Page MenuHomeFreeBSD

D3552.id8431.diff
No OneTemporary

D3552.id8431.diff

Index: sys/dev/ioat/ioat.c
===================================================================
--- sys/dev/ioat/ioat.c
+++ sys/dev/ioat/ioat.c
@@ -947,7 +947,7 @@
{
uint64_t status;
uint32_t chanerr;
- int timeout, error;
+ int timeout;
status = ioat_get_chansts(ioat);
if (is_ioat_active(status) || is_ioat_idle(status))
@@ -974,6 +974,13 @@
chanerr = pci_read_config(ioat->device, IOAT_CFG_CHANERR_INT_OFFSET, 4);
pci_write_config(ioat->device, IOAT_CFG_CHANERR_INT_OFFSET, chanerr, 4);
+ /*
+ * BDXDE models reset MSI-X registers on device reset. Save/restore
+ * their contents manually.
+ */
+ if (ioat_is_bdxde(ioat))
+ pci_save_state(ioat->device);
+
ioat_reset(ioat);
/* Wait at most 20 ms */
@@ -982,19 +989,8 @@
if (timeout == 20)
return (ETIMEDOUT);
- /*
- * BDXDE models reset MSI-X registers on device reset. We must
- * teardown and re-setup interrupts.
- */
- if (ioat_is_bdxde(ioat)) {
- error = ioat_teardown_intr(ioat);
- if (error)
- return (error);
-
- error = ioat_setup_intr(ioat);
- if (error)
- return (error);
- }
+ if (ioat_is_bdxde(ioat))
+ pci_restore_state(ioat->device);
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Fri, May 1, 3:41 PM (10 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32584077
Default Alt Text
D3552.id8431.diff (1 KB)

Event Timeline