Revision 823bd739

b/hw/scsi/scsi-disk.c
1548 1548
    int len = r->req.cmd.xfer;
1549 1549
    UnmapCBData *data;
1550 1550

  
1551
    /* Reject ANCHOR=1.  */
1552
    if (r->req.cmd.buf[1] & 0x1) {
1553
        goto invalid_field;
1554
    }
1555

  
1551 1556
    if (len < 8) {
1552 1557
        goto invalid_param_len;
1553 1558
    }
......
1578 1583

  
1579 1584
invalid_param_len:
1580 1585
    scsi_check_condition(r, SENSE_CODE(INVALID_PARAM_LEN));
1586
    return;
1587

  
1588
invalid_field:
1589
    scsi_check_condition(r, SENSE_CODE(INVALID_FIELD));
1581 1590
}
1582 1591

  
1583 1592
static void scsi_disk_emulate_write_data(SCSIRequest *req)
......
1856 1865

  
1857 1866
        /*
1858 1867
         * We only support WRITE SAME with the unmap bit set for now.
1868
         * Reject UNMAP=0 or ANCHOR=1.
1859 1869
         */
1860
        if (!(req->cmd.buf[1] & 0x8)) {
1870
        if (!(req->cmd.buf[1] & 0x8) || (req->cmd.buf[1] & 0x10)) {
1861 1871
            goto illegal_request;
1862 1872
        }
1863 1873

  

Also available in: Unified diff