On Tue, Jun 24, 2014 at 11:08:54AM -0500, Michael Christie wrote:
> > static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd)
> > {
> > -   unsigned int xfer_len = blk_rq_bytes(scmd->request);
> > +   unsigned int xfer_len = scsi_out(scmd)->length;
> >     unsigned int prot_op = scsi_get_prot_op(scmd);
> >     unsigned int sector_size = scmd->device->sector_size;
> 
> 
> Do we need to check for the data direction. Something like
> 
> if (scmd->sc_data_direction == DMA_TO_DEVICE)
>       xfer_len = scsi_out(scmnd)->length;
> else
>       xfer_len = scsi_in(scmnd)->length;

For non-bidi commands those are the same, but I suspect we'd need
something like that for bidi commands.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to