aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-03-24ide: init_irq() doesn't need to hold ide_cfg_mtxBartlomiej Zolnierkiewicz1-4/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24ide: move ->lock and ->timer init from init_irq() to ide_init_port_data()Bartlomiej Zolnierkiewicz1-5/+6
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24ide: no need to touch local IRQs in ide_probe_port()Bartlomiej Zolnierkiewicz1-6/+0
Remove superfluous local_save_flags() local_irq_enable_in_hardirq() ... local_irq_restore() combo. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24ide: fix IDE_DFLAG_NO_IO_32BIT handlingBartlomiej Zolnierkiewicz1-7/+2
* IDE_DFLAG_NO_IO_32BIT may be set by cmd640's ->init_dev method so don't clear it in ide_port_tune_devices() (+ no need to do it). * Move IDE_DFLAG_NO_IO_32BIT handling to ide_port_init_devices(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-05ide: allow to wrap interrupt handlerStanislaw Gruszka1-1/+6
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Andrew Victor <linux@maxim.org.za> [bart: minor checkpatch.pl / CodingStyle fixups] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-02-02IDE: Unregister and disable devices if initialization fails.Ian Campbell1-1/+2
On reboot the loop in device_shutdown gets confused by these partially initialized devices and goes into an infinite loop. Therefore unregister and disable these devices. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> [bart: remove leftover hwif->present clearing + update patch description] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-02-02ide: fix ide_register_port() failure handlingBartlomiej Zolnierkiewicz1-8/+32
* Factor out port freeing from ide_host_free() to ide_free_port(). * Add ide_disable_port() and use it on ide_register_port() failure. Cc: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-19ide: fix IDE PMAC breakageAndreas Schwab1-1/+2
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> writes: > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > --- > drivers/ide/ide-probe.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > Index: b/drivers/ide/ide-probe.c > =================================================================== > --- a/drivers/ide/ide-probe.c > +++ b/drivers/ide/ide-probe.c > @@ -640,14 +640,9 @@ static int ide_register_port(ide_hwif_t > /* register with global device tree */ > dev_set_name(&hwif->gendev, hwif->name); > hwif->gendev.driver_data = hwif; > - if (hwif->gendev.parent == NULL) { > - if (hwif->dev) > - hwif->gendev.parent = hwif->dev; > - else > - /* Would like to do = &device_legacy */ > - hwif->gendev.parent = NULL; > - } > + hwif->gendev.parent = hwif->dev; This [bart: commit 96d40941236722777c259775640b8880b7dc6f33 ("ide: small ide_register_port() cleanup")] breaks ide-pmac. It overwrites the parent that pmac_ide_macio_attach has set. Signed-off-by: Andreas Schwab <schwab@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-14ide: fix accidental LOCKDEP breakage caused by local_irq_set() removalBartlomiej Zolnierkiewicz1-1/+1
commit 54cc1428cfa619e16d75baae8cb041a2eff015f0 ("ide: remove local_irq_set() macro") accidentally replaced local_save_flags() by local_irq_set() in ide_probe_port() and __ide_wait_stat() which resulted in LOCKDEP breakage. Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: move read_sff_dma_status() method to 'struct ide_dma_ops'Sergei Shtylyov1-2/+5
Move apparently misplaced read_sff_dma_status() method from 'struct ide_tp_ops' to 'struct ide_dma_ops', renaming it to dma_sff_read_status() and making only required for SFF-8038i compatible IDE controller drivers (greatly cutting down the number of initializers) as its only user (outside ide-dma-sff.c and such drivers) appears to be ide_pci_check_simplex() which is only called for such controllers... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: fix ide_port_scan() to do ACPI setup after initializing request queuesBartlomiej Zolnierkiewicz1-1/+1
This makes ide_port_scan()'s behavior match ide_host_register()'s one and fixes OOPS in elv_may_queue() during port re-scan. Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: Fix drive's DWORD-IO handlingMario Schwalbe1-2/+1
According the documentation, id[ATA_ID_DWORD_IO] is non-zero if the drive supports dword IO, while the code disables support by setting IDE_DFLAG_NO_IO_32BIT. In addition, this word has been reused by the ATA8 specification. This patch fixes both cases. Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> [bart: remove id[ATA_ID_DWORD_IO] check altogether per Sergei's suggestion] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: add port and host iteratorsBartlomiej Zolnierkiewicz1-58/+38
Add ide_port_for_each_dev() / ide_host_for_each_port() iterators and update IDE code to use them. While at it: - s/unit/i/ variable in ide_port_wait_ready(), ide_probe_port(), ide_port_tune_devices(), ide_port_init_devices_data(), do_reset1(), ide_acpi_set_state() and scc_dma_end() - s/d/i/ variable in ide_proc_port_register_devices() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: dynamic allocation of device structuresBartlomiej Zolnierkiewicz1-20/+51
Allocate device structures dynamically instead of having them embedded in ide_hwif_t: * Remove needless zeroing of port structure from ide_init_port_data(). * Add ide_hwif_t.devices[MAX_DRIVES] (table of pointers to the devices). * Add ide_port_{alloc,free}_devices() helpers and use them respectively in ide_{host,free}_alloc(). * Convert all users of ->drives[] to use ->devices[] instead. While at it: * Use drive->dn for the slave device check in scc_pata.c. As a nice side-effect this patch cuts ~1kB (x86-32) from the resulting code size: text data bss dec hex filename 53963 1244 237 55444 d894 drivers/ide/ide-core.o.before 52981 1244 237 54462 d4be drivers/ide/ide-core.o.after Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: NUMA aware allocation of host and port structuresBartlomiej Zolnierkiewicz1-4/+5
kzalloc() -> kzalloc_node() in ide_host_alloc(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: remove local_irq_set() macroBartlomiej Zolnierkiewicz1-1/+2
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: remove HWIF() macroBartlomiej Zolnierkiewicz1-6/+6
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: move ide_init_port_data() and friends to ide-probe.cBartlomiej Zolnierkiewicz1-0/+135
* Move IDE_DEFAULT_MAX_FAILURES to <linux/ide.h>. * Move ide_cfg_mtx, ide_hwif_to_major[], ide_port_init_devices_data(), ide_init_port_data(), ide_init_port_hw() and ide_unregister() to ide-probe.c from ide.c. * Make ide_unregister(), ide_init_port_data(), ide_init_port_hw() and ide_cfg_mtx static. While at it: * Remove stale ide_init_port_data() documentation and ide_lock extern. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: merge ide_hwgroup_t with ide_hwif_t (v2)Bartlomiej Zolnierkiewicz1-74/+13
* Merge ide_hwgroup_t with ide_hwif_t. * Cleanup init_irq() accordingly, then remove no longer needed ide_remove_port_from_hwgroup() and ide_ports[]. * Remove now unused HWGROUP() macro. While at it: * ide_dump_ata_error() fixups v2: * Fix ->quirk_list check in do_ide_request() (s/hwif->cur_dev/prev_port->cur_dev). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: remove hwgroup->hwif and {drive,hwif}->nextBartlomiej Zolnierkiewicz1-84/+6
* Add 'int port_count' field to ide_hwgroup_t to keep the track of the number of ports in the hwgroup. Then update init_irq() and ide_remove_port_from_hwgroup() to use it. * Remove no longer needed hwgroup->hwif, {drive,hwif}->next, ide_add_drive_to_hwgroup() and ide_remove_drive_from_hwgroup() (hwgroup->drive now only denotes the currently active device in the hwgroup). * Update locking documentation in <linux/ide.h>. While at it: * Rename ->drive field in ide_hwgroup_t to ->cur_dev. * Use __func__ in ide_timer_expiry(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: use per-port IRQ handlersBartlomiej Zolnierkiewicz1-13/+8
Use hwif instead of hwgroup as {request,free}_irq()'s cookie, teach ide_intr() to return early for non-active serialized ports, modify unexpected_intr() accordingly and then use per-port IRQ handlers instead of per-hwgroup ones. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: remove the last ide-scsi remnantsBorislav Petkov1-2/+0
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: use per-device request queue locks (v2)Bartlomiej Zolnierkiewicz1-2/+1
* Move hack for flush requests from choose_drive() to do_ide_request(). * Add ide_plug_device() helper and convert core IDE code from using per-hwgroup lock as a request lock to use the ->queue_lock instead. * Remove no longer needed: - choose_drive() function - WAKEUP() macro - 'sleeping' flag from ide_hwif_t - 'service_{start,time}' fields from ide_drive_t This patch results in much simpler and more maintainable code (besides being a scalability improvement). v2: * Fixes/improvements based on review from Elias: - take as many requests off the queue as possible - remove now redundant BUG_ON() Cc: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: move sysfs support to ide-sysfs.cBartlomiej Zolnierkiewicz1-52/+0
While at it: - media_string() -> ide_media_string() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: factor out device type classifying from do_identify()Bartlomiej Zolnierkiewicz1-73/+81
Factor out device type classifying from do_identify() to ide_classify_ata_dev() and ide_classify_atapi_dev(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: small ide_register_port() cleanupBartlomiej Zolnierkiewicz1-7/+2
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: remove chipset type fixup from ide_host_register()Bartlomiej Zolnierkiewicz1-3/+0
* Set chipset type explicitly in tx4938ide and tx4939ide host drivers (all other host drivers were updated already). * Remove no longer used chipset type fixup from ide_host_register(). Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: push local_irq_{save,restore}() to do_identify()Bartlomiej Zolnierkiewicz1-7/+4
Push local_irq_{save,restore}() from actual_try_to_identify() to do_identify() and remove no longer needed local_irq_enable(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: move legacy ISA/VLB ports handling to ide-legacy.c (v2)Bartlomiej Zolnierkiewicz1-56/+0
* Move legacy ISA/VLB ports handling from ide-probe.c to ide-legacy.c. * Add CONFIG_IDE_LEGACY config option to be selected by host drivers needing ide-legacy.c. v2: Fix CONFIG_IDE_LEGACY not being defined in Kconfig. (from Takashi Iwai <tiwai@suse.de>) There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: remove inline tags from ide-probe.cBartlomiej Zolnierkiewicz1-4/+4
Let the compiler handle it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers1-2/+2
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: rework handling of serialized ports (v2)Bartlomiej Zolnierkiewicz1-45/+5
* hpt366: set IDE_HFLAG_SERIALIZE in ->host_flags if needed in init_hwif_hpt366(). Remove HPT_SERIALIZE_IO while at it. * Set IDE_HFLAG_SERIALIZE in ->host_flags if needed in ide_init_port(). * Convert init_irq() to use IDE_HFLAG_SERIALIZE together with hwif->host to find out ports which need to be serialized. * Remove no longer needed save_match() and ide_hwif_t.serialized. v2: * Set host's ->host_flags field instead of port's copy. This patch should fix the incorrect grouping of port(s) from host(s) that need serialization with port(s) that happen to use the same IRQ(s) but are from the host(s) that don't need it. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: add ->max_sectors field to struct ide_port_infoBartlomiej Zolnierkiewicz1-2/+2
* Add ->max_sectors field to struct ide_port_info to allow host drivers to specify value used for hwif->rqsize (if smaller than the default). * Convert pdc202xx_old to use ->max_sectors and remove no longer needed IDE_HFLAG_RQSIZE_256 flag. There should be no functional changes caused by this patch. Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: always set nIEN on idle devicesBartlomiej Zolnierkiewicz1-3/+1
* Set nIEN for previous port/device in ide_do_request() also if port uses a non-shared IRQ. * Remove no longer needed ide_hwif_t.sharing_irq. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29cmd64x: set IDE_HFLAG_SERIALIZE explictly for CMD646Bartlomiej Zolnierkiewicz1-1/+1
* Set IDE_HFLAG_SERIALIZE explictly for CMD646. * Remove no longer needed ide_cmd646 chipset type (which has a nice side-effect of fixing handling of unexpected IRQs). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ali14xx: doesn't use shared IRQsBartlomiej Zolnierkiewicz1-2/+1
init_irq() shouldn't use IRQF_SHARED for ali14xx IDE IRQ handler. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: replace the global ide_lock spinlock by per-hwgroup spinlocks (v2)Bartlomiej Zolnierkiewicz1-11/+15
Now that (almost) all host drivers have been fixed not to abuse ide_lock and core code usage of ide_lock has been sanitized we may safely replace ide_lock by per-hwgroup locks. This patch is partially based on earlier patch from Ravikiran G Thirumalai. While at it: - don't use deprecated HWIF() and HWGROUP() macros - update locking documentation in ide.h v2: Add missing spin_lock_init(&hwgroup->lock). (Noticed by Elias Oltmanns) Cc: Vaibhav V. Nivargi <vaibhav.nivargi@gmail.com> Cc: Alok N. Kataria <alokk@calsoftinc.com> Cc: Shai Fultheim <shai@scalex86.org> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Cc: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-02amd74xx: workaround unreliable AltStatus register for nVidia controllersBartlomiej Zolnierkiewicz1-1/+2
It seems that on some nVidia controllers using AltStatus register can be unreliable so default to Status register if the PCI device is in Compatibility Mode. In order to achieve this: * Add ide_pci_is_in_compatibility_mode() inline helper to <linux/ide.h>. * Add IDE_HFLAG_BROKEN_ALTSTATUS host flag and set it in amd74xx host driver for nVidia controllers in Compatibility Mode. * Teach actual_try_to_identify() and drive_is_ready() about the new flag. This fixes the regression caused by removal of CONFIG_IDEPCI_SHARE_IRQ config option in 2.6.25 and using AltStatus register unconditionally when available (kernel.org bugs #11659 and #10216). [ Moreover for CONFIG_IDEPCI_SHARE_IRQ=y (which is what most people and distributions use) it never worked correctly. ] Thanks to Remy LABENE and Lars Winterfeld for help with debugging the problem. More info at: http://bugzilla.kernel.org/show_bug.cgi?id=11659 http://bugzilla.kernel.org/show_bug.cgi?id=10216 Reported-by: Remy LABENE <remy.labene@free.fr> Tested-by: Remy LABENE <remy.labene@free.fr> Tested-by: Lars Winterfeld <lars.winterfeld@tu-ilmenau.de> Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17ide: remove IDE_AFLAG_NO_DOORLOCKINGBartlomiej Zolnierkiewicz1-0/+1
Just use IDE_DFLAG_DOORLOCKING instead. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-16device create: ide: convert device_create_drvdata to device_createGreg Kroah-Hartman1-2/+2
Now that device_create() has been audited, rename things back to the original call to be sane. Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-13ide: Implement disk shock protection support (v4)Elias Oltmanns1-0/+5
On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD FEATURE as specified in ATA-7 is issued to the device and processing of the request queue is stopped thereafter until the specified timeout expires or user space asks to resume normal operation. This is supposed to prevent the heads of a hard drive from accidentally crashing onto the platter when a heavy shock is anticipated (like a falling laptop expected to hit the floor). Port resets are deferred whenever a device on that port is in the parked state. v3: Elias Oltmanns <eo@nebensachen.de> wrote: [...] > >> 1. Make sure that no negative value is being passed to > >> jiffies_to_msecs() in ide_park_show(). > >> 2. Drop the superfluous variable hwif in ide_special_rq(). > >> 3. Skip initialisation of task and tf in ide_special_rq() if we are not > >> handling a (un)park request. > > > > Well, #3 should have been done differently because we donn't want to > > check for REQ_(UN)?PARK_HEADS more often than is necessary. > > While preparing the backport to 2.6.27, it has just occurred to me that > we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset() > because this flag must not be set after *any* sort of access to the > device. v4: Fix a memory leak due to a missing blk_put_request() in issue_park_cmd(). Additionally, we should plug the queue when enqueueing the unpark request because there is no guarantee that the park timeout has not expired by then. Even though the chance for that to happen is very slim, the request might end up hanging in the queue until the next I/O operation is queued up. While at it, clean up the code a little: - make issue_park_cmd() a function of type void since nobody cares for the return value anyway; - use blk_start_queueing() instead of __blk_run_queue() since we don't have to worry about recursion; - remove a superfluous pointer deference in task_no_data_intr(). Signed-off-by: Elias Oltmanns <eo@nebensachen.de> Cc: Jeff Garzik <jeff@garzik.org>, Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: Two fixes regarding memory allocationElias Oltmanns1-5/+15
In function ide_devset_execute() we should use __GFP_WAIT rather than GFP_KERNEL. Also, the allocation cannot possibly fail at that point. More importantly, there is a potential memory leak in the device probing code. The infrastructure seems rather complex and I hope I haven't messed anything up by trying to fix this. Signed-off-by: Elias Oltmanns <eo@nebensachen.de> [bart: remove superfluous ide_lock taking] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: set IDE_AFLAG_DRQ_INTERRUPT in do_identify()Bartlomiej Zolnierkiewicz1-0/+2
Set IDE_AFLAG_DRQ_INTERRUPT in do_identify() instead of ATAPI device drivers *_setup() methods. While at it: - use ata_id_cdb_intr() There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: remove ide_host_alloc_all()Bartlomiej Zolnierkiewicz1-22/+9
* Remove no longer used ide_host_alloc_all(). * Add MAX_HOST_PORTS define and use it instead of MAX_HWIFS as the maximum number of host ports possible. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: remove [ata_]select_tBartlomiej Zolnierkiewicz1-2/+2
* Use 'drive->dn & 1' in ide_init_disk(). * remove [ata_]select_t. While at it: * Use ATA_DEVICE_OBS define in ide_port_init_devices_data(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: use 'drive->dn & 1' instead of drive->select.b.unitBartlomiej Zolnierkiewicz1-12/+14
* Call ide_port_init_devices() in ide_host_register() also if 'struct ide_port_info *d' is not available. * Init drive->dn in ide_port_init_devices() instead of ide_probe_port() so it is valid also in ->init_dev. * Pass device number to ide_dev_apply_params(). * Use 'drive->dn & 1' instead of drive->select.b.unit. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: add device flagsBartlomiej Zolnierkiewicz1-48/+56
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields to IDE_DFLAG_* flags. While at it: - IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48 - fixup some comments - remove needless g->flags zeroing from ide*_probe() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: remove unnecessary MAX_HWIFS checks from ide-probe.cBartlomiej Zolnierkiewicz1-16/+9
MAX_HWIFS is now always equal to the number of IDE major numbers. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-10ide: add proper PCI PM support (v2)Bartlomiej Zolnierkiewicz1-1/+3
* Keep pointer to ->init_chipset method also in struct ide_host and set it in ide_host_alloc_all(). * Add ide_pci_suspend() and ide_pci_resume() helpers (default ->suspend and ->resume implementations). * ->init_chipset can no longer be marked __devinit. * Add proper PCI PM support to IDE PCI host drivers (rz1000.c and tc86c001.c are skipped for now since they need to be converted from using ->init_hwif to use ->init_chipset instead). v2: * Cleanup CONFIG_PM #ifdef-s per akpm's suggestion. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-10ide: use ata_id_is_cfa()Bartlomiej Zolnierkiewicz1-8/+6
Use ata_id_is_cfa() in do_identify() instead of open-coding check for CompactFlash devices (the inline helper also takes care of detecting CFs advertising themselves as ATA disks). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>