mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
crypto: qat - handle sysfs-triggered reset callbacks
A reset requested through /sys/bus/pci/devices/.../reset invokes the driver reset_prepare() and reset_done() callbacks. The QAT driver does not implement those callbacks today, so the reset proceeds without quiescing the device or bringing it back up afterward, which leaves the device unusable. Hook reset_prepare() and reset_done() into adf_err_handler so the common shutdown and recovery flow also runs for reset. Skip device quiesce if the device is already in a down state. Cc: stable@vger.kernel.org Signed-off-by: Ahsan Atta <ahsan.atta@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Damian Muszynski <damian.muszynski@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
56707afb92
commit
4627ef7019
|
|
@ -250,10 +250,22 @@ static void adf_resume(struct pci_dev *pdev)
|
|||
dev_info(&pdev->dev, "Device is up and running\n");
|
||||
}
|
||||
|
||||
static void adf_reset_prepare(struct pci_dev *pdev)
|
||||
{
|
||||
reset_prepare(pdev);
|
||||
}
|
||||
|
||||
static void adf_reset_done(struct pci_dev *pdev)
|
||||
{
|
||||
reset_done(pdev);
|
||||
}
|
||||
|
||||
const struct pci_error_handlers adf_err_handler = {
|
||||
.error_detected = adf_error_detected,
|
||||
.slot_reset = adf_slot_reset,
|
||||
.resume = adf_resume,
|
||||
.reset_prepare = adf_reset_prepare,
|
||||
.reset_done = adf_reset_done,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(adf_err_handler);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user