ide-cd: convert to using generic sense request
authorBorislav Petkov <petkovbb@googlemail.com>
Sat, 18 Apr 2009 22:00:42 +0000 (07:00 +0900)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 28 Apr 2009 05:37:30 +0000 (07:37 +0200)
commitc457ce874a0f3dfa3d5e9f2309789f6f34e24325
treebd6a66e463d2360c9a6fbbfbad085935c91c4ddc
parente69d800f7e8797a8e3423380ee9d8ca1cb90c388
ide-cd: convert to using generic sense request

Preallocate a sense request in the ->do_request method and reinitialize
it only on demand, in case it's been consumed in the IRQ handler path.
The reason for this is that we don't want to be mapping rq to bio in
the IRQ path and introduce all kinds of unnecessary hacks to the block
layer.

tj: * Both user and kernel PC requests expect sense data to be stored
      in separate storage other than drive->sense_data.  Copy sense
      data to rq->sense on completion if rq->sense is not NULL.  This
      fixes bogus sense data on PC requests.

As a result, remove cdrom_queue_request_sense.

CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CC: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ide/ide-cd.c
drivers/ide/ide-cd.h