Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Dec 2018 10:41:14 +0000 (UTC)
From:      Kashyap D Desai <kadesai@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342531 - head/sys/dev/mpr
Message-ID:  <201812261041.wBQAfEp4035728@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kadesai
Date: Wed Dec 26 10:41:14 2018
New Revision: 342531
URL: https://svnweb.freebsd.org/changeset/base/342531

Log:
  Add Sea,Aero adapter support
  
  Added deviceID's for Sea,Aero to mpr Driver
  Aero:
          0x00E0 Invalid
          0x00E1 Configurable Secure
          0x00E2 Hard Secure
          0x00E3 Tampered
  Sea:
          0x00E4 Invalid
          0x00E5 Configurable Secure
          0x00E6 Hard Secure
          0x00E7 Tampered
  
  For Tampered & Invalid type cards, driver will claim the device & quit the probe function with below error message,
  "HBA is in Non Secure mode"
  
  for Configurable Secure type cards, driver will display below message in .probe() callback function,
  "HBA is in Configurable Secure mode"
  
  Submitted by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
  Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
  Approved by:  ken
  MFC after:  3 days
  Sponsored by:   Broadcom Inc

Modified:
  head/sys/dev/mpr/mpr_pci.c
  head/sys/dev/mpr/mprvar.h

Modified: head/sys/dev/mpr/mpr_pci.c
==============================================================================
--- head/sys/dev/mpr/mpr_pci.c	Wed Dec 26 10:40:27 2018	(r342530)
+++ head/sys/dev/mpr/mpr_pci.c	Wed Dec 26 10:41:14 2018	(r342531)
@@ -148,6 +148,30 @@ struct mpr_ident {
 	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3716,
 	    0xffff, 0xffff, MPR_FLAGS_GEN35_IOC,
 	    "Avago Technologies (LSI) SAS3716" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_INVALID0_SAS3816,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) INVALID0 SAS3816" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_CFG_SEC_SAS3816,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) CFG SEC SAS3816" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_HARD_SEC_SAS3816,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) HARD SEC SAS3816" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_INVALID1_SAS3816,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) INVALID1 SAS3816" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_INVALID0_SAS3916,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) INVALID0 SAS3916" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_CFG_SEC_SAS3916,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) CFG SEC SAS3916" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_HARD_SEC_SAS3916,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) HARD SEC SAS3916" },
+	{ MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_INVALID1_SAS3916,
+	    0xffff, 0xffff, (MPR_FLAGS_GEN35_IOC | MPR_FLAGS_SEA_IOC),
+	    "Broadcom Inc. (LSI) INVALID1 SAS3916" },
 	{ 0, 0, 0, 0, 0, NULL }
 };
 
@@ -205,6 +229,21 @@ mpr_pci_attach(device_t dev)
 	sc->mpr_dev = dev;
 	m = mpr_find_ident(dev);
 	sc->mpr_flags = m->flags;
+
+	switch (m->device) {
+	case MPI26_MFGPAGE_DEVID_INVALID0_SAS3816:
+	case MPI26_MFGPAGE_DEVID_INVALID1_SAS3816:
+	case MPI26_MFGPAGE_DEVID_INVALID0_SAS3916:
+	case MPI26_MFGPAGE_DEVID_INVALID1_SAS3916:
+		mpr_printf(sc, "HBA is in Non Secure mode\n");
+		return (ENXIO);
+	case MPI26_MFGPAGE_DEVID_CFG_SEC_SAS3816:
+	case MPI26_MFGPAGE_DEVID_CFG_SEC_SAS3916:
+		mpr_printf(sc, "HBA is in Configurable Secure mode\n");
+		break;
+	default:
+		break;
+	}
 
 	mpr_get_tunables(sc);
 

Modified: head/sys/dev/mpr/mprvar.h
==============================================================================
--- head/sys/dev/mpr/mprvar.h	Wed Dec 26 10:40:27 2018	(r342530)
+++ head/sys/dev/mpr/mprvar.h	Wed Dec 26 10:41:14 2018	(r342531)
@@ -341,6 +341,7 @@ struct mpr_softc {
 #define	MPR_FLAGS_ATTACH_DONE	(1 << 5)
 #define	MPR_FLAGS_GEN35_IOC	(1 << 6)
 #define	MPR_FLAGS_REALLOCATED	(1 << 7)
+#define	MPR_FLAGS_SEA_IOC	(1 << 8)
 	u_int				mpr_debug;
 	int				msi_msgs;
 	u_int				reqframesz;



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