mirror of https://gitee.com/openkylin/linux.git
Merge branch 'pci/aer' into next
* pci/aer: PCI/AER: Remove unused .link_reset() callback
This commit is contained in:
commit
ca0ef7fecc
|
@ -78,7 +78,6 @@ struct pci_error_handlers
|
||||||
{
|
{
|
||||||
int (*error_detected)(struct pci_dev *dev, enum pci_channel_state);
|
int (*error_detected)(struct pci_dev *dev, enum pci_channel_state);
|
||||||
int (*mmio_enabled)(struct pci_dev *dev);
|
int (*mmio_enabled)(struct pci_dev *dev);
|
||||||
int (*link_reset)(struct pci_dev *dev);
|
|
||||||
int (*slot_reset)(struct pci_dev *dev);
|
int (*slot_reset)(struct pci_dev *dev);
|
||||||
void (*resume)(struct pci_dev *dev);
|
void (*resume)(struct pci_dev *dev);
|
||||||
};
|
};
|
||||||
|
@ -104,8 +103,7 @@ if it implements any, it must implement error_detected(). If a callback
|
||||||
is not implemented, the corresponding feature is considered unsupported.
|
is not implemented, the corresponding feature is considered unsupported.
|
||||||
For example, if mmio_enabled() and resume() aren't there, then it
|
For example, if mmio_enabled() and resume() aren't there, then it
|
||||||
is assumed that the driver is not doing any direct recovery and requires
|
is assumed that the driver is not doing any direct recovery and requires
|
||||||
a slot reset. If link_reset() is not implemented, the card is assumed to
|
a slot reset. Typically a driver will want to know about
|
||||||
not care about link resets. Typically a driver will want to know about
|
|
||||||
a slot_reset().
|
a slot_reset().
|
||||||
|
|
||||||
The actual steps taken by a platform to recover from a PCI error
|
The actual steps taken by a platform to recover from a PCI error
|
||||||
|
@ -232,25 +230,9 @@ proceeds to STEP 4 (Slot Reset)
|
||||||
|
|
||||||
STEP 3: Link Reset
|
STEP 3: Link Reset
|
||||||
------------------
|
------------------
|
||||||
The platform resets the link, and then calls the link_reset() callback
|
The platform resets the link. This is a PCI-Express specific step
|
||||||
on all affected device drivers. This is a PCI-Express specific state
|
|
||||||
and is done whenever a non-fatal error has been detected that can be
|
and is done whenever a non-fatal error has been detected that can be
|
||||||
"solved" by resetting the link. This call informs the driver of the
|
"solved" by resetting the link.
|
||||||
reset and the driver should check to see if the device appears to be
|
|
||||||
in working condition.
|
|
||||||
|
|
||||||
The driver is not supposed to restart normal driver I/O operations
|
|
||||||
at this point. It should limit itself to "probing" the device to
|
|
||||||
check its recoverability status. If all is right, then the platform
|
|
||||||
will call resume() once all drivers have ack'd link_reset().
|
|
||||||
|
|
||||||
Result codes:
|
|
||||||
(identical to STEP 3 (MMIO Enabled)
|
|
||||||
|
|
||||||
The platform then proceeds to either STEP 4 (Slot Reset) or STEP 5
|
|
||||||
(Resume Operations).
|
|
||||||
|
|
||||||
>>> The current powerpc implementation does not implement this callback.
|
|
||||||
|
|
||||||
STEP 4: Slot Reset
|
STEP 4: Slot Reset
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -598,15 +598,6 @@ pci_slot_reset(struct pci_dev *pdev)
|
||||||
return PCI_ERS_RESULT_CAN_RECOVER;
|
return PCI_ERS_RESULT_CAN_RECOVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pci_ers_result_t
|
|
||||||
pci_link_reset(struct pci_dev *pdev)
|
|
||||||
{
|
|
||||||
struct hfi1_devdata *dd = pci_get_drvdata(pdev);
|
|
||||||
|
|
||||||
dd_dev_info(dd, "HFI1 link_reset function called, ignored\n");
|
|
||||||
return PCI_ERS_RESULT_CAN_RECOVER;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pci_resume(struct pci_dev *pdev)
|
pci_resume(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
|
@ -625,7 +616,6 @@ pci_resume(struct pci_dev *pdev)
|
||||||
const struct pci_error_handlers hfi1_pci_err_handler = {
|
const struct pci_error_handlers hfi1_pci_err_handler = {
|
||||||
.error_detected = pci_error_detected,
|
.error_detected = pci_error_detected,
|
||||||
.mmio_enabled = pci_mmio_enabled,
|
.mmio_enabled = pci_mmio_enabled,
|
||||||
.link_reset = pci_link_reset,
|
|
||||||
.slot_reset = pci_slot_reset,
|
.slot_reset = pci_slot_reset,
|
||||||
.resume = pci_resume,
|
.resume = pci_resume,
|
||||||
};
|
};
|
||||||
|
|
|
@ -682,13 +682,6 @@ qib_pci_slot_reset(struct pci_dev *pdev)
|
||||||
return PCI_ERS_RESULT_CAN_RECOVER;
|
return PCI_ERS_RESULT_CAN_RECOVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pci_ers_result_t
|
|
||||||
qib_pci_link_reset(struct pci_dev *pdev)
|
|
||||||
{
|
|
||||||
qib_devinfo(pdev, "QIB link_reset function called, ignored\n");
|
|
||||||
return PCI_ERS_RESULT_CAN_RECOVER;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
qib_pci_resume(struct pci_dev *pdev)
|
qib_pci_resume(struct pci_dev *pdev)
|
||||||
{
|
{
|
||||||
|
@ -707,7 +700,6 @@ qib_pci_resume(struct pci_dev *pdev)
|
||||||
const struct pci_error_handlers qib_pci_err_handler = {
|
const struct pci_error_handlers qib_pci_err_handler = {
|
||||||
.error_detected = qib_pci_error_detected,
|
.error_detected = qib_pci_error_detected,
|
||||||
.mmio_enabled = qib_pci_mmio_enabled,
|
.mmio_enabled = qib_pci_mmio_enabled,
|
||||||
.link_reset = qib_pci_link_reset,
|
|
||||||
.slot_reset = qib_pci_slot_reset,
|
.slot_reset = qib_pci_slot_reset,
|
||||||
.resume = qib_pci_resume,
|
.resume = qib_pci_resume,
|
||||||
};
|
};
|
||||||
|
|
|
@ -781,12 +781,6 @@ static pci_ers_result_t ngene_error_detected(struct pci_dev *dev,
|
||||||
return PCI_ERS_RESULT_CAN_RECOVER;
|
return PCI_ERS_RESULT_CAN_RECOVER;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pci_ers_result_t ngene_link_reset(struct pci_dev *dev)
|
|
||||||
{
|
|
||||||
printk(KERN_INFO DEVICE_NAME ": link reset\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static pci_ers_result_t ngene_slot_reset(struct pci_dev *dev)
|
static pci_ers_result_t ngene_slot_reset(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
printk(KERN_INFO DEVICE_NAME ": slot reset\n");
|
printk(KERN_INFO DEVICE_NAME ": slot reset\n");
|
||||||
|
@ -800,7 +794,6 @@ static void ngene_resume(struct pci_dev *dev)
|
||||||
|
|
||||||
static const struct pci_error_handlers ngene_errors = {
|
static const struct pci_error_handlers ngene_errors = {
|
||||||
.error_detected = ngene_error_detected,
|
.error_detected = ngene_error_detected,
|
||||||
.link_reset = ngene_link_reset,
|
|
||||||
.slot_reset = ngene_slot_reset,
|
.slot_reset = ngene_slot_reset,
|
||||||
.resume = ngene_resume,
|
.resume = ngene_resume,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1336,7 +1336,6 @@ static int genwqe_sriov_configure(struct pci_dev *dev, int numvfs)
|
||||||
static struct pci_error_handlers genwqe_err_handler = {
|
static struct pci_error_handlers genwqe_err_handler = {
|
||||||
.error_detected = genwqe_err_error_detected,
|
.error_detected = genwqe_err_error_detected,
|
||||||
.mmio_enabled = genwqe_err_result_none,
|
.mmio_enabled = genwqe_err_result_none,
|
||||||
.link_reset = genwqe_err_result_none,
|
|
||||||
.slot_reset = genwqe_err_slot_reset,
|
.slot_reset = genwqe_err_slot_reset,
|
||||||
.resume = genwqe_err_resume,
|
.resume = genwqe_err_resume,
|
||||||
};
|
};
|
||||||
|
|
|
@ -678,9 +678,6 @@ struct pci_error_handlers {
|
||||||
/* MMIO has been re-enabled, but not DMA */
|
/* MMIO has been re-enabled, but not DMA */
|
||||||
pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev);
|
pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev);
|
||||||
|
|
||||||
/* PCI Express link has been reset */
|
|
||||||
pci_ers_result_t (*link_reset)(struct pci_dev *dev);
|
|
||||||
|
|
||||||
/* PCI slot has been reset */
|
/* PCI slot has been reset */
|
||||||
pci_ers_result_t (*slot_reset)(struct pci_dev *dev);
|
pci_ers_result_t (*slot_reset)(struct pci_dev *dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue