Re: Dual slot PCI riser messes up ivtv

From: Islam Amer
Date: Sun Jun 24 2007 - 10:27:44 EST


On Thu, 2007-06-28 at 19:04 +0200, Clemens Koller wrote:
> Hi, Lennart!
>
> Lennart Sorensen schrieb:
> > On Thu, Jun 28, 2007 at 05:32:48PM +0200, Clemens Koller wrote:
> >> Robert Hancock schrieb:
> >>> Islam Amer wrote:
> >>>> I am trying to build a settop box with two cards, a PVR-150 and a DVB
> >>>> card. The mini-ITX motherboard has only one PCI slot, so I bought an
> >>>> active PCI riser.
> >> Please define "active". Is there a PCI bridge chip on the riser card?
> >> Or better: Tell us manufacturer and type of this PCI riser card and the
> >> mini-ITX board.
> >
> > Certainly many riser cards only have jumpers to change the irq for the
> > second slot, or some default built in remapping. And they may have id
> > select pins to pick which slots they should pretend to be. From what I
> > have read, via mini itx boards require a very specific design for riser
> > boards, which isn't what most riser boards do. Other mini itx boards
> > are probably different.
>
> The main problem is the unknown BIOS support for the PCI configuration.
> Maybe the manufacturer is at least willing to publish the default
> configuration, so the PCI riser can be modified/fixed to the same
> config. (Just call him and ask for the board designer... YMMV)
>
> However, AFAIK this (re-)configuration can be done by the kernel, too.
> (on embedded ppc platforms, the PCI mapping is done in the kernel)
>
> At least from the electrical engineer's point of view it's not
> difficult to modify a dumb passive PCI riser card to have the IRQ's and
> REQ/GNTs routed and have the IDSEL soldered with 220 Ohms to the
> proper AD line pin. (been there, done that)
> (If somebody want's to mess around with that stuff, contact
> me off list, it's getting OT here.)
>
> > Certainly the simplest is a riser card with a proper pci bridge that
> > creates a secondary pci bus with it's own device ids and maps the
> > interrupts correctly. Then all that really matters is that the bios on
> > the board supports pci bridges (a few companies actually manage to fail
> > to support pci bridges at all in their bioses).
>
> True. It might be more easy to get that running, hoping that
> the BIOS enumerates the bridge right.
> Kernel support shouldn't be an issue here as long as the
> chip is supported.
>
> Best greets,

Sorry for the late reply, I don't have internet connection at home yet.

I tested things a little more and the situation is getting better.

First the riser card is a dual slot one , with a chip on it so I assumed
it is active. It has jumpers to set the device number of the upper slot
and the devices in the two slots have to share the IRQ. This is it
here :
www.tranquilpc.co.uk/support/Files/TPC014/Tranquil%20Riser.pdf

Second : I found out that tvtime and mplayer cannot deal with the
pvr-150 card as a normal analogue card. mplayer can deal with it using
the pvr:// syntax. Also using ivtv-tune and mplayer /dev/video0 works.

So the error tvtime was giving was probably because it uses v4l1 ioctls
which are not supported by ivtv or something, just a wild guess.

Mythtv works fine when choosing MPEG2 card.

Third : The bug lies in the situation where the PVR-150 card is in the
upper slot and the DVB card is in the lower slot, in which case the DVB
card does not work. That was the dmesg output I posted earlier.

Fourth : here's cat /proc/interrupts in the current working situation
with the PVR-150 card in the lower slot and the DVB card in the upper
slot.
0: 64 IO-APIC-edge timer
1: 1130 IO-APIC-edge i8042
7: 0 IO-APIC-edge parport0
8: 3 IO-APIC-edge rtc
9: 0 IO-APIC-fasteoi acpi
12: 4 IO-APIC-edge i8042
14: 18035 IO-APIC-edge ide0
17: 0 IO-APIC-fasteoi ohci_hcd:usb1
18: 26 IO-APIC-fasteoi ohci_hcd:usb2
19: 0 IO-APIC-fasteoi ohci_hcd:usb3
20: 2 IO-APIC-fasteoi ehci_hcd:usb4
21: 12329 IO-APIC-fasteoi eth1
22: 16399 IO-APIC-fasteoi SiS SI7012
23: 15020 IO-APIC-fasteoi saa7134[0], saa7134[0], ivtv0
NMI: 0
LOC: 757294
ERR: 0
MIS: 0

As you can see the two cards are sharing the IRQ properly.

Thanks and sorry for replying late.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/