The SCSI core never sets sc_data_direction to DMA_BIDIRECTIONAL.

Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com>
Cc: Stefan Richter <stef...@s5r6.in-berlin.de>
---
 drivers/firewire/sbp2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 64ac8f8..ab1b114 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -1467,7 +1467,7 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost,
         * Bidirectional commands are not yet implemented, and unknown
         * transfer direction not handled.
         */
-       if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) {
+       if (scsi_bidi_cmnd(cmd)) {
                dev_err(lu_dev(lu), "cannot handle bidirectional command\n");
                cmd->result = DID_ERROR << 16;
                cmd->scsi_done(cmd);
-- 
2.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" 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