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 9f10d9ee0a
> 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>
This commit is contained in:
parent
5d49c101a1
commit
b348487f0d
1 changed files with 4 additions and 0 deletions
|
@ -457,6 +457,10 @@ int ide_cdrom_packet(struct cdrom_device_info *cdi,
|
|||
layer. the packet must be complete, as we do not
|
||||
touch it at all. */
|
||||
ide_cd_init_rq(drive, &req);
|
||||
|
||||
if (cgc->data_direction == CGC_DATA_WRITE)
|
||||
req.cmd_flags |= REQ_RW;
|
||||
|
||||
memcpy(req.cmd, cgc->cmd, CDROM_PACKET_SIZE);
|
||||
if (cgc->sense)
|
||||
memset(cgc->sense, 0, sizeof(struct request_sense));
|
||||
|
|
Loading…
Reference in a new issue