aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd_ioctl.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-03-07 15:53:49 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-03-07 15:53:49 -0500
commitb348487f0dc06f09a4c0d9e353eaa66e70230c7d (patch)
treeb5ec8b2cd498621500d06595bec0f0e0dc9fa65c /drivers/ide/ide-cd_ioctl.c
parent5d49c101a126808a38f2a1f4eedc1fd28233e37f (diff)
ide-cd: mark REQ_TYPE_ATA_PC write requests with REQ_RW flag
On Thursday 06 March 2008, walt wrote: > For me, this commit causes the problem it's intended to fix: > > commit 9f10d9ee0ac6d79d7bc8b9a158bf4a29322d84d3 > Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> > Date: Tue Feb 26 21:50:35 2008 +0100 > > ide-cd: fix 'ireason' handling for REQ_TYPE_ATA_PC requests > > This fixes some hangs caused by not finishing the transfer before ending > the request and also makes use of 'ireason == 1' quirk for spurious IRQs. > > When I mount a CD there is a long delay, and I see this error message: > > hdc: ide_cd_check_ireason: wrong transfer direction! > cdrom: failed setting lba address space > hdc: status error: status=0x58 { DriveReady SeekComplete DataRequest } > ide: failed opcode was: unknown > hdc: drive not ready for command > <repeated many times> > > When I revert this commit everything works properly again, including > CD burning. It turned out that REQ_TYPE_ATA_PC write requests were not marked as such (the previous commit assumed them to be). Reported-by: walt <w41ter@gmail.com> Tested-by: walt <w41ter@gmail.com> Reviewed-by: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd_ioctl.c')
-rw-r--r--drivers/ide/ide-cd_ioctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c
index b68284de4e85..6d147ce6782f 100644
--- a/drivers/ide/ide-cd_ioctl.c
+++ b/drivers/ide/ide-cd_ioctl.c
@@ -457,6 +457,10 @@ int ide_cdrom_packet(struct cdrom_device_info *cdi,
457 layer. the packet must be complete, as we do not 457 layer. the packet must be complete, as we do not
458 touch it at all. */ 458 touch it at all. */
459 ide_cd_init_rq(drive, &req); 459 ide_cd_init_rq(drive, &req);
460
461 if (cgc->data_direction == CGC_DATA_WRITE)
462 req.cmd_flags |= REQ_RW;
463
460 memcpy(req.cmd, cgc->cmd, CDROM_PACKET_SIZE); 464 memcpy(req.cmd, cgc->cmd, CDROM_PACKET_SIZE);
461 if (cgc->sense) 465 if (cgc->sense)
462 memset(cgc->sense, 0, sizeof(struct request_sense)); 466 memset(cgc->sense, 0, sizeof(struct request_sense));