aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 23:32:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 23:32:16 -0400
commit6ec129c3a2f8b38bc37e42348470ccfcb7460146 (patch)
tree3f11a99b9680728951b371fe12b5e01b6fc545a4 /drivers/scsi/lpfc/lpfc.h
parent01e73be3c8f254ef19d787f9b6757468175267eb (diff)
parentb64ddf96456cde17be22bf74cafed381a29d58ba (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (58 commits) [SCSI] zfcp: clear boxed flag on unit reopen. [SCSI] zfcp: clear adapter failed flag if an fsf request times out. [SCSI] zfcp: rework request ID management. [SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI [SCSI] zfcp: Locking for req_no and req_seq_no [SCSI] zfcp: print S_ID and D_ID with 3 bytes [SCSI] ipr: Use PCI-E reset API for new ipr adapter [SCSI] qla2xxx: Update version number to 8.01.07-k7. [SCSI] qla2xxx: Add MSI support. [SCSI] qla2xxx: Correct pci_set_msi() usage semantics. [SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed. [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings. [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization. [SCSI] zfcp: Stop system after memory corruption [SCSI] mesh: cleanup variable usage in interrupt handler [SCSI] megaraid: replace yield() with cond_resched() [SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n [SCSI] aacraid: correct SUN products to README [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers [SCSI] aacraid: kexec fix (reset interrupt handler) ...
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r--drivers/scsi/lpfc/lpfc.h33
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
385static inline void
386lpfc_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
398struct rnidrsp { 393struct rnidrsp {
399 void *buf; 394 void *buf;