Explorar o código

[PATCH] ide-cd: only set rq->errors SCSI style for block pc requests

We should only set ->errors to CHECK_CONDITION and so on for requests
that use this field in the SCSI manner.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jens Axboe %!s(int64=18) %!d(string=hai) anos
pai
achega
b715673129
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/ide/ide-cd.c

+ 1 - 1
drivers/ide/ide-cd.c

@@ -724,7 +724,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
 		 * if we have an error, pass back CHECK_CONDITION as the
 		 * if we have an error, pass back CHECK_CONDITION as the
 		 * scsi status byte
 		 * scsi status byte
 		 */
 		 */
-		if (!rq->errors)
+		if (blk_pc_request(rq) && !rq->errors)
 			rq->errors = SAM_STAT_CHECK_CONDITION;
 			rq->errors = SAM_STAT_CHECK_CONDITION;
 
 
 		/* Check for tray open. */
 		/* Check for tray open. */