aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-11 20:17:14 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-07 21:27:30 +0100
commit23077f1d72d279244536f11db51258fc4759c81a (patch)
tree74f44fbe7ee74bddb65325bb73341a8236c01172 /drivers
parent0e930f437eab6db6de5e3f0efbf10dafffca401a (diff)
ieee1394: sbp2: slightly reorder sbp2scsi_abort
Put the target's fetch agent into reset state before the underlying ORB DMA is unmapped and the ->done handler is called. It is highly unlikely but the target could access that ORB right before sbp2 sends the reset request. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/sbp2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index cd156d4e779..e5ba55bbd93 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -2564,11 +2564,9 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt)
scsi_print_command(SCpnt);
if (sbp2util_node_is_available(scsi_id)) {
+ sbp2_agent_reset(scsi_id, 1);
- /*
- * Right now, just return any matching command structures
- * to the free pool.
- */
+ /* Return a matching command structure to the free pool. */
spin_lock_irqsave(&scsi_id->sbp2_command_orb_lock, flags);
command = sbp2util_find_command_for_SCpnt(scsi_id, SCpnt);
if (command) {
@@ -2589,10 +2587,6 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt)
}
spin_unlock_irqrestore(&scsi_id->sbp2_command_orb_lock, flags);
- /*
- * Initiate a fetch agent reset.
- */
- sbp2_agent_reset(scsi_id, 1);
sbp2scsi_complete_all_commands(scsi_id, DID_BUS_BUSY);
}