Date: Thu, 13 Jun 2013 10:18:30 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-amd64@freebsd.org Cc: Konstantin Belousov <kostikbel@gmail.com>, Michal Sviba <michal@sviba.cz>, freebsd-usb@freebsd.org Subject: Re: amd64/179376: xhci ehci irq storm Message-ID: <201306131018.30778.jhb@freebsd.org> In-Reply-To: <20130611174822.GR3047@kib.kiev.ua> References: <201306110920.r5B9K1m4071258@freefall.freebsd.org> <51B7563D.20807@sviba.cz> <20130611174822.GR3047@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, June 11, 2013 1:48:22 pm Konstantin Belousov wrote: > --- a/sys/dev/usb/controller/xhci_pci.c > +++ b/sys/dev/usb/controller/xhci_pci.c > @@ -171,11 +170,22 @@ xhci_pci_attach(device_t self) > > usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); > > - rid = 0; > - sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, > - RF_SHAREABLE | RF_ACTIVE); > + sc->sc_irq_rid = 0; > + count = pci_msi_count(self); > + if (count >= 1) { > + if (count > 1) > + count = 1; You can just drop the if and always do the assignment here, yes? (Minor nit I know, and the original patch is fine for testing) -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306131018.30778.jhb>