On Wed, 2015-01-21 at 17:18 +0100, Bart Van Assche wrote: > Hello, > > 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. There is an example in drivers/target/loopback/tcm_loop.c, btw. --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