All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Walls <awalls@md.metrocast.net>
To: "Igor M. Liplianin" <liplianin@me.by>
Cc: linux-media@vger.kernel.org
Subject: Re: Need info to understand TeVii S470 cx23885 MSI  problem
Date: Tue, 14 Sep 2010 17:01:20 -0400	[thread overview]
Message-ID: <1284498080.26360.45.camel@morgan.silverblock.net> (raw)
In-Reply-To: <201009140108.50109.liplianin@me.by>

On Tue, 2010-09-14 at 01:08 +0300, Igor M. Liplianin wrote:
> В сообщении от 13 сентября 2010 23:41:21 автор Igor M. Liplianin написал:
> > В сообщении от 13 сентября 2010 23:38:28 автор Igor M. Liplianin написал:
> > > В сообщении от 12 сентября 2010 22:56:57 автор Andy Walls написал:

> > > > The linux kernel should be writing the MSI IRQ vector into the PCI
> > > > configuration space of the CX23885.  It looks like when you unload and
> > > > reload the cx23885 module, it is not changing the vector.

> > > Error appears only and if you zap actual channel(interrupts actually
> > > calls). First time module loaded and zapped some channel. At this point
> > > there is no errors. /proc/interrupts shows some irq's for cx23885.
> > > Then rmmod-insmod and szap again. Voilla! No irq vector.
> > > /proc/interrupts shows zero irq calls for cx23885.
> > > In my case Do_irq complains about irq 153, dmesq says cx23885 uses 45.

> > Forget to mention. The tree is media_tree, branch staging/v2.6.37

Hi Igor,

On the surface what is going on is now obvious to me:

> bash-4.1# szap -l10750 bridge-tv -x
> reading channels from file '/root/.szap/channels.conf'
> zapping to 6 'bridge-tv':
> sat 1, frequency = 12303 MHz H, symbolrate 27500000, vpid = 0x0134, apid = 0x0100 sid = 0x003b
> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
> status 1f | signal fde8 | snr e128 | ber 00000000 | unc 0000000b | FE_HAS_LOCK
> bash-4.1# lspci -d 14f1: -xxxx -vvvv 
> 02:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder 
> (rev 02)
>         Subsystem: Device d470:9022

>         Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
>                 Address: 00000000fee0300c  Data: 4191

> a0: 05 00 81 00 0c 30 e0 fe 00 00 00 00 91 41 00 00
             ^                            ^^
             |                            |
MSI Enabled--+                            |
                                          |
Linux MSI vector (0x91 = 145) ------------+


> bash-4.1# rmmod cx23885
> bash-4.1# insmod cx23885.ko
> bash-4.1# lspci -d 14f1: -xxxx -vvvv 
> 02:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder 
> (rev 02)
>         Subsystem: Device d470:9022

>         Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
>                 Address: 00000000fee0300c  Data: 4199

> a0: 05 00 81 00 0c 30 e0 fe 00 00 00 00 99 41 00 00
             ^                            ^^
             |                            |
MSI Enabled--+                            |
                                          |
Linux MSI vector (0x99 = 153) ------------+ 


> bash-4.1# szap -l10750 bridge-tv -x
> reading channels from file '/root/.szap/channels.conf'
> zapping to 6 'bridge-tv':
> sat 1, frequency = 12303 MHz H, symbolrate 27500000, vpid = 0x0134, apid = 0x0100 sid = 0x003b
> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
> status 00 | signal f618 | snr e128 | ber 00000000 | unc 0000000b | 
> 
> Message from syslogd@localhost at Tue Sep 14 01:00:50 2010 ...
> localhost kernel: do_IRQ: 0.145 No irq handler for vector (irq -1)
                              ^^^
                               |
Previous MSI vector used ------+
(145 = 0x91 and is not 0x99 ! )


The CX23885 hardware is sending the old/previous MSI data in the PCIe
MSI message.

The likely reasons I can think of for this to happen are:

1. The CX23885 chip has a bug and send at least one PCIe MSI message
with the old MSI data, when the MSI data payload in the PCIe config
space of the CX23885 has changed.

2. Your kernel is using the PCI Enhanced Configuration Access Method
(Linux calls it MMCONFIG in dmesg) and PCI MMIO Configuration writes to
the CX23885 are getting reordered due to motherboard/chipset design
problem.  Under these conditions, MSI on the CX23885 could be re-enabled
before the MSI Data vector is updated in the CX23885's PCI config space.

(See page 5 of:
http://www.pcisig.com/specifications/pciexpress/PciEx_ECN_MMCONFIG_040217.pdf )


To eliminate #2 being a problem, could you please boot your kernel with
"pci=nommconf" on the kernel command line and see if the MSI data vector
problem goes away?

Regards,
Andy


  reply	other threads:[~2010-09-14 21:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 19:56 Need info to understand TeVii S470 cx23885 MSI problem Andy Walls
2010-09-13 20:38 ` Igor M. Liplianin
2010-09-13 20:41   ` Igor M. Liplianin
2010-09-13 22:08     ` Igor M. Liplianin
2010-09-14 21:01       ` Andy Walls [this message]
2010-09-13 23:05 Andy Walls

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284498080.26360.45.camel@morgan.silverblock.net \
    --to=awalls@md.metrocast.net \
    --cc=linux-media@vger.kernel.org \
    --cc=liplianin@me.by \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.