Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7730
b: refs/heads/master
c: cca5335
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Sep 5, 2005
1 parent ce667e6 commit 31834e7
Show file tree
Hide file tree
Showing 9 changed files with 742 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad3e0edaceb9771be7ffbd7aa24fb444a7ed85bf
refs/heads/master: cca5335caf2d19ef8bd6b833445d2c6ca652a89b
7 changes: 7 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#define DEBUG2_3_11(x) do {x;} while (0);
#define DEBUG2_9_10(x) do {x;} while (0);
#define DEBUG2_11(x) do {x;} while (0);
#define DEBUG2_13(x) do {x;} while (0);
#else
#define DEBUG2(x) do {} while (0);
#endif
Expand Down Expand Up @@ -169,8 +170,14 @@

#if defined(QL_DEBUG_LEVEL_13)
#define DEBUG13(x) do {x;} while (0)
#if !defined(DEBUG2_13)
#define DEBUG2_13(x) do {x;} while(0)
#endif
#else
#define DEBUG13(x) do {} while (0)
#if !defined(QL_DEBUG_LEVEL_2)
#define DEBUG2_13(x) do {} while(0)
#endif
#endif

#if defined(QL_DEBUG_LEVEL_14)
Expand Down
151 changes: 147 additions & 4 deletions trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
* valid range of an N-PORT id is 0 through 0x7ef.
*/
#define NPH_LAST_HANDLE 0x7ef
#define NPH_MGMT_SERVER 0x7fa /* FFFFFA */
#define NPH_SNS 0x7fc /* FFFFFC */
#define NPH_FABRIC_CONTROLLER 0x7fd /* FFFFFD */
#define NPH_F_PORT 0x7fe /* FFFFFE */
Expand Down Expand Up @@ -1131,10 +1132,7 @@ typedef struct {

uint8_t link_down_timeout;

uint8_t adapter_id_0[4];
uint8_t adapter_id_1[4];
uint8_t adapter_id_2[4];
uint8_t adapter_id_3[4];
uint8_t adapter_id[16];

uint8_t alt1_boot_node_name[WWN_SIZE];
uint16_t alt1_boot_lun_number;
Expand Down Expand Up @@ -1728,6 +1726,8 @@ typedef struct fc_port {

#define CT_REJECT_RESPONSE 0x8001
#define CT_ACCEPT_RESPONSE 0x8002
#define CT_REASON_CANNOT_PERFORM 0x09
#define CT_EXPL_ALREADY_REGISTERED 0x10

#define NS_N_PORT_TYPE 0x01
#define NS_NL_PORT_TYPE 0x02
Expand Down Expand Up @@ -1769,6 +1769,100 @@ typedef struct fc_port {
#define RSNN_NN_REQ_SIZE (16 + 8 + 1 + 255)
#define RSNN_NN_RSP_SIZE 16

/*
* HBA attribute types.
*/
#define FDMI_HBA_ATTR_COUNT 9
#define FDMI_HBA_NODE_NAME 1
#define FDMI_HBA_MANUFACTURER 2
#define FDMI_HBA_SERIAL_NUMBER 3
#define FDMI_HBA_MODEL 4
#define FDMI_HBA_MODEL_DESCRIPTION 5
#define FDMI_HBA_HARDWARE_VERSION 6
#define FDMI_HBA_DRIVER_VERSION 7
#define FDMI_HBA_OPTION_ROM_VERSION 8
#define FDMI_HBA_FIRMWARE_VERSION 9
#define FDMI_HBA_OS_NAME_AND_VERSION 0xa
#define FDMI_HBA_MAXIMUM_CT_PAYLOAD_LENGTH 0xb

struct ct_fdmi_hba_attr {
uint16_t type;
uint16_t len;
union {
uint8_t node_name[WWN_SIZE];
uint8_t manufacturer[32];
uint8_t serial_num[8];
uint8_t model[16];
uint8_t model_desc[80];
uint8_t hw_version[16];
uint8_t driver_version[32];
uint8_t orom_version[16];
uint8_t fw_version[16];
uint8_t os_version[128];
uint8_t max_ct_len[4];
} a;
};

struct ct_fdmi_hba_attributes {
uint32_t count;
struct ct_fdmi_hba_attr entry[FDMI_HBA_ATTR_COUNT];
};

/*
* Port attribute types.
*/
#define FDMI_PORT_ATTR_COUNT 5
#define FDMI_PORT_FC4_TYPES 1
#define FDMI_PORT_SUPPORT_SPEED 2
#define FDMI_PORT_CURRENT_SPEED 3
#define FDMI_PORT_MAX_FRAME_SIZE 4
#define FDMI_PORT_OS_DEVICE_NAME 5
#define FDMI_PORT_HOST_NAME 6

struct ct_fdmi_port_attr {
uint16_t type;
uint16_t len;
union {
uint8_t fc4_types[32];
uint32_t sup_speed;
uint32_t cur_speed;
uint32_t max_frame_size;
uint8_t os_dev_name[32];
uint8_t host_name[32];
} a;
};

/*
* Port Attribute Block.
*/
struct ct_fdmi_port_attributes {
uint32_t count;
struct ct_fdmi_port_attr entry[FDMI_PORT_ATTR_COUNT];
};

/* FDMI definitions. */
#define GRHL_CMD 0x100
#define GHAT_CMD 0x101
#define GRPL_CMD 0x102
#define GPAT_CMD 0x110

#define RHBA_CMD 0x200
#define RHBA_RSP_SIZE 16

#define RHAT_CMD 0x201
#define RPRT_CMD 0x210

#define RPA_CMD 0x211
#define RPA_RSP_SIZE 16

#define DHBA_CMD 0x300
#define DHBA_REQ_SIZE (16 + 8)
#define DHBA_RSP_SIZE 16

#define DHAT_CMD 0x301
#define DPRT_CMD 0x310
#define DPA_CMD 0x311

/* CT command header -- request/response common fields */
struct ct_cmd_hdr {
uint8_t revision;
Expand Down Expand Up @@ -1826,6 +1920,43 @@ struct ct_sns_req {
uint8_t name_len;
uint8_t sym_node_name[255];
} rsnn_nn;

struct {
uint8_t hba_indentifier[8];
} ghat;

struct {
uint8_t hba_identifier[8];
uint32_t entry_count;
uint8_t port_name[8];
struct ct_fdmi_hba_attributes attrs;
} rhba;

struct {
uint8_t hba_identifier[8];
struct ct_fdmi_hba_attributes attrs;
} rhat;

struct {
uint8_t port_name[8];
struct ct_fdmi_port_attributes attrs;
} rpa;

struct {
uint8_t port_name[8];
} dhba;

struct {
uint8_t port_name[8];
} dhat;

struct {
uint8_t port_name[8];
} dprt;

struct {
uint8_t port_name[8];
} dpa;
} req;
};

Expand Down Expand Up @@ -1883,6 +2014,12 @@ struct ct_sns_rsp {
struct {
uint8_t fc4_types[32];
} gft_id;

struct {
uint32_t entry_count;
uint8_t port_name[8];
struct ct_fdmi_hba_attributes attrs;
} ghat;
} rsp;
};

Expand Down Expand Up @@ -2033,6 +2170,8 @@ struct isp_operations {
uint16_t (*calc_req_entries) (uint16_t);
void (*build_iocbs) (srb_t *, cmd_entry_t *, uint16_t);
void * (*prep_ms_iocb) (struct scsi_qla_host *, uint32_t, uint32_t);
void * (*prep_ms_fdmi_iocb) (struct scsi_qla_host *, uint32_t,
uint32_t);

uint8_t * (*read_nvram) (struct scsi_qla_host *, uint8_t *,
uint32_t, uint32_t);
Expand Down Expand Up @@ -2112,6 +2251,7 @@ typedef struct scsi_qla_host {
#define IOCTL_ERROR_RECOVERY 23
#define LOOP_RESET_NEEDED 24
#define BEACON_BLINK_NEEDED 25
#define REGISTER_FDMI_NEEDED 26

uint32_t device_flags;
#define DFLG_LOCAL_DEVICES BIT_0
Expand Down Expand Up @@ -2205,6 +2345,7 @@ typedef struct scsi_qla_host {
int port_down_retry_count;
uint8_t mbx_count;
uint16_t last_loop_id;
uint16_t mgmt_svr_loop_id;

uint32_t login_retry_count;

Expand Down Expand Up @@ -2319,6 +2460,7 @@ typedef struct scsi_qla_host {
uint8_t model_number[16+1];
#define BINZERO "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
char *model_desc;
uint8_t adapter_id[16+1];

uint8_t *node_name;
uint8_t *port_name;
Expand Down Expand Up @@ -2378,6 +2520,7 @@ typedef struct scsi_qla_host {
#define QLA_SUSPENDED 0x106
#define QLA_BUSY 0x107
#define QLA_RSCNS_HANDLED 0x108
#define QLA_ALREADY_REGISTERED 0x109

/*
* Stat info for all adpaters
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ extern int ql2xplogiabsentdevice;
extern int ql2xenablezio;
extern int ql2xintrdelaytimer;
extern int ql2xloginretrycount;
extern int ql2xfdmienable;

extern void qla2x00_sp_compl(scsi_qla_host_t *, srb_t *);

Expand Down Expand Up @@ -269,6 +270,9 @@ extern int qla2x00_rft_id(scsi_qla_host_t *);
extern int qla2x00_rff_id(scsi_qla_host_t *);
extern int qla2x00_rnn_id(scsi_qla_host_t *);
extern int qla2x00_rsnn_nn(scsi_qla_host_t *);
extern void *qla2x00_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
extern void *qla24xx_prep_ms_fdmi_iocb(scsi_qla_host_t *, uint32_t, uint32_t);
extern int qla2x00_fdmi_register(scsi_qla_host_t *);

/*
* Global Function Prototypes in qla_rscn.c source file.
Expand Down
Loading

0 comments on commit 31834e7

Please sign in to comment.