View | Details | Raw Unified | Return to bug 229106
Collapse All | Expand All

(-)sys/dev/usb/controller/ohci_pci.c (-2 / +8 lines)
Lines 206-211 ohci_pci_probe(device_t self) Link Here
206
}
206
}
207
207
208
static int
208
static int
209
ohci_pci_dummy_filter(void *unused __unused)
210
{
211
	return (FILTER_HANDLED);
212
}
213
214
static int
209
ohci_pci_attach(device_t self)
215
ohci_pci_attach(device_t self)
210
{
216
{
211
	ohci_softc_t *sc = device_get_softc(self);
217
	ohci_softc_t *sc = device_get_softc(self);
Lines 308-314 ohci_pci_attach(device_t self) Link Here
308
314
309
#if (__FreeBSD_version >= 700031)
315
#if (__FreeBSD_version >= 700031)
310
	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
316
	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
311
	    NULL, (driver_intr_t *)ohci_interrupt, sc, &sc->sc_intr_hdl);
317
	    ohci_pci_dummy_filter, NULL, sc, &sc->sc_intr_hdl);
312
#else
318
#else
313
	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
319
	err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
314
	    (driver_intr_t *)ohci_interrupt, sc, &sc->sc_intr_hdl);
320
	    (driver_intr_t *)ohci_interrupt, sc, &sc->sc_intr_hdl);
Lines 320-326 ohci_pci_attach(device_t self) Link Here
320
	}
326
	}
321
	err = ohci_init(sc);
327
	err = ohci_init(sc);
322
	if (!err) {
328
	if (!err) {
323
		err = device_probe_and_attach(sc->sc_bus.bdev);
329
		//err = device_probe_and_attach(sc->sc_bus.bdev);
324
	}
330
	}
325
	if (err) {
331
	if (err) {
326
		device_printf(self, "USB init failed\n");
332
		device_printf(self, "USB init failed\n");
(-)sys/kern/kern_intr.c (+2 lines)
Lines 32-37 __FBSDID("$FreeBSD$"); Link Here
32
#include "opt_ddb.h"
32
#include "opt_ddb.h"
33
#include "opt_kstack_usage_prof.h"
33
#include "opt_kstack_usage_prof.h"
34
34
35
#define QUEUE_MACRO_DEBUG_TRASH
36
35
#include <sys/param.h>
37
#include <sys/param.h>
36
#include <sys/bus.h>
38
#include <sys/bus.h>
37
#include <sys/conf.h>
39
#include <sys/conf.h>
(-)sys/x86/x86/io_apic.c (-2 / +36 lines)
Lines 149-154 static int enable_extint; Link Here
149
SYSCTL_INT(_hw_apic, OID_AUTO, enable_extint, CTLFLAG_RDTUN, &enable_extint, 0,
149
SYSCTL_INT(_hw_apic, OID_AUTO, enable_extint, CTLFLAG_RDTUN, &enable_extint, 0,
150
    "Enable the ExtINT pin in the first I/O APIC");
150
    "Enable the ExtINT pin in the first I/O APIC");
151
151
152
static u_int stuck_irq;
153
SYSCTL_INT(_hw_apic, OID_AUTO, stuck_irq, CTLFLAG_RWTUN, &stuck_irq, 0,
154
    "Make this interrupt appear to constantly fire after "
155
    "it fires for the first time");
156
152
static void
157
static void
153
_ioapic_eoi_source(struct intsrc *isrc, int locked)
158
_ioapic_eoi_source(struct intsrc *isrc, int locked)
154
{
159
{
Lines 157-169 _ioapic_eoi_source(struct intsrc *isrc, int locked Link Here
157
	volatile uint32_t *apic_eoi;
162
	volatile uint32_t *apic_eoi;
158
	uint32_t low1;
163
	uint32_t low1;
159
164
165
	src = (struct ioapic_intsrc *)isrc;
166
	io = (struct ioapic *)isrc->is_pic;
167
160
	lapic_eoi();
168
	lapic_eoi();
169
170
	if (src->io_irq == stuck_irq) {
171
		/*
172
		 * Virtually re-raise the interrupt using
173
		 * IRQ Pin Assertion Register (0x20)
174
		 * after EOI-ing it.
175
		 */
176
		volatile uint32_t *apic_irq_assert;
177
178
		apic_irq_assert = (volatile uint32_t *)
179
		    ((volatile char *)io->io_addr + 0x20);
180
		*apic_irq_assert = src->io_intpin;
181
	}
182
161
	if (!lapic_eoi_suppression)
183
	if (!lapic_eoi_suppression)
162
		return;
184
		return;
163
	src = (struct ioapic_intsrc *)isrc;
185
164
	if (src->io_edgetrigger)
186
	if (src->io_edgetrigger)
165
		return;
187
		return;
166
	io = (struct ioapic *)isrc->is_pic;
167
188
168
	/*
189
	/*
169
	 * Handle targeted EOI for level-triggered pins, if broadcast
190
	 * Handle targeted EOI for level-triggered pins, if broadcast
Lines 270-275 ioapic_enable_source(struct intsrc *isrc) Link Here
270
		intpin->io_masked = 0;
291
		intpin->io_masked = 0;
271
	}
292
	}
272
	mtx_unlock_spin(&icu_lock);
293
	mtx_unlock_spin(&icu_lock);
294
295
	if (intpin->io_irq == stuck_irq) {
296
		/*
297
		 * Virtually re-raise the interrupt using
298
		 * IRQ Pin Assertion Register (0x20)
299
		 * after unmasking it.
300
		 */
301
		volatile uint32_t *apic_irq_assert;
302
303
		apic_irq_assert = (volatile uint32_t *)
304
		    ((volatile char *)io->io_addr + 0x20);
305
		*apic_irq_assert = intpin->io_intpin;
306
	}
273
}
307
}
274
308
275
static void
309
static void

Return to bug 229106