Revision 74382217 hw/spapr_vscsi.c

b/hw/spapr_vscsi.c
450 450
    uint8_t *cdb = req->iu.srp.cmd.cdb;
451 451
    int n;
452 452

  
453
    n = scsi_req_get_sense(req->sreq, req->sense, sizeof(req->sense));
454
    if (n) {
455
        req->senselen = n;
456
        vscsi_send_rsp(s, req, CHECK_CONDITION, 0, 0);
457
        vscsi_put_req(s, req);
458
        return;
459
    }
460

  
461
    dprintf("VSCSI: Got CHECK_CONDITION, requesting sense...\n");
453 462
    cdb[0] = 3;
454 463
    cdb[1] = 0;
455 464
    cdb[2] = 0;
......
522 531
            }
523 532
            vscsi_send_rsp(s, req, 0, res_in, res_out);
524 533
        } else if (arg == CHECK_CONDITION) {
525
            dprintf("VSCSI: Got CHECK_CONDITION, requesting sense...\n");
526 534
            vscsi_send_request_sense(s, req);
527 535
            return;
528 536
        } else {

Also available in: Unified diff