diff options
author | mjacob <mjacob@FreeBSD.org> | 2002-10-11 17:28:01 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2002-10-11 17:28:01 +0000 |
commit | 4c7b07a1ef3d72cb8fb30d03fe680a758e80daad (patch) | |
tree | b409a9507b8133ed92029731c0294ac4694612a8 /sys | |
parent | 89ee3553f82e20daa697f61e79c568eceb2e93b8 (diff) | |
download | FreeBSD-src-4c7b07a1ef3d72cb8fb30d03fe680a758e80daad.zip FreeBSD-src-4c7b07a1ef3d72cb8fb30d03fe680a758e80daad.tar.gz |
This should enable 10160 support. As best as I can tell, the same
f/w as 12160 is used, and otherwise, this is just a single channel
variant of the 10160.
MFC after: 0 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/isp/isp.c | 5 | ||||
-rw-r--r-- | sys/dev/isp/isp_pci.c | 17 | ||||
-rw-r--r-- | sys/dev/isp/ispvar.h | 9 |
3 files changed, 27 insertions, 4 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index c755e1e..a943556 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -284,6 +284,8 @@ isp_reset(struct ispsoftc *isp) btype = "1280"; else if (IS_1080(isp)) btype = "1080"; + else if (IS_10160(isp)) + btype = "10160"; else if (IS_12160(isp)) btype = "12160"; else @@ -5895,7 +5897,8 @@ isp_read_nvram(struct ispsoftc *isp) if (IS_ULTRA3(isp)) { isp_parse_nvram_12160(isp, 0, nvram_data); - isp_parse_nvram_12160(isp, 1, nvram_data); + if (IS_12160(isp)) + isp_parse_nvram_12160(isp, 1, nvram_data); } else if (IS_1080(isp)) { isp_parse_nvram_1080(isp, 0, nvram_data); } else if (IS_1280(isp) || IS_1240(isp)) { diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 3701376..f6e767e 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -181,6 +181,10 @@ static struct ispmdvec mdvec_2300 = { #define PCI_PRODUCT_QLOGIC_ISP1080 0x1080 #endif +#ifndef PCI_PRODUCT_QLOGIC_ISP10160 +#define PCI_PRODUCT_QLOGIC_ISP10160 0x1016 +#endif + #ifndef PCI_PRODUCT_QLOGIC_ISP12160 #define PCI_PRODUCT_QLOGIC_ISP12160 0x1216 #endif @@ -215,6 +219,9 @@ static struct ispmdvec mdvec_2300 = { #define PCI_QLOGIC_ISP1080 \ ((PCI_PRODUCT_QLOGIC_ISP1080 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP10160 \ + ((PCI_PRODUCT_QLOGIC_ISP10160 << 16) | PCI_VENDOR_QLOGIC) + #define PCI_QLOGIC_ISP12160 \ ((PCI_PRODUCT_QLOGIC_ISP12160 << 16) | PCI_VENDOR_QLOGIC) @@ -294,6 +301,9 @@ isp_pci_probe(device_t dev) case PCI_QLOGIC_ISP1280: device_set_desc(dev, "Qlogic ISP 1280 PCI SCSI Adapter"); break; + case PCI_QLOGIC_ISP10160: + device_set_desc(dev, "Qlogic ISP 10160 PCI SCSI Adapter"); + break; case PCI_QLOGIC_ISP12160: if (pci_get_subvendor(dev) == AMI_RAID_SUBVENDOR_ID) { return (ENXIO); @@ -458,6 +468,13 @@ isp_pci_attach(device_t dev) pcs->pci_poff[DMA_BLOCK >> _BLK_REG_SHFT] = ISP1080_DMA_REGS_OFF; } + if (pci_get_devid(dev) == PCI_QLOGIC_ISP10160) { + mdvp = &mdvec_12160; + basetype = ISP_HA_SCSI_10160; + psize = sizeof (sdparam); + pcs->pci_poff[DMA_BLOCK >> _BLK_REG_SHFT] = + ISP1080_DMA_REGS_OFF; + } if (pci_get_devid(dev) == PCI_QLOGIC_ISP12160) { mdvp = &mdvec_12160; basetype = ISP_HA_SCSI_12160; diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 9176783..d3de14d 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -540,7 +540,8 @@ typedef struct ispsoftc { #define ISP_HA_SCSI_1240 0x8 #define ISP_HA_SCSI_1080 0x9 #define ISP_HA_SCSI_1280 0xa -#define ISP_HA_SCSI_12160 0xb +#define ISP_HA_SCSI_10160 0xb +#define ISP_HA_SCSI_12160 0xc #define ISP_HA_FC 0xf0 #define ISP_HA_FC_2100 0x10 #define ISP_HA_FC_2200 0x20 @@ -551,12 +552,14 @@ typedef struct ispsoftc { #define IS_1240(isp) (isp->isp_type == ISP_HA_SCSI_1240) #define IS_1080(isp) (isp->isp_type == ISP_HA_SCSI_1080) #define IS_1280(isp) (isp->isp_type == ISP_HA_SCSI_1280) +#define IS_10160(isp) (isp->isp_type == ISP_HA_SCSI_10160) #define IS_12160(isp) (isp->isp_type == ISP_HA_SCSI_12160) #define IS_12X0(isp) (IS_1240(isp) || IS_1280(isp)) +#define IS_1X160(isp) (IS_10160(isp) || IS_12160(isp)) #define IS_DUALBUS(isp) (IS_12X0(isp) || IS_12160(isp)) -#define IS_ULTRA2(isp) (IS_1080(isp) || IS_1280(isp) || IS_12160(isp)) -#define IS_ULTRA3(isp) (IS_12160(isp)) +#define IS_ULTRA2(isp) (IS_1080(isp) || IS_1280(isp) || IS_1X160(isp)) +#define IS_ULTRA3(isp) (IS_1X160(isp)) #define IS_FC(isp) ((isp)->isp_type & ISP_HA_FC) #define IS_2100(isp) ((isp)->isp_type == ISP_HA_FC_2100) |