aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:32 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:32 +0100
commite3d9a73a83d98fc466dabdcfe4f4e7e4419e3f8e (patch)
tree3a93a8eca3800bafe5aeaf6a469fb3af05739c44 /drivers/ide/ide-taskfile.c
parentide: no need to read Status and Error registers for "empty" taskfile requests (diff)
downloadlinux-dev-e3d9a73a83d98fc466dabdcfe4f4e7e4419e3f8e.tar.xz
linux-dev-e3d9a73a83d98fc466dabdcfe4f4e7e4419e3f8e.zip
ide: remove ->data_phase field from ide_hwif_t
* Always use hwif->task->data_phase and remove ->data_phase field from ide_hwif_t. * Remove superfluous REQ_TYPE_ATA_TASKFILE check from ide_pio_datablock() while at it. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 297cf6f4c723..7237e1547b1f 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -265,21 +265,18 @@ static void ide_pio_multi(ide_drive_t *drive, struct request *rq,
static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
unsigned int write)
{
+ ide_task_t *task = &drive->hwif->task;
u8 saved_io_32bit = drive->io_32bit;
if (rq->bio) /* fs request */
rq->errors = 0;
- if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
- ide_task_t *task = rq->special;
-
- if (task->tf_flags & IDE_TFLAG_IO_16BIT)
- drive->io_32bit = 0;
- }
+ if (task->tf_flags & IDE_TFLAG_IO_16BIT)
+ drive->io_32bit = 0;
touch_softlockup_watchdog();
- switch (drive->hwif->data_phase) {
+ switch (task->data_phase) {
case TASKFILE_MULTI_IN:
case TASKFILE_MULTI_OUT:
ide_pio_multi(drive, rq, write);
@@ -297,9 +294,10 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
{
if (rq->bio) {
ide_hwif_t *hwif = drive->hwif;
+ ide_task_t *task = &hwif->task;
int sectors = hwif->nsect - hwif->nleft;
- switch (hwif->data_phase) {
+ switch (task->data_phase) {
case TASKFILE_IN:
if (hwif->nleft)
break;
@@ -431,14 +429,14 @@ static ide_startstop_t task_out_intr (ide_drive_t *drive)
static ide_startstop_t pre_task_out_intr(ide_drive_t *drive, struct request *rq)
{
- ide_hwif_t *hwif = drive->hwif;
+ ide_task_t *task = &drive->hwif->task;
ide_startstop_t startstop;
if (ide_wait_stat(&startstop, drive, ATA_DRQ,
drive->bad_wstat, WAIT_DRQ)) {
printk(KERN_ERR "%s: no DRQ after issuing %sWRITE%s\n",
drive->name,
- hwif->data_phase == TASKFILE_MULTI_OUT ? "MULT" : "",
+ task->data_phase == TASKFILE_MULTI_OUT ? "MULT" : "",
(drive->dev_flags & IDE_DFLAG_LBA48) ? "_EXT" : "");
return startstop;
}