linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
@ 2008-05-16 17:35 Randy Dunlap
  2008-05-16 18:15 ` Bjorn Helgaas
  2008-05-22 11:09 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-05-16 17:35 UTC (permalink / raw)
  To: netdev, jgarzik; +Cc: linux-next, bjorn.helgaas, akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

3c515.c uses pnp_irq(), which calls pnp_get_resource(),
which is not defined when CONFIG_PNP=n, so in that case,
get the IRQ from a hardware register.

3c515.c:(.text+0x3adc0): undefined reference to `pnp_get_resource'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/net/3c515.c |    4 ++++
 1 file changed, 4 insertions(+)

--- next-20080516.orig/drivers/net/3c515.c
+++ next-20080516/drivers/net/3c515.c
@@ -572,12 +572,16 @@ static int corkscrew_setup(struct net_de
 	int irq;
 	DECLARE_MAC_BUF(mac);
 
+#ifdef __ISAPNP__
 	if (idev) {
 		irq = pnp_irq(idev, 0);
 		vp->dev = &idev->dev;
 	} else {
 		irq = inw(ioaddr + 0x2002) & 15;
 	}
+#else
+	irq = inw(ioaddr + 0x2002) & 15;
+#endif
 
 	dev->base_addr = ioaddr;
 	dev->irq = irq;

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

* Re: [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
  2008-05-16 17:35 [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n Randy Dunlap
@ 2008-05-16 18:15 ` Bjorn Helgaas
  2008-05-16 18:21   ` Randy Dunlap
  2008-05-22 11:09 ` Jeff Garzik
  1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2008-05-16 18:15 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: netdev, jgarzik, linux-next, akpm

On Friday 16 May 2008 11:35:24 am Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> 3c515.c uses pnp_irq(), which calls pnp_get_resource(),
> which is not defined when CONFIG_PNP=n, so in that case,
> get the IRQ from a hardware register.
> 
> 3c515.c:(.text+0x3adc0): undefined reference to `pnp_get_resource'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Hmm, wonder why my allyesconfig didn't catch this one.
I prefer CONFIG_PNP to __ISAPNP__ in general, but I see
you're just following the other tests in the same file.

Thanks!

Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

> ---
>  drivers/net/3c515.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- next-20080516.orig/drivers/net/3c515.c
> +++ next-20080516/drivers/net/3c515.c
> @@ -572,12 +572,16 @@ static int corkscrew_setup(struct net_de
>  	int irq;
>  	DECLARE_MAC_BUF(mac);
>  
> +#ifdef __ISAPNP__
>  	if (idev) {
>  		irq = pnp_irq(idev, 0);
>  		vp->dev = &idev->dev;
>  	} else {
>  		irq = inw(ioaddr + 0x2002) & 15;
>  	}
> +#else
> +	irq = inw(ioaddr + 0x2002) & 15;
> +#endif
>  
>  	dev->base_addr = ioaddr;
>  	dev->irq = irq;
> 



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

* Re: [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
  2008-05-16 18:15 ` Bjorn Helgaas
@ 2008-05-16 18:21   ` Randy Dunlap
  2008-05-16 18:58     ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2008-05-16 18:21 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: netdev, jgarzik, linux-next, akpm

Bjorn Helgaas wrote:
> On Friday 16 May 2008 11:35:24 am Randy Dunlap wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> 3c515.c uses pnp_irq(), which calls pnp_get_resource(),
>> which is not defined when CONFIG_PNP=n, so in that case,
>> get the IRQ from a hardware register.
>>
>> 3c515.c:(.text+0x3adc0): undefined reference to `pnp_get_resource'
>>
>> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Hmm, wonder why my allyesconfig didn't catch this one.

Because parts of it are =n.  :)

> I prefer CONFIG_PNP to __ISAPNP__ in general, but I see
> you're just following the other tests in the same file.

Yes.  And it would need to be CONFIG_ISAPNP, not CONFIG_PNP.

> 
> Thanks!
> 
> Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> 
>> ---
>>  drivers/net/3c515.c |    4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> --- next-20080516.orig/drivers/net/3c515.c
>> +++ next-20080516/drivers/net/3c515.c
>> @@ -572,12 +572,16 @@ static int corkscrew_setup(struct net_de
>>  	int irq;
>>  	DECLARE_MAC_BUF(mac);
>>  
>> +#ifdef __ISAPNP__
>>  	if (idev) {
>>  		irq = pnp_irq(idev, 0);
>>  		vp->dev = &idev->dev;
>>  	} else {
>>  		irq = inw(ioaddr + 0x2002) & 15;
>>  	}
>> +#else
>> +	irq = inw(ioaddr + 0x2002) & 15;
>> +#endif
>>  
>>  	dev->base_addr = ioaddr;
>>  	dev->irq = irq;
>>
> 
> 


-- 
~Randy

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

* Re: [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
  2008-05-16 18:21   ` Randy Dunlap
@ 2008-05-16 18:58     ` Bjorn Helgaas
  0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2008-05-16 18:58 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: netdev, jgarzik, linux-next, akpm, Adam M Belay, Adam Belay

On Friday 16 May 2008 12:21:35 pm Randy Dunlap wrote:
> Bjorn Helgaas wrote:
> > I prefer CONFIG_PNP to __ISAPNP__ in general, but I see
> > you're just following the other tests in the same file.
> 
> Yes.  And it would need to be CONFIG_ISAPNP, not CONFIG_PNP.

Huh.  Sure enough.  I hadn't even noticed pnp_find_dev().
I'm not sure why pnp_find_dev() should be under CONFIG_ISAPNP
rather than CONFIG_PNP, other than the fact that it uses
ISAPNP_ANY_ID.

On the other hand, there are only 25-30 users of pnp_find_dev();
maybe I should just look at converting them and nuking the
compat interfaces completely.

Bjorn

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

* Re: [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
  2008-05-16 17:35 [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n Randy Dunlap
  2008-05-16 18:15 ` Bjorn Helgaas
@ 2008-05-22 11:09 ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2008-05-22 11:09 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: netdev, linux-next, bjorn.helgaas, akpm

Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> 3c515.c uses pnp_irq(), which calls pnp_get_resource(),
> which is not defined when CONFIG_PNP=n, so in that case,
> get the IRQ from a hardware register.
> 
> 3c515.c:(.text+0x3adc0): undefined reference to `pnp_get_resource'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  drivers/net/3c515.c |    4 ++++

applied



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

end of thread, other threads:[~2008-05-22 11:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-16 17:35 [PATCH -next] 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n Randy Dunlap
2008-05-16 18:15 ` Bjorn Helgaas
2008-05-16 18:21   ` Randy Dunlap
2008-05-16 18:58     ` Bjorn Helgaas
2008-05-22 11:09 ` Jeff Garzik

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).