Displaying 4 results from an estimated 4 matches for "dxfer_direct".
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...;hdr.cmd_len = cdb_len;
- cmd->hdr.cmdp = cdb;
- cmd->hdr.iovec_count = 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(&cm...
2009 Oct 27
0
[PATCH 4/4] megasas: Add SCSI command emulation
...;hdr.cmd_len = cdb_len;
- cmd->hdr.cmdp = cdb;
- cmd->hdr.iovec_count = 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(&cm...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...;hdr.cmd_len = cdb_len;
+ cmd->hdr.cmdp = cdb;
+ cmd->hdr.iovec_count = 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...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
...;hdr.cmd_len = cdb_len;
+ cmd->hdr.cmdp = cdb;
+ cmd->hdr.iovec_count = 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...