Skip to content

Commit ddc5911

Browse files
emuslndavem330
authored andcommitted
ionic: call ionic_port_init after fw-upgrade
Since the fw has been re-inited, we need to refresh the port information dma address so we can see fresh port information. Let's call ionic_port_init again, and tweak it to allow for a call to simply refresh the existing dma address. Fixes: c672412 ("ionic: remove lifs on fw reset") Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f20a4d4 commit ddc5911

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,6 +2118,7 @@ static void ionic_lif_handle_fw_up(struct ionic_lif *lif)
21182118
dev_info(ionic->dev, "FW Up: restarting LIFs\n");
21192119

21202120
ionic_init_devinfo(ionic);
2121+
ionic_port_init(ionic);
21212122
err = ionic_qcqs_alloc(lif);
21222123
if (err)
21232124
goto err_out;

drivers/net/ethernet/pensando/ionic/ionic_main.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -509,16 +509,16 @@ int ionic_port_init(struct ionic *ionic)
509509
size_t sz;
510510
int err;
511511

512-
if (idev->port_info)
513-
return 0;
514-
515-
idev->port_info_sz = ALIGN(sizeof(*idev->port_info), PAGE_SIZE);
516-
idev->port_info = dma_alloc_coherent(ionic->dev, idev->port_info_sz,
517-
&idev->port_info_pa,
518-
GFP_KERNEL);
519512
if (!idev->port_info) {
520-
dev_err(ionic->dev, "Failed to allocate port info, aborting\n");
521-
return -ENOMEM;
513+
idev->port_info_sz = ALIGN(sizeof(*idev->port_info), PAGE_SIZE);
514+
idev->port_info = dma_alloc_coherent(ionic->dev,
515+
idev->port_info_sz,
516+
&idev->port_info_pa,
517+
GFP_KERNEL);
518+
if (!idev->port_info) {
519+
dev_err(ionic->dev, "Failed to allocate port info\n");
520+
return -ENOMEM;
521+
}
522522
}
523523

524524
sz = min(sizeof(ident->port.config), sizeof(idev->dev_cmd_regs->data));

0 commit comments

Comments
 (0)