search for: sg_dxfer_from_dev

Displaying 5 results from an estimated 5 matches for "sg_dxfer_from_dev".

2016 Feb 01
1
Advice on virtio, or any virtualization solution for hdparm
...the full harddisk/SSD info. Can I know how to resolve this so that the output is the same for 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, res...
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...unt = cmd->sge_count; - cmd->hdr.dxferp = cmd->iov; - for (n = 0; n < cmd->sge_count; n++) - cmd->hdr.dxfer_len += cmd->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';...
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...unt = cmd->sge_count; - cmd->hdr.dxferp = cmd->iov; - for (n = 0; n < cmd->sge_count; n++) - cmd->hdr.dxfer_len += cmd->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';...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...unt = cmd->sge_count; + cmd->hdr.dxferp = cmd->iov; + for (n = 0; n < cmd->sge_count; n++) + cmd->hdr.dxfer_len += cmd->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\...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...unt = cmd->sge_count; + cmd->hdr.dxferp = cmd->iov; + for (n = 0; n < cmd->sge_count; n++) + cmd->hdr.dxfer_len += cmd->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\...