diff options
author | ken <ken@FreeBSD.org> | 2015-01-08 17:51:12 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2015-01-08 17:51:12 +0000 |
commit | 37a5c9febfc9e70e15ac4ef028692ba9d20f0c57 (patch) | |
tree | 653896ae043b2c9a8207329453930301a7534003 /sys/netinet6 | |
parent | 400655a4d3161237b0842268334fca7f9858601f (diff) | |
download | FreeBSD-src-37a5c9febfc9e70e15ac4ef028692ba9d20f0c57.zip FreeBSD-src-37a5c9febfc9e70e15ac4ef028692ba9d20f0c57.tar.gz |
Close a race in the isp(4) driver that caused devices to disappear
and not automatically come back if they were gone for a short
period of time.
The isp(4) driver has a 30 second gone device timer that gets
activated whenever a device goes away. If the device comes back
before the timer expires, we don't send a notification to CAM that
it has gone away. If, however, there is a command sent to the
device while it is gone and before it comes back, the isp(4) driver
sends the command back with CAM_SEL_TIMEOUT status.
CAM responds to the CAM_SEL_TIMEOUT status by removing the device.
In the case where a device comes back within the 30 second gone
device timer window, though, we weren't telling CAM the device
came back.
So, fix this by tracking whether we have told CAM the device is
gone, and if we have, send a rescan if it comes back within the 30
second window.
ispvar.h:
In the fcportdb_t structure, add a new bitfield,
reported_gone. This gets set whenever we return a command
with CAM_SEL_TIMEOUT status on a Fibre Channel device.
isp_freebsd.c:
In isp_done(), if we're sending CAM_SEL_TIMEOUT for for a
command sent to a FC device, set the reported_gone bit.
In isp_async(), in the ISPASYNC_DEV_STAYED case, rescan the
device in question if it is mapped to a target ID and has
been reported gone.
In isp_make_here(), take a port database entry argument,
and clear the reported_gone bit when we send a rescan to
CAM.
In isp_make_gone(), take a port database entry as an
argument, and set the reported_gone bit when we send an
async event telling CAM consumers that the device is gone.
Sponsored by: Spectra Logic
MFC after: 1 week
Diffstat (limited to 'sys/netinet6')
0 files changed, 0 insertions, 0 deletions