aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r--drivers/scsi/lpfc/lpfc.h43
1 files changed, 24 insertions, 19 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 38ffa8d6e629..087c44539a16 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -1,7 +1,7 @@
1/******************************************************************* 1/*******************************************************************
2 * This file is part of the Emulex Linux Device Driver for * 2 * This file is part of the Emulex Linux Device Driver for *
3 * Fibre Channel Host Bus Adapters. * 3 * Fibre Channel Host Bus Adapters. *
4 * Copyright (C) 2004-2005 Emulex. All rights reserved. * 4 * Copyright (C) 2004-2006 Emulex. All rights reserved. *
5 * EMULEX and SLI are trademarks of Emulex. * 5 * EMULEX and SLI are trademarks of Emulex. *
6 * www.emulex.com * 6 * www.emulex.com *
7 * Portions Copyright (C) 2004-2005 Christoph Hellwig * 7 * Portions Copyright (C) 2004-2005 Christoph Hellwig *
@@ -121,7 +121,9 @@ struct lpfc_stats {
121 uint32_t elsRcvLOGO; 121 uint32_t elsRcvLOGO;
122 uint32_t elsRcvPRLO; 122 uint32_t elsRcvPRLO;
123 uint32_t elsRcvPRLI; 123 uint32_t elsRcvPRLI;
124 uint32_t elsRcvRRQ; 124 uint32_t elsRcvLIRR;
125 uint32_t elsRcvRPS;
126 uint32_t elsRcvRPL;
125 uint32_t elsXmitFLOGI; 127 uint32_t elsXmitFLOGI;
126 uint32_t elsXmitPLOGI; 128 uint32_t elsXmitPLOGI;
127 uint32_t elsXmitPRLI; 129 uint32_t elsXmitPRLI;
@@ -167,33 +169,35 @@ struct lpfc_sysfs_mbox {
167}; 169};
168 170
169struct lpfc_hba { 171struct lpfc_hba {
170 struct list_head hba_list; /* List of hbas/ports */
171 struct lpfc_sli sli; 172 struct lpfc_sli sli;
172 struct lpfc_sli2_slim *slim2p; 173 struct lpfc_sli2_slim *slim2p;
173 dma_addr_t slim2p_mapping; 174 dma_addr_t slim2p_mapping;
174 uint16_t pci_cfg_value; 175 uint16_t pci_cfg_value;
175 176
176 struct semaphore hba_can_block; 177 struct semaphore hba_can_block;
177 uint32_t hba_state; 178 int32_t hba_state;
178 179
179#define LPFC_INIT_START 1 /* Initial state after board reset */ 180#define LPFC_STATE_UNKNOWN 0 /* HBA state is unknown */
180#define LPFC_INIT_MBX_CMDS 2 /* Initialize HBA with mbox commands */ 181#define LPFC_WARM_START 1 /* HBA state after selective reset */
181#define LPFC_LINK_DOWN 3 /* HBA initialized, link is down */ 182#define LPFC_INIT_START 2 /* Initial state after board reset */
182#define LPFC_LINK_UP 4 /* Link is up - issue READ_LA */ 183#define LPFC_INIT_MBX_CMDS 3 /* Initialize HBA with mbox commands */
183#define LPFC_LOCAL_CFG_LINK 5 /* local NPORT Id configured */ 184#define LPFC_LINK_DOWN 4 /* HBA initialized, link is down */
184#define LPFC_FLOGI 6 /* FLOGI sent to Fabric */ 185#define LPFC_LINK_UP 5 /* Link is up - issue READ_LA */
185#define LPFC_FABRIC_CFG_LINK 7 /* Fabric assigned NPORT Id 186#define LPFC_LOCAL_CFG_LINK 6 /* local NPORT Id configured */
187#define LPFC_FLOGI 7 /* FLOGI sent to Fabric */
188#define LPFC_FABRIC_CFG_LINK 8 /* Fabric assigned NPORT Id
186 configured */ 189 configured */
187#define LPFC_NS_REG 8 /* Register with NameServer */ 190#define LPFC_NS_REG 9 /* Register with NameServer */
188#define LPFC_NS_QRY 9 /* Query NameServer for NPort ID list */ 191#define LPFC_NS_QRY 10 /* Query NameServer for NPort ID list */
189#define LPFC_BUILD_DISC_LIST 10 /* Build ADISC and PLOGI lists for 192#define LPFC_BUILD_DISC_LIST 11 /* Build ADISC and PLOGI lists for
190 * device authentication / discovery */ 193 * device authentication / discovery */
191#define LPFC_DISC_AUTH 11 /* Processing ADISC list */ 194#define LPFC_DISC_AUTH 12 /* Processing ADISC list */
192#define LPFC_CLEAR_LA 12 /* authentication cmplt - issue 195#define LPFC_CLEAR_LA 13 /* authentication cmplt - issue
193 CLEAR_LA */ 196 CLEAR_LA */
194#define LPFC_HBA_READY 32 197#define LPFC_HBA_READY 32
195#define LPFC_HBA_ERROR 0xff 198#define LPFC_HBA_ERROR -1
196 199
200 int32_t stopped; /* HBA has not been restarted since last ERATT */
197 uint8_t fc_linkspeed; /* Link speed after last READ_LA */ 201 uint8_t fc_linkspeed; /* Link speed after last READ_LA */
198 202
199 uint32_t fc_eventTag; /* event tag for link attention */ 203 uint32_t fc_eventTag; /* event tag for link attention */
@@ -245,6 +249,7 @@ struct lpfc_hba {
245#define FC_SCSI_SCAN_TMO 0x4000 /* scsi scan timer running */ 249#define FC_SCSI_SCAN_TMO 0x4000 /* scsi scan timer running */
246#define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */ 250#define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */
247#define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */ 251#define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */
252#define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */
248 253
249 uint32_t fc_topology; /* link topology, from LINK INIT */ 254 uint32_t fc_topology; /* link topology, from LINK INIT */
250 255
@@ -289,8 +294,8 @@ struct lpfc_hba {
289 uint32_t cfg_link_speed; 294 uint32_t cfg_link_speed;
290 uint32_t cfg_cr_delay; 295 uint32_t cfg_cr_delay;
291 uint32_t cfg_cr_count; 296 uint32_t cfg_cr_count;
297 uint32_t cfg_multi_ring_support;
292 uint32_t cfg_fdmi_on; 298 uint32_t cfg_fdmi_on;
293 uint32_t cfg_fcp_bind_method;
294 uint32_t cfg_discovery_threads; 299 uint32_t cfg_discovery_threads;
295 uint32_t cfg_max_luns; 300 uint32_t cfg_max_luns;
296 uint32_t cfg_poll; 301 uint32_t cfg_poll;