summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-sbp2.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-05-10 01:23:09 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-05-10 18:24:14 +0200
commite1b68c4dcfb8bb7d79b6771e48767039ffbe00a8 (patch)
tree5d175ff06ec568a2efa2e6468371bf7acbdd6f05 /drivers/firewire/fw-sbp2.c
parentfirewire: Handle the last few DMA mapping error cases. (diff)
downloadlinux-e1b68c4dcfb8bb7d79b6771e48767039ffbe00a8.tar.xz
linux-e1b68c4dcfb8bb7d79b6771e48767039ffbe00a8.zip
firewire: Return SCSI_MLQUEUE_HOST_BUSY for out of memory cases in queuecommand.
Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r--drivers/firewire/fw-sbp2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index c32254e94187..07be24e2d201 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -1017,7 +1017,9 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
*/
if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) {
fw_error("Cannot handle DMA_BIDIRECTIONAL - rejecting command");
- goto fail_alloc;
+ cmd->result = DID_ERROR << 16;
+ done(cmd);
+ return 0;
}
orb = kzalloc(sizeof *orb, GFP_ATOMIC);
@@ -1093,9 +1095,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
fail_mapping:
kfree(orb);
fail_alloc:
- cmd->result = DID_ERROR << 16;
- done(cmd);
- return 0;
+ return SCSI_MLQUEUE_HOST_BUSY;
}
static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)