diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-01-23 06:23:37 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-01-23 06:23:37 +0000 |
commit | 2ad9b36fa169019b73c876cc2ce2a2a683bbe6d3 (patch) | |
tree | c610435fa91dd49869b88e957e07d5db355f11a9 /sys/dev/isp/isp_pci.c | |
parent | 3172ccca0f55366494c853ef0b578fbb01ddf1f8 (diff) | |
download | FreeBSD-src-2ad9b36fa169019b73c876cc2ce2a2a683bbe6d3.zip FreeBSD-src-2ad9b36fa169019b73c876cc2ce2a2a683bbe6d3.tar.gz |
First of several commits as this driver is dusted off and maybe brought
up to date. Principle changes for this reelase is to support 2K Port Login
firmware. This allows us to support the 2322 (and 2422 4Gb) cards which only
come with the 2K Port Login firmware. The 2322 should now work- but we don't
have firmware sets for it in ispfw (as the change to load 2K Port Login f/w
hasn't been made- that f/w is so big it has to be loaded in more than one
chunk).
Other changes are the beginnings of cleaning up some long standing target
mode issues. The next changes here will incorporate a lot of bug fixes
from others.
Finally, some copyright cleanup and attempts to make the parts of the
driver that are FreeBSD specific start conforming more to FreeBSD style.
MFC after: 1 month
Diffstat (limited to 'sys/dev/isp/isp_pci.c')
-rw-r--r-- | sys/dev/isp/isp_pci.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index b75867c..4d2810e 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -2,7 +2,8 @@ * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. * FreeBSD Version. * - * Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob + * Copyright (c) 1997-2006 by Matthew Jacob + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,6 +25,7 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * */ #include <sys/cdefs.h> @@ -220,6 +222,10 @@ static struct ispmdvec mdvec_2300 = { #define PCI_PRODUCT_QLOGIC_ISP2312 0x2312 #endif +#ifndef PCI_PRODUCT_QLOGIC_ISP2322 +#define PCI_PRODUCT_QLOGIC_ISP2322 0x2322 +#endif + #ifndef PCI_PRODUCT_QLOGIC_ISP6312 #define PCI_PRODUCT_QLOGIC_ISP6312 0x6312 #endif @@ -254,6 +260,9 @@ static struct ispmdvec mdvec_2300 = { #define PCI_QLOGIC_ISP2312 \ ((PCI_PRODUCT_QLOGIC_ISP2312 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2322 \ + ((PCI_PRODUCT_QLOGIC_ISP2322 << 16) | PCI_VENDOR_QLOGIC) + #define PCI_QLOGIC_ISP6312 \ ((PCI_PRODUCT_QLOGIC_ISP6312 << 16) | PCI_VENDOR_QLOGIC) @@ -336,6 +345,9 @@ isp_pci_probe(device_t dev) case PCI_QLOGIC_ISP2312: device_set_desc(dev, "Qlogic ISP 2312 PCI FC-AL Adapter"); break; + case PCI_QLOGIC_ISP2322: + device_set_desc(dev, "Qlogic ISP 2322 PCI FC-AL Adapter"); + break; case PCI_QLOGIC_ISP6312: device_set_desc(dev, "Qlogic ISP 6312 PCI FC-AL Adapter"); break; @@ -534,6 +546,13 @@ isp_pci_attach(device_t dev) pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2300_OFF; } + if (pci_get_devid(dev) == PCI_QLOGIC_ISP2322) { + mdvp = &mdvec_2300; + basetype = ISP_HA_FC_2322; + psize = sizeof (fcparam); + pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = + PCI_MBOX_REGS2300_OFF; + } isp = &pcs->pci_isp; isp->isp_param = malloc(psize, M_DEVBUF, M_NOWAIT | M_ZERO); if (isp->isp_param == NULL) { @@ -550,7 +569,10 @@ isp_pci_attach(device_t dev) * Try and find firmware for this device. */ - if (isp_get_firmware_p) { + /* + * Don't even attempt to get firmware for the 2322/2422 (yet) + */ + if (IS_2322(isp) == 0 && IS_24XX(isp) == 0 && isp_get_firmware_p) { int device = (int) pci_get_device(dev); #ifdef ISP_TARGET_MODE (*isp_get_firmware_p)(0, 1, device, &mdvp->dv_ispfw); @@ -744,7 +766,7 @@ isp_pci_attach(device_t dev) /* * Last minute checks... */ - if (IS_2312(isp)) { + if (IS_23XX(isp)) { isp->isp_port = pci_get_function(dev); } |