mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
scsi: ignore LUN field in the CDB
The LUN field in the CDB is a historical relic. Ignore it as reserved, which is what modern SCSI specifications actually say. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
aba1f02363
commit
1455084ea2
2 changed files with 5 additions and 6 deletions
|
@ -337,9 +337,8 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)
|
|||
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req);
|
||||
int ret;
|
||||
|
||||
if (cmd[0] != REQUEST_SENSE &&
|
||||
(req->lun != s->lun || (cmd[1] >> 5) != s->lun)) {
|
||||
DPRINTF("Unimplemented LUN %d\n", req->lun ? req->lun : cmd[1] >> 5);
|
||||
if (cmd[0] != REQUEST_SENSE && req->lun != s->lun) {
|
||||
DPRINTF("Unimplemented LUN %d\n", req->lun);
|
||||
scsi_set_sense(s, SENSE_CODE(LUN_NOT_SUPPORTED));
|
||||
r->req.status = CHECK_CONDITION;
|
||||
scsi_req_complete(&r->req);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue