svn commit: r233995 - in stable/9/sys: dev/mpt i386/conf

Marius Strobl marius at FreeBSD.org
Sat Apr 7 12:46:28 UTC 2012


Author: marius
Date: Sat Apr  7 12:46:27 2012
New Revision: 233995
URL: http://svn.freebsd.org/changeset/base/233995

Log:
  MFC: r233827
  
  Fix probing of SAS1068E with a device ID of 0x0059 after r232411 (MFC'ed
  to stable/9 in r232562).
  Reported by: infofarmer
  
  MFC: r233886
  
  Refine r233827; as it turns out, controllers with a device ID of 0x0059
  can be upgraded to MegaRAID mode, in which case mfi(4) should attach to
  these based on the sub-vendor and -device ID instead (not currently done).
  Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY.
  While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in
  the default case.

Modified:
  stable/9/sys/dev/mpt/mpt_pci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/dev/mpt/mpt_pci.c
==============================================================================
--- stable/9/sys/dev/mpt/mpt_pci.c	Sat Apr  7 09:26:21 2012	(r233994)
+++ stable/9/sys/dev/mpt/mpt_pci.c	Sat Apr  7 12:46:27 2012	(r233995)
@@ -141,6 +141,10 @@ __FBSDID("$FreeBSD$");
 #define MPI_MANUFACTPAGE_DEVID_SAS1068A_FB	0x0055
 #endif
 
+#ifndef	MPI_MANUFACTPAGE_DEVID_SAS1068E_FB
+#define	MPI_MANUFACTPAGE_DEVID_SAS1068E_FB	0x0059
+#endif
+
 #ifndef	MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB
 #define	MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB	0x007C
 #endif
@@ -183,10 +187,12 @@ static int
 mpt_pci_probe(device_t dev)
 {
 	const char *desc;
+	int rval;
 
 	if (pci_get_vendor(dev) != MPI_MANUFACTPAGE_VENDORID_LSILOGIC)
 		return (ENXIO);
 
+	rval = BUS_PROBE_DEFAULT;
 	switch (pci_get_device(dev)) {
 	case MPI_MANUFACTPAGE_DEVICEID_FC909_FB:
 		desc = "LSILogic FC909 FC Adapter";
@@ -228,6 +234,13 @@ mpt_pci_probe(device_t dev)
 	case MPI_MANUFACTPAGE_DEVID_53C1030ZC:
 		desc = "LSILogic 1030 Ultra4 Adapter";
 		break;
+	case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB:
+		/*
+		 * Allow mfi(4) to claim this device in case it's in MegaRAID
+		 * mode.
+		 */
+		rval = BUS_PROBE_LOW_PRIORITY;
+		/* FALLTHROUGH */
 	case MPI_MANUFACTPAGE_DEVID_SAS1064:
 	case MPI_MANUFACTPAGE_DEVID_SAS1064A:
 	case MPI_MANUFACTPAGE_DEVID_SAS1064E:
@@ -245,7 +258,7 @@ mpt_pci_probe(device_t dev)
 	}
 
 	device_set_desc(dev, desc);
-	return (0);
+	return (rval);
 }
 
 #if	__FreeBSD_version < 500000  
@@ -419,6 +432,7 @@ mpt_pci_attach(device_t dev)
 	case MPI_MANUFACTPAGE_DEVID_SAS1068:
 	case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB:
 	case MPI_MANUFACTPAGE_DEVID_SAS1068E:
+	case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB:
 		mpt->is_sas = 1;
 		break;
 	default:


More information about the svn-src-stable-9 mailing list