PERFORCE change 112460 for review

Matt Jacob mjacob at FreeBSD.org
Wed Jan 3 17:03:44 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=112460

Change 112460 by mjacob at mjexp on 2007/01/04 01:03:16

	Check the return from registering FC4 types with the fabric name
	server.
	
	Don't complain about a hard loop id of 0xffff- we get this in
	point-to-point topologies with the 2300 and 2K Login firmware.
	
	Up the timeout on register FC4 types commands.
	
	MFP4 after:	1 day

Affected files ...

.. //depot/projects/mjexp/sys/dev/isp/isp.c#6 edit

Differences ...

==== //depot/projects/mjexp/sys/dev/isp/isp.c#6 (text+ko) ====

@@ -1634,12 +1634,14 @@
 		/*
 		 * We end up with these Loop IDs for F-Port topologies
 		 */
-		if (icbp->icb_hardaddr != 0xff && icbp->icb_hardaddr != 0x800) {
-		    isp_prt(isp, ISP_LOGERR,
-			"bad hard address %u- resetting to zero",
-			icbp->icb_hardaddr); 
+		if (icbp->icb_hardaddr != 0xff &&
+		    icbp->icb_hardaddr != 0x800 &&
+		    icbp->icb_hardaddr != 0xffff) {
+			isp_prt(isp, ISP_LOGERR,
+			    "bad hard address %u- resetting to zero",
+			    icbp->icb_hardaddr); 
+			icbp->icb_hardaddr = 0;
 		}
-		icbp->icb_hardaddr = 0;
 	}
 
 	/*
@@ -1888,7 +1890,9 @@
 		/*
 		 * We end up with these Loop IDs for F-Port topologies
 		 */
-		if (icbp->icb_hardaddr != 0xff && icbp->icb_hardaddr != 0x800) {
+		if (icbp->icb_hardaddr != 0xff &&
+		    icbp->icb_hardaddr != 0x800 &&
+		    icbp->icb_hardaddr != 0xffff) {
 			isp_prt(isp, ISP_LOGERR,
 			    "bad hard address %u- resetting to zero",
 			    icbp->icb_hardaddr); 
@@ -2585,6 +2589,7 @@
 	}
 
 	if (check_for_fabric && isp_getpdb(isp, loopid, &pdb, 1) == 0) {
+		int r;
 		if (IS_2100(isp)) {
 			fcp->isp_topo = TOPO_FL_PORT;
 		}
@@ -2609,9 +2614,14 @@
 		lp->new_portid = lp->portid;
 		lp->new_roles = lp->roles;
 		if (IS_24XX(isp)) {
-			(void) isp_register_fc4_type_24xx(isp);
+			r = isp_register_fc4_type_24xx(isp);
 		} else {
-			(void) isp_register_fc4_type(isp);
+			r = isp_register_fc4_type(isp);
+		}
+		if (r) {
+			isp_prt(isp, ISP_LOGSANCFG,
+			    "isp_fclink_test: register fc4 type failed");
+			return (-1);
 		}
 	} else {
 not_on_fabric:
@@ -2625,6 +2635,7 @@
 		mbs.param[1] = MBGSD_GET_RATE;
 		/* mbs.param[2] undefined if we're just getting rate */
 		mbs.logval = MBLOGALL;
+		mbs.timeout = 3000000;
 		isp_mboxcmd(isp, &mbs);
 		if (mbs.param[0] == MBOX_COMMAND_COMPLETE) {
 			if (mbs.param[1] == MBGSD_FOURGB) {
@@ -3138,7 +3149,7 @@
 	mbs.param[6] = DMA_WD3(fcp->isp_scdma);
 	mbs.param[7] = DMA_WD2(fcp->isp_scdma);
 	mbs.logval = MBLOGALL;
-	mbs.timeout = 1000000;
+	mbs.timeout = 10000000;
 	isp_mboxcmd(isp, &mbs);
 	if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
 		if (mbs.param[0] == MBOX_INVALID_COMMAND) {
@@ -3826,7 +3837,7 @@
 	mbs.param[6] = DMA_WD3(fcp->isp_scdma);
 	mbs.param[7] = DMA_WD2(fcp->isp_scdma);
 	mbs.logval = MBLOGALL;
-	mbs.timeout = 1000000;
+	mbs.timeout = 10000000;
 	MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_RFT_ID_REQ_SIZE);
 	isp_mboxcmd(isp, &mbs);
 	FC_SCRATCH_RELEASE(isp);


More information about the p4-projects mailing list