diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-06-17 20:56:39 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-06-17 23:38:11 -0400 |
commit | 858c9f6c19c6f9bf86cbbc64ce0d17c61d6131b8 (patch) | |
tree | 9591b15b4424066023e375ad0aa33fdd37e1c452 /drivers/scsi/lpfc/lpfc.h | |
parent | 92d7f7b0cde3ad2260e7462b40867b57efd49851 (diff) |
[SCSI] lpfc: bug fixes
Following the NPIV support, the following changes have been accumulated
in the testing and qualification of the driver:
- Fix affinity of ELS ring to slow/deferred event processing
- Fix Ring attention masks
- Defer dev_loss_tmo timeout handling to worker thread
- Consolidate link down error classification for better error checking
- Remove unused/deprecated nlp_initiator_tmr timer
- Fix for async scan - move adapter init code back into pci_probe_one
context. Fix async scan interfaces.
- Expand validation of ability to create vports
- Extract VPI resource cnt from firmware
- Tuning of Login/Reject policies to better deal with overwhelmned targets
- Misc ELS and discovery fixes
- Export the npiv_enable attribute to sysfs
- Mailbox handling fix
- Add debugfs support
- A few other small misc fixes:
- wrong return values, double-frees, bad locking
- Added adapter failure heartbeat
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index 4b9019d7d508..f8f64d6485cd 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -23,7 +23,6 @@ | |||
23 | 23 | ||
24 | struct lpfc_sli2_slim; | 24 | struct lpfc_sli2_slim; |
25 | 25 | ||
26 | |||
27 | #define LPFC_MAX_TARGET 256 /* max number of targets supported */ | 26 | #define LPFC_MAX_TARGET 256 /* max number of targets supported */ |
28 | #define LPFC_MAX_DISC_THREADS 64 /* max outstanding discovery els | 27 | #define LPFC_MAX_DISC_THREADS 64 /* max outstanding discovery els |
29 | requests */ | 28 | requests */ |
@@ -45,6 +44,9 @@ struct lpfc_sli2_slim; | |||
45 | /* Number of exchanges reserved for discovery to complete */ | 44 | /* Number of exchanges reserved for discovery to complete */ |
46 | #define LPFC_DISC_IOCB_BUFF_COUNT 20 | 45 | #define LPFC_DISC_IOCB_BUFF_COUNT 20 |
47 | 46 | ||
47 | #define LPFC_HB_MBOX_INTERVAL 5 /* Heart beat interval in seconds. */ | ||
48 | #define LPFC_HB_MBOX_TIMEOUT 30 /* Heart beat timeout in seconds. */ | ||
49 | |||
48 | /* Define macros for 64 bit support */ | 50 | /* Define macros for 64 bit support */ |
49 | #define putPaddrLow(addr) ((uint32_t) (0xffffffff & (u64)(addr))) | 51 | #define putPaddrLow(addr) ((uint32_t) (0xffffffff & (u64)(addr))) |
50 | #define putPaddrHigh(addr) ((uint32_t) (0xffffffff & (((u64)(addr))>>32))) | 52 | #define putPaddrHigh(addr) ((uint32_t) (0xffffffff & (((u64)(addr))>>32))) |
@@ -308,13 +310,15 @@ struct lpfc_vport { | |||
308 | 310 | ||
309 | spinlock_t work_port_lock; | 311 | spinlock_t work_port_lock; |
310 | uint32_t work_port_events; /* Timeout to be handled */ | 312 | uint32_t work_port_events; /* Timeout to be handled */ |
311 | #define WORKER_DISC_TMO 0x1 /* Discovery timeout */ | 313 | #define WORKER_DISC_TMO 0x1 /* vport: Discovery timeout */ |
312 | #define WORKER_ELS_TMO 0x2 /* ELS timeout */ | 314 | #define WORKER_ELS_TMO 0x2 /* vport: ELS timeout */ |
313 | #define WORKER_MBOX_TMO 0x4 /* MBOX timeout */ | 315 | #define WORKER_FDMI_TMO 0x4 /* vport: FDMI timeout */ |
314 | #define WORKER_FDMI_TMO 0x8 /* FDMI timeout */ | 316 | |
315 | #define WORKER_FABRIC_BLOCK_TMO 0x10 /* fabric block timout */ | 317 | #define WORKER_MBOX_TMO 0x100 /* hba: MBOX timeout */ |
316 | #define WORKER_RAMP_DOWN_QUEUE 0x20 /* Decrease Q depth */ | 318 | #define WORKER_HB_TMO 0x200 /* hba: Heart beat timeout */ |
317 | #define WORKER_RAMP_UP_QUEUE 0x40 /* Increase Q depth */ | 319 | #define WORKER_FABRIC_BLOCK_TMO 0x400 /* hba: fabric block timout */ |
320 | #define WORKER_RAMP_DOWN_QUEUE 0x800 /* hba: Decrease Q depth */ | ||
321 | #define WORKER_RAMP_UP_QUEUE 0x1000 /* hba: Increase Q depth */ | ||
318 | 322 | ||
319 | struct timer_list fc_fdmitmo; | 323 | struct timer_list fc_fdmitmo; |
320 | struct timer_list els_tmofunc; | 324 | struct timer_list els_tmofunc; |
@@ -326,6 +330,14 @@ struct lpfc_vport { | |||
326 | #define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */ | 330 | #define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */ |
327 | char *vname; /* Application assigned name */ | 331 | char *vname; /* Application assigned name */ |
328 | struct fc_vport *fc_vport; | 332 | struct fc_vport *fc_vport; |
333 | |||
334 | #ifdef CONFIG_LPFC_DEBUG_FS | ||
335 | struct dentry *debug_disc_trc; | ||
336 | struct dentry *debug_nodelist; | ||
337 | struct dentry *vport_debugfs_root; | ||
338 | struct lpfc_disc_trc *disc_trc; | ||
339 | atomic_t disc_trc_cnt; | ||
340 | #endif | ||
329 | }; | 341 | }; |
330 | 342 | ||
331 | struct hbq_s { | 343 | struct hbq_s { |
@@ -408,6 +420,7 @@ struct lpfc_hba { | |||
408 | uint32_t cfg_hba_queue_depth; | 420 | uint32_t cfg_hba_queue_depth; |
409 | uint32_t cfg_peer_port_login; | 421 | uint32_t cfg_peer_port_login; |
410 | uint32_t cfg_vport_restrict_login; | 422 | uint32_t cfg_vport_restrict_login; |
423 | uint32_t cfg_npiv_enable; | ||
411 | uint32_t cfg_fcp_class; | 424 | uint32_t cfg_fcp_class; |
412 | uint32_t cfg_use_adisc; | 425 | uint32_t cfg_use_adisc; |
413 | uint32_t cfg_ack0; | 426 | uint32_t cfg_ack0; |
@@ -513,10 +526,10 @@ struct lpfc_hba { | |||
513 | mempool_t *nlp_mem_pool; | 526 | mempool_t *nlp_mem_pool; |
514 | 527 | ||
515 | struct fc_host_statistics link_stats; | 528 | struct fc_host_statistics link_stats; |
529 | |||
516 | struct list_head port_list; | 530 | struct list_head port_list; |
517 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ | 531 | struct lpfc_vport *pport; /* physical lpfc_vport pointer */ |
518 | uint16_t max_vpi; /* Maximum virtual nports */ | 532 | uint16_t max_vpi; /* Maximum virtual nports */ |
519 | uint16_t vpi_cnt; /* Nport count */ | ||
520 | #define LPFC_MAX_VPI 100 /* Max number of VPorts supported */ | 533 | #define LPFC_MAX_VPI 100 /* Max number of VPorts supported */ |
521 | unsigned long *vpi_bmask; /* vpi allocation table */ | 534 | unsigned long *vpi_bmask; /* vpi allocation table */ |
522 | 535 | ||
@@ -531,6 +544,15 @@ struct lpfc_hba { | |||
531 | unsigned long last_rsrc_error_time; | 544 | unsigned long last_rsrc_error_time; |
532 | unsigned long last_ramp_down_time; | 545 | unsigned long last_ramp_down_time; |
533 | unsigned long last_ramp_up_time; | 546 | unsigned long last_ramp_up_time; |
547 | #ifdef CONFIG_LPFC_DEBUG_FS | ||
548 | struct dentry *hba_debugfs_root; | ||
549 | atomic_t debugfs_vport_count; | ||
550 | #endif | ||
551 | |||
552 | /* Fields used for heart beat. */ | ||
553 | unsigned long last_completion_time; | ||
554 | struct timer_list hb_tmofunc; | ||
555 | uint8_t hb_outstanding; | ||
534 | }; | 556 | }; |
535 | 557 | ||
536 | static inline struct Scsi_Host * | 558 | static inline struct Scsi_Host * |