From: Michael Reed Date: Mon, 31 Jul 2006 17:19:40 +0000 (-0500) Subject: [SCSI] mptfc: properly wait for firmware target discovery to complete X-Git-Tag: v2.6.18-rc5~57^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77d88ee275aeba5da447987f30401bbd4c901ca9;p=linux-2.6 [SCSI] mptfc: properly wait for firmware target discovery to complete Based upon a conversation I had with LSI's fibre channel firmware guru, this patch adds another condition under which the driver waits for the firmware link initialization / target discovery to complete. Signed-off-by: Michael Reed Acked-by: Moore, Eric Signed-off-by: James Bottomley --- diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index 90da7d63b0..2144554a64 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -669,7 +669,10 @@ mptfc_GetFcPortPage0(MPT_ADAPTER *ioc, int portnum) * if still doing discovery, * hang loose a while until finished */ - if (pp0dest->PortState == MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN) { + if ((pp0dest->PortState == MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN) || + (pp0dest->PortState == MPI_FCPORTPAGE0_PORTSTATE_ONLINE && + (pp0dest->Flags & MPI_FCPORTPAGE0_FLAGS_ATTACH_TYPE_MASK) + == MPI_FCPORTPAGE0_FLAGS_ATTACH_NO_INIT)) { if (count-- > 0) { msleep(100); goto try_again;