aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-04-25 09:52:34 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-06 10:33:14 -0400
commit7054a606e6724674a5acd103ed74eacb02c73393 (patch)
tree271327c20a1e4bff9475ef7a9d98afd4644d6570 /drivers/scsi/lpfc/lpfc_attr.c
parentde0c5b32b50ef2673f4cd434b9c2732237d715dd (diff)
[SCSI] lpfc 8.1.12 : Round 2 of Miscellaneous fixes
Round 2 of Miscellaneous fixes: - Ensure we don't prematurely re-enable IRQs in lpfc_sli_abort_fcp_cmpl(). - Prevent freeing of iocb after IOCB_TIMEDOUT error. - Added code to cleanup REG_LOGIN mailbox command when a LOGO is received. - Fix offline window where more work can sneak in after clearing work_ha - Use target reset instead of LU reset in bus_device_reset_handler - Fixed system hangs due to leaked host_lock. - Fixed NULL pointer dereference during I/O with LIP. - Fixed false iocb timeout. - Fixed name server query response handling. - Change rport dev_loss_tmo value when user change lpfc HBA's dev_loss_tmo. - Fixed a memory leak in lpfc_sli_wake_mbox_wait. - Fixed check for dropped frames. - Removed hba queue depth calculation based on device PCI IDs - Change min cr_count value specified in comment to agree with setting 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_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index c0b02b11d88f..7811aaf114d5 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -828,6 +828,18 @@ lpfc_nodev_tmo_init(struct lpfc_hba *phba, int val)
828 return -EINVAL; 828 return -EINVAL;
829} 829}
830 830
831static void
832lpfc_update_rport_devloss_tmo(struct lpfc_hba *phba)
833{
834 struct lpfc_nodelist *ndlp;
835
836 spin_lock_irq(phba->host->host_lock);
837 list_for_each_entry(ndlp, &phba->fc_nodes, nlp_listp)
838 if (ndlp->rport)
839 ndlp->rport->dev_loss_tmo = phba->cfg_devloss_tmo;
840 spin_unlock_irq(phba->host->host_lock);
841}
842
831static int 843static int
832lpfc_nodev_tmo_set(struct lpfc_hba *phba, int val) 844lpfc_nodev_tmo_set(struct lpfc_hba *phba, int val)
833{ 845{
@@ -843,6 +855,7 @@ lpfc_nodev_tmo_set(struct lpfc_hba *phba, int val)
843 if (val >= LPFC_MIN_DEVLOSS_TMO && val <= LPFC_MAX_DEVLOSS_TMO) { 855 if (val >= LPFC_MIN_DEVLOSS_TMO && val <= LPFC_MAX_DEVLOSS_TMO) {
844 phba->cfg_nodev_tmo = val; 856 phba->cfg_nodev_tmo = val;
845 phba->cfg_devloss_tmo = val; 857 phba->cfg_devloss_tmo = val;
858 lpfc_update_rport_devloss_tmo(phba);
846 return 0; 859 return 0;
847 } 860 }
848 861
@@ -878,6 +891,7 @@ lpfc_devloss_tmo_set(struct lpfc_hba *phba, int val)
878 phba->cfg_nodev_tmo = val; 891 phba->cfg_nodev_tmo = val;
879 phba->cfg_devloss_tmo = val; 892 phba->cfg_devloss_tmo = val;
880 phba->dev_loss_tmo_changed = 1; 893 phba->dev_loss_tmo_changed = 1;
894 lpfc_update_rport_devloss_tmo(phba);
881 return 0; 895 return 0;
882 } 896 }
883 897
@@ -997,7 +1011,7 @@ LPFC_ATTR_R(ack0, 0, 0, 1, "Enable ACK0 support");
997/* 1011/*
998# lpfc_cr_delay & lpfc_cr_count: Default values for I/O colaesing 1012# lpfc_cr_delay & lpfc_cr_count: Default values for I/O colaesing
999# cr_delay (msec) or cr_count outstanding commands. cr_delay can take 1013# cr_delay (msec) or cr_count outstanding commands. cr_delay can take
1000# value [0,63]. cr_count can take value [0,255]. Default value of cr_delay 1014# value [0,63]. cr_count can take value [1,255]. Default value of cr_delay
1001# is 0. Default value of cr_count is 1. The cr_count feature is disabled if 1015# is 0. Default value of cr_count is 1. The cr_count feature is disabled if
1002# cr_delay is set to 0. 1016# cr_delay is set to 0.
1003*/ 1017*/
@@ -1955,25 +1969,8 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
1955 sizeof(struct fcp_rsp) + 1969 sizeof(struct fcp_rsp) +
1956 (phba->cfg_sg_seg_cnt * sizeof(struct ulp_bde64)); 1970 (phba->cfg_sg_seg_cnt * sizeof(struct ulp_bde64));
1957 1971
1958 switch (phba->pcidev->device) {
1959 case PCI_DEVICE_ID_LP101:
1960 case PCI_DEVICE_ID_BSMB:
1961 case PCI_DEVICE_ID_ZSMB:
1962 phba->cfg_hba_queue_depth = LPFC_LP101_HBA_Q_DEPTH;
1963 break;
1964 case PCI_DEVICE_ID_RFLY:
1965 case PCI_DEVICE_ID_PFLY:
1966 case PCI_DEVICE_ID_BMID:
1967 case PCI_DEVICE_ID_ZMID:
1968 case PCI_DEVICE_ID_TFLY:
1969 phba->cfg_hba_queue_depth = LPFC_LC_HBA_Q_DEPTH;
1970 break;
1971 default:
1972 phba->cfg_hba_queue_depth = LPFC_DFT_HBA_Q_DEPTH;
1973 }
1974 1972
1975 if (phba->cfg_hba_queue_depth > lpfc_hba_queue_depth) 1973 lpfc_hba_queue_depth_init(phba, lpfc_hba_queue_depth);
1976 lpfc_hba_queue_depth_init(phba, lpfc_hba_queue_depth);
1977 1974
1978 return; 1975 return;
1979} 1976}