ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE
PATCH 14/20 ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILE
Based on the previous work by Tejun Heo.
There should be no functionality changes caused by this patch.
--- drivers/ide/ide-disk.c | 4 +++- drivers/ide/ide-taskfile.c | 2 +- drivers/ide/ide.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/ide/ide-disk.c +3 -1
@@ -620,8 +620,10 @@ static int set_multcount(ide_drive_t *drif (drive->special.b.set_multmode)return -EBUSY ; +ide_init_drive_cmd (&rq); - rq.cmd_type =REQ_TYPE_ATA_CMD ; + rq.cmd_type =REQ_TYPE_ATA_TASKFILE ; + drive->mult_req = arg; drive->special.b.set_multmode =1 ; (void )ide_do_drive_cmd (drive, &rq, ide_wait);
drivers/ide/ide-taskfile.c +1 -1
@@ -782,7 +782,7 @@ int ide_cmd_ioctl (ide_drive_t *drive, ustruct request rq;ide_init_drive_cmd (&rq); - rq.cmd_type =REQ_TYPE_ATA_CMD ; + rq.cmd_type =REQ_TYPE_ATA_TASKFILE ;return ide_do_drive_cmd (drive, &rq, ide_wait); }
drivers/ide/ide.c +1 -1
@@ -876,7 +876,7 @@ int set_pio_mode(ide_drive_t *drive, intreturn -EBUSY ;ide_init_drive_cmd (&rq); - rq.cmd_type =REQ_TYPE_ATA_CMD ; + rq.cmd_type =REQ_TYPE_ATA_TASKFILE ; drive->tune_req = (u8 ) arg; drive->special.b.set_tune =1 ;
Quoted 3 lines · Bartlomiej Zolnierkiewicz
Based on the previous work by Tejun Heo.
There should be no functionality changes caused by this patch.
I didn't get the point. Why do you consider them "empty"?
Quoted 37 lines
Cc Tejun Heo <[email protected]>Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Index:
b/drivers/ide/ide-disk.c
===================================================================drivers/ide/ide-disk.c +3
-1@@ -620,8 +620,10 @@ static int set_multcount(ide_drive_t *drif (drive->special.b.set_multmode)return -EBUSY ; +ide_init_drive_cmd (&rq); - rq.cmd_type =REQ_TYPE_ATA_CMD ; + rq.cmd_type =REQ_TYPE_ATA_TASKFILE ; + drive->mult_req = arg; drive->special.b.set_multmode =1 ; (void )ide_do_drive_cmd (drive, &rq, ide_wait);Index:
b/drivers/ide/ide-taskfile.c
===================================================================drivers/ide/ide-taskfile.c +1
-1@@ -782,7 +782,7 @@ int ide_cmd_ioctl (ide_drive_t *drive, ustruct request rq;ide_init_drive_cmd (&rq); - rq.cmd_type =REQ_TYPE_ATA_CMD ; + rq.cmd_type =REQ_TYPE_ATA_TASKFILE ;return ide_do_drive_cmd (drive, &rq, ide_wait); }Index:
b/drivers/ide/ide.c
===================================================================
drivers/ide/ide.c int set_pio_mode(ide_drive_t *drive, int · line 882
Quoted 8 lines
drivers/ide/ide.c +1
-1@@ -876,7 +876,7 @@ int set_pio_mode(ide_drive_t *drive, intreturn -EBUSY ;ide_init_drive_cmd (&rq); - rq.cmd_type =REQ_TYPE_ATA_CMD ; + rq.cmd_type =REQ_TYPE_ATA_TASKFILE ; drive->tune_req = (u8 ) arg; drive->special.b.set_tune =1 ;
MBR, Sergei
Quoted 7 lines · Sergei Shtylyov
Quoted 3 lines · Bartlomiej Zolnierkiewicz
Based on the previous work by Tejun Heo.
There should be no functionality changes caused by this patch.
I didn't get the point. Why do you consider them "empty"?
These requests don't have command buffer (in case of REQ_TYPE_ATA_CMD) or ide_task_t (REQ_ATA_TYPE_ATA_TASKFILE) attached to them.
[ Please see execute_drive_cmd() for details. ]
Bart