Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2018 00:45:48 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331335 - stable/11/sys/dev/isp
Message-ID:  <201803220045.w2M0jmqo000976@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Mar 22 00:45:48 2018
New Revision: 331335
URL: https://svnweb.freebsd.org/changeset/base/331335

Log:
  MFC r330963: Increase ABOUT FIRMWARE command timeout to 5s.
  
  It seems default timeout of 100ms is not enough for my 2694L card,
  while it was perfectly fine for others, even for full-height 2694.

Modified:
  stable/11/sys/dev/isp/isp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/isp/isp.c
==============================================================================
--- stable/11/sys/dev/isp/isp.c	Wed Mar 21 23:52:37 2018	(r331334)
+++ stable/11/sys/dev/isp/isp.c	Thu Mar 22 00:45:48 2018	(r331335)
@@ -874,6 +874,7 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults)
 			}
 		}
 	} else if (IS_26XX(isp)) {
+		isp_prt(isp, ISP_LOGDEBUG1, "loading firmware from flash");
 		MBSINIT(&mbs, MBOX_LOAD_FLASH_FIRMWARE, MBLOGALL, 5000000);
 		mbs.ibitm = 0x01;
 		mbs.obitm = 0x07;
@@ -911,9 +912,12 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults)
 	 * we still need to (re)start it.
 	 */
 	MBSINIT(&mbs, MBOX_EXEC_FIRMWARE, MBLOGALL, 5000000);
-	if (IS_24XX(isp)) {
+	if (IS_26XX(isp)) {
 		mbs.param[1] = code_org >> 16;
 		mbs.param[2] = code_org;
+	} else if (IS_24XX(isp)) {
+		mbs.param[1] = code_org >> 16;
+		mbs.param[2] = code_org;
 		if (isp->isp_loaded_fw) {
 			mbs.param[3] = 0;
 		} else {
@@ -952,7 +956,7 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults)
 	 * Ask the chip for the current firmware version.
 	 * This should prove that the new firmware is working.
 	 */
-	MBSINIT(&mbs, MBOX_ABOUT_FIRMWARE, MBLOGALL, 0);
+	MBSINIT(&mbs, MBOX_ABOUT_FIRMWARE, MBLOGALL, 5000000);
 	isp_mboxcmd(isp, &mbs);
 	if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
 		return;
@@ -6737,7 +6741,7 @@ static const char *scsi_mbcmd_names[] = {
 static const uint32_t mbpfc[] = {
 	ISP_FC_OPMAP(0x01, 0x01),	/* 0x00: MBOX_NO_OP */
 	ISP_FC_OPMAP(0x1f, 0x01),	/* 0x01: MBOX_LOAD_RAM */
-	ISP_FC_OPMAP_HALF(0x07, 0xff, 0x00, 0x03),	/* 0x02: MBOX_EXEC_FIRMWARE */
+	ISP_FC_OPMAP_HALF(0x07, 0xff, 0x00, 0x1f),	/* 0x02: MBOX_EXEC_FIRMWARE */
 	ISP_FC_OPMAP(0xdf, 0x01),	/* 0x03: MBOX_DUMP_RAM */
 	ISP_FC_OPMAP(0x07, 0x07),	/* 0x04: MBOX_WRITE_RAM_WORD */
 	ISP_FC_OPMAP(0x03, 0x07),	/* 0x05: MBOX_READ_RAM_WORD */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803220045.w2M0jmqo000976>