| #
137b004e
|
| 21-Jun-2024 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix the isp(4) driver with 9.x firmware.
The isp(4) driver (and ispfw(4) firmware) previously only included firmware for Qlogic controllers up to 8Gb. It recently gained firmware for the 27XX and 2
Fix the isp(4) driver with 9.x firmware.
The isp(4) driver (and ispfw(4) firmware) previously only included firmware for Qlogic controllers up to 8Gb. It recently gained firmware for the 27XX and 28XX series controllers along with improved firmware loading capabilities.
The 9.x firmware available for the 27XX and 28XX controllers in ispfw(4) adds login state for NVMe devices in the top nibble of the login state in the port database (isp_pdb_24xx_t in ispmbox.h).
This breaks the check at the end of isp_getpdb() to make sure the device is in the right login state. As a result, it breaks device discovery for many (perhaps all?) FC devices. In my testing with IBM LTO-6 drives attached to a quad port 16Gb Qlogic 2714, they don't show up when they are directly connected (and in loop mode) or connected via a switch (and in fabric mode).
So, mask off the top bits of of the login state before checking it. This shouldn't break anything, because all of the existing login states defined in ispmbox.h are in the low nibble.
sys/dev/isp/ispmbox.h: Add a FCP login state mask define, and a NVMe login state shift.
sys/dev/isp/isp.c: In isp_getpdb(), make sure we're only looking at the FCP login state bits when we try to determine whether a device is in the right login state.
MFC after: 1 week Sponsored by: Spectra Logic Reviewed by: mav Differential Revision: <https://reviews.freebsd.org/D45660>
show more ...
|
| #
10ed63fc
|
| 27-Oct-2023 |
Joerg Pulz <Joerg.Pulz@frm2.tum.de> |
isp(4): Rework firmware handling/loading
Correctly identify the active firmware in flash on adapters with primary and secondary firmware region in flash. Correctly identify the active NVRAM on adapt
isp(4): Rework firmware handling/loading
Correctly identify the active firmware in flash on adapters with primary and secondary firmware region in flash. Correctly identify the active NVRAM on adapters with primary and secondary NVRAM region in flash.
Loading ispfw(4) moved from isp_pci_attach() to isp_reset(). Drop the reference to ispfw(4) after using it so one can kldunload(8) it. New isp_load_ram() function to load either ispfw(4) or flash firmware into RISC's RAM. New functions to read data from flash. The old ones will be removed later. A bunch of new helper functions to identify and validate active flash regions for firmware, auxiliary and NVRAM. Overhaul ISP_FW_* macros and make use of it when comparing firmware versions. We can handle firmware versions up to 255.255.255.
Firmware load priority slightly changed: For 27xx and newer adapters: - load ispfw(4) firmware - request (active) flash firmware information - compare version numbers of ispfw(4) and flash firmware - load firmware with highest version into RISC's RAM - if loading ispfw(4) is disabled or failed - load firmware from flash - if everything else fails use MBOX_LOAD_FLASH_FIRMWARE as fallback
For 26xx and older adapters nothing changed: - load ispfw(4) firmware and load it into RISC's RAM - if loading ispfw(4) is disabled or failed use MBOX_EXEC_FIRMWARE - for 26xx a preceding MBOX_LOAD_FLASH_FIRMWARE is used
New read only sysctl(8)'s: dev.isp.N.fw_version_run: the firmware version actually running dev.isp.N.fw_version_ispfw: the firmware version provided by ispfw(4) dev.isp.N.fw_version_flash: the (active) firmware version in flash
While here: - firmware attribute handling/parsing reworked + renamed defines from ISP2400_FW_ATTR_* to ISP_FW_ATTR_* + changed values to match new handling/parsing + added some more attributes - enable FLT support on 26xx based adapters - log level adjustments - new function return status codes (some for now, some for later use) - some minor style changes
Tested and approved to work on real hardware with: - Qlogic ISP 2532 (QLogic QLE2560 8Gb FC Adapter) - Qlogic ISP 2031 (QLogic QLE2662 16Gbit 2Port FC Adapter) - Qlogic ISP 2722 (QLogic QLE2690 16Gb FC Adapter) - Qlogic ISP 2812 (QLogic QLE2772 32Gbit 2Port FC Adapter)
PR: 273263 Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/877 MFC after: 1 month Sponsored by: Technical University of Munich
show more ...
|
| #
71625ec9
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| #
407abff6
|
| 07-Jul-2023 |
Joerg Pulz <Joerg.Pulz@frm2.tum.de> |
isp(4): Add support for QLogic 28xx devices
This covers the following HBAs: ISP2812-based 64/32G Fibre Channel to PCIe Controller: QLE2770 Single Port 32GFC PCIe Gen4 x8 Adapter QLE2772 Du
isp(4): Add support for QLogic 28xx devices
This covers the following HBAs: ISP2812-based 64/32G Fibre Channel to PCIe Controller: QLE2770 Single Port 32GFC PCIe Gen4 x8 Adapter QLE2772 Dual Port 32GFC PCIe Gen4 x8 Adapter QLE2870 Single Port 64GFC PCIe Gen4 x8 Adapter QLE2872 Dual Port 64GFC PCIe Gen4 x8 Adapter
ISP2814-based 64/32G Fibre Channel to PCIe Controller: QLE2774 Quad Port 32GFC PCIe Gen4 x16 Adapter QLE2874 Quad Port 64GFC PCIe Gen4 x16 Adapter
While here, add required bits to support 64GB FC.
Default framesize is set to 2048 for ISP28xx based HBAs for now.
PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726
show more ...
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
bafe4cee
|
| 09-Apr-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
ips(4): Remove a double word in a few source code comments
- s/for for/for/
MFC after: 3 days
|
| #
156c1ebe
|
| 27-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Some code reorganization.
- Remove code duplication by adding two new functions to execute prepared queue entry via either mbox or request queue and wait for result. - Since the new function execu
Some code reorganization.
- Remove code duplication by adding two new functions to execute prepared queue entry via either mbox or request queue and wait for result. - Since the new function executing via request queue sleeps any way, make it sleep also in case of overflows or handle shortages. It should make it more reliable and less affecting other less flexible request queue users. - Turn isp_target_put_entry() into not target-specific isp_send_entry(). - Make handling of responses with control handles more universal. - Move RQSTYPE_RPT_ID_ACQ handling into new function. - Inline isp_handle_other_response(), becoming trivial after above. - Clean the list of IOCBs from pre-24xx ones.
show more ...
|
| #
b760d2ec
|
| 26-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
More cleanup in response queue and reset code.
|
| #
b05f17a1
|
| 26-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Some minor FCoE bits I had lying around.
|
| #
5bcbd98c
|
| 24-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Update RQSFLAG_* definitions.
|
| #
0f99cb55
|
| 24-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Implement request queue overflow protection.
Before this change in case of request queue overflow driver just froze the device queue for 100ms to retry after. It was pretty bad for performance. Thi
Implement request queue overflow protection.
Before this change in case of request queue overflow driver just froze the device queue for 100ms to retry after. It was pretty bad for performance. This change introduces SIM queue freezing when free space on the request queue drops below 255 entries (worst case of maximum I/O size S/G list), checking for a chance to release it on I/O completion. If the queue still get overflowed somehow, the old mechanism is still in place, just with delay reduced to 10ms.
With the earlier queue length increase overflows should not happen often, but it is still easily reachable on synthetic tests.
show more ...
|
| #
c515717a
|
| 22-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Remove remnants of execthrottle and maxalloc parameters.
The first was obsolete since 26xx, not used on 25xx and not needed on 24xx. The second seems never worked on 24xx and up.
|
| #
1b760be4
|
| 20-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Remove parallel SCSI and 1/2Gb FC support from isp(4).
This removes 288KB (36%) of the driver code and zillions of hacks and workarounds, making single driver uniformly support several different gen
Remove parallel SCSI and 1/2Gb FC support from isp(4).
This removes 288KB (36%) of the driver code and zillions of hacks and workarounds, making single driver uniformly support several different generations of hardware interfaces, not counting minor card variations. After years of the hopeless fight, I don't think it worth to continue support for hardware obsolete for 15-20 years. Instead much cleaner now code should allow to move forward toward better locking, multiple queues and other cool features.
All the remaining Qlogic cards starting from 4Gb 24xx to 32Gb 27xx use the same hardware/firmware interface with minor incremental improvements, so it seems to be a good new starting point. Except one PCI-X model all all of them are PCIe and so still usable in modern systems.
Discussed with: ken, scottl, jpaetzel, imp Relnotes: yes
show more ...
|
| #
2aaf9152
|
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
| #
eb1761b0
|
| 11-Mar-2019 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r345025
|
| #
6f9dbc0e
|
| 11-Mar-2019 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix CRN resets in the isp(4) driver in certain situations.
The Command Reference Number (CRN) is part of the FC-Tape features that we enable when talking to tape drives. It starts at 1, and goes to
Fix CRN resets in the isp(4) driver in certain situations.
The Command Reference Number (CRN) is part of the FC-Tape features that we enable when talking to tape drives. It starts at 1, and goes to 255 and wraps around to 1. There are a number of reset type conditions that result in the CRN getting reset to 1. These are detailed in section 4.10 (table 8) of the FCP-4r02b specification.
One of the conditions is when a PRLI (Process Login) is sent by the initiator, and the Establish Image Pair bit is set in Word 0 of the PRLI.
Previously, the isp(4) driver core sent a notification via isp_async() that the target had changed or stayed in place, but there was no indication of whether a PRLI was sent and whether the Establish Image Pair bit was set.
The result of this was that in some situations, notably switching back and forth between a direct connection and a switch connection to a tape drive, the isp(4) driver would fail to reset the CRN in situations that require it according to the spec. When the CRN isn't reset in a situation that requires it, the tape drive then rejects every subsequent command that is sent to the drive. It is assuming that the commands are being sent out of order.
So, modify the isp(4) driver to include Word 0 of the PRLI command when it sends isp_async() notifications of target changes. Look at the Establish Image Pair bit, and reset the CRN if that bit is set.
With this change, I am able to switch a tape drive back and forth between a direct connection and a switch connection, and the isp(4) driver resets the CRN when it should.
sys/dev/isp_stds.h: Add bit definitions for PRLI Word 0.
sys/dev/ispmbox.h: Add PRLI Word 0 to the port database type, isp_pdb_t.
sys/dev/ispvar.h Add PRLI Word 0 to fcportdb_t.
sys/dev/isp.c: Populate the new prli_word0 parameter in the port database.
In isp_pdb_add_update(), add a check to see if the Establish Image Pair bit is set in PRLI Word 0. If it is, then that is an additional reason to create a change notification.
sys/dev/isp_freebsd.c: In isp_async(), if the device changed or stayed, look at PRLI Word 0 to see if the Establish Image Pair bit is set. If it is, reset the CRN if we haven't already.
MFC after: 1 week Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D19472
show more ...
|
| #
137b004e
|
| 21-Jun-2024 |
Kenneth D. Merry <ken@FreeBSD.org> |
Fix the isp(4) driver with 9.x firmware.
The isp(4) driver (and ispfw(4) firmware) previously only included firmware for Qlogic controllers up to 8Gb. It recently gained firmware for the 27XX and 2
Fix the isp(4) driver with 9.x firmware.
The isp(4) driver (and ispfw(4) firmware) previously only included firmware for Qlogic controllers up to 8Gb. It recently gained firmware for the 27XX and 28XX series controllers along with improved firmware loading capabilities.
The 9.x firmware available for the 27XX and 28XX controllers in ispfw(4) adds login state for NVMe devices in the top nibble of the login state in the port database (isp_pdb_24xx_t in ispmbox.h).
This breaks the check at the end of isp_getpdb() to make sure the device is in the right login state. As a result, it breaks device discovery for many (perhaps all?) FC devices. In my testing with IBM LTO-6 drives attached to a quad port 16Gb Qlogic 2714, they don't show up when they are directly connected (and in loop mode) or connected via a switch (and in fabric mode).
So, mask off the top bits of of the login state before checking it. This shouldn't break anything, because all of the existing login states defined in ispmbox.h are in the low nibble.
sys/dev/isp/ispmbox.h: Add a FCP login state mask define, and a NVMe login state shift.
sys/dev/isp/isp.c: In isp_getpdb(), make sure we're only looking at the FCP login state bits when we try to determine whether a device is in the right login state.
MFC after: 1 week Sponsored by: Spectra Logic Reviewed by: mav Differential Revision: <https://reviews.freebsd.org/D45660>
show more ...
|
| #
10ed63fc
|
| 27-Oct-2023 |
Joerg Pulz <Joerg.Pulz@frm2.tum.de> |
isp(4): Rework firmware handling/loading
Correctly identify the active firmware in flash on adapters with primary and secondary firmware region in flash. Correctly identify the active NVRAM on adapt
isp(4): Rework firmware handling/loading
Correctly identify the active firmware in flash on adapters with primary and secondary firmware region in flash. Correctly identify the active NVRAM on adapters with primary and secondary NVRAM region in flash.
Loading ispfw(4) moved from isp_pci_attach() to isp_reset(). Drop the reference to ispfw(4) after using it so one can kldunload(8) it. New isp_load_ram() function to load either ispfw(4) or flash firmware into RISC's RAM. New functions to read data from flash. The old ones will be removed later. A bunch of new helper functions to identify and validate active flash regions for firmware, auxiliary and NVRAM. Overhaul ISP_FW_* macros and make use of it when comparing firmware versions. We can handle firmware versions up to 255.255.255.
Firmware load priority slightly changed: For 27xx and newer adapters: - load ispfw(4) firmware - request (active) flash firmware information - compare version numbers of ispfw(4) and flash firmware - load firmware with highest version into RISC's RAM - if loading ispfw(4) is disabled or failed - load firmware from flash - if everything else fails use MBOX_LOAD_FLASH_FIRMWARE as fallback
For 26xx and older adapters nothing changed: - load ispfw(4) firmware and load it into RISC's RAM - if loading ispfw(4) is disabled or failed use MBOX_EXEC_FIRMWARE - for 26xx a preceding MBOX_LOAD_FLASH_FIRMWARE is used
New read only sysctl(8)'s: dev.isp.N.fw_version_run: the firmware version actually running dev.isp.N.fw_version_ispfw: the firmware version provided by ispfw(4) dev.isp.N.fw_version_flash: the (active) firmware version in flash
While here: - firmware attribute handling/parsing reworked + renamed defines from ISP2400_FW_ATTR_* to ISP_FW_ATTR_* + changed values to match new handling/parsing + added some more attributes - enable FLT support on 26xx based adapters - log level adjustments - new function return status codes (some for now, some for later use) - some minor style changes
Tested and approved to work on real hardware with: - Qlogic ISP 2532 (QLogic QLE2560 8Gb FC Adapter) - Qlogic ISP 2031 (QLogic QLE2662 16Gbit 2Port FC Adapter) - Qlogic ISP 2722 (QLogic QLE2690 16Gb FC Adapter) - Qlogic ISP 2812 (QLogic QLE2772 32Gbit 2Port FC Adapter)
PR: 273263 Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/877 MFC after: 1 month Sponsored by: Technical University of Munich
show more ...
|
| #
71625ec9
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| #
407abff6
|
| 07-Jul-2023 |
Joerg Pulz <Joerg.Pulz@frm2.tum.de> |
isp(4): Add support for QLogic 28xx devices
This covers the following HBAs: ISP2812-based 64/32G Fibre Channel to PCIe Controller: QLE2770 Single Port 32GFC PCIe Gen4 x8 Adapter QLE2772 Du
isp(4): Add support for QLogic 28xx devices
This covers the following HBAs: ISP2812-based 64/32G Fibre Channel to PCIe Controller: QLE2770 Single Port 32GFC PCIe Gen4 x8 Adapter QLE2772 Dual Port 32GFC PCIe Gen4 x8 Adapter QLE2870 Single Port 64GFC PCIe Gen4 x8 Adapter QLE2872 Dual Port 64GFC PCIe Gen4 x8 Adapter
ISP2814-based 64/32G Fibre Channel to PCIe Controller: QLE2774 Quad Port 32GFC PCIe Gen4 x16 Adapter QLE2874 Quad Port 64GFC PCIe Gen4 x16 Adapter
While here, add required bits to support 64GB FC.
Default framesize is set to 2048 for ISP28xx based HBAs for now.
PR: 271062 Reviewed by: imp, mav Sponsored by: Technical University of Munich Pull Request: https://github.com/freebsd/freebsd-src/pull/726
show more ...
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
bafe4cee
|
| 09-Apr-2022 |
Gordon Bergling <gbe@FreeBSD.org> |
ips(4): Remove a double word in a few source code comments
- s/for for/for/
MFC after: 3 days
|
| #
156c1ebe
|
| 27-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Some code reorganization.
- Remove code duplication by adding two new functions to execute prepared queue entry via either mbox or request queue and wait for result. - Since the new function execu
Some code reorganization.
- Remove code duplication by adding two new functions to execute prepared queue entry via either mbox or request queue and wait for result. - Since the new function executing via request queue sleeps any way, make it sleep also in case of overflows or handle shortages. It should make it more reliable and less affecting other less flexible request queue users. - Turn isp_target_put_entry() into not target-specific isp_send_entry(). - Make handling of responses with control handles more universal. - Move RQSTYPE_RPT_ID_ACQ handling into new function. - Inline isp_handle_other_response(), becoming trivial after above. - Clean the list of IOCBs from pre-24xx ones.
show more ...
|
| #
b760d2ec
|
| 26-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
More cleanup in response queue and reset code.
|
| #
b05f17a1
|
| 26-Nov-2020 |
Alexander Motin <mav@FreeBSD.org> |
Some minor FCoE bits I had lying around.
|