aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-08-14 12:46:00 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-17 13:34:33 -0400
commit4fc383c09d14783ca7d7e97e2134abbe7dc43230 (patch)
treec1163633adfea681f340d3a42814aaded3ef6515 /drivers/ieee1394/sbp2.c
parent1f427e8055b1ab408395d6da421d93783120484c (diff)
ieee1394: sbp2: recheck node generation in sbp2_update
While sbp2_update() is doing its duties after a bus reset, another reset could happen. Don't accept new requests until the next undisturbed sbp2_update() or until sbp2_remove(). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index b5bcca36d43c..5440cd050268 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -802,11 +802,12 @@ static int sbp2_update(struct unit_directory *ud)
802 */ 802 */
803 sbp2scsi_complete_all_commands(scsi_id, DID_BUS_BUSY); 803 sbp2scsi_complete_all_commands(scsi_id, DID_BUS_BUSY);
804 804
805 /* Make sure we unblock requests (since this is likely after a bus 805 /* Accept new commands unless there was another bus reset in the
806 * reset). */ 806 * meantime. */
807 atomic_set(&scsi_id->unfinished_reset, 0); 807 if (hpsb_node_entry_valid(scsi_id->ne)) {
808 scsi_unblock_requests(scsi_id->scsi_host); 808 atomic_set(&scsi_id->unfinished_reset, 0);
809 809 scsi_unblock_requests(scsi_id->scsi_host);
810 }
810 return 0; 811 return 0;
811} 812}
812 813