Lines Matching +full:0 +full:x00
25 #define PCI_SLOT 0x02
26 #define PCI_FN 0x00
43 for (i = 0; i < vs->num_queues + 2; i++) { in qvirtio_scsi_pci_free()
70 struct virtio_scsi_cmd_req req = { { 0 } }; in virtio_scsi_do_command()
71 struct virtio_scsi_cmd_resp resp = { .response = 0xff, .status = 0xff }; in virtio_scsi_do_command()
72 uint64_t req_addr, resp_addr, data_in_addr = 0, data_out_addr = 0; in virtio_scsi_do_command()
79 req.lun[0] = 1; /* Select LUN */ in virtio_scsi_do_command()
136 vs->num_queues = qvirtio_config_readl(dev, 0); in qvirtio_scsi_init()
140 for (i = 0; i < vs->num_queues + 2; i++) { in qvirtio_scsi_init()
148 NULL, 0, NULL, 0, &resp), in qvirtio_scsi_init()
149 ==, 0); in qvirtio_scsi_init()
151 g_assert_cmpint(resp.sense[0], ==, 0x70); /* Fixed format sense buffer */ in qvirtio_scsi_init()
153 g_assert_cmpint(resp.sense[12], ==, 0x29); /* POWER ON */ in qvirtio_scsi_init()
154 g_assert_cmpint(resp.sense[13], ==, 0x00); in qvirtio_scsi_init()
173 uint8_t buf1[512] = { 0 }; in test_unaligned_write_same()
176 0x41, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00 in test_unaligned_write_same()
179 0x41, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x33, 0x00, 0x00 in test_unaligned_write_same()
182 0x41, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x33, 0x00, 0x00 in test_unaligned_write_same()
188 g_assert_cmphex(0, ==, in test_unaligned_write_same()
189 virtio_scsi_do_command(vs, write_same_cdb_1, NULL, 0, buf1, 512, in test_unaligned_write_same()
192 g_assert_cmphex(0, ==, in test_unaligned_write_same()
193 virtio_scsi_do_command(vs, write_same_cdb_2, NULL, 0, buf2, 512, in test_unaligned_write_same()
196 g_assert_cmphex(0, ==, in test_unaligned_write_same()
197 virtio_scsi_do_command(vs, write_same_cdb_ndob, NULL, 0, NULL, 0, in test_unaligned_write_same()
210 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00 in test_unmap_large_lba()
215 * LBA 0x7fff is ~ 1/8 into device, with 4k blocks in test_unmap_large_lba()
218 uint8_t unmap_params[0x18] = { in test_unmap_large_lba()
219 0x00, 0x16, /* unmap data length */ in test_unmap_large_lba()
220 0x00, 0x10, /* unmap block descriptor data length */ in test_unmap_large_lba()
221 0x00, 0x00, 0x00, 0x00, /* reserved */ in test_unmap_large_lba()
222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, /* LBA */ in test_unmap_large_lba()
223 0x00, 0x00, 0x03, 0xff, /* sector count */ in test_unmap_large_lba()
224 0x00, 0x00, 0x00, 0x00, /* reserved */ in test_unmap_large_lba()
231 virtio_scsi_do_command(vs, unmap, NULL, 0, unmap_params, in test_unmap_large_lba()
233 g_assert_cmphex(resp.response, ==, 0); in test_unmap_large_lba()
244 uint8_t buf[2048] = { 0 }; in test_write_to_cdrom()
246 /* WRITE(10) to LBA 0, transfer length 1 */ in test_write_to_cdrom()
247 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 in test_write_to_cdrom()
254 virtio_scsi_do_command(vs, write_cdb, NULL, 0, buf, 2048, &resp); in test_write_to_cdrom()
255 g_assert_cmphex(resp.response, ==, 0); in test_write_to_cdrom()
257 g_assert_cmphex(resp.sense[0], ==, 0x70); in test_write_to_cdrom()
259 g_assert_cmphex(resp.sense[12], ==, 0x27); /* WRITE PROTECTED */ in test_write_to_cdrom()
260 g_assert_cmphex(resp.sense[13], ==, 0x00); /* WRITE PROTECTED */ in test_write_to_cdrom()
275 uint8_t buf[512] = { 0 }; in test_iothread_attach_node()
277 /* WRITE(10) to LBA 0, transfer length 1 */ in test_iothread_attach_node()
278 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 in test_iothread_attach_node()
286 g_assert(fd >= 0); in test_iothread_attach_node()
306 ret = virtio_scsi_do_command(vs, write_cdb, NULL, 0, buf, 512, NULL); in test_iothread_attach_node()
307 g_assert_cmphex(ret, ==, 0); in test_iothread_attach_node()
328 "-device scsi-hd,drive=dr1,lun=0,scsi-id=1"); in virtio_scsi_setup()
338 "-device scsi-hd,drive=dr1,lun=0,scsi-id=1" in virtio_scsi_setup_4k()
349 "-device scsi-cd,drive=dr1,lun=0,scsi-id=1"); in virtio_scsi_setup_cd()