svn commit: r224041 - head/sys/dev/mfi

John Baldwin jhb at FreeBSD.org
Thu Jul 14 20:20:34 UTC 2011


Author: jhb
Date: Thu Jul 14 20:20:33 2011
New Revision: 224041
URL: http://svn.freebsd.org/changeset/base/224041

Log:
  Support controllers whose option ROM is disabled in the BIOS by kicking
  the firmware so that it boots.
  
  PR:		kern/154978
  Submitted by:	Andrew Boyer  aboyer of averesystems com
  Obtained from:	LSI
  MFC after:	1 week

Modified:
  head/sys/dev/mfi/mfi.c
  head/sys/dev/mfi/mfireg.h

Modified: head/sys/dev/mfi/mfi.c
==============================================================================
--- head/sys/dev/mfi/mfi.c	Thu Jul 14 20:17:05 2011	(r224040)
+++ head/sys/dev/mfi/mfi.c	Thu Jul 14 20:20:33 2011	(r224041)
@@ -260,8 +260,12 @@ mfi_transition_firmware(struct mfi_softc
 		case MFI_FWSTATE_FLUSH_CACHE:
 			max_wait = 20;
 			break;
+		case MFI_FWSTATE_BOOT_MESSAGE_PENDING:
+			MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_HOTPLUG);
+			max_wait = 10;
+			break;
 		default:
-			device_printf(sc->mfi_dev,"Unknown firmware state %d\n",
+			device_printf(sc->mfi_dev,"Unknown firmware state %#x\n",
 			    fw_state);
 			return (ENXIO);
 		}
@@ -273,7 +277,7 @@ mfi_transition_firmware(struct mfi_softc
 				break;
 		}
 		if (fw_state == cur_state) {
-			device_printf(sc->mfi_dev, "firmware stuck in state "
+			device_printf(sc->mfi_dev, "Firmware stuck in state "
 			    "%#x\n", fw_state);
 			return (ENXIO);
 		}

Modified: head/sys/dev/mfi/mfireg.h
==============================================================================
--- head/sys/dev/mfi/mfireg.h	Thu Jul 14 20:17:05 2011	(r224040)
+++ head/sys/dev/mfi/mfireg.h	Thu Jul 14 20:20:33 2011	(r224041)
@@ -112,6 +112,7 @@ __FBSDID("$FreeBSD$");
 #define MFI_FWSTATE_WAIT_HANDSHAKE	0x60000000
 #define MFI_FWSTATE_FW_INIT_2		0x70000000
 #define MFI_FWSTATE_DEVICE_SCAN		0x80000000
+#define MFI_FWSTATE_BOOT_MESSAGE_PENDING	0x90000000
 #define MFI_FWSTATE_FLUSH_CACHE		0xa0000000
 #define MFI_FWSTATE_READY		0xb0000000
 #define MFI_FWSTATE_OPERATIONAL		0xc0000000
@@ -127,6 +128,7 @@ __FBSDID("$FreeBSD$");
 #define MFI_FWINIT_READY	0x00000002 /* Move from operational to ready */
 #define MFI_FWINIT_MFIMODE	0x00000004 /* unknown */
 #define MFI_FWINIT_CLEAR_HANDSHAKE 0x00000008 /* Respond to WAIT_HANDSHAKE */
+#define MFI_FWINIT_HOTPLUG	0x00000010
 
 /* MFI Commands */
 typedef enum {


More information about the svn-src-all mailing list