diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2014-07-12 12:48:31 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-25 17:17:03 -0400 |
commit | f885fb73f64154690c2158e813de56363389ffec (patch) | |
tree | 9cb6a9e4abe95b803756281474ec038f6d8220d8 /drivers/scsi | |
parent | 56b26e69c8283121febedd12b3cc193384af46b9 (diff) |
drivers: scsi: storvsc: Set srb_flags in all cases
Correctly set SRB flags for all valid I/O directions. Some IHV drivers on the
Windows host require this. The host validates the command and SRB flags
prior to passing the command down to native driver stack.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 2b8595b7ad45..b529ae8e8fff 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c | |||
@@ -1601,26 +1601,24 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd) | |||
1601 | vm_srb = &cmd_request->vstor_packet.vm_srb; | 1601 | vm_srb = &cmd_request->vstor_packet.vm_srb; |
1602 | vm_srb->win8_extension.time_out_value = 60; | 1602 | vm_srb->win8_extension.time_out_value = 60; |
1603 | 1603 | ||
1604 | vm_srb->win8_extension.srb_flags |= | ||
1605 | (SRB_FLAGS_QUEUE_ACTION_ENABLE | | ||
1606 | SRB_FLAGS_DISABLE_SYNCH_TRANSFER); | ||
1604 | 1607 | ||
1605 | /* Build the SRB */ | 1608 | /* Build the SRB */ |
1606 | switch (scmnd->sc_data_direction) { | 1609 | switch (scmnd->sc_data_direction) { |
1607 | case DMA_TO_DEVICE: | 1610 | case DMA_TO_DEVICE: |
1608 | vm_srb->data_in = WRITE_TYPE; | 1611 | vm_srb->data_in = WRITE_TYPE; |
1609 | vm_srb->win8_extension.srb_flags |= SRB_FLAGS_DATA_OUT; | 1612 | vm_srb->win8_extension.srb_flags |= SRB_FLAGS_DATA_OUT; |
1610 | vm_srb->win8_extension.srb_flags |= | ||
1611 | (SRB_FLAGS_QUEUE_ACTION_ENABLE | | ||
1612 | SRB_FLAGS_DISABLE_SYNCH_TRANSFER); | ||
1613 | break; | 1613 | break; |
1614 | case DMA_FROM_DEVICE: | 1614 | case DMA_FROM_DEVICE: |
1615 | vm_srb->data_in = READ_TYPE; | 1615 | vm_srb->data_in = READ_TYPE; |
1616 | vm_srb->win8_extension.srb_flags |= SRB_FLAGS_DATA_IN; | 1616 | vm_srb->win8_extension.srb_flags |= SRB_FLAGS_DATA_IN; |
1617 | vm_srb->win8_extension.srb_flags |= | ||
1618 | (SRB_FLAGS_QUEUE_ACTION_ENABLE | | ||
1619 | SRB_FLAGS_DISABLE_SYNCH_TRANSFER); | ||
1620 | break; | 1617 | break; |
1621 | default: | 1618 | default: |
1622 | vm_srb->data_in = UNKNOWN_TYPE; | 1619 | vm_srb->data_in = UNKNOWN_TYPE; |
1623 | vm_srb->win8_extension.srb_flags = 0; | 1620 | vm_srb->win8_extension.srb_flags |= (SRB_FLAGS_DATA_IN | |
1621 | SRB_FLAGS_DATA_OUT); | ||
1624 | break; | 1622 | break; |
1625 | } | 1623 | } |
1626 | 1624 | ||