From: Stefan Richter Date: Mon, 14 Aug 2006 16:46:00 +0000 (+0200) Subject: ieee1394: sbp2: recheck node generation in sbp2_update X-Git-Tag: v2.6.19-rc1~644^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fc383c09d14783ca7d7e97e2134abbe7dc43230;p=linux-2.6 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 --- diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index b5bcca36d4..5440cd0502 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c @@ -802,11 +802,12 @@ static int sbp2_update(struct unit_directory *ud) */ sbp2scsi_complete_all_commands(scsi_id, DID_BUS_BUSY); - /* Make sure we unblock requests (since this is likely after a bus - * reset). */ - atomic_set(&scsi_id->unfinished_reset, 0); - scsi_unblock_requests(scsi_id->scsi_host); - + /* Accept new commands unless there was another bus reset in the + * meantime. */ + if (hpsb_node_entry_valid(scsi_id->ne)) { + atomic_set(&scsi_id->unfinished_reset, 0); + scsi_unblock_requests(scsi_id->scsi_host); + } return 0; }