aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_init.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-04-06 15:04:33 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 14:45:24 -0400
commit49198b371e2da20548d1408a7d3a8dea2f91263c (patch)
treeb04993f74b2798bbf9e18f952ec6d1fd18cb0db6 /drivers/scsi/lpfc/lpfc_init.c
parent6c8eea54ec62c1a3fdb21de583639c49dcdc8811 (diff)
[SCSI] lpfc 8.3.12: Critical fixes
- Move the code to increase the sg seg count for LP21000 adapters. - Check pcmd on command completion before dereferencing it. - Clear queue memory when creating firmware queues to prevent stale entries. - Replace the use of PAGE_SIZE in many areas that assumed it was always 4k. - Add an else clause to a conditional that needed to unlock the hba_lock. Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 8341d44fe87b..03681013d804 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2600,15 +2600,6 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev)
2600 init_timer(&vport->els_tmofunc); 2600 init_timer(&vport->els_tmofunc);
2601 vport->els_tmofunc.function = lpfc_els_timeout; 2601 vport->els_tmofunc.function = lpfc_els_timeout;
2602 vport->els_tmofunc.data = (unsigned long)vport; 2602 vport->els_tmofunc.data = (unsigned long)vport;
2603 if (phba->pcidev->device == PCI_DEVICE_ID_HORNET) {
2604 phba->menlo_flag |= HBA_MENLO_SUPPORT;
2605 /* check for menlo minimum sg count */
2606 if (phba->cfg_sg_seg_cnt < LPFC_DEFAULT_MENLO_SG_SEG_CNT) {
2607 phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT;
2608 shost->sg_tablesize = phba->cfg_sg_seg_cnt;
2609 }
2610 }
2611
2612 error = scsi_add_host_with_dma(shost, dev, &phba->pcidev->dev); 2603 error = scsi_add_host_with_dma(shost, dev, &phba->pcidev->dev);
2613 if (error) 2604 if (error)
2614 goto out_put_shost; 2605 goto out_put_shost;
@@ -3852,6 +3843,13 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)
3852 3843
3853 /* Get all the module params for configuring this host */ 3844 /* Get all the module params for configuring this host */
3854 lpfc_get_cfgparam(phba); 3845 lpfc_get_cfgparam(phba);
3846 if (phba->pcidev->device == PCI_DEVICE_ID_HORNET) {
3847 phba->menlo_flag |= HBA_MENLO_SUPPORT;
3848 /* check for menlo minimum sg count */
3849 if (phba->cfg_sg_seg_cnt < LPFC_DEFAULT_MENLO_SG_SEG_CNT)
3850 phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT;
3851 }
3852
3855 /* 3853 /*
3856 * Since the sg_tablesize is module parameter, the sg_dma_buf_size 3854 * Since the sg_tablesize is module parameter, the sg_dma_buf_size
3857 * used to create the sg_dma_buf_pool must be dynamically calculated. 3855 * used to create the sg_dma_buf_pool must be dynamically calculated.