aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide
AgeCommit message (Collapse)Author
2007-12-12ide: fix ->io_32bit race in set_io_32bit()Bartlomiej Zolnierkiewicz
set_io_32bit() (ide_procset_t function) can race against running PIO transfers. Fix it by using ide_spin_wait_hwgroup(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: remove stale changelog from ide-probe.cBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: remove stale changelog from ide-disk.cBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: remove dead code from __ide_dma_test_irq()Bartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12hpt366: fix HPT37x PIO mode timings (take 2)Sergei Shtylyov
After looking into the HPT370 manual (now that I have it) and re-checking all the timing tables, here's what I have discovered: - at 33 MHz clock, PIO mode 0 timings turned to be overclocked, and all other PIO modes underclocked; - at 50 MHz clock, PIO modes 0 to 2 turned to be overclocked; - at 66 MHz clock, PIO mode 0 was overclocked too. Finally, the taskfile timing (matching PIO mode 0) turned to be overclocked at all clock frequencies (and in all manuals)... The new timings have been tested on HPT370 chip (at 33 MHz PCI clock) and on HPT371N chip (at both 50 and 66 MHz DPLL clock). Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12pdc202xx_new: fix Promise TX4 supportBartlomiej Zolnierkiewicz
In case of Promise TX4 the first PCI device is located at slot 1 and the second one is at slot 2 so the offset used by pci_get_slot() should be "+1" and not "+2". Thanks goes out to Markus Dietz for bugreport and testing this patch. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide-cd: remove dead post_transform_command()Bartlomiej Zolnierkiewicz
post_transform_command() call in cdrom_newpc_intr() has no effect because it is done after the request has already been fully completed (rq->bio and rq->data are always NULL). It was verified to be true regardless whether INQUIRY command is using DMA or PIO to transfer data (by using modified Tejun Heo's test-shortsg.c utility and adding a few printk()-s to ide-cd). This was uncovered thanks to the "blk_end_request: full I/O completion handler (take 3)" patch series from Kiyoshi Ueda. Cc: jens.axboe@oracle.com Cc: bharrosh@panasas.com Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: Tejun Heo <htejun@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: DMA reporting and validity checking fixes (take 3)Bartlomiej Zolnierkiewicz
* ide_xfer_verbose() fixups: - beautify returned mode names - fix PIO5 reporting - make it return 'const char *' * Change printk() level from KERN_DEBUG to KERN_INFO in ide_find_dma_mode(). * Add ide_id_dma_bug() helper based on ide_dma_verbose() to check for invalid DMA info in identify block. * Use ide_id_dma_bug() in ide_tune_dma() and ide_driveid_update(). As a result DMA won't be tuned or will be disabled after tuning if device reports inconsistent info about enabled DMA mode (ide_dma_verbose() does the same checks while the IDE device is probed by ide-{cd,disk} device driver). * Remove no longer needed ide_dma_verbose(). This patch should fix the following problem with out-of-sync IDE messages reported by Nick Warne: hdd: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache<7>hdd: skipping word 93 validity check , UDMA(66) and later debugged by Mark Lord to be caused by: ide_dma_verbose() printk( ... "2048kB Cache"); eighty_ninty_three() printk(KERN_DEBUG "%s: skipping word 93 validity check\n"); ide_dma_verbose() printk(", UDMA(66)" Please note that as a result ide-{cd,disk} device drivers won't report the DMA speed used but this is intended since now DMA mode being used is always reported by IDE core code. v2: * fixes suggested by Randy: - use KERN_CONT for printk()-s in ide-{cd,disk}.c - don't remove argument name from ide_xfer_verbose() declaration v3: * Remove incorrect check for (id->field_valid & 1) from ide_id_dma_bug() (spotted by Sergei). * "XFER SLOW" -> "PIO SLOW" in ide_xfer_verbose() (suggested by Sergei). * Fix ide_find_dma_mode() to report the correct mode ('mode' after being limited by 'req_mode'). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Nick Warne <nick@ukfsn.org> Cc: Mark Lord <lkml@rtr.ca> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: add /sys/bus/ide/devices/*/{model,firmware,serial} sysfs entriesBartlomiej Zolnierkiewicz
Cc: Dan Kegel <dank@kegel.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Xavier Bestel <xavier.bestel@free.fr> Cc: Andrey Borzenkov <arvidjaar@mail.ru> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: coding style fixes for drivers/ide/setup-pci.cBartlomiej Zolnierkiewicz
* remove trailing whitespaces * 'if()' -> 'if ()' * remove extra new-line before EXPORT_SYMBOL_GPL() * add extra new-line after 'id' definition * respect 80-columns limit There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: fix ide_scan_pcibus() error messageBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: deprecate CONFIG_BLK_DEV_OFFBOARDBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-12-12ide: add missing checks for control register existenceBartlomiej Zolnierkiewicz
Add missing checks for control register existence (some legacy m68k specific IDE controllers don't have it). Also use drive->ctl while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide: More TSST drives with broken cable detectionPeter Missel
Add more TSST (Toshiba/Samsung) drives to the 'broken cable detection' blacklist. Signed-off-by: Peter Missel (peter.missel@onlinehome.de) Cc: Alan Cox <alan@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ali14xx: constify __initdataBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide: remove bogus ide_fix_driveid() commentBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27trm290: remove bogus init_hwif_trm290() commentBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27piix: add HP compaq laptop to short cable listBartlomiej Zolnierkiewicz
Port of Jeff's libata commit 54174db300ee1bac632d62e4ac37fe02e47d1f18 ("[libata] ata_piix: add HP compaq laptop to short cable list"). Cc: Jeff Garzik <jeff@garzik.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27alim15x3: add Mitac 8317 and derivatives to ali_cable_override()Bartlomiej Zolnierkiewicz
Port of Alan's patch for pata_ali.c. Cc: Alan Cox <alan@redhat.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide: add TORiSAN model: CD-ROM CDR_U200 fw: 1.09 to DMA blacklistBartlomiej Zolnierkiewicz
Based on the report from snowbat@gmail.com. Fixes kernel bugzilla bug #9195. Tested-by: snowbat@gmail.com Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27amd74xx: arm hackAndrew Morton
drivers/ide/pci/amd74xx.c: In function `init_hwif_amd74xx': drivers/ide/pci/amd74xx.c:387: error: implicit declaration of function `pci_get_legacy_ide_irq' Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27drivers/ide: Add missing "space"Joe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide-cris: don't override ide_register_hw() resultBartlomiej Zolnierkiewicz
* Don't override ide_register_hw() result and check if there is a hwif available to use. * MAX_HWIFS is user configurable nowadays so replace it by hard-coded value. * Remove the comment about ide_hwifs[]. Acked-by: Mikael Starvik <starvik@axis.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide: move CONFIG_IDE_ETRAX to drivers/ide/KconfigBartlomiej Zolnierkiewicz
* Move ETRAX_IDE and friends from arch/cris/arch-{v10,v32}/drivers/Kconfig to drivers/ide/Kconfig. * Don't force selecting ide-disk and ide-cd device drivers (please handle this through defconfig if necessary). * Make ETRAX_IDE depend on BROKEN for the time being (it doesn't even compile currently). Cc: Mikael Starvik <starvik@axis.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide: add CONFIG_IDE_H8300 config optionBartlomiej Zolnierkiewicz
Add a separate config option for ide-8300 host driver instead of depending on CONFIG_H8300. This change is a preparation for the future changes and also allows ide-h8300 to be disabled if needed. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide/Kconfig: fix mpc8xx host driver dependenciesBartlomiej Zolnierkiewicz
Only LWMON, IVMS8, IVML24 and TQM8xxL platforms have the needed defines (IDE0_BASE_OFFSET and friends) in the platform header file. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27macide/q40ide: add missing __init tag to {macide,q40ide}_init()Bartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27aec62xx: Fix kernel oops in driver's probe functionAleksandar Radovanovic
Add pci_enable_device() to aec62xx probe function before doing any I/O. Original probe function tries to read from device's PCI region 4 before calling ide_setup_pci_device(). Since the device is not enabled at this point, on machines that have no firmware PCI initialization (e.g. ASUS WL-700gE router), corresponding PCI BAR is 0 and the following inb() causes a kernel oops. Signed-off-by: Aleksandar Radovanovic <biblbroks@sezampro.yu> Cc: Linus Torvalds <torvalds@linux-foundation.org>, Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide: skip ide_wait_not_busy() on noprobe-disksJonas Stare
There is a problem in some hardware where the kernel will stall for 35 seconds waiting for disks that don't exist. This patch will skip waiting for the BSY-bit on IDE drives to go away if you set "hdx=noprobe" as a kernel option and the disk is not marked as 'present' (like when you set the geometry by hand). If no noprobe-option is set the code will work (more or less) as the original but if set the code will skip the ide_wait_not_busy() for that drive. Even if there would be a drive there and it is still busy afterwards it should not matter since it isn't probed for later. The code also honors the MAX_DRIVES variable instead of assuming that there will be two harddrives on the bus. Bart: minor cleanups Signed-off-by: Jonas Stare <jonas.stare@purplescout.se> CC: Andrew Morton <akpm@linux-foundation.org>, Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27siimage: remove resetproc() methodSergei Shtylyov
The intent behind siimage_reset() was probably to hard reset the interface and the SATA PHY but as the code writes to two reserved bits instead, it obviously has been ineffective from the start. So, just remove it. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27ide: don't set PIO mode on pre-EIDE drivesSergei Shtylyov
Fix handling of the PIO modes for the pre-EIDE drives that did not support the PIO Flow Control Transfer Mode value (00001 nnn) of the Set Transfer Mode feature by skipping the actual mode programming. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27sis5513.c: Add Packard Bell EasyNote K5305 to laptopsGabriel Craciunescu
With newer kernels HDD in my old laptop is limited to UDMA 33. With this patch I get UDMA 100 again. Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: remove stale/incorrect comment from setup-pci.cBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13it821x/jmicron: fix return value of {it821x,jmicron}_init_one()Bartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: don't BUG() on unsupported transfer modesBartlomiej Zolnierkiewicz
Fix ide-cris, cs5530, sc1200 and sis5513 host drivers to just return instead of OOPS-ing for unsupported modes in ->set_dma_mode methods. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: use drive->select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd()Bartlomiej Zolnierkiewicz
Use drive->select.all for REQ_TYPE_ATA_TASK requests in execute_drive_cmd() (the obsolete bits 7 and 5 of the Device register need to be set). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: add missing HOB bit clearing to ide_dump_ata_status()Bartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide-pmac: skip conservative PIO "downgrade"Bartlomiej Zolnierkiewicz
We can skip conservative PIO "downgrade" (PIO3 becomes PIO2 etc.) on PMAC. Problem reported by Mikael. Cc: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: BLK_DEV_IDECD help: remove outdated noteAdrian Bunk
LILO version 16 was released on 26-02-1995 (sic), so telling people to not use older versions no longer has any value. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13cmd64x: don't clear the other channel's interruptSergei Shtylyov
Make sure to not clear the other IDE channel's interrupt when clearing an IDE interrupt via the MRDMODE register. Thanks to Bart for finding a coding mistake. Bart: This fixes regression from commit 66602c83dcb6a5d82772d88ae7a32cd4a1213528 ("cmd64x: use interrupt status from MRDMODE register (take 2)"). Extra thanks to Martin for reporting and bisecting the issue. From: Sergei Shtylyov <sshtylyov@ru.mvista.com> Tested-by: Martin Rogge <marogge@onlinehome.de> Tested-by: Milan Kocian <milon@wq.cz> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: fix IDE_HFLAG_NO_ATAPI_DMA handling in config_drive_for_dma()Bartlomiej Zolnierkiewicz
commit 33c1002ed912ac9dacedd5d5b166da3b72d18460 incorrectly changed return value from '0' to '-1', fix it (ns87415 was the only host driver affected since it uses both IDE_HFLAG_TRUST_BIOS_FOR_DMA and IDE_HFLAG_NO_ATAPI_DMA). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: move ide_fixstring() documentation to ide-iops.c from ide.hBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: add missing #ifdef/#endif CONFIG_IDE_TASK_IOCTLBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: fix ide_find_dma_mode() to print human-readable infoBartlomiej Zolnierkiewicz
Problem reported by Mikael. Cc: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: add missing rq.ref_count initialization to ide_diag_taskfile()Bartlomiej Zolnierkiewicz
Noticed by Tejun Heo. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: clear HOB bit for REQ_TYPE_ATA_TASK requests in ide_end_drive_cmd()Bartlomiej Zolnierkiewicz
ide_dump_ata_status() may set HOB bit before ide_end_drive_cmd() is called. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: check rq->cmd_type in drive_cmd_intr()Bartlomiej Zolnierkiewicz
drive_cmd_intr() is used by both REQ_TYPE_ATA_CMD and REQ_TYPE_ATA_TASK but commands using PIO-in protocol are valid only for REQ_TYPE_ATA_CMD (&args[4] in case of REQ_TYPE_ATA_TASK points to a value for IDE_LCYL_REG register instead of the data buffer). This fix allows REQ_TYPE_ATA_TASK commands to use non-zero values for IDE_SECTOR_REG (args[3]). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide/Kconfig: fix BLK_DEV_OFFBOARD dependenciesBartlomiej Zolnierkiewicz
This config option is effective only for host drivers that use IDE_HFLAG_OFF_BOARD host flag (aec62xx, generic, hpt34x, hpt366, pdc202xx_new, pdc202xx_old and tc86c001). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide: unexport ide_fix_driveidAdrian Bunk
ide_fix_driveid can now be unexported. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-05ide/Kconfig: add IDEDISK_MULTI_MODE text adapted from hdparm manual pageMatti Linnanvuori
Add IDEDISK_MULTI_MODE text adapted from hdparm manual page. Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>