From 7b3194de40bae21f3c63590a91d7ab41398abef3 Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 30 Nov 2015 21:43:20 +0000 Subject: MFC r291147: Increase maximal value of vports tunable to 254. I am not sure this value is really viable yet, but that is what chips officially support in NPIV mode (in loop mode maximum is 125). --- sys/dev/isp/isp_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/isp/isp_pci.c') diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 7ddf3c6..9de13a2 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -486,7 +486,7 @@ isp_get_generic_options(device_t dev, ispsoftc_t *isp) } tval = -1; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "vports", &tval); - if (tval > 0 && tval < 127) { + if (tval > 0 && tval <= 254) { isp_nvports = tval; } tval = 7; -- cgit v1.1 From a492c3be4748c669010c09e89fa2ba26a74f9197 Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 30 Nov 2015 21:55:35 +0000 Subject: MFC r291188: Rip off target mode support for parallel SCSI QLogic adapters. Hacks to enable target mode there complicated code, while didn't really work. And for outdated hardware fixing it is not really interesting. Initiator mode tested with Qlogic 1080 adapter is still working fine. --- sys/dev/isp/isp_pci.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'sys/dev/isp/isp_pci.c') diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 9de13a2..8bd247f 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -551,6 +551,9 @@ isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) isp->isp_confopts |= ISP_CFG_OWNLOOPID; } + if (IS_SCSI(isp)) + return; + tval = -1; snprintf(name, sizeof(name), "%srole", prefix); if (resource_int_value(device_get_name(dev), device_get_unit(dev), @@ -570,11 +573,6 @@ isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) if (tval == -1) { tval = ISP_DEFAULT_ROLES; } - - if (IS_SCSI(isp)) { - ISP_SPI_PC(isp, chan)->def_role = tval; - return; - } ISP_FC_PC(isp, chan)->def_role = tval; tval = 0; @@ -889,14 +887,7 @@ isp_pci_attach(device_t dev) isp_get_specific_options(dev, i, isp); } - /* - * The 'it' suffix really only matters for SCSI cards in target mode. - */ isp->isp_osinfo.fw = NULL; - if (IS_SCSI(isp) && (ISP_SPI_PC(isp, 0)->def_role & ISP_ROLE_TARGET)) { - snprintf(fwname, sizeof (fwname), "isp_%04x_it", did); - isp->isp_osinfo.fw = firmware_get(fwname); - } if (isp->isp_osinfo.fw == NULL) { snprintf(fwname, sizeof (fwname), "isp_%04x", did); isp->isp_osinfo.fw = firmware_get(fwname); @@ -1587,17 +1578,6 @@ isp_pci_mbxdma(ispsoftc_t *isp) } else { nsegs = ISP_NSEG_MAX; } -#ifdef ISP_TARGET_MODE - /* - * XXX: We don't really support 64 bit target mode for parallel scsi yet - */ - if (IS_SCSI(isp) && isp->isp_osinfo.sixtyfourbit) { - free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); - isp_prt(isp, ISP_LOGERR, "we cannot do DAC for SPI cards yet"); - ISP_LOCK(isp); - return (1); - } -#endif if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, &isp->isp_osinfo.dmat)) { free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); -- cgit v1.1 From 4cf0c712d6689f77afd96295f5f093f4b2f0dc76 Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 30 Nov 2015 21:56:31 +0000 Subject: MFC r291209: Fix target mode support for Qlogic 2200 FC adapters. Now target mode works for all supported FC adapters except ancient 2100, which is not tested. --- sys/dev/isp/isp_pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/isp/isp_pci.c') diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 8bd247f..b5b8636 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -1488,7 +1488,7 @@ imc(void *arg, bus_dma_segment_t *segs, int nseg, int error) segs->ds_addr += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); imushp->vbase += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); - if (imushp->isp->isp_type >= ISP_HA_FC_2300) { + if (imushp->isp->isp_type >= ISP_HA_FC_2200) { imushp->isp->isp_osinfo.ecmd_dma = segs->ds_addr; imushp->isp->isp_osinfo.ecmd_free = (isp_ecmd_t *)imushp->vbase; imushp->isp->isp_osinfo.ecmd_base = imushp->isp->isp_osinfo.ecmd_free; @@ -1627,7 +1627,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) len += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp)); } #endif - if (isp->isp_type >= ISP_HA_FC_2300) { + if (isp->isp_type >= ISP_HA_FC_2200) { len += (N_XCMDS * XCMD_SIZE); } @@ -1689,7 +1689,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) bus_dma_tag_destroy(fc->tdmat); goto bad; } - if (isp->isp_type >= ISP_HA_FC_2300) { + if (!IS_2100(isp)) { for (i = 0; i < INITIAL_NEXUS_COUNT; i++) { struct isp_nexus *n = malloc(sizeof (struct isp_nexus), M_DEVBUF, M_NOWAIT | M_ZERO); if (n == NULL) { -- cgit v1.1 From b7a97f633885df312d545c6aef705d33bc34b9b0 Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 30 Nov 2015 21:57:16 +0000 Subject: MFC r291221: Remove "disable" hint, which duplicates system-wide "disabled". --- sys/dev/isp/isp_pci.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'sys/dev/isp/isp_pci.c') diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index b5b8636..26fae24 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -456,16 +456,6 @@ isp_get_generic_options(device_t dev, ispsoftc_t *isp) { int tval; - /* - * Figure out if we're supposed to skip this one. - */ - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), "disable", &tval) == 0 && tval) { - device_printf(dev, "disabled at user request\n"); - isp->isp_osinfo.disabled = 1; - return; - } - tval = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "fwload_disable", &tval) == 0 && tval != 0) { isp->isp_confopts |= ISP_CFG_NORELOAD; @@ -710,16 +700,6 @@ isp_pci_attach(device_t dev) isp_get_generic_options(dev, isp); /* - * Check to see if options have us disabled - */ - if (isp->isp_osinfo.disabled) { - /* - * But return zero to preserve unit numbering - */ - return (0); - } - - /* * Get PCI options- which in this case are just mapping preferences. */ isp_get_pci_options(dev, &m1, &m2); -- cgit v1.1 From 97189158140218a2e5bfbd037679e515e9b2c64e Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 30 Nov 2015 21:58:51 +0000 Subject: MFC r291365, r291369: One more round of port scanner rewrite. - Make scan aborted by event restart immediately and infinitely. - Improve handling of some loop events from firmware. - Remove loop down timer, adding its functionality to scanner thread. - Some more unification and simplification. --- sys/dev/isp/isp_pci.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'sys/dev/isp/isp_pci.c') diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 26fae24..55cb034 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -638,16 +638,6 @@ isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) } } - tval = 0; - snprintf(name, sizeof(name), "%shysteresis", prefix); - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), - "name", &tval); - if (tval >= 0 && tval < 256) { - ISP_FC_PC(isp, chan)->hysteresis = tval; - } else { - ISP_FC_PC(isp, chan)->hysteresis = isp_fabric_hysteresis; - } - tval = -1; snprintf(name, sizeof(name), "%sloop_down_limit", prefix); (void) resource_int_value(device_get_name(dev), device_get_unit(dev), -- cgit v1.1