lpfc: Fix FW dump using sysfs
Fix FW dump using sysfs Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
db55fba8dc
commit
0293635ef6
|
@ -640,6 +640,7 @@ struct lpfc_hba {
|
||||||
#define HBA_DEVLOSS_TMO 0x2000 /* HBA in devloss timeout */
|
#define HBA_DEVLOSS_TMO 0x2000 /* HBA in devloss timeout */
|
||||||
#define HBA_RRQ_ACTIVE 0x4000 /* process the rrq active list */
|
#define HBA_RRQ_ACTIVE 0x4000 /* process the rrq active list */
|
||||||
#define HBA_FCP_IOQ_FLUSH 0x8000 /* FCP I/O queues being flushed */
|
#define HBA_FCP_IOQ_FLUSH 0x8000 /* FCP I/O queues being flushed */
|
||||||
|
#define HBA_FW_DUMP_OP 0x10000 /* Skips fn reset before FW dump */
|
||||||
uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
|
uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
|
||||||
struct lpfc_dmabuf slim2p;
|
struct lpfc_dmabuf slim2p;
|
||||||
|
|
||||||
|
|
|
@ -919,10 +919,15 @@ lpfc_sli4_pdev_reg_request(struct lpfc_hba *phba, uint32_t opcode)
|
||||||
phba->cfg_sriov_nr_virtfn = 0;
|
phba->cfg_sriov_nr_virtfn = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opcode == LPFC_FW_DUMP)
|
||||||
|
phba->hba_flag |= HBA_FW_DUMP_OP;
|
||||||
|
|
||||||
status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
|
status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
|
||||||
|
|
||||||
if (status != 0)
|
if (status != 0) {
|
||||||
|
phba->hba_flag &= ~HBA_FW_DUMP_OP;
|
||||||
return status;
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
/* wait for the device to be quiesced before firmware reset */
|
/* wait for the device to be quiesced before firmware reset */
|
||||||
msleep(100);
|
msleep(100);
|
||||||
|
|
|
@ -4057,12 +4057,13 @@ lpfc_sli4_brdreset(struct lpfc_hba *phba)
|
||||||
{
|
{
|
||||||
struct lpfc_sli *psli = &phba->sli;
|
struct lpfc_sli *psli = &phba->sli;
|
||||||
uint16_t cfg_value;
|
uint16_t cfg_value;
|
||||||
int rc;
|
int rc = 0;
|
||||||
|
|
||||||
/* Reset HBA */
|
/* Reset HBA */
|
||||||
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
|
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
|
||||||
"0295 Reset HBA Data: x%x x%x\n",
|
"0295 Reset HBA Data: x%x x%x x%x\n",
|
||||||
phba->pport->port_state, psli->sli_flag);
|
phba->pport->port_state, psli->sli_flag,
|
||||||
|
phba->hba_flag);
|
||||||
|
|
||||||
/* perform board reset */
|
/* perform board reset */
|
||||||
phba->fc_eventTag = 0;
|
phba->fc_eventTag = 0;
|
||||||
|
@ -4075,6 +4076,12 @@ lpfc_sli4_brdreset(struct lpfc_hba *phba)
|
||||||
phba->fcf.fcf_flag = 0;
|
phba->fcf.fcf_flag = 0;
|
||||||
spin_unlock_irq(&phba->hbalock);
|
spin_unlock_irq(&phba->hbalock);
|
||||||
|
|
||||||
|
/* SLI4 INTF 2: if FW dump is being taken skip INIT_PORT */
|
||||||
|
if (phba->hba_flag & HBA_FW_DUMP_OP) {
|
||||||
|
phba->hba_flag &= ~HBA_FW_DUMP_OP;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Now physically reset the device */
|
/* Now physically reset the device */
|
||||||
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
||||||
"0389 Performing PCI function reset!\n");
|
"0389 Performing PCI function reset!\n");
|
||||||
|
|
Loading…
Reference in New Issue