#
792e47a5 |
| 28-Dec-2024 |
Fuqian Huang <huangfq.daxian@gmail.com> |
ocs_fc: print instance_index value rather than pointer itself in ocs_cam.c
In function ocs_scsi_recv_tmf, print instance_index rather than the pointer itself to avoid printing out kernel pointer to
ocs_fc: print instance_index value rather than pointer itself in ocs_cam.c
In function ocs_scsi_recv_tmf, print instance_index rather than the pointer itself to avoid printing out kernel pointer to user space.
PR: 238659 Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com> Reviewed-by: imp
show more ...
|
Revision tags: release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
a9504d76 |
| 13-Dec-2023 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
ocs_fc: Use xpt_path_sbuf() to copy the path to sbuf.
Reported by: imp MFC after: 1 week
|
#
70547544 |
| 12-Dec-2023 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
ocs_fc: IO timeout handling and error reporting fix.
Hardware timeout uses a 8-bit timeout value and expects the timeout to be less than 255 seconds. Added software timer implemetation to timeout an
ocs_fc: IO timeout handling and error reporting fix.
Hardware timeout uses a 8-bit timeout value and expects the timeout to be less than 255 seconds. Added software timer implemetation to timeout and abort the IOs with timeout more than 255 seconds.
Fix the timeout problem by dividing CAM timeouts by 1000 as hardware expects timeout value in seconds. Before this change, CAM timeouts in milliseconds were getting truncated to 8 bits and converted to seconds. So the actual timeout used when going down to the card would depend on the bottom 8 bits of the timeout used.
Add the mapping of ocs_fc error status to CAM status.
Reported by: ken Reviewed by: ken Tested by: ken, ram Approved by: ken MFC after: 1 week
show more ...
|
Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
8d9e2928 |
| 20-Jul-2022 |
Dimitry Andric <dim@FreeBSD.org> |
Fix unused variable warning in ocs_cam.c
With clang 15, the following -Werror warning is produced:
sys/dev/ocs_fc/ocs_cam.c:2556:11: error: variable 'count' set but not used [-Werror,-Wunused-b
Fix unused variable warning in ocs_cam.c
With clang 15, the following -Werror warning is produced:
sys/dev/ocs_fc/ocs_cam.c:2556:11: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable] uint32_t count; ^
The 'count' variable seems to be a left-over from some debugging code that no longer exists, and can be removed without any functional change.
MFC after: 3 days
show more ...
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
41e94669 |
| 24-Sep-2021 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
ocs_fc: Fix device lost timer where device is not getting deleted.
Issue: Devices wont go away after the link down.
Device lost timer functionality in ocs_fc is broken, `is_target` flag is not set
ocs_fc: Fix device lost timer where device is not getting deleted.
Issue: Devices wont go away after the link down.
Device lost timer functionality in ocs_fc is broken, `is_target` flag is not set in the target database and target delete is skipped.
Fix: Remove unused flags and delete the device when timer expires.
Reported by: ken@kdm.org Reviewed by: mav, ken
show more ...
|
#
d063d1bc |
| 24-Sep-2021 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
ocs_fc: When commands complete with an error, freeze the device queue.
Proper error recovery depends on freezing the device queue when an error occurs, so we can recover from an error before sending
ocs_fc: When commands complete with an error, freeze the device queue.
Proper error recovery depends on freezing the device queue when an error occurs, so we can recover from an error before sending additional commands.
The ocs_fc(4) driver was not freezing the device queue for most SCSI errors, and that broke error recovery.
sys/dev/ocs_fc/ocs_cam.c: In ocs_scsi_initiator_io_cb(), freeze the device queue if we're passing back status other than CAM_REQ_CMP.
Submitted by: ken@kdm.org Reviewed by: mav, ken
show more ...
|
#
1af49c2e |
| 24-Sep-2021 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
ocs_fc: Fix CAM status reporting in ocs_fc(4) when no data is returned.
In ocs_scsi_initiator_io_cb(), if the SCSI command that is getting completed had a residual equal to the trans
ocs_fc: Fix CAM status reporting in ocs_fc(4) when no data is returned.
In ocs_scsi_initiator_io_cb(), if the SCSI command that is getting completed had a residual equal to the transfer length, it was setting the CCB status to CAM_REQ_CMP.
That breaks the expected behavior for commands like READ ATTRIBUTE. For READ ATTRIBUTE, if the first attribute requested doesn't exist, the command is supposed to return an error (Illegal Request, Invalid Field in CDB). The broken behavior for READ ATTRIBUTE caused LTFS tape formatting to fail. It looks for attribute 0x1623, and expects to see an error if the attribute isn't present.
In addition, if the residual is negative (indicating an overrun), only set the CCB status to CAM_DATA_RUN_ERR if we have not already reported an error. The SCSI sense data will have more detail about what went wrong.
sys/dev/ocs_fc/ocs_cam.c: In ocs_scsi_initiator_io_cb(), don't set the status to CAM_REQ_CMP if the residual is equal to the transfer length.
Also, only set CAM_DATA_RUN_ERR if we didn't get SCSI status.
Submitted by: ken@kdm.org Reviewed by: mav, ken
show more ...
|
#
322dbb8c |
| 24-Sep-2021 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
ocs_fc: Increase maximum supported SG elements to support larger transfer sizes.
Reported by: ken@kdm.org Reviewed by: mav, ken
|
Revision tags: release/13.0.0 |
|
#
88364968 |
| 25-Oct-2020 |
Alexander Motin <mav@FreeBSD.org> |
Introduce support of SCSI Command Priority.
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 pr
Introduce support of SCSI Command Priority.
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.
show more ...
|
#
eb5a54f8 |
| 25-Oct-2020 |
Alexander Motin <mav@FreeBSD.org> |
Fix incorrect constants of target tag action.
ocs_scsi_recv_cmd() receives the flags after ocs_get_flags_fcp_cmd(), which translates them from FCP_TASK_ATTR_* to OCS_SCSI_CMD_*. As result non-SIMPL
Fix incorrect constants of target tag action.
ocs_scsi_recv_cmd() receives the flags after ocs_get_flags_fcp_cmd(), which translates them from FCP_TASK_ATTR_* to OCS_SCSI_CMD_*. As result non-SIMPLE requests turned into HEAD or ORDERED depending on direction.
MFC after: 2 weeks
show more ...
|
Revision tags: release/12.2.0 |
|
#
98d835ae |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
ocs_fc: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
7e565c55 |
| 30-Jan-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343320 through r343570.
|
#
4915e5c7 |
| 23-Jan-2019 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
Fixed issues reported by coverity scan.
Approved by: mav MFC after: 3 weeks
|
#
b9732f78 |
| 11-Jan-2019 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
Remove accessing remote node and domain objects while processing cam actions. Issue: ocs_fc(4) driver panics. It's induced by setting the port_state sysctl to offline, then online, then offline, th
Remove accessing remote node and domain objects while processing cam actions. Issue: ocs_fc(4) driver panics. It's induced by setting the port_state sysctl to offline, then online, then offline, then online, and so forth and so on in rapid succession.
Reason: While we set the port_state to online fc discovery will start and OS is enumerating the target discs by calling ocs_action(), then set the port state to "offline" which deletes domain/sport/nodes.
In ocs_action()->XPT_GET_TRAN_SETTINGS we are accessing the remote node which can be invalid to get the wwpn, wwnn and port.
Fix: Removed accessing of remote node and domain in some ocs_action() cases. Populated the required values from ocs_fcport. This removes the dependency of node and domain structures while processing XPT_PATH_INQ and XPT_GET_TRAN_SETTINGS. We will invalidate the target entries after the device lost timeout(30 seconds).
Approved by: ken, mav MFC after: 3 weeks
show more ...
|
Revision tags: release/12.0.0 |
|
#
6affb8eb |
| 18-Jul-2018 |
Ram Kishore Vegesna <ram@FreeBSD.org> |
Implemented Device Lost Timer, which is used to give target device the time to recover before marking dead.
Issue: IO fails immediately after doing port-toggle. Fix: Added LDT(Device Lost Timer)- we
Implemented Device Lost Timer, which is used to give target device the time to recover before marking dead.
Issue: IO fails immediately after doing port-toggle. Fix: Added LDT(Device Lost Timer)- we wait a specific period of time prior to telling the OS about lost device.
Approved by: ken, mav MFC after: 3 days Differential Revision: D16196
show more ...
|
Revision tags: release/11.2.0 |
|
#
ef270ab1 |
| 30-Mar-2018 |
Kenneth D. Merry <ken@FreeBSD.org> |
Bring in the Broadcom/Emulex Fibre Channel driver, ocs_fc(4).
The ocs_fc(4) driver supports the following hardware:
Emulex 16/8G FC GEN 5 HBAS LPe15004 FC Host Bus Adapters LPe160XX FC Host Bus A
Bring in the Broadcom/Emulex Fibre Channel driver, ocs_fc(4).
The ocs_fc(4) driver supports the following hardware:
Emulex 16/8G FC GEN 5 HBAS LPe15004 FC Host Bus Adapters LPe160XX FC Host Bus Adapters
Emulex 32/16G FC GEN 6 HBAS LPe3100X FC Host Bus Adapters LPe3200X FC Host Bus Adapters
The driver supports target and initiator mode, and also supports FC-Tape.
Note that the driver only currently works on little endian platforms. It is only included in the module build for amd64 and i386, and in GENERIC on amd64 only.
Submitted by: Ram Kishore Vegesna <ram.vegesna@broadcom.com> Reviewed by: mav MFC after: 5 days Relnotes: yes Sponsored by: Broadcom Differential Revision: https://reviews.freebsd.org/D11423
show more ...
|