Re: sc_data_direction and bidi commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2015-01-22 at 11:14 +0100, Bart Van Assche wrote:
> On 01/22/15 11:02, Nicholas A. Bellinger wrote:
> > On Wed, 2015-01-21 at 17:18 +0100, Bart Van Assche wrote:
> >> Although several SCSI LLDs compare sc_data_direction with the value
> >> DMA_BIDIRECTIONAL apparently scsi_setup_cmnd() never sets
> >> sc_data_direction to the value DMA_BIDIRECTIONAL. Is this behavior on
> >> purpose ?
> > 
> > Yes.  Bi-directional CDBs are signaled using scsi_bidi_cmnd(), and IIRC
> > ->sc_data_direction = DMA_TO_DEVICE is set for those cases.
> 
> But why is sc_data_direction set to DMA_BIDIRECTIONAL in
> scsi_ioctl_reset() in drivers/scsi/scsi_error.c ? I think
> scsi_bidi_cmnd() will return false for the SCSI command submitted by
> scsi_ioctl_reset() since in this case scmd->request->next_rq == NULL.
> 

Well, according to DMA-API.txt it's classified as:

   DMA_BIDIRECTIONAL       direction isn't known

and is unrelated to any actual SCSI bidi commands containing both WRITE
and READ payload buffers.

scsi_ioctl_reset() is only generating TMFs btw, and can't inject any
SCSI bidi commands.

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux