Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Add support to display if adapter dumps are available

Currently, if there has been an issue whereby an adapter dump was taken,
there is nothing displayed to hint that it is present. Utilities must be
run and they must query for the status in order to then download the dump.

Add a message to the driver to query dump image presence when initializing
the SLI Port.

Link: https://lore.kernel.org/r/20200630215001.70793-12-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Dick Kennedy and committed by
Martin K. Petersen
f0020e42 45bc4427

+25
+3
drivers/scsi/lpfc/lpfc_hw4.h
··· 650 650 #define lpfc_sliport_status_oti_SHIFT 29 651 651 #define lpfc_sliport_status_oti_MASK 0x1 652 652 #define lpfc_sliport_status_oti_WORD word0 653 + #define lpfc_sliport_status_dip_SHIFT 25 654 + #define lpfc_sliport_status_dip_MASK 0x1 655 + #define lpfc_sliport_status_dip_WORD word0 653 656 #define lpfc_sliport_status_rn_SHIFT 24 654 657 #define lpfc_sliport_status_rn_MASK 0x1 655 658 #define lpfc_sliport_status_rn_WORD word0
+22
drivers/scsi/lpfc/lpfc_sli.c
··· 7300 7300 return 1; 7301 7301 } 7302 7302 7303 + static void lpfc_sli4_dip(struct lpfc_hba *phba) 7304 + { 7305 + uint32_t if_type; 7306 + 7307 + if_type = bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf); 7308 + if (if_type == LPFC_SLI_INTF_IF_TYPE_2 || 7309 + if_type == LPFC_SLI_INTF_IF_TYPE_6) { 7310 + struct lpfc_register reg_data; 7311 + 7312 + if (lpfc_readl(phba->sli4_hba.u.if_type2.STATUSregaddr, 7313 + &reg_data.word0)) 7314 + return; 7315 + 7316 + if (bf_get(lpfc_sliport_status_dip, &reg_data)) 7317 + lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 7318 + "2904 Firmware Dump Image Present" 7319 + " on Adapter"); 7320 + } 7321 + } 7322 + 7303 7323 /** 7304 7324 * lpfc_sli4_hba_setup - SLI4 device initialization PCI function 7305 7325 * @phba: Pointer to HBA context object. ··· 7357 7337 phba->sli.sli_flag |= LPFC_SLI_ACTIVE; 7358 7338 spin_unlock_irq(&phba->hbalock); 7359 7339 } 7340 + 7341 + lpfc_sli4_dip(phba); 7360 7342 7361 7343 /* 7362 7344 * Allocate a single mailbox container for initializing the