diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2015-01-23 09:05:13 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2015-01-31 09:27:40 -0500 |
commit | 1f95f8c9fddb14ec0c5b2d49f691b9c2aee7b9b9 (patch) | |
tree | 80945f8cc50af45e52122b31b21adf59d84a9e6c /drivers/firewire | |
parent | b625a825955ede39047e821f4b69f36cf042b952 (diff) |
firewire: sbp2: remove redundant check for bidi command
[Bart van Asche:] SCSI core never sets cmd->sc_data_direction to
DMA_BIDIRECTIONAL; scsi_bidi_cmnd(cmd) should be used instead to
test for a bidirectional command.
[Christoph Hellwig:] Bidirectional commands won't ever be queued
anyway, unless a LLD or transport driver sets QUEUE_FLAG_BIDI.
So, simply remove the respective queuecommand check in the SBP-2
transport driver.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/sbp2.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 64ac8f8f5098..c22606fe3d44 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c | |||
@@ -1463,17 +1463,6 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost, | |||
1463 | struct sbp2_command_orb *orb; | 1463 | struct sbp2_command_orb *orb; |
1464 | int generation, retval = SCSI_MLQUEUE_HOST_BUSY; | 1464 | int generation, retval = SCSI_MLQUEUE_HOST_BUSY; |
1465 | 1465 | ||
1466 | /* | ||
1467 | * Bidirectional commands are not yet implemented, and unknown | ||
1468 | * transfer direction not handled. | ||
1469 | */ | ||
1470 | if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) { | ||
1471 | dev_err(lu_dev(lu), "cannot handle bidirectional command\n"); | ||
1472 | cmd->result = DID_ERROR << 16; | ||
1473 | cmd->scsi_done(cmd); | ||
1474 | return 0; | ||
1475 | } | ||
1476 | |||
1477 | orb = kzalloc(sizeof(*orb), GFP_ATOMIC); | 1466 | orb = kzalloc(sizeof(*orb), GFP_ATOMIC); |
1478 | if (orb == NULL) | 1467 | if (orb == NULL) |
1479 | return SCSI_MLQUEUE_HOST_BUSY; | 1468 | return SCSI_MLQUEUE_HOST_BUSY; |