search for: scsidiskst

Displaying 6 results from an estimated 6 matches for "scsidiskst".

2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...SCSIRequest { /* Both sector and sector_count are in terms of qemu 512 byte blocks. */ uint64_t sector; uint32_t sector_count; - struct iovec iov; + struct iovec *iov; QEMUIOVector qiov; BlockDriverAIOCB *aiocb; struct SCSIRequest *next; @@ -72,7 +72,8 @@ struct SCSIDiskState This is the number of 512 byte blocks in a single scsi sector. */ int cluster_size; uint64_t max_lba; - int sense; + uint8_t sense[SCSI_SENSE_LEN]; + uint8_t sense_len; char drive_serial_str[21]; QEMUBH *bh; }; @@ -90,13 +91,12 @@ static SCSIRequest *scsi_n...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...SCSIRequest { /* Both sector and sector_count are in terms of qemu 512 byte blocks. */ uint64_t sector; uint32_t sector_count; - struct iovec iov; + struct iovec *iov; QEMUIOVector qiov; BlockDriverAIOCB *aiocb; struct SCSIRequest *next; @@ -72,7 +72,8 @@ struct SCSIDiskState This is the number of 512 byte blocks in a single scsi sector. */ int cluster_size; uint64_t max_lba; - int sense; + uint8_t sense[SCSI_SENSE_LEN]; + uint8_t sense_len; char drive_serial_str[21]; QEMUBH *bh; }; @@ -90,13 +91,12 @@ static SCSIRequest *scsi_n...
2015 Mar 11
3
[PATCH] virtio: Remove virtio device during shutdown
On Wed, 03/11 10:06, Michael S. Tsirkin wrote: > On Wed, Mar 11, 2015 at 04:09:17PM +0800, Fam Zheng wrote: > > Currently shutdown is nop for virtio devices, but the core code could > > remove things behind us such as MSI-X handler etc. For example in the > > case of virtio-scsi-pci, the device may still try to send interupts, > > which will be on IRQ lines seeing MSI-X
2015 Mar 11
3
[PATCH] virtio: Remove virtio device during shutdown
On Wed, 03/11 10:06, Michael S. Tsirkin wrote: > On Wed, Mar 11, 2015 at 04:09:17PM +0800, Fam Zheng wrote: > > Currently shutdown is nop for virtio devices, but the core code could > > remove things behind us such as MSI-X handler etc. For example in the > > case of virtio-scsi-pci, the device may still try to send interupts, > > which will be on IRQ lines seeing MSI-X
2009 Oct 27
0
[PATCH 1/4] Add 'raid' interface class
....c @@ -41,6 +41,7 @@ do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0) #define SCSI_DMA_BUF_SIZE 131072 #define SCSI_MAX_INQUIRY_LEN 256 +#define SCSI_SENSE_LEN 18 #define SCSI_REQ_STATUS_RETRY 0x01 @@ -136,6 +137,22 @@ static SCSIRequest *scsi_find_request(SCSIDiskState *s, uint32_t tag) return r; } +/* Helper function to build a sense block */ +int32_t scsi_build_sense(uint8_t *sense_buf, uint32_t sense) +{ + memset(sense_buf, 0, SCSI_SENSE_LEN); + if (!sense) + return 0; + + sense_buf[0] = 0xf0; /* current, fixed format */ + sense_bu...
2009 Oct 27
0
[PATCH 1/4] Add 'raid' interface class
....c @@ -41,6 +41,7 @@ do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0) #define SCSI_DMA_BUF_SIZE 131072 #define SCSI_MAX_INQUIRY_LEN 256 +#define SCSI_SENSE_LEN 18 #define SCSI_REQ_STATUS_RETRY 0x01 @@ -136,6 +137,22 @@ static SCSIRequest *scsi_find_request(SCSIDiskState *s, uint32_t tag) return r; } +/* Helper function to build a sense block */ +int32_t scsi_build_sense(uint8_t *sense_buf, uint32_t sense) +{ + memset(sense_buf, 0, SCSI_SENSE_LEN); + if (!sense) + return 0; + + sense_buf[0] = 0xf0; /* current, fixed format */ + sense_bu...