linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with exclusive interrupt in hostap_cs
       [not found] <20090420101340.142b6bc6@dp-indexing.com>
@ 2009-04-20 19:19 ` Larry Finger
  2009-04-20 22:57   ` Peter Stuge
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2009-04-20 19:19 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: Jack Schneider, linux-pcmcia, wireless

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


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

* Re: Problem with exclusive interrupt in hostap_cs
  2009-04-20 19:19 ` Problem with exclusive interrupt in hostap_cs Larry Finger
@ 2009-04-20 22:57   ` Peter Stuge
       [not found]     ` <20090421103617.05737b01@dp-indexing.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stuge @ 2009-04-20 22:57 UTC (permalink / raw)
  To: Larry Finger; +Cc: Jouni Malinen, linux-pcmcia, wireless, Jack Schneider

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

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

* Re: Problem with exclusive interrupt in hostap_cs
       [not found]     ` <20090421103617.05737b01@dp-indexing.com>
@ 2009-04-21 16:49       ` Larry Finger
  2009-07-27 13:50         ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2009-04-21 16:49 UTC (permalink / raw)
  To: Jack Schneider; +Cc: Peter Stuge, linux-pcmcia, wireless

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;

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

* Re: Problem with exclusive interrupt in hostap_cs
  2009-04-21 16:49       ` Larry Finger
@ 2009-07-27 13:50         ` Wolfram Sang
  2009-07-27 22:28           ` Larry Finger
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2009-07-27 13:50 UTC (permalink / raw)
  To: linux-wireless; +Cc: linux-pcmcia

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/  |


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

* Re: Problem with exclusive interrupt in hostap_cs
  2009-07-27 13:50         ` Wolfram Sang
@ 2009-07-27 22:28           ` Larry Finger
  2009-07-28  8:34             ` Wolfram Sang
  0 siblings, 1 reply; 6+ messages in thread
From: Larry Finger @ 2009-07-27 22:28 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-pcmcia, linux-wireless

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


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

* Re: Problem with exclusive interrupt in hostap_cs
  2009-07-27 22:28           ` Larry Finger
@ 2009-07-28  8:34             ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2009-07-28  8:34 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-pcmcia, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]


> 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/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2009-07-28  8:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20090420101340.142b6bc6@dp-indexing.com>
2009-04-20 19:19 ` Problem with exclusive interrupt in hostap_cs Larry Finger
2009-04-20 22:57   ` Peter Stuge
     [not found]     ` <20090421103617.05737b01@dp-indexing.com>
2009-04-21 16:49       ` Larry Finger
2009-07-27 13:50         ` Wolfram Sang
2009-07-27 22:28           ` Larry Finger
2009-07-28  8:34             ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).