aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-02-26 14:13:54 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-03 08:38:58 -0500
commite40a02c12581f710877da372b5d7e15b68a1c5c3 (patch)
treee26d0d655a8179553fbf05c7efab0da083448377 /drivers/scsi
parent9f1177a3f8eee22427eb97e6e00b62ff0be2871f (diff)
[SCSI] lpfc 8.3.10: Fix user interface issues
- Add Logging message for critial errors. - Remove unused variable from lpfc_nodev_tmo_show - Update supress_link_up parameter with #define values. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc.h3
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c7
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c21
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c14
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c11
6 files changed, 49 insertions, 11 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 84b696463a58..ce0599dcc814 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -623,6 +623,9 @@ struct lpfc_hba {
623 uint32_t cfg_log_verbose; 623 uint32_t cfg_log_verbose;
624 uint32_t cfg_aer_support; 624 uint32_t cfg_aer_support;
625 uint32_t cfg_suppress_link_up; 625 uint32_t cfg_suppress_link_up;
626#define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */
627#define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */
628#define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */
626 629
627 lpfc_vpd_t vpd; /* vital product data */ 630 lpfc_vpd_t vpd; /* vital product data */
628 631
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index c992e8328f9e..64cd17eedb64 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -1939,7 +1939,9 @@ static DEVICE_ATTR(lpfc_enable_npiv, S_IRUGO,
1939# 0x2 = never bring up link 1939# 0x2 = never bring up link
1940# Default value is 0. 1940# Default value is 0.
1941*/ 1941*/
1942LPFC_ATTR_R(suppress_link_up, 0, 0, 2, "Suppress Link Up at initialization"); 1942LPFC_ATTR_R(suppress_link_up, LPFC_INITIALIZE_LINK, LPFC_INITIALIZE_LINK,
1943 LPFC_DELAY_INIT_LINK_INDEFINITELY,
1944 "Suppress Link Up at initialization");
1943 1945
1944/* 1946/*
1945# lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear 1947# lpfc_nodev_tmo: If set, it will hold all I/O errors on devices that disappear
@@ -1966,8 +1968,7 @@ lpfc_nodev_tmo_show(struct device *dev, struct device_attribute *attr,
1966{ 1968{
1967 struct Scsi_Host *shost = class_to_shost(dev); 1969 struct Scsi_Host *shost = class_to_shost(dev);
1968 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; 1970 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
1969 int val = 0; 1971
1970 val = vport->cfg_devloss_tmo;
1971 return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_devloss_tmo); 1972 return snprintf(buf, PAGE_SIZE, "%d\n", vport->cfg_devloss_tmo);
1972} 1973}
1973 1974
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 08b6634cb994..4623323da577 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -806,9 +806,8 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
806 } 806 }
807 807
808 /* FLOGI failure */ 808 /* FLOGI failure */
809 lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, 809 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
810 "0100 FLOGI failure Data: x%x x%x " 810 "0100 FLOGI failure Status:x%x/x%x TMO:x%x\n",
811 "x%x\n",
812 irsp->ulpStatus, irsp->un.ulpWord[4], 811 irsp->ulpStatus, irsp->un.ulpWord[4],
813 irsp->ulpTimeout); 812 irsp->ulpTimeout);
814 goto flogifail; 813 goto flogifail;
@@ -1409,6 +1408,10 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
1409 goto out; 1408 goto out;
1410 } 1409 }
1411 /* PLOGI failed */ 1410 /* PLOGI failed */
1411 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
1412 "2753 PLOGI failure DID:%06X Status:x%x/x%x\n",
1413 ndlp->nlp_DID, irsp->ulpStatus,
1414 irsp->un.ulpWord[4]);
1412 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ 1415 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
1413 if (lpfc_error_lost_link(irsp)) 1416 if (lpfc_error_lost_link(irsp))
1414 rc = NLP_STE_FREED_NODE; 1417 rc = NLP_STE_FREED_NODE;
@@ -1577,6 +1580,10 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
1577 goto out; 1580 goto out;
1578 } 1581 }
1579 /* PRLI failed */ 1582 /* PRLI failed */
1583 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
1584 "2754 PRLI failure DID:%06X Status:x%x/x%x\n",
1585 ndlp->nlp_DID, irsp->ulpStatus,
1586 irsp->un.ulpWord[4]);
1580 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ 1587 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
1581 if (lpfc_error_lost_link(irsp)) 1588 if (lpfc_error_lost_link(irsp))
1582 goto out; 1589 goto out;
@@ -1860,6 +1867,10 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
1860 goto out; 1867 goto out;
1861 } 1868 }
1862 /* ADISC failed */ 1869 /* ADISC failed */
1870 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
1871 "2755 ADISC failure DID:%06X Status:x%x/x%x\n",
1872 ndlp->nlp_DID, irsp->ulpStatus,
1873 irsp->un.ulpWord[4]);
1863 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ 1874 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
1864 if (!lpfc_error_lost_link(irsp)) 1875 if (!lpfc_error_lost_link(irsp))
1865 lpfc_disc_state_machine(vport, ndlp, cmdiocb, 1876 lpfc_disc_state_machine(vport, ndlp, cmdiocb,
@@ -2009,6 +2020,10 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
2009 /* ELS command is being retried */ 2020 /* ELS command is being retried */
2010 goto out; 2021 goto out;
2011 /* LOGO failed */ 2022 /* LOGO failed */
2023 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
2024 "2756 LOGO failure DID:%06X Status:x%x/x%x\n",
2025 ndlp->nlp_DID, irsp->ulpStatus,
2026 irsp->un.ulpWord[4]);
2012 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ 2027 /* Do not call DSM for lpfc_els_abort'ed ELS cmds */
2013 if (lpfc_error_lost_link(irsp)) 2028 if (lpfc_error_lost_link(irsp))
2014 goto out; 2029 goto out;
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index b64cecafa7ab..437ddc92ebea 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -549,7 +549,7 @@ lpfc_config_port_post(struct lpfc_hba *phba)
549 mempool_free(pmb, phba->mbox_mem_pool); 549 mempool_free(pmb, phba->mbox_mem_pool);
550 return -EIO; 550 return -EIO;
551 } 551 }
552 } else if (phba->cfg_suppress_link_up == 0) { 552 } else if (phba->cfg_suppress_link_up == LPFC_INITIALIZE_LINK) {
553 lpfc_init_link(phba, pmb, phba->cfg_topology, 553 lpfc_init_link(phba, pmb, phba->cfg_topology,
554 phba->cfg_link_speed); 554 phba->cfg_link_speed);
555 pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; 555 pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
@@ -667,7 +667,7 @@ lpfc_hba_init_link(struct lpfc_hba *phba)
667 mempool_free(pmb, phba->mbox_mem_pool); 667 mempool_free(pmb, phba->mbox_mem_pool);
668 return -EIO; 668 return -EIO;
669 } 669 }
670 phba->cfg_suppress_link_up = 0; 670 phba->cfg_suppress_link_up = LPFC_INITIALIZE_LINK;
671 671
672 return 0; 672 return 0;
673} 673}
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 7f21b47db791..889a7b9ec92b 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -2079,8 +2079,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
2079 2079
2080 if (resp_info & RSP_LEN_VALID) { 2080 if (resp_info & RSP_LEN_VALID) {
2081 rsplen = be32_to_cpu(fcprsp->rspRspLen); 2081 rsplen = be32_to_cpu(fcprsp->rspRspLen);
2082 if ((rsplen != 0 && rsplen != 4 && rsplen != 8) || 2082 if (rsplen != 0 && rsplen != 4 && rsplen != 8) {
2083 (fcprsp->rspInfo3 != RSP_NO_FAILURE)) {
2084 lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, 2083 lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
2085 "2719 Invalid response length: " 2084 "2719 Invalid response length: "
2086 "tgt x%x lun x%x cmnd x%x rsplen x%x\n", 2085 "tgt x%x lun x%x cmnd x%x rsplen x%x\n",
@@ -2090,6 +2089,17 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
2090 host_status = DID_ERROR; 2089 host_status = DID_ERROR;
2091 goto out; 2090 goto out;
2092 } 2091 }
2092 if (fcprsp->rspInfo3 != RSP_NO_FAILURE) {
2093 lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
2094 "2757 Protocol failure detected during "
2095 "processing of FCP I/O op: "
2096 "tgt x%x lun x%x cmnd x%x rspInfo3 x%x\n",
2097 cmnd->device->id,
2098 cmnd->device->lun, cmnd->cmnd[0],
2099 fcprsp->rspInfo3);
2100 host_status = DID_ERROR;
2101 goto out;
2102 }
2093 } 2103 }
2094 2104
2095 if ((resp_info & SNS_LEN_VALID) && fcprsp->rspSnsLen) { 2105 if ((resp_info & SNS_LEN_VALID) && fcprsp->rspSnsLen) {
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index d51ee7e3273b..49bed3e8c95d 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -3091,6 +3091,12 @@ lpfc_sli_brdready_s3(struct lpfc_hba *phba, uint32_t mask)
3091 3091
3092 /* Check to see if any errors occurred during init */ 3092 /* Check to see if any errors occurred during init */
3093 if ((status & HS_FFERM) || (i >= 20)) { 3093 if ((status & HS_FFERM) || (i >= 20)) {
3094 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
3095 "2751 Adapter failed to restart, "
3096 "status reg x%x, FW Data: A8 x%x AC x%x\n",
3097 status,
3098 readl(phba->MBslimaddr + 0xa8),
3099 readl(phba->MBslimaddr + 0xac));
3094 phba->link_state = LPFC_HBA_ERROR; 3100 phba->link_state = LPFC_HBA_ERROR;
3095 retval = 1; 3101 retval = 1;
3096 } 3102 }
@@ -3278,6 +3284,9 @@ lpfc_sli_brdkill(struct lpfc_hba *phba)
3278 if (retval != MBX_SUCCESS) { 3284 if (retval != MBX_SUCCESS) {
3279 if (retval != MBX_BUSY) 3285 if (retval != MBX_BUSY)
3280 mempool_free(pmb, phba->mbox_mem_pool); 3286 mempool_free(pmb, phba->mbox_mem_pool);
3287 lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
3288 "2752 KILL_BOARD command failed retval %d\n",
3289 retval);
3281 spin_lock_irq(&phba->hbalock); 3290 spin_lock_irq(&phba->hbalock);
3282 phba->link_flag &= ~LS_IGNORE_ERATT; 3291 phba->link_flag &= ~LS_IGNORE_ERATT;
3283 spin_unlock_irq(&phba->hbalock); 3292 spin_unlock_irq(&phba->hbalock);
@@ -4035,7 +4044,7 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba)
4035 4044
4036lpfc_sli_hba_setup_error: 4045lpfc_sli_hba_setup_error:
4037 phba->link_state = LPFC_HBA_ERROR; 4046 phba->link_state = LPFC_HBA_ERROR;
4038 lpfc_printf_log(phba, KERN_INFO, LOG_INIT, 4047 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
4039 "0445 Firmware initialization failed\n"); 4048 "0445 Firmware initialization failed\n");
4040 return rc; 4049 return rc;
4041} 4050}