Commit 5ff0bd88 authored by Jens Axboe's avatar Jens Axboe Committed by James Bottomley

[PATCH] aacraid bad queuecommand return

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.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 48ea62fc
......@@ -894,7 +894,7 @@ int aac_read(struct scsi_cmnd * scsicmd, int cid)
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 * scsicmd, int cid)
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 * scsicmd, int cid)
fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext);
return -1;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment