Revision 1455084e
b/hw/scsi-disk.c | ||
---|---|---|
518 | 518 |
|
519 | 519 |
memset(outbuf, 0, buflen); |
520 | 520 |
|
521 |
if (req->lun || req->cmd.buf[1] >> 5) {
|
|
521 |
if (req->lun) { |
|
522 | 522 |
outbuf[0] = 0x7f; /* LUN not supported */ |
523 | 523 |
return buflen; |
524 | 524 |
} |
... | ... | |
1024 | 1024 |
} |
1025 | 1025 |
#endif |
1026 | 1026 |
|
1027 |
if (req->lun || buf[1] >> 5) {
|
|
1027 |
if (req->lun) { |
|
1028 | 1028 |
/* Only LUN 0 supported. */ |
1029 |
DPRINTF("Unimplemented LUN %d\n", req->lun ? req->lun : buf[1] >> 5);
|
|
1029 |
DPRINTF("Unimplemented LUN %d\n", req->lun); |
|
1030 | 1030 |
if (command != REQUEST_SENSE && command != INQUIRY) { |
1031 | 1031 |
scsi_command_complete(r, CHECK_CONDITION, |
1032 | 1032 |
SENSE_CODE(LUN_NOT_SUPPORTED)); |
b/hw/scsi-generic.c | ||
---|---|---|
337 | 337 |
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req); |
338 | 338 |
int ret; |
339 | 339 |
|
340 |
if (cmd[0] != REQUEST_SENSE && |
|
341 |
(req->lun != s->lun || (cmd[1] >> 5) != s->lun)) { |
|
342 |
DPRINTF("Unimplemented LUN %d\n", req->lun ? req->lun : cmd[1] >> 5); |
|
340 |
if (cmd[0] != REQUEST_SENSE && req->lun != s->lun) { |
|
341 |
DPRINTF("Unimplemented LUN %d\n", req->lun); |
|
343 | 342 |
scsi_set_sense(s, SENSE_CODE(LUN_NOT_SUPPORTED)); |
344 | 343 |
r->req.status = CHECK_CONDITION; |
345 | 344 |
scsi_req_complete(&r->req); |
Also available in: Unified diff