linux/drivers/ide
Bartlomiej Zolnierkiewicz 3ab7efe8e2 ide: DMA reporting and validity checking fixes (take 3)
* 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-12 23:31:58 +01:00
..
arm ide/arm/icside: fallout from commit 86f3a492bb 2007-10-27 22:18:11 -07:00
cris ide-cris: don't override ide_register_hw() result 2007-11-27 21:35:55 +01:00
h8300 icside: use ec->dma directly 2007-10-20 00:32:32 +02:00
legacy ali14xx: constify __initdata 2007-11-27 21:35:57 +01:00
mips [SG] Update drivers to use sg helpers 2007-10-22 21:19:53 +02:00
pci trm290: remove bogus init_hwif_trm290() comment 2007-11-27 21:35:56 +01:00
ppc drivers/ide: Add missing "space" 2007-11-27 21:35:55 +01:00
ide-acpi.c ide: fix ->data_phase in taskfile_load_raw() 2007-10-20 00:32:37 +02:00
ide-cd.c ide: DMA reporting and validity checking fixes (take 3) 2007-12-12 23:31:58 +01:00
ide-cd.h ide-cd: replace C code with call to ARRAY_SIZE() macro 2007-07-09 23:17:57 +02:00
ide-disk.c ide: DMA reporting and validity checking fixes (take 3) 2007-12-12 23:31:58 +01:00
ide-dma.c ide: DMA reporting and validity checking fixes (take 3) 2007-12-12 23:31:58 +01:00
ide-floppy.c Fixup rq_for_each_segment() indentation 2007-10-10 09:25:56 +02:00
ide-generic.c ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
ide-io.c ide: add missing checks for control register existence 2007-12-12 23:31:57 +01:00
ide-iops.c ide: DMA reporting and validity checking fixes (take 3) 2007-12-12 23:31:58 +01:00
ide-lib.c ide: DMA reporting and validity checking fixes (take 3) 2007-12-12 23:31:58 +01:00
ide-pnp.c icside: use ec->dma directly 2007-10-20 00:32:32 +02:00
ide-probe.c ide: add missing checks for control register existence 2007-12-12 23:31:57 +01:00
ide-proc.c ide: add ide_device_add() 2007-10-20 00:32:31 +02:00
ide-tape.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
ide-taskfile.c ide: add missing #ifdef/#endif CONFIG_IDE_TASK_IOCTL 2007-11-05 21:42:27 +01:00
ide-timing.h ide: remove ide_find_best_pio_mode() 2007-07-20 01:11:58 +02:00
ide.c ide: add /sys/bus/ide/devices/*/{model,firmware,serial} sysfs entries 2007-12-12 23:31:58 +01:00
Kconfig ide: deprecate CONFIG_BLK_DEV_OFFBOARD 2007-12-12 23:31:57 +01:00
Makefile ide: add CONFIG_IDE_H8300 config option 2007-11-27 21:35:54 +01:00
setup-pci.c ide: coding style fixes for drivers/ide/setup-pci.c 2007-12-12 23:31:57 +01:00