[REPOST][PATCH 1/6] mpt fusion - fibre channel target discovery prematurely terminates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reset processing sets ioc->active to zero.  This causes target discovery
to be unable to read configuration pages which can result in fewer
than the total number of targets being discovered.  This patch skips
target discovery if ioc->active is zero.  The driver reschedules
target discovery once ioc->active becomes non-zero.

This situation occurs when the lsiutil program is being used to reset
the board.

(Logic change from previously posted 01-mptfc_eagain.patch.)

Signed-off-by: Michael Reed <mdr@xxxxxxx>

Reset processing sets ioc->active to zero.  This causes target discovery
to be unable to read configuration pages which can result in fewer
than the total number of targets being discovered.  This patch skips
target discovery if ioc->active is zero.  The driver reschedules
target discovery once ioc->active becomes non-zero.

This situation occurs when the lsiutil program is being used to reset
the board.

Signed-off-by: Michael Reed <mdr@xxxxxxx>


--- rc4u/drivers/message/fusion/mptfc.c	2006-05-18 16:43:54.968309949 -0500
+++ rc4/drivers/message/fusion/mptfc.c	2006-05-24 14:08:58.999830952 -0500
@@ -639,6 +639,14 @@
 	struct mptfc_rport_info *ri;
 
 	do {
+		/*
+		 * if the ioc isn't active, cannot fetch config pages
+		 * if it becomes active, work count will increment and
+		 * another pass will occur or work will be rescheduled
+		 */
+		if (ioc->active == 0)
+			goto check_work_remaining;
+
 		/* start by tagging all ports as missing */
 		list_for_each_entry(ri, &ioc->fc_rports, list) {
 			if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) {
@@ -676,6 +684,7 @@
 			}
 		}
 
+ check_work_remaining:
 		/*
 		 * allow multiple passes as target state
 		 * might have changed during scan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux