mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
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>
This commit is contained in:
parent
95ffc5e314
commit
e1b68c4dcf
1 changed files with 4 additions and 4 deletions
|
@ -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) {
|
if (cmd->sc_data_direction == DMA_BIDIRECTIONAL) {
|
||||||
fw_error("Cannot handle DMA_BIDIRECTIONAL - rejecting command");
|
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);
|
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:
|
fail_mapping:
|
||||||
kfree(orb);
|
kfree(orb);
|
||||||
fail_alloc:
|
fail_alloc:
|
||||||
cmd->result = DID_ERROR << 16;
|
return SCSI_MLQUEUE_HOST_BUSY;
|
||||||
done(cmd);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
|
static int sbp2_scsi_slave_alloc(struct scsi_device *sdev)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue