ide-cd: remove dead post_transform_command()
post_transform_command() call in cdrom_newpc_intr() has no effect because it is done after the request has already been fully completed (rq->bio and rq->data are always NULL). It was verified to be true regardless whether INQUIRY command is using DMA or PIO to transfer data (by using modified Tejun Heo's test-shortsg.c utility and adding a few printk()-s to ide-cd). This was uncovered thanks to the "blk_end_request: full I/O completion handler (take 3)" patch series from Kiyoshi Ueda. Cc: jens.axboe@oracle.com Cc: bharrosh@panasas.com Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com Cc: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: Tejun Heo <htejun@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
3ab7efe8e2
commit
c86ae7df90
@ -1650,31 +1650,6 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void post_transform_command(struct request *req)
|
|
||||||
{
|
|
||||||
u8 *c = req->cmd;
|
|
||||||
char *ibuf;
|
|
||||||
|
|
||||||
if (!blk_pc_request(req))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (req->bio)
|
|
||||||
ibuf = bio_data(req->bio);
|
|
||||||
else
|
|
||||||
ibuf = req->data;
|
|
||||||
|
|
||||||
if (!ibuf)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* set ansi-revision and response data as atapi
|
|
||||||
*/
|
|
||||||
if (c[0] == GPCMD_INQUIRY) {
|
|
||||||
ibuf[2] |= 2;
|
|
||||||
ibuf[3] = (ibuf[3] & 0xf0) | 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef void (xfer_func_t)(ide_drive_t *, void *, u32);
|
typedef void (xfer_func_t)(ide_drive_t *, void *, u32);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1810,9 +1785,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
|
|||||||
return ide_started;
|
return ide_started;
|
||||||
|
|
||||||
end_request:
|
end_request:
|
||||||
if (!rq->data_len)
|
|
||||||
post_transform_command(rq);
|
|
||||||
|
|
||||||
spin_lock_irqsave(&ide_lock, flags);
|
spin_lock_irqsave(&ide_lock, flags);
|
||||||
blkdev_dequeue_request(rq);
|
blkdev_dequeue_request(rq);
|
||||||
end_that_request_last(rq, 1);
|
end_that_request_last(rq, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user