Commit 34ad9377 authored by David S. Miller's avatar David S. Miller

Merge branch 'ionic-error-recovery'

Shannon Nelson says:

====================
ionic error recovery

This set of patches comes mostly from error recovery path testing,
as well as a couple of upstream review comments.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7b419e65 9e15410d
...@@ -266,6 +266,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -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) ...@@ -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);
......
...@@ -96,6 +96,7 @@ enum ionic_status_code { ...@@ -96,6 +96,7 @@ enum ionic_status_code {
IONIC_RC_ERROR = 29, /* Generic error */ IONIC_RC_ERROR = 29, /* Generic error */
IONIC_RC_ERDMA = 30, /* Generic RDMA error */ IONIC_RC_ERDMA = 30, /* Generic RDMA error */
IONIC_RC_EVFID = 31, /* VF ID does not exist */ IONIC_RC_EVFID = 31, /* VF ID does not exist */
IONIC_RC_EBAD_FW = 32, /* FW file is invalid or corrupted */
}; };
enum ionic_notifyq_opcode { enum ionic_notifyq_opcode {
......
...@@ -64,6 +64,8 @@ static const char *ionic_error_to_str(enum ionic_status_code code) ...@@ -64,6 +64,8 @@ static const char *ionic_error_to_str(enum ionic_status_code code)
return "IONIC_RC_ERROR"; return "IONIC_RC_ERROR";
case IONIC_RC_ERDMA: case IONIC_RC_ERDMA:
return "IONIC_RC_ERDMA"; return "IONIC_RC_ERDMA";
case IONIC_RC_EBAD_FW:
return "IONIC_RC_EBAD_FW";
default: default:
return "IONIC_RC_UNKNOWN"; return "IONIC_RC_UNKNOWN";
} }
...@@ -429,17 +431,23 @@ int ionic_identify(struct ionic *ionic) ...@@ -429,17 +431,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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment