* via82xx.c vs. sonypi.c i/o region conflict on vaio
@ 2004-07-14 17:42 Greg Ingram
2004-07-14 19:31 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Greg Ingram @ 2004-07-14 17:42 UTC (permalink / raw)
To: linux-kernel
Howdy,
(I sent a similar version of this message to Jaroslav Kysela
<perex@suse.cz> but haven't heard back from him.)
I'm working with a Sony Vaio PCG-FXA32. The "Sony Programmable I/O
Controller Driver v1.22" (drivers/char/sonypi.c). finds a controller and
grabs ports 0x1080-0x109f. The sound module (sound/pci/via82xx.c) finds a
VIA686A and grabs ports 0x1000-0x10ff. The ranges overlap. I can't load
both modules.
I modified the sound driver to grab only 128 ports instead of 256 and the
driver works fine on this hardware. In 2.6.7, it's line 2049 or so of
sound/pci/via82xx.c:
old: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
new: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
Does anyone know specifically that some chipsets need so many ports? If
so, what info for this hardware can I supply to fix the sound driver
permanently?
Regards,
- Greg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: via82xx.c vs. sonypi.c i/o region conflict on vaio
2004-07-14 17:42 via82xx.c vs. sonypi.c i/o region conflict on vaio Greg Ingram
@ 2004-07-14 19:31 ` Jeff Garzik
2004-07-14 19:53 ` Greg Ingram
2004-07-15 9:58 ` Takashi Iwai
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-07-14 19:31 UTC (permalink / raw)
To: Greg Ingram; +Cc: linux-kernel, tiwai, Jaroslav Kysela
Greg Ingram wrote:
> I modified the sound driver to grab only 128 ports instead of 256 and the
> driver works fine on this hardware. In 2.6.7, it's line 2049 or so of
> sound/pci/via82xx.c:
>
> old: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
> new: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
I don't see any difference between these two lines.
Regardless, I see two bugs:
1) Hardcoding 256 for resource size. Should be using pci_resource_len()
2) via82xx sound driver should be using pci_request_regions() and
pci_release_regions(), not request_region. Doing this eliminates issue #1.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: via82xx.c vs. sonypi.c i/o region conflict on vaio
2004-07-14 19:31 ` Jeff Garzik
@ 2004-07-14 19:53 ` Greg Ingram
2004-07-15 9:58 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: Greg Ingram @ 2004-07-14 19:53 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel, tiwai, Jaroslav Kysela
On Wed, 14 Jul 2004, Jeff Garzik wrote:
> Greg Ingram wrote:
> > I modified the sound driver to grab only 128 ports instead of 256 and the
> > driver works fine on this hardware. In 2.6.7, it's line 2049 or so of
> > sound/pci/via82xx.c:
> >
> > old: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
> > new: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
>
>
> I don't see any difference between these two lines.
Doh! In new I replaced '256' with '128'.
> Regardless, I see two bugs:
>
> 1) Hardcoding 256 for resource size. Should be using pci_resource_len()
>
> 2) via82xx sound driver should be using pci_request_regions() and
> pci_release_regions(), not request_region. Doing this eliminates issue #1.
Is the fix in? Or is there something I need to do?
Incidentally, on the notebook, cutting the region grabbed by the audio
driver also eliminated a nifty hang-the-machine issue if I pressed Fn-F7
trying to shove video out the external display port.
Regards,
- Greg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: via82xx.c vs. sonypi.c i/o region conflict on vaio
2004-07-14 19:31 ` Jeff Garzik
2004-07-14 19:53 ` Greg Ingram
@ 2004-07-15 9:58 ` Takashi Iwai
1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2004-07-15 9:58 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Greg Ingram, linux-kernel, Jaroslav Kysela
At Wed, 14 Jul 2004 15:31:44 -0400,
Jeff Garzik wrote:
>
> Greg Ingram wrote:
> > I modified the sound driver to grab only 128 ports instead of 256 and the
> > driver works fine on this hardware. In 2.6.7, it's line 2049 or so of
> > sound/pci/via82xx.c:
> >
> > old: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
> > new: if ((chip->res_port = request_region(chip->port, 256, card->driver)) == NULL) {
>
>
> I don't see any difference between these two lines.
>
> Regardless, I see two bugs:
>
> 1) Hardcoding 256 for resource size. Should be using pci_resource_len()
>
> 2) via82xx sound driver should be using pci_request_regions() and
> pci_release_regions(), not request_region. Doing this eliminates issue #1.
Agreed, it's much simpler.
I'll fix it (over all ALSA PCI drivers).
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-15 9:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-14 17:42 via82xx.c vs. sonypi.c i/o region conflict on vaio Greg Ingram
2004-07-14 19:31 ` Jeff Garzik
2004-07-14 19:53 ` Greg Ingram
2004-07-15 9:58 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox