linux/drivers/ide
Bartlomiej Zolnierkiewicz f44ae58a27 icside: fix ->speedproc to return on unsupported modes (take 5)
* All other implementations of ->speedproc return zero on success
  and non-zero on failure.  Currently it doesn't matter for icside host
  driver and isn't a bug per se since:

  - ide_set_xfer_rate() return value is ignored by all IDE core users

  - icside doesn't (yet!) use ide_tune_dma() in icside_dma_check()

  but sooner or later we will need to fix anyway - so lets do it now.

* icside_set_speed() happily accepts unsupported transfer modes which
  results in drive->drive_data being set to the maximum value (480)
  and drive->current_speed being set to the unsupported transfer mode.

  Fix it.

v2:
* The initial version of the patch was broken because it didn't take into
  the account (the different from usual) return values of icside_set_speed()
  (Noticed by Russell).

v3:
* Remove no longer needed initialization/checking of cycle_time
  (Noticed by Sergei).

* No need to set drive->drive_data if DMA is not going to be used
  (Noticed by Sergei).

* Remove incorrect setting of drive->current_speed
  (Noticed by Sergei).

* Move ide_config_drive_speed() at the end of icside_set_speed().

v4:
* If DMA mode is not found in icside_dma_check() then just return "-1" and
  don't call icside_set_speed() (v3 got it wrong and "1" was returned instead).

v5:
* Return "-1"/"0" in icside_set_speed() instead of icside_dma_check() return
  value (just like it was before this patch).

Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11 23:54:00 +02:00
..
arm icside: fix ->speedproc to return on unsupported modes (take 5) 2007-10-11 23:54:00 +02:00
cris ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
h8300 ide: add "initializing" argument to ide_register_hw() 2007-05-10 00:01:10 +02:00
legacy ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
mips ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
pci sgiioc4: use ide_tune_dma() 2007-10-11 23:54:00 +02:00
ppc ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
ide-acpi.c ide: hook ACPI _PSx method to IDE power on/off 2007-10-11 23:53:58 +02:00
ide-cd.c [BLOCK] Get rid of request_queue_t typedef 2007-07-24 09:28:11 +02: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: ST320413A has the same problem as ST340823A 2007-09-17 12:35:30 +02:00
ide-dma.c ide: mode limiting fixes for user requested speed changes 2007-10-11 23:53:59 +02:00
ide-floppy.c ide: add support for SCSI ioctls to ide-floppy 2007-07-20 01:11:59 +02:00
ide-generic.c ide: add ide_proc_register_port() 2007-05-10 00:01:11 +02:00
ide-io.c ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
ide-iops.c ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
ide-lib.c ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
ide-pnp.c ide: add "initializing" argument to ide_register_hw() 2007-05-10 00:01:10 +02:00
ide-probe.c ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
ide-proc.c ide: use mutex instead of ide_setting_sem semaphore in IDE driver 2007-07-09 23:17:56 +02:00
ide-tape.c ide: eliminate warnings in ide-tape.c 2007-08-01 23:46:44 +02:00
ide-taskfile.c ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy 2007-07-03 22:28:34 +02:00
ide-timing.h ide: remove ide_find_best_pio_mode() 2007-07-20 01:11:58 +02:00
ide.c ide: add ide_set{_max}_pio() (take 4) 2007-10-11 23:54:00 +02:00
Kconfig ide: Kconfig face-lift 2007-10-11 23:54:00 +02:00
Makefile ide: make /proc/ide/ optional 2007-05-10 00:01:09 +02:00
setup-pci.c ide: fix PCI refcounting 2007-09-11 22:28:34 +02:00