diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index a7de0bca5bdd..82e8f90c4617 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-2006 Emulex. All rights reserved. * | 4 | * Copyright (C) 2004-2007 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 * |
@@ -27,10 +27,6 @@ struct lpfc_sli2_slim; | |||
27 | requests */ | 27 | requests */ |
28 | #define LPFC_MAX_NS_RETRY 3 /* Number of retry attempts to contact | 28 | #define LPFC_MAX_NS_RETRY 3 /* Number of retry attempts to contact |
29 | the NameServer before giving up. */ | 29 | the NameServer before giving up. */ |
30 | #define LPFC_DFT_HBA_Q_DEPTH 2048 /* max cmds per hba */ | ||
31 | #define LPFC_LC_HBA_Q_DEPTH 1024 /* max cmds per low cost hba */ | ||
32 | #define LPFC_LP101_HBA_Q_DEPTH 128 /* max cmds per low cost hba */ | ||
33 | |||
34 | #define LPFC_CMD_PER_LUN 3 /* max outstanding cmds per lun */ | 30 | #define LPFC_CMD_PER_LUN 3 /* max outstanding cmds per lun */ |
35 | #define LPFC_SG_SEG_CNT 64 /* sg element count per scsi cmnd */ | 31 | #define LPFC_SG_SEG_CNT 64 /* sg element count per scsi cmnd */ |
36 | #define LPFC_IOCB_LIST_CNT 2250 /* list of IOCBs for fast-path usage. */ | 32 | #define LPFC_IOCB_LIST_CNT 2250 /* list of IOCBs for fast-path usage. */ |
@@ -244,28 +240,23 @@ struct lpfc_hba { | |||
244 | #define FC_FABRIC 0x100 /* We are fabric attached */ | 240 | #define FC_FABRIC 0x100 /* We are fabric attached */ |
245 | #define FC_ESTABLISH_LINK 0x200 /* Reestablish Link */ | 241 | #define FC_ESTABLISH_LINK 0x200 /* Reestablish Link */ |
246 | #define FC_RSCN_DISCOVERY 0x400 /* Authenticate all devices after RSCN*/ | 242 | #define FC_RSCN_DISCOVERY 0x400 /* Authenticate all devices after RSCN*/ |
243 | #define FC_BLOCK_MGMT_IO 0x800 /* Don't allow mgmt mbx or iocb cmds */ | ||
247 | #define FC_LOADING 0x1000 /* HBA in process of loading drvr */ | 244 | #define FC_LOADING 0x1000 /* HBA in process of loading drvr */ |
248 | #define FC_UNLOADING 0x2000 /* HBA in process of unloading drvr */ | 245 | #define FC_UNLOADING 0x2000 /* HBA in process of unloading drvr */ |
249 | #define FC_SCSI_SCAN_TMO 0x4000 /* scsi scan timer running */ | 246 | #define FC_SCSI_SCAN_TMO 0x4000 /* scsi scan timer running */ |
250 | #define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */ | 247 | #define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */ |
251 | #define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */ | 248 | #define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */ |
252 | #define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */ | 249 | #define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */ |
250 | #define FC_LOOPBACK_MODE 0x40000 /* NPort is in Loopback mode */ | ||
251 | /* This flag is set while issuing */ | ||
252 | /* INIT_LINK mailbox command */ | ||
253 | #define FC_IGNORE_ERATT 0x80000 /* intr handler should ignore ERATT */ | ||
253 | 254 | ||
254 | uint32_t fc_topology; /* link topology, from LINK INIT */ | 255 | uint32_t fc_topology; /* link topology, from LINK INIT */ |
255 | 256 | ||
256 | struct lpfc_stats fc_stat; | 257 | struct lpfc_stats fc_stat; |
257 | 258 | ||
258 | /* These are the head/tail pointers for the bind, plogi, adisc, unmap, | 259 | struct list_head fc_nodes; |
259 | * and map lists. Their counters are immediately following. | ||
260 | */ | ||
261 | struct list_head fc_plogi_list; | ||
262 | struct list_head fc_adisc_list; | ||
263 | struct list_head fc_reglogin_list; | ||
264 | struct list_head fc_prli_list; | ||
265 | struct list_head fc_nlpunmap_list; | ||
266 | struct list_head fc_nlpmap_list; | ||
267 | struct list_head fc_npr_list; | ||
268 | struct list_head fc_unused_list; | ||
269 | 260 | ||
270 | /* Keep counters for the number of entries in each list. */ | 261 | /* Keep counters for the number of entries in each list. */ |
271 | uint16_t fc_plogi_cnt; | 262 | uint16_t fc_plogi_cnt; |
@@ -387,13 +378,17 @@ struct lpfc_hba { | |||
387 | 378 | ||
388 | mempool_t *mbox_mem_pool; | 379 | mempool_t *mbox_mem_pool; |
389 | mempool_t *nlp_mem_pool; | 380 | mempool_t *nlp_mem_pool; |
390 | struct list_head freebufList; | ||
391 | struct list_head ctrspbuflist; | ||
392 | struct list_head rnidrspbuflist; | ||
393 | 381 | ||
394 | struct fc_host_statistics link_stats; | 382 | struct fc_host_statistics link_stats; |
395 | }; | 383 | }; |
396 | 384 | ||
385 | static inline void | ||
386 | lpfc_set_loopback_flag(struct lpfc_hba *phba) { | ||
387 | if (phba->cfg_topology == FLAGS_LOCAL_LB) | ||
388 | phba->fc_flag |= FC_LOOPBACK_MODE; | ||
389 | else | ||
390 | phba->fc_flag &= ~FC_LOOPBACK_MODE; | ||
391 | } | ||
397 | 392 | ||
398 | struct rnidrsp { | 393 | struct rnidrsp { |
399 | void *buf; | 394 | void *buf; |