* [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif
@ 2008-06-24 9:47 Eric Miao
2008-06-26 23:52 ` Nicolas Pitre
2008-06-27 5:55 ` Jeff Garzik
0 siblings, 2 replies; 6+ messages in thread
From: Eric Miao @ 2008-06-24 9:47 UTC (permalink / raw)
To: linux-arm-kernel, linux-netdev; +Cc: Nicolas Pitre, Magnus Damm, Eric Miao
From: Eric Miao <eric.miao@marvell.com>
Apparently, the code enclosed by #ifdef CONFIG_ISA .. #endif are no longer
used, remove them from the driver to avoid confusion.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
---
drivers/net/smc91x.c | 38 --------------------------------------
drivers/net/smc91x.h | 13 -------------
2 files changed, 0 insertions(+), 51 deletions(-)
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index a188e33..d471308 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -23,8 +23,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Arguments:
- * io = for the base address
- * irq = for the IRQ
* nowait = 0 for normal wait states, 1 eliminates additional wait states
*
* original author:
@@ -90,33 +88,6 @@ static const char version[] =
#include "smc91x.h"
-#ifdef CONFIG_ISA
-/*
- * the LAN91C111 can be at any of the following port addresses. To change,
- * for a slightly different card, you can add it to the array. Keep in
- * mind that the array must end in zero.
- */
-static unsigned int smc_portlist[] __initdata = {
- 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, 0
-};
-
-#ifndef SMC_IOADDR
-# define SMC_IOADDR -1
-#endif
-static unsigned long io = SMC_IOADDR;
-module_param(io, ulong, 0400);
-MODULE_PARM_DESC(io, "I/O base address");
-
-#ifndef SMC_IRQ
-# define SMC_IRQ -1
-#endif
-static int irq = SMC_IRQ;
-module_param(irq, int, 0400);
-MODULE_PARM_DESC(irq, "IRQ number");
-
-#endif /* CONFIG_ISA */
-
#ifndef SMC_NOWAIT
# define SMC_NOWAIT 0
#endif
@@ -2315,15 +2286,6 @@ static struct platform_driver smc_driver = {
static int __init smc_init(void)
{
-#ifdef MODULE
-#ifdef CONFIG_ISA
- if (io == -1)
- printk(KERN_WARNING
- "%s: You shouldn't use auto-probing with insmod!\n",
- CARDNAME);
-#endif
-#endif
-
return platform_driver_register(&smc_driver);
}
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 69e97a1..97a3c52 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -279,19 +279,6 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
#define SMC_IRQ_FLAGS (0)
-#elif defined(CONFIG_ISA)
-
-#define SMC_CAN_USE_8BIT 1
-#define SMC_CAN_USE_16BIT 1
-#define SMC_CAN_USE_32BIT 0
-
-#define SMC_inb(a, r) inb((a) + (r))
-#define SMC_inw(a, r) inw((a) + (r))
-#define SMC_outb(v, a, r) outb(v, (a) + (r))
-#define SMC_outw(v, a, r) outw(v, (a) + (r))
-#define SMC_insw(a, r, p, l) insw((a) + (r), p, l)
-#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l)
-
#elif defined(CONFIG_M32R)
#define SMC_CAN_USE_8BIT 0
--
1.5.4.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif
2008-06-24 9:47 [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif Eric Miao
@ 2008-06-26 23:52 ` Nicolas Pitre
2008-06-27 5:55 ` Jeff Garzik
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Pitre @ 2008-06-26 23:52 UTC (permalink / raw)
To: Eric Miao; +Cc: linux-arm-kernel, linux-netdev, Magnus Damm, Eric Miao
On Tue, 24 Jun 2008, Eric Miao wrote:
> From: Eric Miao <eric.miao@marvell.com>
>
> Apparently, the code enclosed by #ifdef CONFIG_ISA .. #endif are no longer
> used, remove them from the driver to avoid confusion.
>
> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Nicolas Pitre <nico@cam.org>
> ---
> drivers/net/smc91x.c | 38 --------------------------------------
> drivers/net/smc91x.h | 13 -------------
> 2 files changed, 0 insertions(+), 51 deletions(-)
>
> diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
> index a188e33..d471308 100644
> --- a/drivers/net/smc91x.c
> +++ b/drivers/net/smc91x.c
> @@ -23,8 +23,6 @@
> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> *
> * Arguments:
> - * io = for the base address
> - * irq = for the IRQ
> * nowait = 0 for normal wait states, 1 eliminates additional wait states
> *
> * original author:
> @@ -90,33 +88,6 @@ static const char version[] =
>
> #include "smc91x.h"
>
> -#ifdef CONFIG_ISA
> -/*
> - * the LAN91C111 can be at any of the following port addresses. To change,
> - * for a slightly different card, you can add it to the array. Keep in
> - * mind that the array must end in zero.
> - */
> -static unsigned int smc_portlist[] __initdata = {
> - 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
> - 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, 0
> -};
> -
> -#ifndef SMC_IOADDR
> -# define SMC_IOADDR -1
> -#endif
> -static unsigned long io = SMC_IOADDR;
> -module_param(io, ulong, 0400);
> -MODULE_PARM_DESC(io, "I/O base address");
> -
> -#ifndef SMC_IRQ
> -# define SMC_IRQ -1
> -#endif
> -static int irq = SMC_IRQ;
> -module_param(irq, int, 0400);
> -MODULE_PARM_DESC(irq, "IRQ number");
> -
> -#endif /* CONFIG_ISA */
> -
> #ifndef SMC_NOWAIT
> # define SMC_NOWAIT 0
> #endif
> @@ -2315,15 +2286,6 @@ static struct platform_driver smc_driver = {
>
> static int __init smc_init(void)
> {
> -#ifdef MODULE
> -#ifdef CONFIG_ISA
> - if (io == -1)
> - printk(KERN_WARNING
> - "%s: You shouldn't use auto-probing with insmod!\n",
> - CARDNAME);
> -#endif
> -#endif
> -
> return platform_driver_register(&smc_driver);
> }
>
> diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
> index 69e97a1..97a3c52 100644
> --- a/drivers/net/smc91x.h
> +++ b/drivers/net/smc91x.h
> @@ -279,19 +279,6 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
>
> #define SMC_IRQ_FLAGS (0)
>
> -#elif defined(CONFIG_ISA)
> -
> -#define SMC_CAN_USE_8BIT 1
> -#define SMC_CAN_USE_16BIT 1
> -#define SMC_CAN_USE_32BIT 0
> -
> -#define SMC_inb(a, r) inb((a) + (r))
> -#define SMC_inw(a, r) inw((a) + (r))
> -#define SMC_outb(v, a, r) outb(v, (a) + (r))
> -#define SMC_outw(v, a, r) outw(v, (a) + (r))
> -#define SMC_insw(a, r, p, l) insw((a) + (r), p, l)
> -#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l)
> -
> #elif defined(CONFIG_M32R)
>
> #define SMC_CAN_USE_8BIT 0
> --
> 1.5.4.3
>
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif
2008-06-24 9:47 [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif Eric Miao
2008-06-26 23:52 ` Nicolas Pitre
@ 2008-06-27 5:55 ` Jeff Garzik
2008-06-27 6:10 ` Eric Miao
1 sibling, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2008-06-27 5:55 UTC (permalink / raw)
To: Eric Miao
Cc: linux-arm-kernel, linux-netdev, Nicolas Pitre, Magnus Damm,
Eric Miao
Eric Miao wrote:
> Apparently, the code enclosed by #ifdef CONFIG_ISA .. #endif are no longer
> used
What does this mean?
CONFIG_ISA platforms still exist, and one presumes that the ISA hardware
still exists.
Is this hardware covered by another driver?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif
2008-06-27 5:55 ` Jeff Garzik
@ 2008-06-27 6:10 ` Eric Miao
2008-06-27 6:31 ` Jeff Garzik
0 siblings, 1 reply; 6+ messages in thread
From: Eric Miao @ 2008-06-27 6:10 UTC (permalink / raw)
To: Jeff Garzik
Cc: linux-arm-kernel, linux-netdev, Nicolas Pitre, Magnus Damm,
Eric Miao
Jeff Garzik wrote:
> Eric Miao wrote:
>> Apparently, the code enclosed by #ifdef CONFIG_ISA .. #endif are no
>> longer
>> used
>
> What does this mean?
>
> CONFIG_ISA platforms still exist, and one presumes that the ISA hardware
> still exists.
>
> Is this hardware covered by another driver?
>
Well, I assume the original code tends to support ISA with module
parameters to setup the IO address base and IRQ etc. But obviously,
those part of the code is now totally invalid and confusing only.
Should there be requirement of supporting ISA hardware with this
chip, the driver is actually unable to, and I prefer to re-write
that part of the code if necessary.
BTW: I don't know any ISA NIC with a SMC91X chip by far, and I
cannot infer by the driver code itself what type of ISA NIC it
is supporting.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif
2008-06-27 6:10 ` Eric Miao
@ 2008-06-27 6:31 ` Jeff Garzik
2008-06-27 13:48 ` Nicolas Pitre
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2008-06-27 6:31 UTC (permalink / raw)
To: Eric Miao
Cc: linux-arm-kernel, linux-netdev, Nicolas Pitre, Magnus Damm,
Eric Miao
Eric Miao wrote:
> Jeff Garzik wrote:
>> Eric Miao wrote:
>>> Apparently, the code enclosed by #ifdef CONFIG_ISA .. #endif are no
>>> longer
>>> used
>> What does this mean?
>>
>> CONFIG_ISA platforms still exist, and one presumes that the ISA hardware
>> still exists.
>>
>> Is this hardware covered by another driver?
>>
>
> Well, I assume the original code tends to support ISA with module
> parameters to setup the IO address base and IRQ etc. But obviously,
> those part of the code is now totally invalid and confusing only.
>
> Should there be requirement of supporting ISA hardware with this
> chip, the driver is actually unable to, and I prefer to re-write
> that part of the code if necessary.
>
> BTW: I don't know any ISA NIC with a SMC91X chip by far, and I
> cannot infer by the driver code itself what type of ISA NIC it
> is supporting.
These are questions that must be researched...
Where did the ISA support come from?
Was it copied from another driver, or did it actually work on real
hardware at some point in the past?
If the latter, when did ISA support stop working? i.e. a regression
occurred
Certainly if the driver has -never- worked on ISA hardware, then the
code should be removed. Who knows the definitive answer? What does the
driver look like in older (pre-2.6.12) kernels?
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif
2008-06-27 6:31 ` Jeff Garzik
@ 2008-06-27 13:48 ` Nicolas Pitre
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pitre @ 2008-06-27 13:48 UTC (permalink / raw)
To: Jeff Garzik
Cc: Eric Miao, linux-arm-kernel, linux-netdev, Magnus Damm, Eric Miao
On Fri, 27 Jun 2008, Jeff Garzik wrote:
> Eric Miao wrote:
> > Jeff Garzik wrote:
> > > Eric Miao wrote:
> > > > Apparently, the code enclosed by #ifdef CONFIG_ISA .. #endif are no
> > > > longer
> > > > used
> > > What does this mean?
> > >
> > > CONFIG_ISA platforms still exist, and one presumes that the ISA hardware
> > > still exists.
> > >
> > > Is this hardware covered by another driver?
> > >
> >
> > Well, I assume the original code tends to support ISA with module
> > parameters to setup the IO address base and IRQ etc. But obviously,
> > those part of the code is now totally invalid and confusing only.
> >
> > Should there be requirement of supporting ISA hardware with this
> > chip, the driver is actually unable to, and I prefer to re-write
> > that part of the code if necessary.
> >
> > BTW: I don't know any ISA NIC with a SMC91X chip by far, and I
> > cannot infer by the driver code itself what type of ISA NIC it
> > is supporting.
>
> These are questions that must be researched...
>
> Where did the ISA support come from?
>From the original driver before I started maintaining it years ago.
> Was it copied from another driver, or did it actually work on real hardware at
> some point in the past?
It did work on real hardware since, originally, the SMC91C9x chips were
found on ISA cards only.
> If the latter, when did ISA support stop working? i.e. a regression occurred
Long long ago I'm afraid. I even sent a call for help from someone with
an actual ISA card a couple years ago with no response. I suspect ISA
support has been broken for quite a while now and no one ever
complained.
> Certainly if the driver has -never- worked on ISA hardware, then the code
> should be removed. Who knows the definitive answer? What does the driver
> look like in older (pre-2.6.12) kernels?
I started hacking on that driver in the 2.4.x days, and I suspect I
could have broken ISA at that time.
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-06-27 13:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 9:47 [PATCH 01/10] smc91x: remove unused code enclosed by #ifdef CONFIG_ISA .. #endif Eric Miao
2008-06-26 23:52 ` Nicolas Pitre
2008-06-27 5:55 ` Jeff Garzik
2008-06-27 6:10 ` Eric Miao
2008-06-27 6:31 ` Jeff Garzik
2008-06-27 13:48 ` Nicolas Pitre
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).