2009-04-20 19:19:49

by Larry Finger

[permalink] [raw]
Subject: Problem with exclusive interrupt in hostap_cs

Jouni,

This was posted on the PCMCIA mailing list by Jack Schneider:

> Hi, folks Using Debian Lenny OS with 2.6.28.2-486 kernel.
> I have a very old DEC VP575 laptop which I want to use as back-up
> server. I need two net connections. When I use a single pccard,
> wired, all is well. If I insert my second card, WIFI-Intersil Prism2.5
> I get the following /var/log/messages error:
> pcmcia: request for exclusive IRQ couuld not be fulfilled.
> pcmcia: the driver needs updating to supported shared IRQ lines

The two drivers being loaded are hostap_cs and xirc2ps_cs. The latter one is
coded to handle shared interrupts, but hostap_cs is not.

I would have no problem changing the driver interrupt registration in the
link->irq structure, but I was not quite sure how change prism2_interrupt() to
detect the shared case when the interrupt status register is 0xFFFF.

Could you please take a look at this?

Thanks,

Larry



2009-04-20 23:04:23

by Peter Stuge

[permalink] [raw]
Subject: Re: Problem with exclusive interrupt in hostap_cs

Larry Finger wrote:
> I would have no problem changing the driver interrupt registration
> in the link->irq structure, but I was not quite sure how change
> prism2_interrupt() to detect the shared case when the interrupt
> status register is 0xFFFF.

Another option would be for Jack to try the orinoco_cs driver.


//Peter

2009-04-21 16:50:03

by Larry Finger

[permalink] [raw]
Subject: Re: Problem with exclusive interrupt in hostap_cs

Jack Schneider wrote:
>
> Hi, All
> Tried the orinoco_cs driver last nite and got an error, something like;
> device not supported..
>
> Thanks for trying..

I took a second look at the code and found that other drivers are using the
routine prism2_interrupt() with shared interrupts, thus the patch below should
be all that is needed.

I trust that you will be able to build the patched driver.

Larry


Index: wireless-testing/drivers/net/wireless/hostap/hostap_cs.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/hostap/hostap_cs.c
+++ wireless-testing/drivers/net/wireless/hostap/hostap_cs.c
@@ -666,7 +666,8 @@ static int prism2_config(struct pcmcia_d
* irq structure is initialized.
*/
if (link->conf.Attributes & CONF_ENABLE_IRQ) {
- link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
+ link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING |
+ IRQ_HANDLE_PRESENT;
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = prism2_interrupt;
link->irq.Instance = dev;

2009-07-27 13:55:03

by Wolfram Sang

[permalink] [raw]
Subject: Re: Problem with exclusive interrupt in hostap_cs

Hi Larry,

Larry Finger wrote:

> I took a second look at the code and found that other drivers are using the
> routine prism2_interrupt() with shared interrupts, thus the patch below should
> be all that is needed.
>
> I trust that you will be able to build the patched driver.
>
> Larry
>
>
> Index: wireless-testing/drivers/net/wireless/hostap/hostap_cs.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/hostap/hostap_cs.c
> +++ wireless-testing/drivers/net/wireless/hostap/hostap_cs.c
> @@ -666,7 +666,8 @@ static int prism2_config(struct pcmcia_d
> * irq structure is initialized.
> */
> if (link->conf.Attributes & CONF_ENABLE_IRQ) {
> - link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
> + link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING |
> + IRQ_HANDLE_PRESENT;
> link->irq.IRQInfo1 = IRQ_LEVEL_ID;
> link->irq.Handler = prism2_interrupt;
> link->irq.Instance = dev;

Do you think this could be queued up by now? Looks okay to me...

Regards,

Wolfram

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |


2009-07-28 08:34:54

by Wolfram Sang

[permalink] [raw]
Subject: Re: Problem with exclusive interrupt in hostap_cs


> As Dominik was missing and there was no action on the linux-pcmcia
> list, I took advantage of the fact that this is a wireless device and
> submitted the patch to John Linville. It is commit
> e4a01604b8e5656f3a059f52b3e8f2560740c057 in the wireless-testing tree
> and was sent to DaveM on July 24 for linux-next. It will be in 2.6.32.

Great. IMHO the netdev-tree was the more apropriate one anyhow. It seems it got
into linux-next shortly after I checked, so sorry for the noise!

Regards,

Wolfram

--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |


Attachments:
(No filename) (663.00 B)
signature.asc (197.00 B)
Digital signature
Download all attachments

2009-07-27 22:28:08

by Larry Finger

[permalink] [raw]
Subject: Re: Problem with exclusive interrupt in hostap_cs

Wolfram Sang wrote:
> Hi Larry,
>
> Larry Finger wrote:
>
>> I took a second look at the code and found that other drivers are
>> using the
>> routine prism2_interrupt() with shared interrupts, thus the patch
>> below should
>> be all that is needed.
>>
>> I trust that you will be able to build the patched driver.
>>
>> Larry
>>
>>
>> Index: wireless-testing/drivers/net/wireless/hostap/hostap_cs.c
>> ===================================================================
>> --- wireless-testing.orig/drivers/net/wireless/hostap/hostap_cs.c
>> +++ wireless-testing/drivers/net/wireless/hostap/hostap_cs.c
>> @@ -666,7 +666,8 @@ static int prism2_config(struct pcmcia_d
>> * irq structure is initialized.
>> */
>> if (link->conf.Attributes & CONF_ENABLE_IRQ) {
>> - link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
>> + link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING |
>> + IRQ_HANDLE_PRESENT;
>> link->irq.IRQInfo1 = IRQ_LEVEL_ID;
>> link->irq.Handler = prism2_interrupt;
>> link->irq.Instance = dev;
>
> Do you think this could be queued up by now? Looks okay to me...

As Dominik was missing and there was no action on the linux-pcmcia
list, I took advantage of the fact that this is a wireless device and
submitted the patch to John Linville. It is commit
e4a01604b8e5656f3a059f52b3e8f2560740c057 in the wireless-testing tree
and was sent to DaveM on July 24 for linux-next. It will be in 2.6.32.

Larry