Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Feb 2009 12:54:06 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Jason Harmening <jason.harmening@gmail.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: PCI-Express interrupt issues
Message-ID:  <200902091254.06917.jhb@freebsd.org>
In-Reply-To: <2d1264630902090811p761b0a14w997985779aad8748@mail.gmail.com>
References:  <20090208113202.6d591589@CORONA> <200902090946.46917.jhb@freebsd.org> <2d1264630902090811p761b0a14w997985779aad8748@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 09 February 2009 11:11:20 am Jason Harmening wrote:
> On Mon, Feb 9, 2009 at 8:46 AM, John Baldwin <jhb@freebsd.org> wrote:
> > On Sunday 08 February 2009 12:32:02 pm Jason Harmening wrote:
> >> Hi All,
> >>
> >> I'm the maintainer for the FreeBSD cx88 driver (multimedia/cx88).  I've
> >> recently encountered some issues w/ interrupt handling, specifically on
> >> PCI-Express systems, and I was hoping someone would be able to help me.
> >>
> >> Issue #1:
> >>
> >> The cx88 driver has split interrupt handling between filters and
> >> ithreads since filters became available w/ 7.0.  For the past year, the
> >> filters have been set up to return FILTER_SCHEDULE_THREAD if the status
> >> register indicates an interrupt, FILTER_STRAY otherwise.  Everything
> >> has worked fine.
> >>
> >> However, I recently stumbled across some documentation indicating that
> >> FILTER_SCHEDULE_THREAD shouldn't be returned alone--instead, the filter
> >> should return FILTER_HANDLED | FILTER_SCHEDULE_THREAD.  So I modified
> >> the cx88 driver to do that instead, and that's where things turned
> >> strange:
> >>
> >> On machine #1, which uses a VIA K8T800 chipset, everything still worked
> >> fine.
> >>
> >> On machine #2, which uses a VIA K8T890 chipset, the threaded interrupt
> >> handlers were no longer invoked.  It's as though the bus driver saw
> >> FILTER_HANDLED in the bitmask and assumed the interrupt was already
> >> processed without checking to see if an ithread should be scheduled.
> >> What's interesting is that the only significant difference between the
> >> K8T800 in machine #1 and the K8T890 in machine #2 is that the K8T890
> >> supports PCI-Express, while the K8T800 is PCI-only.
> >
> > Are you seeing this only on 7.0?  Also, do you have 'INTR_FILTER' enabled 
in
> > the kernel?  If you don't, then your ithread will never be called if you 
have
> > a filter (actually, the bus_setup_intr() should fail in that case if you
> > specify both).
> 
> All machines are running 7.1-STABLE.  Filters are enabled across the
> board, and reverting to just returning  FILTER_SCHEDULE_THREAD fixes
> the issue.

Do you see a dedicated interrupt thread for your device in top/ps?  It should 
be 'intr: pcm0' (or whatever the device name is).

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902091254.06917.jhb>