changeset 13294:0e11573d9a03

735 Add support for Qlogic 2322 (QLE2360) Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Ken Mays <maybird1776@yahoo.com> Reviewed by: David Gwynne <loki@animata.net> Approved by: Gordon Ross <gwr@nexenta.com>
author Garrett D'Amore <garrett@nexenta.com>
date Thu, 24 Feb 2011 21:06:19 -0800
parents b91ea3ba02d2
children 5fd2dd481bd0
files usr/src/pkg/manifests/driver-network-qlc.mf usr/src/uts/common/io/fibre-channel/fca/qlc/ql_api.c usr/src/uts/common/io/fibre-channel/fca/qlc/ql_xioctl.c
diffstat 3 files changed, 15 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/pkg/manifests/driver-network-qlc.mf	Thu Feb 24 07:54:25 2011 -0800
+++ b/usr/src/pkg/manifests/driver-network-qlc.mf	Thu Feb 24 21:06:19 2011 -0800
@@ -21,6 +21,7 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
 #
 
 #
@@ -43,21 +44,11 @@
 dir path=kernel/misc group=sys
 dir path=kernel/misc/qlc group=sys
 dir path=kernel/misc/qlc/$(ARCH64) group=sys
-$(i386_ONLY)driver name=qlc class=fibre-channel perms="* 0666 root sys" \
-    alias=pci1077,132 \
+driver name=qlc class=fibre-channel perms="* 0666 root sys" \
     alias=pci1077,2200 \
     alias=pci1077,2300 \
     alias=pci1077,2312 \
-    alias=pci1077,2422 \
-    alias=pciex1077,2432 \
-    alias=pciex1077,2532 \
-    alias=pciex1077,5432 \
-    alias=pciex1077,8001 \
-    alias=pciex1077,8021
-$(sparc_ONLY)driver name=qlc class=fibre-channel perms="* 0666 root sys" \
-    alias=pci1077,2200 \
-    alias=pci1077,2300 \
-    alias=pci1077,2312 \
+    alias=pci1077,2322 \
     alias=pci1077,2422 \
     alias=pciex1077,2432 \
     alias=pciex1077,2532 \
--- a/usr/src/uts/common/io/fibre-channel/fca/qlc/ql_api.c	Thu Feb 24 07:54:25 2011 -0800
+++ b/usr/src/uts/common/io/fibre-channel/fca/qlc/ql_api.c	Thu Feb 24 21:06:19 2011 -0800
@@ -24,6 +24,9 @@
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  */
+/*
+ * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ */
 
 #pragma ident	"Copyright 2010 QLogic Corporation; ql_api.c"
 
@@ -1047,18 +1050,14 @@
 		switch (ha->device_id) {
 		case 0x2300:
 		case 0x2312:
-#if !defined(__sparc) || defined(QL_DEBUG_ROUTINES)
-		/*
-		 * per marketing, fibre-lite HBA's are not supported
-		 * on sparc platforms
-		 */
+		case 0x2322:
 		case 0x6312:
 		case 0x6322:
-#endif	/* !defined(__sparc) || defined(QL_DEBUG_ROUTINES) */
 			if (ql_pci_config_get8(ha, PCI_CONF_IPIN) == 2) {
 				ha->flags |= FUNCTION_1;
 			}
-			if (ha->device_id == 0x6322) {
+			if ((ha->device_id == 0x6322) ||
+			    (ha->device_id == 0x2322)) {
 				ha->cfg_flags |= CFG_CTRL_6322;
 				ha->fw_class = 0x6322;
 				ha->risc_dump_size = QL_6322_FW_DUMP_SIZE;
@@ -1108,20 +1107,6 @@
 		case 0x5422:
 		case 0x5432:
 		case 0x8432:
-#ifdef __sparc
-			/*
-			 * Per marketing, the QLA/QLE-2440's (which
-			 * also use the 2422 & 2432) are only for the
-			 * x86 platform (SMB market).
-			 */
-			if (ha->subsys_id == 0x145 || ha->subsys_id == 0x147 ||
-			    ha->subsys_id == 0x13e) {
-				cmn_err(CE_WARN,
-				    "%s(%d): Unsupported HBA ssid: %x",
-				    QL_NAME, instance, ha->subsys_id);
-				goto attach_failed;
-			}
-#endif	/* __sparc */
 			if (ql_pci_config_get8(ha, PCI_CONF_IPIN) == 2) {
 				ha->flags |= FUNCTION_1;
 			}
--- a/usr/src/uts/common/io/fibre-channel/fca/qlc/ql_xioctl.c	Thu Feb 24 07:54:25 2011 -0800
+++ b/usr/src/uts/common/io/fibre-channel/fca/qlc/ql_xioctl.c	Thu Feb 24 21:06:19 2011 -0800
@@ -25,6 +25,10 @@
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+ */
+
 #pragma ident	"Copyright 2010 QLogic Corporation; ql_xioctl.c"
 
 /*
@@ -4995,7 +4999,8 @@
 	 * For driver purposes, we'll treat it as a 128k flash chip.
 	 */
 	if ((ha->device_id == 0x2312 || ha->device_id == 0x6312 ||
-	    ha->device_id == 0x6322) && (xp->fdesc.flash_size > 0x20000) &&
+	    ha->device_id == 0x2322 || ha->device_id == 0x6322) &&
+	    (xp->fdesc.flash_size > 0x20000) &&
 	    (CFG_IST(ha, CFG_SBUS_CARD) ==  0)) {
 		EL(ha, "chip exceeds max size: %xh, using 128k\n",
 		    xp->fdesc.flash_size);