Displaying 5 results from an estimated 5 matches for "mx_sb_len".
2016 Feb 01
1
Advice on virtio, or any virtualization solution for hdparm
...r both host
and guest?
My strace of hdparm from within the guest (just "-e ioctl" is traced):
ioctl(3, HDIO_GET_MULTCOUNT, 0x618ef0) = -1 EINVAL (Invalid argument)
ioctl(3, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[16]=[85, 08, 0e, 00, 00, 00,
01, 00, 00, 00, 00, 00, 00, 40, ec, 00], mx_sb_len=32, iovec_count=0,
dxfer_len=512, timeout=15000, flags=0,
data[512]=["@\0\377?7\310\20\0\0\0\0\0?\0\0\0\0\0\0\0HPAD0409105B"...],
status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0,
resid=0, duration=184, info=0}) = 0
ioctl(3, HDIO_GET_IDENTITY, 0x7fffda088500) = -1 EIN...
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...->iov[n].iov_len;
- if (cmd->sge_count) {
- if (dir)
- cmd->hdr.dxfer_direction = SG_DXFER_TO_DEV;
- else
- cmd->hdr.dxfer_direction = SG_DXFER_FROM_DEV;
- } else {
- cmd->hdr.dxfer_direction = SG_DXFER_NONE;
- }
- cmd->hdr.sbp = cmd->sense;
- cmd->hdr.mx_sb_len = cmd->sense_len;
+ if (bdrv_is_sg(cmd->lun->bdrv)) {
+ memset(&cmd->hdr, 0, sizeof(struct sg_io_hdr));
+ cmd->hdr.interface_id = 'S';
+ cmd->hdr.cmd_len = cdb_len;
+ cmd->hdr.cmdp = cdb;
+ cmd->hdr.iovec_count = cmd->sge_count;
+ cmd->hdr.dxferp = cmd-&...
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...->iov[n].iov_len;
- if (cmd->sge_count) {
- if (dir)
- cmd->hdr.dxfer_direction = SG_DXFER_TO_DEV;
- else
- cmd->hdr.dxfer_direction = SG_DXFER_FROM_DEV;
- } else {
- cmd->hdr.dxfer_direction = SG_DXFER_NONE;
- }
- cmd->hdr.sbp = cmd->sense;
- cmd->hdr.mx_sb_len = cmd->sense_len;
+ if (bdrv_is_sg(cmd->lun->bdrv)) {
+ memset(&cmd->hdr, 0, sizeof(struct sg_io_hdr));
+ cmd->hdr.interface_id = 'S';
+ cmd->hdr.cmd_len = cdb_len;
+ cmd->hdr.cmdp = cdb;
+ cmd->hdr.iovec_count = cmd->sge_count;
+ cmd->hdr.dxferp = cmd-&...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...->iov[n].iov_len;
+ if (cmd->sge_count) {
+ if (dir)
+ cmd->hdr.dxfer_direction = SG_DXFER_TO_DEV;
+ else
+ cmd->hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+ } else {
+ cmd->hdr.dxfer_direction = SG_DXFER_NONE;
+ }
+ cmd->hdr.sbp = cmd->sense;
+ cmd->hdr.mx_sb_len = cmd->sense_len;
+
+ ret = bdrv_ioctl(cmd->lun->bdrv, SG_IO, &cmd->hdr);
+ if (ret) {
+ DPRINTF("SCSI pthru dev %x lun %x failed with %d\n",
+ target, lun, errno);
+ sense_len = scsi_build_sense(cmd->sense, SENSE_IO_ERROR);
+ cmd->sge_size = 0;
+ scsi_status...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...->iov[n].iov_len;
+ if (cmd->sge_count) {
+ if (dir)
+ cmd->hdr.dxfer_direction = SG_DXFER_TO_DEV;
+ else
+ cmd->hdr.dxfer_direction = SG_DXFER_FROM_DEV;
+ } else {
+ cmd->hdr.dxfer_direction = SG_DXFER_NONE;
+ }
+ cmd->hdr.sbp = cmd->sense;
+ cmd->hdr.mx_sb_len = cmd->sense_len;
+
+ ret = bdrv_ioctl(cmd->lun->bdrv, SG_IO, &cmd->hdr);
+ if (ret) {
+ DPRINTF("SCSI pthru dev %x lun %x failed with %d\n",
+ target, lun, errno);
+ sense_len = scsi_build_sense(cmd->sense, SENSE_IO_ERROR);
+ cmd->sge_size = 0;
+ scsi_status...