ide: use blk_fs_request() check in ide-taskfile.c

Use blk_fs_request() in ide-taskfile.c instead of checking for:
- rq->bio in ide_pio_datablock() and task_error()
- rq->cmd_type == REQ_TYPE_ATA_TASKFILE in task_end_request()

There should be no functional changes caused by this patch.
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 03a2faae
...@@ -268,7 +268,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct request *rq, ...@@ -268,7 +268,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
ide_task_t *task = &drive->hwif->task; ide_task_t *task = &drive->hwif->task;
u8 saved_io_32bit = drive->io_32bit; u8 saved_io_32bit = drive->io_32bit;
if (rq->bio) /* fs request */ if (blk_fs_request(rq))
rq->errors = 0; rq->errors = 0;
if (task->tf_flags & IDE_TFLAG_IO_16BIT) if (task->tf_flags & IDE_TFLAG_IO_16BIT)
...@@ -292,7 +292,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct request *rq, ...@@ -292,7 +292,7 @@ static void ide_pio_datablock(ide_drive_t *drive, struct request *rq,
static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq, static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
const char *s, u8 stat) const char *s, u8 stat)
{ {
if (rq->bio) { if (blk_fs_request(rq)) {
ide_hwif_t *hwif = drive->hwif; ide_hwif_t *hwif = drive->hwif;
ide_task_t *task = &hwif->task; ide_task_t *task = &hwif->task;
int sectors = hwif->nsect - hwif->nleft; int sectors = hwif->nsect - hwif->nleft;
...@@ -323,7 +323,7 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq, ...@@ -323,7 +323,7 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
{ {
if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { if (blk_fs_request(rq) == 0) {
ide_task_t *task = rq->special; ide_task_t *task = rq->special;
u8 err = ide_read_error(drive); u8 err = ide_read_error(drive);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册