HomeFreeBSD

ocs_fc: IO timeout handling and error reporting fix.

Description

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

(cherry picked from commit 70547544ce931357c980be47d937e5b57a2d7f49)

Details

Provenance
Ram Kishore Vegesna <ram@FreeBSD.org>Authored on Dec 12 2023, 3:22 PM
Parents
rG42b80d160b4d: bhyve.8: add missed dot
Branches
Unknown
Tags
Unknown

Event Timeline

Ram Kishore Vegesna <ram@FreeBSD.org> committed rG104eae582c91: ocs_fc: IO timeout handling and error reporting fix. (authored by Ram Kishore Vegesna <ram@FreeBSD.org>).Dec 27 2023, 12:27 PM