ionic: refill lif identity after fw_up
After we do a fw upgrade and refill the ionic->ident.dev, we also need to update the other identity info. Since the lif identity needs to be updated each time the ionic identity is refreshed, we can pull it into ionic_identify(). The debugfs entry is moved so that it doesn't cause an error message when the data is refreshed after the fw upgrade. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ba6ab8aca2
commit
a21b5d49e7
|
@ -266,6 +266,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
dev_err(dev, "Cannot identify device: %d, aborting\n", err);
|
dev_err(dev, "Cannot identify device: %d, aborting\n", err);
|
||||||
goto err_out_teardown;
|
goto err_out_teardown;
|
||||||
}
|
}
|
||||||
|
ionic_debugfs_add_ident(ionic);
|
||||||
|
|
||||||
err = ionic_init(ionic);
|
err = ionic_init(ionic);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -286,14 +287,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
goto err_out_reset;
|
goto err_out_reset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Configure LIFs */
|
/* Allocate and init the LIF */
|
||||||
err = ionic_lif_identify(ionic, IONIC_LIF_TYPE_CLASSIC,
|
|
||||||
&ionic->ident.lif);
|
|
||||||
if (err) {
|
|
||||||
dev_err(dev, "Cannot identify LIFs: %d, aborting\n", err);
|
|
||||||
goto err_out_port_reset;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = ionic_lif_size(ionic);
|
err = ionic_lif_size(ionic);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(dev, "Cannot size LIF: %d, aborting\n", err);
|
dev_err(dev, "Cannot size LIF: %d, aborting\n", err);
|
||||||
|
|
|
@ -2556,7 +2556,15 @@ 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_identify(ionic);
|
||||||
|
if (err)
|
||||||
|
goto err_out;
|
||||||
|
err = ionic_port_identify(ionic);
|
||||||
|
if (err)
|
||||||
|
goto err_out;
|
||||||
|
err = ionic_port_init(ionic);
|
||||||
|
if (err)
|
||||||
|
goto err_out;
|
||||||
err = ionic_qcqs_alloc(lif);
|
err = ionic_qcqs_alloc(lif);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
|
|
@ -429,17 +429,23 @@ int ionic_identify(struct ionic *ionic)
|
||||||
sz = min(sizeof(ident->dev), sizeof(idev->dev_cmd_regs->data));
|
sz = min(sizeof(ident->dev), sizeof(idev->dev_cmd_regs->data));
|
||||||
memcpy_fromio(&ident->dev, &idev->dev_cmd_regs->data, sz);
|
memcpy_fromio(&ident->dev, &idev->dev_cmd_regs->data, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&ionic->dev_cmd_lock);
|
mutex_unlock(&ionic->dev_cmd_lock);
|
||||||
|
|
||||||
if (err)
|
if (err) {
|
||||||
goto err_out_unmap;
|
dev_err(ionic->dev, "Cannot identify ionic: %dn", err);
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
|
|
||||||
ionic_debugfs_add_ident(ionic);
|
err = ionic_lif_identify(ionic, IONIC_LIF_TYPE_CLASSIC,
|
||||||
|
&ionic->ident.lif);
|
||||||
|
if (err) {
|
||||||
|
dev_err(ionic->dev, "Cannot identify LIFs: %d\n", err);
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_out_unmap:
|
err_out:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue