]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Switch fabric scans from GID_FT to GID_PT+GFF_ID/GFT_ID.
authorAlexander Motin <mav@FreeBSD.org>
Mon, 3 Jul 2017 15:56:45 +0000 (15:56 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Mon, 3 Jul 2017 15:56:45 +0000 (15:56 +0000)
commita94fab67bb9c07d5837c9e2ad25d48b9b701643a
tree73126e2c342a7b144676bcb54ca8bd52832cd6b2
parentbe9e8bfaea0093d7612b7ee5b357c5f70f1b7463
Switch fabric scans from GID_FT to GID_PT+GFF_ID/GFT_ID.

Instead of using GID_FT SNS request to get list of registered FCP ports,
use GID_PT to get list of all Nx_Ports, and then use GFF_ID and/or GFT_ID
requests to find whether they are FCP and target capable.

The problem with old approach is that GID_FT does not report ports without
FC-4 type registered.  In particular it was impossible to boot OS from
FreeBSD FC target using QLogic FC BIOS, since one does not register FC-4
type even on new cards and so ignored by old code as incompatible.

As a side bonus this allows initiator to skip pointless logins to other
initiators by fetching that information from SNS instead.

In case some switches do not implement GFF_ID/GFT_ID correctly, add sysctls
to disable that functionality.  I handled broken GFF_ID of my Brocade 200E,
but there may be other switches with different bugs.

Linux also uses GID_PT, but GFF_ID is disabled by default there, and GFT_ID
is not supported.

Sponsored by: iXsystems, Inc.
share/man/man4/isp.4
sys/dev/isp/isp.c
sys/dev/isp/isp_freebsd.c
sys/dev/isp/isp_library.c
sys/dev/isp/isp_library.h
sys/dev/isp/ispmbox.h
sys/dev/isp/ispvar.h