]> Git Repo - linux.git/commitdiff
ionic: call ionic_port_init after fw-upgrade
authorShannon Nelson <[email protected]>
Mon, 11 May 2020 21:04:45 +0000 (14:04 -0700)
committerDavid S. Miller <[email protected]>
Tue, 12 May 2020 19:12:34 +0000 (12:12 -0700)
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: c672412f6172 ("ionic: remove lifs on fw reset")
Signed-off-by: Shannon Nelson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/pensando/ionic/ionic_main.c

index f8c626444da019eee873362660ef8c56196a7f88..f8a9c1bcffc9b84174384c8cd693570ecc24bc8c 100644 (file)
@@ -2118,6 +2118,7 @@ static void ionic_lif_handle_fw_up(struct ionic_lif *lif)
        dev_info(ionic->dev, "FW Up: restarting LIFs\n");
 
        ionic_init_devinfo(ionic);
+       ionic_port_init(ionic);
        err = ionic_qcqs_alloc(lif);
        if (err)
                goto err_out;
index 588c62e9add7136e480770d36bf9b2b02e42f6a9..3344bc1f7671b8d42b820aa71b3a29092fda1307 100644 (file)
@@ -509,16 +509,16 @@ int ionic_port_init(struct ionic *ionic)
        size_t sz;
        int err;
 
-       if (idev->port_info)
-               return 0;
-
-       idev->port_info_sz = ALIGN(sizeof(*idev->port_info), PAGE_SIZE);
-       idev->port_info = dma_alloc_coherent(ionic->dev, idev->port_info_sz,
-                                            &idev->port_info_pa,
-                                            GFP_KERNEL);
        if (!idev->port_info) {
-               dev_err(ionic->dev, "Failed to allocate port info, aborting\n");
-               return -ENOMEM;
+               idev->port_info_sz = ALIGN(sizeof(*idev->port_info), PAGE_SIZE);
+               idev->port_info = dma_alloc_coherent(ionic->dev,
+                                                    idev->port_info_sz,
+                                                    &idev->port_info_pa,
+                                                    GFP_KERNEL);
+               if (!idev->port_info) {
+                       dev_err(ionic->dev, "Failed to allocate port info\n");
+                       return -ENOMEM;
+               }
        }
 
        sz = min(sizeof(ident->port.config), sizeof(idev->dev_cmd_regs->data));
This page took 0.062038 seconds and 4 git commands to generate.