Commit 23077f1d authored by Stefan Richter's avatar Stefan Richter

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 0e930f43
...@@ -2564,11 +2564,9 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt) ...@@ -2564,11 +2564,9 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt)
scsi_print_command(SCpnt); scsi_print_command(SCpnt);
if (sbp2util_node_is_available(scsi_id)) { if (sbp2util_node_is_available(scsi_id)) {
sbp2_agent_reset(scsi_id, 1);
/* /* Return a matching command structure to the free pool. */
* Right now, just return any matching command structures
* to the free pool.
*/
spin_lock_irqsave(&scsi_id->sbp2_command_orb_lock, flags); spin_lock_irqsave(&scsi_id->sbp2_command_orb_lock, flags);
command = sbp2util_find_command_for_SCpnt(scsi_id, SCpnt); command = sbp2util_find_command_for_SCpnt(scsi_id, SCpnt);
if (command) { if (command) {
...@@ -2589,10 +2587,6 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt) ...@@ -2589,10 +2587,6 @@ static int sbp2scsi_abort(struct scsi_cmnd *SCpnt)
} }
spin_unlock_irqrestore(&scsi_id->sbp2_command_orb_lock, flags); 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); sbp2scsi_complete_all_commands(scsi_id, DID_BUS_BUSY);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment