FreeBSD Bugzilla – Attachment 241807 Details for
Bug 271062
add support for 28xx based device to isp(4)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch v3 for CURRENT and RELENG-13.2
sys_dev_isp-v3.diff (text/plain), 7.44 KB, created by
Joerg Pulz
on 2023-04-28 10:08:39 UTC
(
hide
)
Description:
patch v3 for CURRENT and RELENG-13.2
Filename:
MIME Type:
Creator:
Joerg Pulz
Created:
2023-04-28 10:08:39 UTC
Size:
7.44 KB
patch
obsolete
>diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4 >index 78d20723f..36fdf3b70 100644 >--- a/share/man/man4/isp.4 >+++ b/share/man/man4/isp.4 >@@ -26,7 +26,7 @@ > .\" > .\" $FreeBSD$ > .\" >-.Dd November 19, 2020 >+.Dd April 25, 2023 > .Dt ISP 4 > .Os > .Sh NAME >@@ -105,6 +105,14 @@ Optical 16Gb FC/FCoE PCIe cards. > Optical 16Gb Fibre Channel PCIe cards. > .It Qlogic 2740/2742/2764 (aka 2722/2714) > Optical 32Gb Fibre Channel PCIe cards. >+.It Qlogic QLE2770/QLE2772 (aka 2812) >+Optical 32Gb Fibre Channel PCIe cards. >+.It Qlogic QLE2774 (aka 2814) >+Optical 32Gb Fibre Channel PCIe cards. >+.It Qlogic QLE2870/QLE2872 (aka 2812) >+Optical 64Gb Fibre Channel PCIe cards. >+.It Qlogic QLE2874 (aka 2814) >+Optical 64Gb Fibre Channel PCIe cards. > .El > .Sh CONFIGURATION OPTIONS > Target mode support for Fibre Channel adapters may be enabled with the >diff --git a/share/man/man4/ispfw.4 b/share/man/man4/ispfw.4 >index 8353413fe..8cff500b9 100644 >--- a/share/man/man4/ispfw.4 >+++ b/share/man/man4/ispfw.4 >@@ -22,7 +22,7 @@ > .\" > .\" $FreeBSD$ > .\" >-.Dd November 19, 2020 >+.Dd April 25, 2023 > .Dt ISPFW 4 > .Os > .Sh NAME >@@ -60,3 +60,5 @@ This driver was written by > .An Matthew Jacob . > Later improvement was done by > .An Alexander Motin Aq Mt mav@FreeBSD.org . >+.Sh BUGS >+Only firmware for the 24xx and 25xx based cards is included. >diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c >index cc2f5ae23..c853b2b2d 100644 >--- a/sys/dev/isp/isp.c >+++ b/sys/dev/isp/isp.c >@@ -179,6 +179,9 @@ isp_reset(ispsoftc_t *isp, int do_load_defaults) > case ISP_HA_FC_2700: > btype = "2700"; > break; >+ case ISP_HA_FC_2800: >+ btype = "2800"; >+ break; > default: > break; > } >@@ -710,8 +713,11 @@ isp_init(ispsoftc_t *isp) > icbp->icb_version = ICB_VERSION1; > icbp->icb_maxfrmlen = DEFAULT_FRAMESIZE(isp); > if (icbp->icb_maxfrmlen < ICB_MIN_FRMLEN || icbp->icb_maxfrmlen > ICB_MAX_FRMLEN) { >- isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM- using %d", DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN); > icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN; >+ if (IS_28XX(isp)) >+ icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN_28XX; >+ >+ isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM - using %d", DEFAULT_FRAMESIZE(isp), icbp->icb_maxfrmlen); > } > > if (!IS_26XX(isp)) >@@ -822,12 +828,16 @@ isp_init(ispsoftc_t *isp) > } else if (isp->isp_confopts & ISP_CFG_32GB) { > icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; > icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_32GB; >+ } else if (isp->isp_confopts & ISP_CFG_64GB) { >+ icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_MASK; >+ icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_64GB; > } else { > switch (icbp->icb_fwoptions3 & ICB2400_OPT3_RATE_MASK) { > case ICB2400_OPT3_RATE_4GB: > case ICB2400_OPT3_RATE_8GB: > case ICB2400_OPT3_RATE_16GB: > case ICB2400_OPT3_RATE_32GB: >+ case ICB2400_OPT3_RATE_64GB: > case ICB2400_OPT3_RATE_AUTO: > break; > case ICB2400_OPT3_RATE_2GB: >@@ -1537,6 +1547,8 @@ isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay) > if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { > if (mbs.param[1] == MBGSD_10GB) > fcp->isp_gbspeed = 10; >+ else if (mbs.param[1] == MBGSD_64GB) >+ fcp->isp_gbspeed = 64; > else if (mbs.param[1] == MBGSD_32GB) > fcp->isp_gbspeed = 32; > else if (mbs.param[1] == MBGSD_16GB) >@@ -4368,7 +4380,9 @@ isp_rd_2400_nvram(ispsoftc_t *isp, uint32_t addr, uint32_t *rp) > uint32_t base = 0x7ffe0000; > uint32_t tmp = 0; > >- if (IS_26XX(isp)) { >+ if (IS_28XX(isp)) { >+ base = 0x7fad0000; /* 0x7f7d0000 + 0x300000 */ >+ } else if (IS_26XX(isp)) { > base = 0x7fe7c000; /* XXX: Observation, may be wrong. */ > } else if (IS_25XX(isp)) { > base = 0x7ff00000 | 0x48000; >diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c >index 01028ae14..a78486785 100644 >--- a/sys/dev/isp/isp_pci.c >+++ b/sys/dev/isp/isp_pci.c >@@ -99,6 +99,16 @@ static struct ispmdvec mdvec_2700 = { > NULL > }; > >+static struct ispmdvec mdvec_2800 = { >+ isp_pci_run_isr_2400, >+ isp_pci_rd_reg_2600, >+ isp_pci_wr_reg_2600, >+ isp_pci_mbxdma, >+ isp_send_cmd, >+ isp_pci_irqsetup, >+ NULL >+}; >+ > #ifndef PCIM_CMD_INVEN > #define PCIM_CMD_INVEN 0x10 > #endif >@@ -143,6 +153,8 @@ static struct ispmdvec mdvec_2700 = { > #define PCI_PRODUCT_QLOGIC_ISP2692 0x2b61 > #define PCI_PRODUCT_QLOGIC_ISP2714 0x2071 > #define PCI_PRODUCT_QLOGIC_ISP2722 0x2261 >+#define PCI_PRODUCT_QLOGIC_ISP2812 0x2281 >+#define PCI_PRODUCT_QLOGIC_ISP2814 0x2081 > > #define PCI_QLOGIC_ISP2422 \ > ((PCI_PRODUCT_QLOGIC_ISP2422 << 16) | PCI_VENDOR_QLOGIC) >@@ -164,6 +176,10 @@ static struct ispmdvec mdvec_2700 = { > ((PCI_PRODUCT_QLOGIC_ISP2714 << 16) | PCI_VENDOR_QLOGIC) > #define PCI_QLOGIC_ISP2722 \ > ((PCI_PRODUCT_QLOGIC_ISP2722 << 16) | PCI_VENDOR_QLOGIC) >+#define PCI_QLOGIC_ISP2812 \ >+ ((PCI_PRODUCT_QLOGIC_ISP2812 << 16) | PCI_VENDOR_QLOGIC) >+#define PCI_QLOGIC_ISP2814 \ >+ ((PCI_PRODUCT_QLOGIC_ISP2814 << 16) | PCI_VENDOR_QLOGIC) > > #define PCI_DFLT_LTNCY 0x40 > #define PCI_DFLT_LNSZ 0x10 >@@ -245,6 +261,12 @@ isp_pci_probe(device_t dev) > case PCI_QLOGIC_ISP2722: > device_set_desc(dev, "Qlogic ISP 2722 PCI FC Adapter"); > break; >+ case PCI_QLOGIC_ISP2812: >+ device_set_desc(dev, "Qlogic ISP 2812 PCI FC Adapter"); >+ break; >+ case PCI_QLOGIC_ISP2814: >+ device_set_desc(dev, "Qlogic ISP 2814 PCI FC Adapter"); >+ break; > default: > return (ENXIO); > } >@@ -493,6 +515,12 @@ isp_pci_attach(device_t dev) > isp->isp_mdvec = &mdvec_2700; > isp->isp_type = ISP_HA_FC_2700; > break; >+ case PCI_QLOGIC_ISP2812: >+ case PCI_QLOGIC_ISP2814: >+ did = 0x2800; >+ isp->isp_mdvec = &mdvec_2800; >+ isp->isp_type = ISP_HA_FC_2800; >+ break; > default: > device_printf(dev, "unknown device type\n"); > goto bad; >diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h >index 88bfa8f68..80def0c3c 100644 >--- a/sys/dev/isp/ispmbox.h >+++ b/sys/dev/isp/ispmbox.h >@@ -179,6 +179,7 @@ > #define MBGSD_8GB 0x04 /* 25XX only */ > #define MBGSD_16GB 0x05 /* 26XX only */ > #define MBGSD_32GB 0x06 /* 27XX only */ >+#define MBGSD_64GB 0x07 /* 28XX only */ > #define MBGSD_10GB 0x13 /* 26XX only */ > #define MBOX_SEND_RNFT 0x005e > #define MBOX_INIT_FIRMWARE 0x0060 >@@ -647,6 +648,7 @@ typedef struct { > #define ICB2400_OPT3_RATE_8GB 0x00008000 > #define ICB2400_OPT3_RATE_16GB 0x0000A000 > #define ICB2400_OPT3_RATE_32GB 0x0000C000 >+#define ICB2400_OPT3_RATE_64GB 0x0000E000 > #define ICB2400_OPT3_ENA_OOF_XFRDY 0x00000200 > #define ICB2400_OPT3_NO_N2N_LOGI 0x00000100 > #define ICB2400_OPT3_NO_LOCAL_PLOGI 0x00000080 >@@ -661,6 +663,7 @@ typedef struct { > #define ICB_MIN_FRMLEN 256 > #define ICB_MAX_FRMLEN 2112 > #define ICB_DFLT_FRMLEN 1024 >+#define ICB_DFLT_FRMLEN_28XX 2048 > #define ICB_DFLT_RDELAY 5 > #define ICB_DFLT_RCOUNT 3 > >diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h >index eae81f6ac..ece346fb9 100644 >--- a/sys/dev/isp/ispvar.h >+++ b/sys/dev/isp/ispvar.h >@@ -539,6 +539,7 @@ struct ispsoftc { > #define ISP_CFG_8GB 0x4000 /* force 8Gb connection (25XX only) */ > #define ISP_CFG_16GB 0x8000 /* force 16Gb connection (26XX only) */ > #define ISP_CFG_32GB 0x10000 /* force 32Gb connection (27XX only) */ >+#define ISP_CFG_64GB 0x20000 /* force 64Gb connection (28XX only) */ > > /* > * For each channel, the outer layers should know what role that channel >@@ -607,10 +608,12 @@ struct ispsoftc { > #define ISP_HA_FC_2500 0x05 > #define ISP_HA_FC_2600 0x06 > #define ISP_HA_FC_2700 0x07 >+#define ISP_HA_FC_2800 0x08 > > #define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500) > #define IS_26XX(isp) ((isp)->isp_type >= ISP_HA_FC_2600) > #define IS_27XX(isp) ((isp)->isp_type >= ISP_HA_FC_2700) >+#define IS_28XX(isp) ((isp)->isp_type >= ISP_HA_FC_2800) > > /* > * DMA related macros
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271062
:
241735
|
241743
|
241807
|
241908
|
241948
|
241964