aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
Commit message (Collapse)AuthorAge
* hpt366: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | | Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* hpt34x: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide/pci/generic: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* cy82c693: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | | | Fix the refcounting for dev2 while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* cs5535: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* cs5530: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* cmd64x: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | | Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* atiixp: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* amd74xx: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* alim15x3: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* aec62xx: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_pci_remove() helperBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | | | | | * Add 'unsigned long host_flags' field to struct ide_host. * Set ->host_flags in ide_host_alloc_all(). * Always set PCI dev's ->driver_data in ide_pci_init_{one,two}(). * Add ide_pci_remove() helper (the default implementation for struct pci_driver's ->remove method). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* via82cxxx: cleanup ->init_chipset methodBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | | * Move the boot message and via_clock setup from init_chipset_via82cxxx() to via_init_one(). * Set vdev->via_config in via_init_one() and cleanup init_chipset_via82cxxx() accordingly. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* cmd64x: cleanup ->init_chipset methodBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | Remove verbose reporting for CMD646 (PCI device revision is always logged by IDE PCI layer). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* amd74xx: cleanup ->init_chipset methodBartlomiej Zolnierkiewicz2008-07-24
| | | | | | Move amd_clock setup from init_chipset_amd74xx() to amd74xx_probe(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tc86c001: remove ->init_chipset methodBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | | | | * Reserve PCI BAR 5 in tc86c001_init_one() and remove no longer needed init_chipset_tc86c001(). While at it: * Add & use DRV_NAME define. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* via82cxxx: convert to use ->host_privBartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* siimage: convert to use ->host_privBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | While at it: * Reserve PCI BAR 5 in siimage_init_one() and remove no longer needed setup_mmio_siimage(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* sc1200: convert to use ->host_privBartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* it821x: convert to use ->host_privBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | | While at it: * Allocate both struct it821x_dev instances at once. * Don't leak itdevs on ide_pci_init_one() failure. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* hpt366: convert to use ->host_privBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | While at it: * Allocate both struct hpt_info instances at once. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* aec62xx: convert to use ->host_privBartlomiej Zolnierkiewicz2008-07-24
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_device_{get,put}() helpersBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | | | | * Add 'struct ide_host *host' field to ide_hwif_t and set it in ide_host_alloc_all(). * Add ide_device_{get,put}() helpers loosely based on SCSI's scsi_device_{get,put}() ones. * Convert IDE device drivers to use ide_device_{get,put}(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ->dev and ->host_priv fields to struct ide_hostBartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | | | | | | | | | * Add 'struct device *dev[2]' and 'void *host_priv' fields to struct ide_host. * Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s](). * Pass 'void *priv' argument to ide_setup_pci_device[s]() and use it to set ->host_priv. * Set PCI dev's ->driver_data to point to the struct ide_host instance if PCI host driver wants to use ->host_priv. * Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: call ide_pci_setup_ports() before do_ide_setup_pci_device()Bartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | | | * Call ide_pci_setup_ports() before do_ide_setup_pci_device() in ide_setup_pci_device[s](). While at it: * Remove stale FIXMEs. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move ide_setup_pci_controller() call to ide_setup_pci_device[s]()Bartlomiej Zolnierkiewicz2008-07-24
| | | | | | There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: respect dev->irq in do_ide_setup_pci_device() also if 'tried_config'Bartlomiej Zolnierkiewicz2008-07-24
| | | | | | | | | * If device is in the PCI native mode respect dev->irq regardless of 'tried_config' in do_ide_setup_pci_device(). * Drop no longer needed 'config' argument from ide_setup_pci_controller(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: always call ->init_chipset method in do_ide_setup_pci_device()Bartlomiej Zolnierkiewicz2008-07-24
| | | | | | Call ->init_chipset method also for 'tried_config' / '!pciirq' conditions. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: small whitespace fixesPavel Machek2008-07-23
| | | | | | | Small whitespace fixes for drivers/ide. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: ide-cd_ioctl.c fix sparse integer as NULL pointer warningsHarvey Harrison2008-07-23
| | | | | | | | | | | | | | | The function ide_cd_queue_pc should be checked as the bufflen arg is dereferenced and lots of callers are passing in NULL. drivers/ide/ide-cd_ioctl.c:124:46: warning: Using plain integer as NULL pointer drivers/ide/ide-cd_ioctl.c:149:47: warning: Using plain integer as NULL pointer drivers/ide/ide-cd_ioctl.c:231:46: warning: Using plain integer as NULL pointer drivers/ide/ide-cd_ioctl.c:374:46: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: ide-cd.c fix sparse endianness warningsHarvey Harrison2008-07-23
| | | | | | | | | | | | | | | | drivers/ide/ide-cd.c:1276:46: warning: Using plain integer as NULL pointer drivers/ide/ide-cd.c:1298:19: warning: cast to restricted __be32 drivers/ide/ide-cd.c:1300:4: warning: cast to restricted __be32 drivers/ide/ide-cd.c:1522:14: warning: cast to restricted __le16 drivers/ide/ide-cd.c:1523:14: warning: cast to restricted __le16 drivers/ide/ide-cd.c:1525:14: warning: cast to restricted __be16 drivers/ide/ide-cd.c:1526:14: warning: cast to restricted __be16 drivers/ide/ide-cd.c:1667:37: warning: cast to restricted __be16 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: convert to using the new atapi_flagsBorislav Petkov2008-07-23
| | | | | | | | | There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove unused PC_FLAG_DRQ_INTERRUPTBorislav Petkov2008-07-23
| | | | | | | There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: convert to using the new atapi_flagsBorislav Petkov2008-07-23
| | | | | | | | | There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: convert to using the new atapi_flags (take 2)Borislav Petkov2008-07-23
| | | | | | | | | | | | | | | while at it, remove PC_FLAG_ZIP_DRIVE from the packed command flags altogether and query the drive type through drive->atapi_flags. v2: ide-floppy fix. There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use rq->cmd instead of pc->c in atapi common codeBorislav Petkov2008-07-23
| | | | | | | | | There should be no functionality change resulting from this patch. [bart: s/HWGROUP(drive)/hwif->hwgroup/] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: pass packet command in rq->cmdBorislav Petkov2008-07-23
| | | | | | | | | | | Make a redundant copy of the packet command bits into rq->cmd. Later, after all drivers have been converted, it'll be switched to use that in the common code instead of pc->c. While at it, simplify ide_tape_create_rw_cmd. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: make room for packet command ids in rq->cmdBorislav Petkov2008-07-23
| | | | | | | | | | ide-tape uses rq->cmd for special commands from the chrdev interface so move those to byte 13 (BLK_MAX_CDB = 16) since a packet cmd is max 12 bytes. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: pass packet command in rq->cmdBorislav Petkov2008-07-23
| | | | | | | | | | | Make a redundant copy of the packet command bits into rq->cmd. Later, after all drivers have been converted, it'll be switched to use that in the common code instead of pc->c. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-scsi: use drive->pc_callback instead of pc->callbackBorislav Petkov2008-07-23
| | | | | | | There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: use drive->pc_callback instead of pc->callbackBorislav Petkov2008-07-23
| | | | | | | | | | The if-else block in the IRQ handler is only temporary so that bisect searches don't break and it'll be removed after converting the remainder of the drivers. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: use drive->pc_callback instead of pc->callbackBorislav Petkov2008-07-23
| | | | | | | | | | | | | | | It is important that drive->pc_callback is set prior to enabling IRQs on the device since this is called from the IRQ handler. Otherwise it hurts as I learnt the hard way from the several "Kernel panic - not synching: Fatal exception in interrupt" during the weekend :). The if-else block in the IRQ handler is only temporary so that bisect searches don't break and it'll be removed after converting the remainder of the drivers. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* drivers/ide/ide-tape.c: remove double kfreeDarren Jenkins2008-07-23
| | | | | | | | | | | | | | Coverity CID: 2336 USE_AFTER_FREE drivers/ide/ide-tape.c ide_tape_kfree_buffer() double free's a pointer (hint freed by an alias in first outer loop). This patch simply removes the superfluous kfree(). Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom> Acked-by: Borislav Petkov <petkovbb@gmail.com> Cc: gadio@netvision.net.il Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_host_free() helper (take 2)Bartlomiej Zolnierkiewicz2008-07-23
| | | | | | | | | | | | | | | | | | | * Add ide_host_free() helper and convert ide_host_remove() to use it. * Fix handling of ide_host_register() failure in ide_host_add(), icside.c, ide-generic.c, falconide.c and sgiioc4.c. While at it: * Fix handling of ide_host_alloc_all() failure in ide-generic.c. * Fix handling of ide_host_alloc() failure in falconide.c (also return the correct error value if no device is found). v2: * falconide build fix. (From Stephen Rothwell) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: allocate ide_hwif_t instances dynamicallyBartlomiej Zolnierkiewicz2008-07-23
| | | | | | | | | | | | | | * Allocate ide_hwif_t instances dynamically and remove ide_hwifs[]. This cuts almost ~14kB from ide-probe.o (x86-32, MAX_HWIFS == 10): text data bss dec hex filename 9140 40 14084 23264 5ae0 drivers/ide/ide-probe.o.before 9169 40 44 9253 2425 drivers/ide/ide-probe.o.after * Remove no longer needed ide_init_port_data() call from ide_unregister(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_ports[]Bartlomiej Zolnierkiewicz2008-07-23
| | | | | | | | | | | | * Add ide_ports[] table keeping pointers to all initialized ports. * Set ide_ports[] entry for a given port in init_irq() and clear it ide_remove_port_from_hwgroup(). * Convert init_irq() to use ide_ports[] instead of ide_hwifs[] for grouping ports into hwgroup. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move ide_remove_port_from_hwgroup() to ide-probe.cBartlomiej Zolnierkiewicz2008-07-23
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix IDE port slots reservation and freeing (take 2)Bartlomiej Zolnierkiewicz2008-07-23
| | | | | | | | | | | | | | | | | | | | | * Make ide_find_port_slot() return port slot index. * Add ide_free_port_slot() helper. * Move ide_init_port_data() call and error printk() from ide_find_port_slot() to ide_host_alloc_all(). * Make ide_{find,free}_port_slot() take ide_cfg_mtx mutex and convert them use ide_indexes bitmap to keep track of reserved port slots. * Don't set hwif->chipset in ide_host_alloc_all() as it is no longer necessary. v2: * Pass the correct slot index to ide_init_port_data(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix ide_host_register() return valueBartlomiej Zolnierkiewicz2008-07-23
| | | | | | | | | | | | Fix ide_host_register() to fail only if all ports cannot be registered. While at it: * Use host->ports[] instead of ide_hwifs[] and remove idx[]. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_host_add() helperBartlomiej Zolnierkiewicz2008-07-23
| | | | | | | | | | | | | | | | | | | | Add ide_host_add() helper which does ide_host_alloc()+ide_host_register(), then convert ide_setup_pci_device[s](), ide_legacy_device_add() and some host drivers to use it. While at it: * Fix ide_setup_pci_device[s](), ide_arm.c, gayle.c, ide-4drives.c, macide.c, q40ide.c, cmd640.c and cs5520.c to return correct error value. * -ENOENT -> -ENOMEM in rapide.c, ide-h8300.c, ide-generic.c, au1xxx-ide.c and pmac.c * -ENODEV -> -ENOMEM in palm_bk3710.c, ide_platform.c and delkin_cb.c * -1 -> -ENOMEM in ide-pnp.c Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>