Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176478887
D60794.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60794.id.diff
View Options
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -6438,12 +6438,6 @@
/* Enable bus-mastering and hardware bug workaround. */
pci_enable_busmaster(dev);
- reg = pci_read_config(dev, PCIR_STATUS, sizeof(reg));
- /* if !MSI */
- if (reg & PCIM_STATUS_INTxSTATE) {
- reg &= ~PCIM_STATUS_INTxSTATE;
- }
- pci_write_config(dev, PCIR_STATUS, reg, sizeof(reg));
rid = PCIR_BAR(0);
sc->sc_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
@@ -6464,6 +6458,16 @@
} else if (pci_alloc_msi(dev, &count) == 0) {
rid = 1;
}
+
+ if (! sc->sc_msix) {
+ /* Hardware bug workaround. */
+ reg = pci_read_config(dev, PCIR_STATUS, sizeof(reg));
+ if (reg & PCIM_STATUS_INTxSTATE) {
+ reg &= ~PCIM_STATUS_INTxSTATE;
+ }
+ pci_write_config(dev, PCIR_STATUS, reg, sizeof(reg));
+ }
+
sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE |
(rid != 0 ? 0 : RF_SHAREABLE));
if (sc->sc_irq == NULL) {
@@ -7049,6 +7053,7 @@
{
struct iwm_softc *sc = device_get_softc(dev);
int do_reinit = 0;
+ uint16_t reg;
/*
* We disable the RETRY_TIMEOUT register (0x41) to keep
@@ -7059,6 +7064,15 @@
if (!sc->sc_attached)
return 0;
+ if (!sc->sc_msix) {
+ /* Hardware bug workaround. */
+ reg = pci_read_config(dev, PCIR_STATUS, sizeof(reg));
+ if (reg & PCIM_STATUS_INTxSTATE) {
+ reg &= ~PCIM_STATUS_INTxSTATE;
+ }
+ pci_write_config(dev, PCIR_STATUS, reg, sizeof(reg));
+ }
+
iwm_init_task(device_get_softc(dev));
IWM_LOCK(sc);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 20, 4:48 AM (11 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41017080
Default Alt Text
D60794.id.diff (1 KB)
Attached To
Mode
D60794: iwm: clear PCIM_STATUS_INTxSTATE if set during attach/resume in !msix
Attached
Detach File
Event Timeline
Log In to Comment