diff options
author | mav <mav@FreeBSD.org> | 2015-10-28 12:34:59 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-28 12:34:59 +0000 |
commit | 87747aebf2ea04c2c50b6bb4a1746690bd7a64dd (patch) | |
tree | 17c9374c8bfa55e2b8ed302e0984e73a822d389f /sys/dev/isp/ispmbox.h | |
parent | 51c57514a7cf540be909413d01aa8400b88153f1 (diff) | |
download | FreeBSD-src-87747aebf2ea04c2c50b6bb4a1746690bd7a64dd.zip FreeBSD-src-87747aebf2ea04c2c50b6bb4a1746690bd7a64dd.tar.gz |
Improve/fix loop scanning routine.
For the most of chips (except anscient ones) port handlers have no relation
to port IDs. In such situation old code scanning first 125 handlers was
quite naive. Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.
Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.
Diffstat (limited to 'sys/dev/isp/ispmbox.h')
-rw-r--r-- | sys/dev/isp/ispmbox.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index cf748a2..6c5f958 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -156,6 +156,8 @@ #define MBOX_SEND_CHANGE_REQUEST 0x0070 #define MBOX_FABRIC_LOGOUT 0x0071 #define MBOX_INIT_LIP_LOGIN 0x0072 +#define MBOX_GET_PORT_NODE_NAME_LIST 0x0075 +#define MBOX_GET_ID_LIST 0x007C #define MBOX_LUN_RESET 0x007E #define MBOX_DRIVER_HEARTBEAT 0x005B @@ -1342,6 +1344,40 @@ typedef struct { } isp_pdb_t; /* + * Port/Node Name List Element + */ +typedef struct { + uint8_t pnnle_name[8]; + uint16_t pnnle_handle; + uint16_t pnnle_reserved; +} isp_pnnle_t; + +#define PNNL_OPTIONS_NODE_NAMES (1<<0) +#define PNNL_OPTIONS_PORT_DATA (1<<2) +#define PNNL_OPTIONS_INITIATORS (1<<3) + +/* + * Port and N-Port Handle List Element + */ +typedef struct { + uint16_t pnhle_port_id_lo; + uint16_t pnhle_port_id_hi_handle; +} isp_pnhle_21xx_t; + +typedef struct { + uint16_t pnhle_port_id_lo; + uint16_t pnhle_port_id_hi; + uint16_t pnhle_handle; +} isp_pnhle_23xx_t; + +typedef struct { + uint16_t pnhle_port_id_lo; + uint16_t pnhle_port_id_hi; + uint16_t pnhle_handle; + uint16_t pnhle_reserved; +} isp_pnhle_24xx_t; + +/* * Port Database Changed Async Event information for 24XX cards */ #define PDB24XX_AE_OK 0x00 |