mirror of https://gitee.com/openkylin/linux.git
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: c672412f61
("ionic: remove lifs on fw reset")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f20a4d4041
commit
ddc5911b9b
|
@ -2118,6 +2118,7 @@ static void ionic_lif_handle_fw_up(struct ionic_lif *lif)
|
||||||
dev_info(ionic->dev, "FW Up: restarting LIFs\n");
|
dev_info(ionic->dev, "FW Up: restarting LIFs\n");
|
||||||
|
|
||||||
ionic_init_devinfo(ionic);
|
ionic_init_devinfo(ionic);
|
||||||
|
ionic_port_init(ionic);
|
||||||
err = ionic_qcqs_alloc(lif);
|
err = ionic_qcqs_alloc(lif);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
|
|
@ -509,16 +509,16 @@ int ionic_port_init(struct ionic *ionic)
|
||||||
size_t sz;
|
size_t sz;
|
||||||
int err;
|
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) {
|
if (!idev->port_info) {
|
||||||
dev_err(ionic->dev, "Failed to allocate port info, aborting\n");
|
idev->port_info_sz = ALIGN(sizeof(*idev->port_info), PAGE_SIZE);
|
||||||
return -ENOMEM;
|
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));
|
sz = min(sizeof(ident->port.config), sizeof(idev->dev_cmd_regs->data));
|
||||||
|
|
Loading…
Reference in New Issue