All of lore.kernel.org
 help / color / mirror / Atom feed
* ISA pnp & kernel 2.6
@ 2004-02-11 21:57 Michael Corlett
  2004-02-12 10:35 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Corlett @ 2004-02-11 21:57 UTC (permalink / raw)
  To: alsa-devel


I have an ISA pnp card (opti931) which stopped working when I
installed kernel 2.6 and the problem is as follows:

The kernel function that sets and activates the card is
isapnp_set_resources (in drivers/pnp/isapnp/core.c) and for
each resource, it is checking that the correct flag is set
before writing to the port (i.e. IORESOURCE_IO, IORESOURCE_IRQ,
IORESOURCE_DMA, IORESOURCE_MEM) however, these flags are never
being set because the driver code is just using
pnp_init_resource_table followed by pnp_resource_change for each
setting and so the configuration is never written to the card.
(I believe that the equivalent code in 2.4 just checked for
flags != 0).

As I see it, there are four options:

1) Manually set the flags in the driver code (this is what I have
    done temporarily to get the card working).


2) Change the test in isapnp_set_resources to

    ((flags & IORESOURCE_xx) | (~flags & IORESOURCE_AUTO))

    as anything that has been auto-allocated should have the
    appropriate flag set.


3) Change pnp_resource_change to clear IORESOURCE_UNSET and change
    the test in isapnp_set_resources to

    (~flags & IORESOURCE_UNSET)


4) In the driver, use something else apart from pnp_resource_change
    (i.e. is there now a preferred method for filling in the
    settings).


I prefer 3) or else 2) but are there any reasons not to do this?
Any advice welcome.


Michael.








-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ISA pnp & kernel 2.6
  2004-02-11 21:57 ISA pnp & kernel 2.6 Michael Corlett
@ 2004-02-12 10:35 ` Takashi Iwai
  2004-02-12 17:19   ` Michael Corlett
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2004-02-12 10:35 UTC (permalink / raw)
  To: Michael Corlett; +Cc: alsa-devel

At Wed, 11 Feb 2004 21:57:35 +0000,
Michael Corlett wrote:
> 
> 
> I have an ISA pnp card (opti931) which stopped working when I
> installed kernel 2.6 and the problem is as follows:
> 
> The kernel function that sets and activates the card is
> isapnp_set_resources (in drivers/pnp/isapnp/core.c) and for
> each resource, it is checking that the correct flag is set
> before writing to the port (i.e. IORESOURCE_IO, IORESOURCE_IRQ,
> IORESOURCE_DMA, IORESOURCE_MEM) however, these flags are never
> being set because the driver code is just using
> pnp_init_resource_table followed by pnp_resource_change for each
> setting and so the configuration is never written to the card.
> (I believe that the equivalent code in 2.4 just checked for
> flags != 0).

did you try the latest 2.6.3-rc kernel?
many pnp fixes are included.


Takashi


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ISA pnp & kernel 2.6
  2004-02-12 10:35 ` Takashi Iwai
@ 2004-02-12 17:19   ` Michael Corlett
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Corlett @ 2004-02-12 17:19 UTC (permalink / raw)
  To: alsa-devel

Takashi Iwai wrote:
> At Wed, 11 Feb 2004 21:57:35 +0000,
> Michael Corlett wrote:
> 
>>
>>I have an ISA pnp card (opti931) which stopped working when I
>>installed kernel 2.6 and the problem is as follows:
>>
>>The kernel function that sets and activates the card is
>>isapnp_set_resources (in drivers/pnp/isapnp/core.c) and for
>>each resource, it is checking that the correct flag is set
>>before writing to the port (i.e. IORESOURCE_IO, IORESOURCE_IRQ,
>>IORESOURCE_DMA, IORESOURCE_MEM) however, these flags are never
>>being set because the driver code is just using
>>pnp_init_resource_table followed by pnp_resource_change for each
>>setting and so the configuration is never written to the card.
>>(I believe that the equivalent code in 2.4 just checked for
>>flags != 0).
> 
> 
> did you try the latest 2.6.3-rc kernel?
> many pnp fixes are included.
> 

I have just tried rc2 and it is indeed fixed.  Thankyou.

Michael.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-12 17:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-11 21:57 ISA pnp & kernel 2.6 Michael Corlett
2004-02-12 10:35 ` Takashi Iwai
2004-02-12 17:19   ` Michael Corlett

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.