dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

421 Commits

Author SHA1 Message Date
Bartlomiej Zolnierkiewicz ebdab07dad ide: move sysfs support to ide-sysfs.c
While at it:
- media_string() -> ide_media_string()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02 16:12:48 +01:00
Bartlomiej Zolnierkiewicz e2984c628c ide: move Power Management support to ide-pm.c
There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:37 +01:00
Bartlomiej Zolnierkiewicz 702c026be8 ide: rework handling of serialized ports (v2)
* hpt366: set IDE_HFLAG_SERIALIZE in ->host_flags if needed
  in init_hwif_hpt366().  Remove HPT_SERIALIZE_IO while at it.

* Set IDE_HFLAG_SERIALIZE in ->host_flags if needed in
  ide_init_port().

* Convert init_irq() to use IDE_HFLAG_SERIALIZE together with
  hwif->host to find out ports which need to be serialized.

* Remove no longer needed save_match() and ide_hwif_t.serialized.

v2:
* Set host's ->host_flags field instead of port's copy.

This patch should fix the incorrect grouping of port(s) from
host(s) that need serialization with port(s) that happen to use
the same IRQ(s) but are from the host(s) that don't need it.

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:36 +01:00
Bartlomiej Zolnierkiewicz b7876a6fb6 cy82c693: remove superfluous ide_cy82c693 chipset type
Since CY82C693 doesn't require serialization we may as well
use the default ide_pci chipset type.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:34 +01:00
Bartlomiej Zolnierkiewicz 1f66019bdf trm290: add IDE_HFLAG_TRM290 host flag
* Add IDE_HFLAG_TRM290 host flag and use it in ide_build_dmatable().

* Remove no longer needed ide_trm290 chipset type.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:34 +01:00
Bartlomiej Zolnierkiewicz 6b4924962c ide: add ->max_sectors field to struct ide_port_info
* Add ->max_sectors field to struct ide_port_info to allow host drivers
  to specify value used for hwif->rqsize (if smaller than the default).

* Convert pdc202xx_old to use ->max_sectors and remove no longer needed
  IDE_HFLAG_RQSIZE_256 flag.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:34 +01:00
Bartlomiej Zolnierkiewicz 7f1ac8c4b9 rz1000: apply chipset quirks early (v2)
* Use pci_name(dev) instead of hwif->name in init_hwif_rz1000().

* init_hwif_rz1000() -> rz1000_init_chipset().  Update rz1000_init_one()
  to use rz1000_init_chipset() and add now required rz1000_remove().

* Remove superfluous ide_rz1000 chipset type.

v2:
* unsigned int rz1000_init_chipset() -> int rz1000_disable_readahead()
  per Sergei's suggestion.

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:33 +01:00
Bartlomiej Zolnierkiewicz f58c1ab8de ide: always set nIEN on idle devices
* Set nIEN for previous port/device in ide_do_request()
  also if port uses a non-shared IRQ.

* Remove no longer needed ide_hwif_t.sharing_irq.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:33 +01:00
Bartlomiej Zolnierkiewicz 6b5cde3629 cmd64x: set IDE_HFLAG_SERIALIZE explictly for CMD646
* Set IDE_HFLAG_SERIALIZE explictly for CMD646.

* Remove no longer needed ide_cmd646 chipset type (which has
  a nice side-effect of fixing handling of unexpected IRQs).

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:32 +01:00
Bartlomiej Zolnierkiewicz 27c01c2db0 ide-cd: remove obsolete seek optimization
It doesn't make much sense nowadays and is problematic on some drives.

Cc: Borislav Petkov <petkovbb@googlemail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:32 +01:00
Bartlomiej Zolnierkiewicz 2a2ca6a961 ide: replace the global ide_lock spinlock by per-hwgroup spinlocks (v2)
Now that (almost) all host drivers have been fixed not to abuse ide_lock
and core code usage of ide_lock has been sanitized we may safely replace
ide_lock by per-hwgroup locks.

This patch is partially based on earlier patch from Ravikiran G Thirumalai.

While at it:
- don't use deprecated HWIF() and HWGROUP() macros
- update locking documentation in ide.h

v2:
Add missing spin_lock_init(&hwgroup->lock).  (Noticed by Elias Oltmanns)

Cc: Vaibhav V. Nivargi <vaibhav.nivargi@gmail.com>
Cc: Alok N. Kataria <alokk@calsoftinc.com>
Cc: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29 20:27:31 +01:00
Bartlomiej Zolnierkiewicz 6636487e8d amd74xx: workaround unreliable AltStatus register for nVidia controllers
It seems that on some nVidia controllers using AltStatus register
can be unreliable so default to Status register if the PCI device
is in Compatibility Mode.  In order to achieve this:

* Add ide_pci_is_in_compatibility_mode() inline helper to <linux/ide.h>.

* Add IDE_HFLAG_BROKEN_ALTSTATUS host flag and set it in amd74xx host
  driver for nVidia controllers in Compatibility Mode.

* Teach actual_try_to_identify() and drive_is_ready() about the new flag.

This fixes the regression caused by removal of CONFIG_IDEPCI_SHARE_IRQ
config option in 2.6.25 and using AltStatus register unconditionally when
available (kernel.org bugs #11659 and #10216).

[ Moreover for CONFIG_IDEPCI_SHARE_IRQ=y (which is what most people
  and distributions use) it never worked correctly. ]

Thanks to Remy LABENE and Lars Winterfeld for help with debugging the problem.

More info at:
http://bugzilla.kernel.org/show_bug.cgi?id=11659
http://bugzilla.kernel.org/show_bug.cgi?id=10216

Reported-by: Remy LABENE <remy.labene@free.fr>
Tested-by: Remy LABENE <remy.labene@free.fr>
Tested-by: Lars Winterfeld <lars.winterfeld@tu-ilmenau.de>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-02 20:40:03 +01:00
Al Viro badf8082c3 [PATCH] switch ide_disk_ops ->ioctl() to sane prototype
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-10-21 07:47:30 -04:00
Al Viro 1bddd9e645 [PATCH] lose the unused file argument in generic_ide_ioctl()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-10-21 07:47:16 -04:00
Bartlomiej Zolnierkiewicz 806f80a6fc ide: add generic ATA/ATAPI disk driver
* Add struct ide_disk_ops containing protocol specific methods.

* Add 'struct ide_disk_ops *' to ide_drive_t.

* Convert ide-{disk,floppy} drivers to use struct ide_disk_ops.

* Merge ide-{disk,floppy} drivers into generic ide-gd driver.

While at it:
- ide_disk_init_capacity() -> ide_disk_get_capacity()

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17 18:09:14 +02:00
Bartlomiej Zolnierkiewicz 79cb380397 ide: allow device drivers to specify per-device type /proc settings
Turn ide_driver_t's 'proc' field into ->proc_entries method
(and also 'settings' field into ->proc_devsets method).  Then
update all device drivers accordingly.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17 18:09:13 +02:00
Bartlomiej Zolnierkiewicz 42619d35c7 ide: remove IDE_AFLAG_NO_DOORLOCKING
Just use IDE_DFLAG_DOORLOCKING instead.

There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17 18:09:11 +02:00
Bartlomiej Zolnierkiewicz e01286282e ide: IDE_AFLAG_FORMAT_IN_PROGRESS -> IDE_DFLAG_FORMAT_IN_PROGRESS
There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17 18:09:11 +02:00
Bartlomiej Zolnierkiewicz da167876bd ide: IDE_AFLAG_WP -> IDE_DFLAG_WP
There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17 18:09:11 +02:00
Bartlomiej Zolnierkiewicz fe11edfaab ide: IDE_AFLAG_MEDIA_CHANGED -> IDE_DFLAG_MEDIA_CHANGED
There should be no functional changes caused by this patch.

Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-17 18:09:11 +02:00
Elias Oltmanns 4abdc6ee7c ide: Implement disk shock protection support (v4)
On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
FEATURE as specified in ATA-7 is issued to the device and processing of
the request queue is stopped thereafter until the specified timeout
expires or user space asks to resume normal operation. This is supposed
to prevent the heads of a hard drive from accidentally crashing onto the
platter when a heavy shock is anticipated (like a falling laptop expected
to hit the floor). Port resets are deferred whenever a device on that
port is in the parked state.

v3:
Elias Oltmanns <eo@nebensachen.de> wrote:
[...]
> >> 1. Make sure that no negative value is being passed to
> >>    jiffies_to_msecs() in ide_park_show().
> >> 2. Drop the superfluous variable hwif in ide_special_rq().
> >> 3. Skip initialisation of task and tf in ide_special_rq() if we are not
> >>    handling a (un)park request.
> >
> > Well, #3 should have been done differently because we donn't want to
> > check for REQ_(UN)?PARK_HEADS more often than is necessary.
> 
> While preparing the backport to 2.6.27, it has just occurred to me that
> we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset()
> because this flag must not be set after *any* sort of access to the
> device.

v4:
Fix a memory leak due to a missing blk_put_request() in
issue_park_cmd(). Additionally, we should plug the queue when enqueueing
the unpark request because there is no guarantee that the park timeout
has not expired by then. Even though the chance for that to happen is
very slim, the request might end up hanging in the queue until the next
I/O operation is queued up. While at it, clean up the code a little:
- make issue_park_cmd() a function of type void since nobody cares for
  the return value anyway;
- use blk_start_queueing() instead of __blk_run_queue() since we don't
  have to worry about recursion;
- remove a superfluous pointer deference in task_no_data_intr().

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Cc: Jeff Garzik <jeff@garzik.org>,
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:50 +02:00
Borislav Petkov 0a9b6f8864 ide: add ide_drive_t.dma flag
This flag is to accomodate ide-cd functionality into ide atapi.

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>
2008-10-13 21:39:49 +02:00
Bartlomiej Zolnierkiewicz 2dbe7e919e ide: move SFF DMA code to ide-dma-sff.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:47 +02:00
Bartlomiej Zolnierkiewicz 2bbd57cad3 ide: switch to DMA-mapping API part #2
Follow-up to commit 5c05ff68b9
("ide: switch to DMA-mapping API"):

* pci_{alloc,free}_consistent() -> dma_{alloc,free}_coherent()
  in ide_{allocate,release}_dma_engine().

* Add ->prd_max_nents and ->prd_ent_size fields to ide_hwif_t
  (+ set default values in ide_allocate_dma_engine()).

* Make ide_{allocate,release}_dma_engine() available also
  for CONFIG_BLK_DEV_IDEDMA_SFF=n.  Then convert au1xxx-ide.c,
  scc_pata.c and sgiioc4.c to use them.

* Add missing ->init_dma method to scc_pata.

This patch also fixes:
- ->dmatable_cpu leak for au1xxx-ide
- too early realease of ->dmatable_cpu for scc_pata
- wrong amount of ->dmatable_cpu memory being freed for sgiioc4

While at it:
- remove superfluous ->dma_base check from ide_unregister()
- return -ENOMEM on error in ide_release_dma_engine()
- beautify error message in ide_release_dma_engine()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:47 +02:00
Bartlomiej Zolnierkiewicz ffa15a6915 ide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
Make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
and convert {ics,au1xxx-}ide.c to use it.

While at it:
- dump ATA Status register content on error
- use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:46 +02:00
Bartlomiej Zolnierkiewicz de23ec9ca8 ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
Make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
and convert {ics,au1xxx-}ide.c to use it.

While at it:
- use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:46 +02:00
Bartlomiej Zolnierkiewicz 653bcf5292 ide: __ide_dma_end() -> ide_dma_end()
While at it:
- use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:46 +02:00
Bartlomiej Zolnierkiewicz f87904898e ide-disk: move all ioctl handling to ide-disk_ioctl.c
While at it:
- idedisk_ioctl() -> ide_disk_ioctl()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:45 +02:00
Bartlomiej Zolnierkiewicz a36223b0dc ide: remove ide_host_alloc_all()
* Remove no longer used ide_host_alloc_all().

* Add MAX_HOST_PORTS define and use it instead of MAX_HWIFS
  as the maximum number of host ports possible.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:43 +02:00
Bartlomiej Zolnierkiewicz bfa7d8e55f ide: ->ide_dma_clear_irq() -> ->clear_irq()
* Rename ->ide_dma_clear_irq method to ->clear_irq
  and move it from ide_hwif_t to struct ide_port_ops.

* Move ->waiting_for_dma check inside ->clear_irq method.

* Move ->dma_base check inside ->clear_irq method.

piix.c:
* Add ich_port_ops and remove init_hwif_ich() wrapper.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:42 +02:00
Bartlomiej Zolnierkiewicz d6ff9f64e6 ide: merge all TASKFILE_NO_DATA data phase handlers into taskfile_no_intr()
* Add 'struct task_s' to ide_hwif_t and init it to the current command
  in do_rw_taskfile().

* Merge all TASKFILE_NO_DATA data phase handlers into taskfile_no_intr().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:41 +02:00
Bartlomiej Zolnierkiewicz 6982daf71c ide: convert 'pio_mode' device setting to use DS_SYNC flag
* Convert 'pio_mode' device setting to use DS_SYNC flag.

* Remove unused special_t.b.{set_tune,serviced} and ide_drive_t.tune_req.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:40 +02:00
Bartlomiej Zolnierkiewicz 7f612f272a ide: remove [ata_]select_t
* Use 'drive->dn & 1' in ide_init_disk().

* remove [ata_]select_t.

While at it:

* Use ATA_DEVICE_OBS define in ide_port_init_devices_data().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:40 +02:00
Bartlomiej Zolnierkiewicz 0d346ba073 ide: sanitize ide*_pm_* enums
* Move ide*_pm_* enums from ide-io.c to <linux/ide.h>.

* idedisk_pm_* -> ide_pm_*

* ide_pm_state_* -> ide_pm_*

* No need to set ide_pm_* enums to the fixed values.

* Uppercase ide_pm_* enums.

* Fix/update comments.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:38 +02:00
Bartlomiej Zolnierkiewicz d1d76714e2 ide: fix HDIO_DRIVE_TASK[FILE] ioctls for CHS commands on LBA devices
Add IDE_DFLAG_LBA device flag and use it instead of ->select.b.lba.

Since ->tf_load uses ->select.all for ATA Device/Head register this
fixes HDIO_DRIVE_TASK[FILE] ioctls for CHS commands on LBA devices.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:38 +02:00
Bartlomiej Zolnierkiewicz e4634d4ef0 ide: remove superfluous ->dma field from ide_hwif_t
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:37 +02:00
Bartlomiej Zolnierkiewicz 0ae4b3199a ide: remove superfluous ->media field from ide_driver_t
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:37 +02:00
Bartlomiej Zolnierkiewicz c39220483e ide: DMA_PIO_RETRY -> IDE_DFLAG_DMA_PIO_RETRY
Add IDE_DFLAG_DMA_PIO_RETRY and use it instead of
ide_drive_t.state + DMA_PIO_RETRY.

There should be no functional changes cause by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:37 +02:00
Bartlomiej Zolnierkiewicz 97100fc816 ide: add device flags
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
to IDE_DFLAG_* flags.

While at it:
- IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48
- fixup some comments
- remove needless g->flags zeroing from ide*_probe()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:36 +02:00
Bartlomiej Zolnierkiewicz 35c1375312 ide-disk: set_addressing() fixes
* Return -EIO if arg > 0 and LBA48 is unsupported.

* No need to reset ->addressing.

* Make ->addressing a single bit flag.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:36 +02:00
Borislav Petkov e1c7c4641a ide: add a driver-wide debugging macro
Add __ide_debug_log() debugging macro which is controlled by drive->debug_mask.
The macro has to have the macro DRV_NAME defined in each driver before use.
Also, add different debugging levels depending on the functionality debugged.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:35 +02:00
Borislav Petkov b22b2ca4ff ide: add drive->debug_mask switch
Add a debugging on/off switch for controlling driver debugging
messages dynamically.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:34 +02:00
Borislav Petkov 5aeddf907f ide: unify conversion macros
Introduce to_ide_drv() and ide_drv_g() macros and replace the respective
definitions of similar ones in each driver.

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>
2008-10-13 21:39:34 +02:00
Bartlomiej Zolnierkiewicz baf08f0be6 ide: make ide_transfer_pc() static
* Move ->ticks field from struct ide_floppy_obj to ide_drive_t.

* Move idefloppy_transfer_pc() to ide-atapi.c and make
  ide_transfer_pc() use it.

* Always use ide_transfer_pc as a handler in ide_issue_pc().

* Remove no longer used idefloppy_start_pc_transfer(),
  ide*_transfer_pc() and 'handler' argument from ide_issue_pc().

* Make ide_transfer_pc() static.

While at it:

* idefloppy_transfer_pc() -> ide_delayed_transfer_pc()

* IDEFLOPPY_TICKS_DELAY -> IDEFLOPPY_PC_DELAY

* ->ticks -> ->pc_delay

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:32 +02:00
Bartlomiej Zolnierkiewicz aa5d2de7b0 ide: make ide_pc_intr() static
* Always use ide_pc_intr as a handler in ide_pc_intr().

* Remove no longer used ide*_pc_intr() and 'handler'
  argument from ide_{transfer_pc,pc_intr}().

* Make ide_pc_intr() static.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:32 +02:00
Bartlomiej Zolnierkiewicz 85e39035ca ide: add ->pc_{update,io}_buffers methods
Add ->pc_{update,io}_buffers methods to ide_drive_t and use
them instead of {update,io}_buffers ide_pc_intr() arguments.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:32 +02:00
Bartlomiej Zolnierkiewicz 6b0da28b2d ide: add ide_retry_pc() helper
* Add ide_create_request_sense_cmd() and ide_retry_pc() helpers
  and convert ide-{atapi,floppy,tape}.c to use them.

* Remove no longer used ide*_create_request_sense_cmd(),
  ide*_retry_pc() and 'retry_pc' argument from ide_pc_intr().

* Make ide_queue_pc_head() static.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:32 +02:00
Bartlomiej Zolnierkiewicz 67c56364df ide: add request_sense_{pc,rq} to ide_drive_t
Add 'struct ide_atapi_pc request_sense_pc' and 'request request_sense_rq' to
ide_drive_t and use them instead of fields in struct ide_{floppy,tape}_obj.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:31 +02:00
Bartlomiej Zolnierkiewicz 844b946852 ide: drop 'timeout' and 'expiry' arguments from ide_pc_intr()
* Move idescsi_expiry() to ide-atapi.c.

* Move get_timeout() to <linux/ide.h>.

* Drop 'timeout' and 'expiry' arguments from ide_pc_intr().

While at it:

* idescsi_expiry() -> ide_scsi_expiry()

* get_timeout() -> ide_scsi_get_timeout()

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:31 +02:00
Bartlomiej Zolnierkiewicz 2b9efba482 ide: add pointer to the current packet command to ide_drive_t
* Add pointer to the current packet command (struct ide_atapi_pc *pc)
  to ide_drive_t and use it instead of the pointer in struct ide_*_obj.

* Use drive->pc in ide_{issue,transfer}_pc() and ide_pc_intr()
  instead of 'pc' argument.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13 21:39:31 +02:00