aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd_ioctl.c
diff options
context:
space:
mode:
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));