aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc.h
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-08-02 11:10:31 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-08-01 13:24:10 -0400
commit51ef4c26891a734bc8416b639ad460a8162926bc (patch)
tree8279e11bf1a0a3200e8aa9bb3d956345ef73533c /drivers/scsi/lpfc/lpfc.h
parent78b2d852a88cd2a55e3ab632109de045d58b83e3 (diff)
[SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes
- Fix vport ndlp ref counting errors - Fix use after free of ndlp structure - Use the correct flag to check for LOADING setting. - Fix driver unload bugs (related to shost references) after link down or rscn - Fix up HBQ initialization - Fix port_list locking around driver unload. - Fix references to hostdata as a phba - Fix GFFID type offset to work correctly with big endian structure. - Only call pci_disable_msi if the pci_enable_msi succeeded - Fix vport_delete wait/fail if in discovery - Put a reference on the nameservers ndlp when performing CT traffic. - Remove unbalanced hba unlock. - Fix up HBQ processing - Fix lpfc debugfs discovery trace output for ELS rsp cmpl - Send ADISC when rpi is 0 - Stop FDISC retrying forever - Unable to retrieve correct config parameter for vport - Fix sli_validate_fcp_iocb, sli_sum_iocb, sli_abort_iocb to be vport-aware. - Fix index-out-of-range error in iocb. Spotted by Coverity. 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.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index a6dd13e05ab2..c28db0521c01 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -78,6 +78,7 @@ struct lpfc_dma_pool {
78 78
79struct hbq_dmabuf { 79struct hbq_dmabuf {
80 struct lpfc_dmabuf dbuf; 80 struct lpfc_dmabuf dbuf;
81 uint32_t size;
81 uint32_t tag; 82 uint32_t tag;
82}; 83};
83 84
@@ -329,15 +330,7 @@ struct lpfc_vport {
329#define FC_LOADING 0x1 /* HBA in process of loading drvr */ 330#define FC_LOADING 0x1 /* HBA in process of loading drvr */
330#define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */ 331#define FC_UNLOADING 0x2 /* HBA in process of unloading drvr */
331 char *vname; /* Application assigned name */ 332 char *vname; /* Application assigned name */
332 struct fc_vport *fc_vport;
333 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_debugfs_trc *disc_trc;
339 atomic_t disc_trc_cnt;
340#endif
341 /* Vport Config Parameters */ 334 /* Vport Config Parameters */
342 uint32_t cfg_scan_down; 335 uint32_t cfg_scan_down;
343 uint32_t cfg_lun_queue_depth; 336 uint32_t cfg_lun_queue_depth;
@@ -353,6 +346,16 @@ struct lpfc_vport {
353 uint32_t cfg_max_luns; 346 uint32_t cfg_max_luns;
354 347
355 uint32_t dev_loss_tmo_changed; 348 uint32_t dev_loss_tmo_changed;
349
350 struct fc_vport *fc_vport;
351
352#ifdef CONFIG_LPFC_DEBUG_FS
353 struct dentry *debug_disc_trc;
354 struct dentry *debug_nodelist;
355 struct dentry *vport_debugfs_root;
356 struct lpfc_debugfs_trc *disc_trc;
357 atomic_t disc_trc_cnt;
358#endif
356}; 359};
357 360
358struct hbq_s { 361struct hbq_s {
@@ -360,11 +363,19 @@ struct hbq_s {
360 uint32_t next_hbqPutIdx; /* Index to next HBQ slot to use */ 363 uint32_t next_hbqPutIdx; /* Index to next HBQ slot to use */
361 uint32_t hbqPutIdx; /* HBQ slot to use */ 364 uint32_t hbqPutIdx; /* HBQ slot to use */
362 uint32_t local_hbqGetIdx; /* Local copy of Get index from Port */ 365 uint32_t local_hbqGetIdx; /* Local copy of Get index from Port */
366 void *hbq_virt; /* Virtual ptr to this hbq */
367 struct list_head hbq_buffer_list; /* buffers assigned to this HBQ */
368 /* Callback for HBQ buffer allocation */
369 struct hbq_dmabuf *(*hbq_alloc_buffer) (struct lpfc_hba *);
370 /* Callback for HBQ buffer free */
371 void (*hbq_free_buffer) (struct lpfc_hba *,
372 struct hbq_dmabuf *);
363}; 373};
364 374
365#define LPFC_MAX_HBQS 16 375#define LPFC_MAX_HBQS 4
366/* this matches the possition in the lpfc_hbq_defs array */ 376/* this matches the position in the lpfc_hbq_defs array */
367#define LPFC_ELS_HBQ 0 377#define LPFC_ELS_HBQ 0
378#define LPFC_EXTRA_HBQ 1
368 379
369struct lpfc_hba { 380struct lpfc_hba {
370 struct lpfc_sli sli; 381 struct lpfc_sli sli;
@@ -460,7 +471,6 @@ struct lpfc_hba {
460 wait_queue_head_t *work_wait; 471 wait_queue_head_t *work_wait;
461 struct task_struct *worker_thread; 472 struct task_struct *worker_thread;
462 473
463 struct list_head hbq_buffer_list;
464 uint32_t hbq_count; /* Count of configured HBQs */ 474 uint32_t hbq_count; /* Count of configured HBQs */
465 struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */ 475 struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */
466 476
@@ -529,6 +539,7 @@ struct lpfc_hba {
529 mempool_t *nlp_mem_pool; 539 mempool_t *nlp_mem_pool;
530 540
531 struct fc_host_statistics link_stats; 541 struct fc_host_statistics link_stats;
542 uint8_t using_msi;
532 543
533 struct list_head port_list; 544 struct list_head port_list;
534 struct lpfc_vport *pport; /* physical lpfc_vport pointer */ 545 struct lpfc_vport *pport; /* physical lpfc_vport pointer */