| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Aborting ATIO while its CTIOs are in progress makes impossible to
handle their completions, making them stuck forever. Detect this
case by checking ctcnt counter and if so instead of aborting just
mark the ATIO as dead to block any new CTIOs. It is not perfect
since the task id can not be reused for some more time, but not
as bad as the task stuck forever.
MFC after: 1 week
(cherry picked from commit 2c48a8f161c91bf7020122697d064a25287097a3)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- When handling notify acknowledge from target code for task abort
request, not only send abort to the firmware, but also delete the
ATIO private data associated with the command. It is required for
proper tag reuse, allowing new "conflicting" commands to be passed
to the target. CTL was already fixed to handle that right, instead
of delaying them in restart queue of the driver.
- When target finally aborts the command (which it should have
done before the notify ack) we should not send another abort to
the firmware. Since we already sent the abort and deleted ATIO
private data above, just return successful completion here, doing
nothing. Since the tag can be reused by that time, we can not
rely on its uniqueness, so when searching to the ATIO private data
compare also the aborted CCB pointer in addition to the tag.
- Fix BA_RJT sending in isp_acknak_abts(). While it should be
rare, teach the code to send error responses for ABTS requests.
MFC after: 2 weeks
(cherry picked from commit ec3175fc3b2c1b07144a85e6a3e2fe534acc0c87)
|
| |
|
|
|
|
|
|
|
|
| |
When aborting command waiting in restart queue remove it from the
queue before freeing it. This should fix NULL dereference panics
we saw on some very busy system.
MFC after: 2 weeks
(cherry picked from commit 40fb1b8bc1cf452d83edc5b25bc1d8bd13c0e72d)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ispfw(4) recently gained firmware for Qlogic 27XX and 28XX
FC controllers, and isp(4) now selects the newer of firmware in
flash or in ispfw(4) to load for those controllers.
This differs from the previous behavior (which remains for older
controllers), which was to always load the ispfw(4) firmware if it
is available.
This adds a loader tunable, hint.isp.N.fwload_force to default to
loading the ispfw(4) firmware, whether or not it is newer than the
firmware in flash. This allows the user to always use the known
firmware version included with the kernel.
Note that there is an existing fwload_disable tunable that tells
the driver to always load the firmware from flash and ignore
ispfw(4). If fwload_disable is set, fwload_force will be ignored.
So users with existing fwload_disable tunables will have the same
behavior.
If a user specifies both fwload_force and fwload_disable for the
same controller, the isp(4) driver prints a warning message,
and fwload_disable will be honored.
The user can see which firmware is active through the
dev.isp.N.fw_version* sysctl variables.
share/man/man4/isp.4:
Document the new loader tunable.
sys/dev/isp/isp.c:
In isp_load_risc_flash(), changet the decision logic to
also consider ISP_CFG_FWLOAD_ONLY. Load the flash firmware
and get the version, so the user knows what it is, but if
the user set fwload_force, honor that. If the user didn't
set fwload_force, the behavior remains to select the newer
firmware version.
sys/dev/isp/isp_pci.c:
Add a new fwload_force tunable. Print out a warning if the
user sets both fwload_disable and fwload_force.
sys/dev/isp/ispvar.h:
Add a new ISP_CFG_FWLOAD_FORCE configuration bit.
Reviewed by: mav
MFC after: 1 week
Sponsored by: Spectra Logic
Differential Revision: <https://reviews.freebsd.org/D45688>
(cherry picked from commit 31354813f3c6e87532189be77c2f10a017c55472)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
(cherry picked from commit 137b004e2b7ab504abf98c4aad9d52607df47b9a)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Prevent kernel panic by not running ISPCTL_FCLINK_TEST after a
failed ISPCTL_ABORT_CMD.
Reviewed by: mav
Tested by: Arne Steinkamm <arne@steinkamm.com>
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45718
(cherry picked from commit 8aa9192ce98aec07b24f8279c709237dd2c4421b)
|
| |
|
|
|
|
|
| |
Reported by: Jenkins
Fixes: 10ed63fc06cb ("isp(4): Rework firmware handling/loading")
(cherry picked from commit 91d2a093dfaccdf288db663b6e9d47539ea1c1bf)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit 10ed63fc06cb9902cc783ce8d0086c9aa97ed1e1)
|
| |
|
|
|
|
|
|
|
|
|
| |
Please tools/build/checkstyle9.pl as mentioned by imp@
PR: 271062
Reviewed by: imp, mav
Sponsored by: Technical University of Munich
Pull Request: https://github.com/freebsd/freebsd-src/pull/726
(cherry picked from commit 348ec8dc036bf4ba1f607bb8acb25a0358436cc7)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename isp_rd_2400_nvram to isp_rd_2xxx_flash.
Cleanup some leftovers.
Hide all output regarding FLT parsing behind ISP_LOGDEBUG0.
Thanks to imp@ and mav@ for reviewing and commenting.
PR: 271062
Reviewed by: imp, mav
Sponsored by: Technical University of Munich
Pull Request: https://github.com/freebsd/freebsd-src/pull/726
(cherry picked from commit 295fd9c1caeb42a4c93005080320d011bf01e4c0)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ISP26xx based HBAs are left as is for now with static NVRAM addressing.
Those HBAs are known as 83xx (2031 and 8031 for real) and need special handling.
This is left for further investigation for now.
Cosmetics:
- rename functions and defines as they are no longer specific to 28xx
- set reasonable log levels
- sort FLT and NVRAM functions (in the order they are used)
Tested and approved to work on real hardware with:
- Qlogic ISP 2532 (QLogic QLE2562 8Gb 2Port FC Adapter)
- Qlogic ISP 2722 (QLogic QLE2690 16Gb FC Adapter)
- Qlogic ISP 2812 (QLogic QLE2772 32Gbit 2Port FC Adapter)
PR: 271062
Reviewed by: imp, mav
Sponsored by: Technical University of Munich
Pull Request: https://github.com/freebsd/freebsd-src/pull/726
(cherry picked from commit 707e4d1b20aa3983f7cd2f444d6ce41eebc02698)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FLT is like a TOC for the flash area and contains entries for every flash
region with start/end address, size and flags.
Start using NVRAM addresses from FLT instead of hardcoded ones for ISP28xx
based HBAs.
The FLT should be available on earlier HBAs too, probably since ISP24xx based.
This needs further investigation and testing.
PR: 271062
Reviewed by: imp, mav
Sponsored by: Technical University of Munich
Pull Request: https://github.com/freebsd/freebsd-src/pull/726
(cherry picked from commit 27b4a1b7e5b871c248dc501aa359c93f7263b074)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use correct NVRAM address for ISP28xx based HBAs to read NVRAM contents.
WWPN/WWNN and framesize are correctly read from NVRAM now.
PR: 271062
Reviewed by: imp, mav
Sponsored by: Technical University of Munich
Pull Request: https://github.com/freebsd/freebsd-src/pull/726
(cherry picked from commit f76f7fefa1bb5dc2ec0c9e44740faac0b46dac25)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit 407abff6a445c8db335093868e9e7e70438c5901)
|
| |
|
|
| |
(cherry picked from commit e4d4beba435815841616d8c4e1e94d3ff00fc36b)
|
| |
|
|
|
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
Similar commit in current:
(cherry picked from commit 685dc743dc3b)
|
| |
|
|
|
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
Similar commit in current:
(cherry picked from commit 71625ec9ad2a)
|
| |
|
|
|
|
|
|
| |
- s/Constatns/Constants/
Obtained from: NetBSD
(cherry picked from commit d3367c35cb12d4acde62ffbb72740801352cd3fc)
|
| |
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
|
| |
|
|
|
|
| |
- s/to to/to/
(cherry picked from commit a5beac3992fb874e57768b3c8d852a806bcb8b21)
|
| |
|
|
|
|
| |
- s/overriden/overridden/
(cherry picked from commit 310d144a83411abedc17bfeec07f1f7ccee2434e)
|
| |
|
|
|
|
| |
- s/for for/for/
(cherry picked from commit bafe4cee3db4846f443241be9f995d72347c3647)
|
| |
|
|
|
|
|
|
|
|
|
| |
It appears at least on QLE2694L cards 3rd and 4th ports follow the
same NVRAM addressing logic as the first two. In lack of proper
documentation this guess is as good as it can be.
MFC after: 1 week
Sponsored by: iXsystems, Inc.
(cherry picked from commit 483e464ed4325a0710485925ecfbe0e1c8d6bb02)
|
| |
|
|
|
|
| |
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 14c912c60dbdeea1769eb32a511e8822356cc6ad)
|
| |
|
|
|
|
| |
MFC after: 2 weeks
(cherry picked from commit b776de6796fa0cd1b7dfaad75402e10907d47f29)
|
| |
|
|
| |
Notes:
svn path=/head/; revision=368133
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
Notes:
svn path=/head/; revision=368105
|
| |
|
|
| |
Notes:
svn path=/head/; revision=368091
|
| |
|
|
| |
Notes:
svn path=/head/; revision=368079
|
| |
|
|
| |
Notes:
svn path=/head/; revision=368044
|
| |
|
|
| |
Notes:
svn path=/head/; revision=368043
|
| |
|
|
| |
Notes:
svn path=/head/; revision=368001
|
| |
|
|
| |
Notes:
svn path=/head/; revision=367991
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It was broken by design and unused for years due to conflicts between
different threads, fighting for the same set of mailbox registers, not
designed for multiple requests at a time. So either request has to be
synchronous and spin under the lock, or it should be sent asynchronously
through the queues as Mailbox Command IOCB or some other way.
This removes any OS specifics from the wait code, so it can be inlined.
Notes:
svn path=/head/; revision=367986
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=367985
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=367979
|
| |
|
|
| |
Notes:
svn path=/head/; revision=367937
|
| |
|
|
|
|
|
| |
Option ISP_TARGET_MODE is evil.
Notes:
svn path=/head/; revision=367929
|
| |
|
|
|
|
|
|
|
|
|
| |
- Allocate 256 handlers more than payload commands for management purposes.
- Increase maximum number of handlers from 8K to 16K by tuning the format.
- Just to be safe limit the number of payload commands to 16K - 256.
- Limit number of target exchanges in mixed mode to the number of atpds.
- If we still somehow get out of atpds -- return BUSY, since we really are.
Notes:
svn path=/head/; revision=367926
|
| |
|
|
|
|
|
|
|
|
| |
There is not much to inherit any more, may create more problems than solve.
Instead parent them all directly to upstream.
While there, add missed payload tag and tune scratch tag destructions.
Notes:
svn path=/head/; revision=367925
|
| |
|
|
|
|
|
|
| |
The first was obsolete since 26xx, not used on 25xx and not needed on 24xx.
The second seems never worked on 24xx and up.
Notes:
svn path=/head/; revision=367924
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qlogic chips store S/G lists in the same queue as requests themselves. In
the worst case 1MB I/O may require up to 52 IOCBs, that means queue of 1024
IOCBs can store only 19 of such requests. The increase reduces chances of
overflow, while we should be able to afford additional 512KB of RAM per HBA.
The Linux driver uses comparable numbers.
While there, decouple ATIO queue size from response queue size. There is
no reason for them to be equal.
Notes:
svn path=/head/; revision=367909
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Make isp_start() to set all the IOCB fields aside of S/G list, removing
extra information from isp_send_cmd(), now only doing S/G lists and sending.
- Turn DMA setup/free from being card and PCI-specific into OS-specific,
instead add new card-specific method for isp_send_cmd(). Previously this
function was a monster handling all the cards.
- Remove double error code translation.
Notes:
svn path=/head/; revision=367906
|
| |
|
|
| |
Notes:
svn path=/head/; revision=367858
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=367857
|
| |
|
|
|
|
|
|
|
|
|
| |
Ecmd memory is not directly related to the request queue, only referenced
from it sometimes in target mode. Separate allocation should be easier
in case of fragmented memory and can be skipped when target is not built.
MFC after: 1 month
Notes:
svn path=/head/; revision=367784
|
| |
|
|
|
|
|
| |
MFC after: 1 month
Notes:
svn path=/head/; revision=367782
|
| |
|
|
|
|
|
|
|
| |
We need only 24 bytes (fcp_rsp_iu_t) there for isp_put_fcp_rsp_iu().
MFC after: 1 month
Notes:
svn path=/head/; revision=367781
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SAM-3 specification introduced concept of Task Priority, that was renamed
to Command Priority in SAM-4, and supported by all modern SCSI transports.
It provides 15 levels of relative priorities: 1 - highest, 15 - lowest and
0 - default. SAT specification for SATA devices translates priorities 1-3
into NCQ high priority.
This change adds new "priority" field into empty spots of struct ccb_scsiio
and struct ccb_accept_tio of CAM and struct ctl_scsiio of CTL. Respective
support is added into iscsi(4), isp(4), mpr(4), mps(4) and ocs_fc(4) drivers
for both initiator and where applicable target roles. Minimal support was
added to CTL to receive the priority value from different frontends, pass it
between HA controllers and report in few places.
This patch does not add consumers of this functionality, so nothing should
really change yet, since the field is still set to 0 (default) on initiator
and not actively used on target. Those are to be implemented separately.
I've confirmed priority working on WD Red SATA disks connected via mpr(4)
and properly transferred to CTL target via iscsi(4), isp(4) and ocs_fc(4).
While there, added missing tag_action support to ocs_fc(4) initiator role.
MFC after: 1 month
Relnotes: yes
Sponsored by: iXsystems, Inc.
Notes:
svn path=/head/; revision=367044
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
Notes:
svn path=/head/; revision=358333
|