Date: Sat, 7 Apr 2012 12:47:13 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r233997 - stable/7/sys/dev/mpt Message-ID: <201204071247.q37ClDMd062169@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Sat Apr 7 12:47:12 2012 New Revision: 233997 URL: http://svn.freebsd.org/changeset/base/233997 Log: MFC: r233827 Fix probing of SAS1068E with a device ID of 0x0059 after r232411 (MFC'ed to stable/7 in r232610). 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/7/sys/dev/mpt/mpt_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_pci.c Sat Apr 7 12:46:53 2012 (r233996) +++ stable/7/sys/dev/mpt/mpt_pci.c Sat Apr 7 12:47:12 2012 (r233997) @@ -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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204071247.q37ClDMd062169>