linux-stable/drivers
Bartlomiej Zolnierkiewicz 88b2b32bab ide: move ide_config_drive_speed() calls to upper layers (take 2)
* Convert {ide_hwif_t,ide_pci_device_t}->host_flag to be u16.

* Add IDE_HFLAG_POST_SET_MODE host flag to indicate the need to program 
  the host for the transfer mode after programming the device.  Set it
  in au1xxx-ide, amd74xx, cs5530, cs5535, pdc202xx_new, sc1200, pmac
  and via82cxxx host drivers.

* Add IDE_HFLAG_NO_SET_MODE host flag to indicate the need to completely
  skip programming of host/device for the transfer mode ("smart" hosts).
  Set it in it821x host driver and check it in ide_tune_dma().

* Add ide_set_pio_mode()/ide_set_dma_mode() helpers and convert all
  direct ->set_pio_mode/->speedproc users to use these helpers.

* Move ide_config_drive_speed() calls from ->set_pio_mode/->speedproc
  methods to callers.

* Rename ->speedproc method to ->set_dma_mode, make it void and update
  all implementations accordingly.

* Update ide_set_xfer_rate() comments.

* Unexport ide_config_drive_speed().

v2:
* Fix issues noticed by Sergei:
  - export ide_set_dma_mode() instead of moving ->set_pio_mode abuse wrt
    to setting DMA modes from sc1200_set_pio_mode() to do_special()
  - check IDE_HFLAG_NO_SET_MODE in ide_tune_dma()
  - check for (hwif->set_pio_mode) == NULL in ide_set_pio_mode()
  - check for (hwif->set_dma_mode) == NULL in ide_set_dma_mode()
  - return -1 from ide_set_{pio,dma}_mode() if ->set_{pio,dma}_mode == NULL
  - don't set ->set_{pio,dma}_mode on it821x in "smart" mode
  - fix build problem in pmac.c
  - minor fixes in au1xxx-ide.c/cs5530.c/siimage.c
  - improve patch description

Changes in behavior caused by this patch:
- HDIO_SET_PIO_MODE ioctl would now return -ENOSYS for attempts to change
  PIO mode if it821x controller is in "smart" mode
- removal of two debugging printk-s (from cs5530.c and sc1200.c)
- transfer modes 0x00-0x07 passed from user space may be programmed twice on
  the device (not really an issue since 0x00 is not supported correctly by
  any host driver ATM, 0x01 is not supported at all and 0x02-0x07 are invalid)

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13 17:47:51 +02:00
..
acorn/char
acpi Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-10-12 15:49:37 -07:00
amba Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ata [libata] struct pci_dev related cleanups 2007-10-12 14:55:47 -04:00
atm [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
auxdisplay
base PM: merge device power-management source files 2007-10-12 14:51:12 -07:00
block [S390] Remove obsolete recommendation for 8M ramdisk size. 2007-10-12 16:13:09 +02:00
bluetooth
cdrom [POWERPC] iSeries: Move detection of virtual cdroms 2007-10-11 20:40:47 +10:00
char PTY: add kernel parameter to overwrite legacy pty count 2007-10-12 14:51:09 -07:00
clocksource
connector [NET]: make netlink user -> kernel interface synchronious 2007-10-10 21:15:29 -07:00
cpufreq Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-10-12 15:49:37 -07:00
crypto [CRYPTO] sha: Add header file for SHA definitions 2007-10-10 16:55:50 -07:00
dio
dma
edac Drivers: clean up direct setting of the name of a kset 2007-10-12 14:51:02 -07:00
eisa Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
fc4
firewire Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
firmware Driver core: rename ktype_edd and ktype_efivar 2007-10-12 14:51:12 -07:00
hid
hwmon
i2c Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ide ide: move ide_config_drive_speed() calls to upper layers (take 2) 2007-10-13 17:47:51 +02:00
ieee1394 Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
infiniband Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
input Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-10-12 15:49:37 -07:00
isdn Merge branch 'isdn-cleanups' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6 2007-10-12 15:03:35 -07:00
kvm
leds leds: Update Cobalt Qube series front LED support 2007-10-11 22:24:00 +01:00
lguest
macintosh
mca
md kobjects: fix up improper use of the kobject name field 2007-10-12 14:51:02 -07:00
media cdev: remove unneeded setting of cdev names 2007-10-12 14:51:02 -07:00
message [NET]: Nuke SET_MODULE_OWNER macro. 2007-10-10 16:51:13 -07:00
mfd
misc Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
mmc Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-10-12 15:49:37 -07:00
mtd
net Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-10-12 15:49:37 -07:00
nubus
of
oprofile
parisc [NET]: Make the device list and device lookups per namespace. 2007-10-10 16:49:10 -07:00
parport
pci Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-10-12 15:50:23 -07:00
pcmcia Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
pnp
power Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ps3
rapidio
rtc
s390 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-10-12 15:49:37 -07:00
sbus
scsi Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2007-10-12 16:16:41 -07:00
serial Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-10-11 21:55:47 -07:00
sh
sn
spi Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
ssb [SSB]: Sparse fixes. 2007-10-10 16:52:21 -07:00
tc
telephony
uio
usb Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-10-12 15:49:37 -07:00
video Convert from class_device to device for drivers/video 2007-10-12 14:51:04 -07:00
w1 Driver core: change add_uevent_var to use a struct 2007-10-12 14:51:01 -07:00
xen
zorro
Kconfig [SSB]: add Sonics Silicon Backplane bus support 2007-10-10 16:51:36 -07:00
Makefile [SSB]: add Sonics Silicon Backplane bus support 2007-10-10 16:51:36 -07:00