The SCSI core never sets sc_data_direction to DMA_BIDIRECTIONAL. Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> Cc: Michael Reed <mdr@xxxxxxx> --- drivers/scsi/qla1280.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index c68a66e..ede9563 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -468,13 +468,14 @@ static struct qla_driver_setup driver_setup; static inline uint16_t qla1280_data_direction(struct scsi_cmnd *cmnd) { + if (scsi_bidi_cmnd(cmnd)) + return BIT_5 | BIT_6; + switch(cmnd->sc_data_direction) { case DMA_FROM_DEVICE: return BIT_5; case DMA_TO_DEVICE: return BIT_6; - case DMA_BIDIRECTIONAL: - return BIT_5 | BIT_6; /* * We could BUG() on default here if one of the four cases aren't * met, but then again if we receive something like that from the -- 2.1.2 -- 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