aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:58 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:58 -0500
commitc86ae7df90a26708e9e54e3a362046873d874e6c (patch)
tree824d363274ed7c8a0502f1b606b3a5a910de72f2 /drivers
parent3ab7efe8e2cbcca2d401b43cfcc2fa9a7dac2299 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-cd.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index db9abd83d959..92ac658dac33 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1650,31 +1650,6 @@ static int cdrom_write_check_ireason(ide_drive_t *drive, int len, int ireason)
1650 return 1; 1650 return 1;
1651} 1651}
1652 1652
1653static void post_transform_command(struct request *req)
1654{
1655 u8 *c = req->cmd;
1656 char *ibuf;
1657
1658 if (!blk_pc_request(req))
1659 return;
1660
1661 if (req->bio)
1662 ibuf = bio_data(req->bio);
1663 else
1664 ibuf = req->data;
1665
1666 if (!ibuf)
1667 return;
1668
1669 /*
1670 * set ansi-revision and response data as atapi
1671 */
1672 if (c[0] == GPCMD_INQUIRY) {
1673 ibuf[2] |= 2;
1674 ibuf[3] = (ibuf[3] & 0xf0) | 2;
1675 }
1676}
1677
1678typedef void (xfer_func_t)(ide_drive_t *, void *, u32); 1653typedef void (xfer_func_t)(ide_drive_t *, void *, u32);
1679 1654
1680/* 1655/*
@@ -1810,9 +1785,6 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
1810 return ide_started; 1785 return ide_started;
1811 1786
1812end_request: 1787end_request:
1813 if (!rq->data_len)
1814 post_transform_command(rq);
1815
1816 spin_lock_irqsave(&ide_lock, flags); 1788 spin_lock_irqsave(&ide_lock, flags);
1817 blkdev_dequeue_request(rq); 1789 blkdev_dequeue_request(rq);
1818 end_that_request_last(rq, 1); 1790 end_that_request_last(rq, 1);