From: Christer Weinigel <christer@weinigel.se>
To: Nathan Laredo <laredo@gnu.org>
Cc: Jiri Slaby <jirislaby@gmail.com>,
linux-kernel@vger.kernel.org, video4linux-list@redhat.com
Subject: Stradis driver conflicts with all other SAA7146 drivers
Date: 28 May 2006 14:33:52 +0200 [thread overview]
Message-ID: <m3wtc6ib0v.fsf@zoo.weinigel.se> (raw)
Hi,
[Nathan Laredo is the maintainer of the stradis driver but Jiri Slaby
submitted the PCI probing change that went into 2.6.16 so I'm Cc-ing
him too. I'm not a member of the video4linux mailing list so please
Cc me on any responses.]
The stradis driver in the 2.6.16 kernel only looks at the SAA7146
vendor and product ID and binds to any SAA7146 based device even if it
is not a stradis card. This stops all other SAA7146 drivers from
working, for example my WinTV Nova-T card using the budget-ci driver
doesn't work any longer. A lot of other people have also been bitten
by this.
So could you please modify your driver so that it only binds to real
stradis cards? If stradis cards have a subvendor and subdevice ID you
could just modify the pci_device_id table to look something like this:
static struct pci_device_id stradis_pci_tbl[] = {
{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7146,
.subvendor = 0xdead,
.subdevice = 0xbeef,
},
{ 0 }
};
>From the code it looks as if some boards don't have a good subsystem
vendor and device ID:
if (!pdev->subsystem_vendor)
dev_info(&pdev->dev, "%d: rev1 decoder\n", saa_num);
else
dev_info(&pdev->dev, "%d: SDM2xx found\n", saa_num);
Are those rev1 boards out in the real world or are they just
prototypes? If they are prototypes, can you add the subvendor ID
anway and add a module parameter so that your driver only binds to
unspecified vendor IDs if you use that module parameter? Something
like this:
static int bind_to_anything = 0;
module_param(bind_to_anything, int, 0);
int __init stradis_init(void)
{
...
if (bind_to_anything) {
stradis_pci_tbl[0].subvendor = PCI_ANY_ID;
stradis_pci_tbl[0].subdevice = PCI_ANY_ID;
}
...
pci_register_driver(&stradis_driver);
...
}
For anyone submitting a new SAA7146 driver to the kernel in the
future, please be aware that your card isn't the only one that uses
that chip, so always add a subvendor/subdevice to your drivers.
/Christer
--
"Just how much can I get away with and still go to heaven?"
Freelance consultant specializing in device driver programming for Linux
Christer Weinigel <christer@weinigel.se> http://www.weinigel.se
next reply other threads:[~2006-05-28 12:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-28 12:33 Christer Weinigel [this message]
2006-05-28 12:53 ` Stradis driver conflicts with all other SAA7146 drivers Jiri Slaby
2006-05-28 14:04 ` Mauro Carvalho Chehab
2006-05-28 16:01 ` Nathan Laredo
2006-05-28 16:17 ` Jiri Slaby
2006-05-28 17:31 ` Mauro Carvalho Chehab
2006-05-28 17:58 ` Christer Weinigel
2006-05-28 18:40 ` Mauro Carvalho Chehab
2006-05-29 12:46 ` [v4l-dvb-maintainer] " Michael Hunold
2006-05-29 13:33 ` Mauro Carvalho Chehab
2006-05-29 13:43 ` Michael Hunold
2006-05-29 13:58 ` Mauro Carvalho Chehab
2006-05-29 14:38 ` Gerd Hoffmann
2006-05-31 14:01 ` Alan Cox
2006-05-31 14:29 ` Arjan van de Ven
2006-05-29 12:44 ` Michael Hunold
2006-05-29 22:51 ` Christer Weinigel
2006-05-28 16:02 ` Christer Weinigel
2006-05-28 16:36 ` Jiri Slaby
2006-05-28 17:17 ` Christer Weinigel
2006-05-28 17:36 ` Jiri Slaby
2006-05-28 17:46 ` matthieu castet
2006-05-28 20:29 ` Jiri Slaby
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=m3wtc6ib0v.fsf@zoo.weinigel.se \
--to=christer@weinigel.se \
--cc=jirislaby@gmail.com \
--cc=laredo@gnu.org \
--cc=linux-kernel@vger.kernel.org \
--cc=video4linux-list@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox