Skip to contentSkip to conversation

aacraid bad queuecommand return

PATCH New Jens Axboe 1 participant 1 message Nov 19, 2004

Subsystems (2)
lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

PATCH 1/1 aacraid bad queuecommand return

Hi,

aac_read() and aac_write() may complete a command but return -1, which is propagated through aac_scsi_cmd() to the mid layer through ->queuecommand. If the command has been completed, it must return 0.

===== drivers/scsi/aacraid/aachba.c 1.29 vs edited =====

drivers/scsi/aacraid/aachba.c +3 -3
@@ -894,7 +894,7 @@ int aac_read(struct scsi_cmnd * scsicmd,
 	aac_io_done(scsicmd);
 	fib_complete(cmd_fibcontext);
 	fib_free(cmd_fibcontext);
-	return -1;
+	return 0;
 }
 
 static int aac_write(struct scsi_cmnd * scsicmd, int cid)
@@ -928,7 +928,7 @@ static int aac_write(struct scsi_cmnd * 
 	if (!(cmd_fibcontext = fib_alloc(dev))) {
 		scsicmd->result = DID_ERROR << 16;
 		aac_io_done(scsicmd);
-		return -1;
+		return 0;
 	}
 	fib_init(cmd_fibcontext);
 
@@ -1004,7 +1004,7 @@ static int aac_write(struct scsi_cmnd * 
 
 	fib_complete(cmd_fibcontext);
 	fib_free(cmd_fibcontext);
-	return -1;
+	return 0;
 }
 
 
Signature · 1 line
Jens Axboe