Re: [PATCH] smsc95xx: Add module parameter to override MAC address

2010-06-25 Thread Steve . Glendinning
Hi Sebastien,

  I'm confused as to why this is desirable when the mac address
  can already be configured after module insertion via
  smsc95xx_netdev_ops.eth_mac_addr().
 
 For example for booting over NFS using a pre-defined MAC address, with 
 a minimal setup (no initrd). Or is there another way to force a MAC
 address for this use-case?

I can't see an existing way of specifying this as a kernel parameter
in Documentation/kernel-parameters.txt. netdev= doesn't have a mac
address parameter.

During development I initially had smsc95xx driver using this logic to
select a MAC address:

1. If net-dev_addr has already been set to a valid mac address (i.e. by
an administrator before bringing the device up) then use that address.

2. If the device is already currently set to a valid mac address then
use that address.  This could have been set by either the device's
EEPROM or by a previously running bootloader.

3. Generate a random mac address.

Unfortunately, this doesn't work so well as the usbnet framework sets
net-dev_addr to the USB node_id before calling our bind function, so
we usually matched at step 1 (and not with the desired outcome).  So
I removed step 1 because, as Simon mentioned, it's possible to change
the mac address after the device is brought up.

I can see you have a different use case, but I don't think this specific
driver is the place for this logic.  I'd rather see it added to either
the usbnet framework or (preferably) the netdev framework so *all*
ethernet drivers can do this the same way.  otherwise we could end up
with slight variations of this code in every single driver!

Steve
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] ARM: OMAP3: Add SMSC911X support to Overo platform (V2)

2009-03-17 Thread Steve . Glendinning
Hi Tony,

Tony Lindgren t...@atomide.com wrote on 16/03/2009 18:08:01:

 * Russell King - ARM Linux li...@arm.linux.org.uk [090315 10:37]:
  On Sun, Mar 15, 2009 at 10:13:47AM -0700, Steve Sakoman wrote:
   On Sun, Mar 15, 2009 at 10:00 AM, Russell King - ARM Linux
   li...@arm.linux.org.uk wrote:
On Sun, Mar 15, 2009 at 09:36:25AM -0700, Steve Sakoman wrote:
On Sun, Mar 15, 2009 at 8:38 AM, Russell King - ARM Linux
li...@arm.linux.org.uk wrote:
 On Fri, Mar 13, 2009 at 03:44:53PM -0700, Tony Lindgren wrote:
 Gumstix will soon be shipping a variant of their Summit board 
that
 includes an SMSC LAN9221 ethernet interface.  This patch 
provides
 support via the smsc911x driver when enabled in kernel config.

 Does this actually work with the smsc911x driver which is 
 in mainline,
 or is it dependent on the smsc911x patches from Steve 
Glendinning?
   
For the shipping Overo kernel, I build with 2 of Steve's 
 patches, copied below.
   
That doesn't help answer the question.  What we need to know is 
whether
this patch works alone?  If not, do we know for sure that 
 Steve's patches
are going in during the next merge window?
   
   It does not work without the 2 mentioned patches (IRQ's never 
 get handled).
  
  So I suggest that this patch is handed over to Steve to submit with 
his
  set of patches.
 
 I've added Steve Glendinning to the Cc.
 
 I'll drop this from my queue, Steve Sakoman please email this to Steve
 Glendinning for inclusion to his queue.
 

Yes, David has included all the IRQ patches in net-next-2.6, so they will 
be merged in the next merge window.

Steve
--
Steve Glendinning
SMSC GmbH
m: +44 777 933 9124
e: steve.glendinn...@smsc.com

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Remaining bits for basic support of LDP

2009-02-03 Thread Steve . Glendinning
Russell King - ARM Linux li...@arm.linux.org.uk wrote on 03/02/2009 
08:10:42:
 On Mon, Feb 02, 2009 at 03:57:45PM -0800, Tony Lindgren wrote:
  * David Miller da...@davemloft.net [090202 13:45]:
   Well, the SMSC driver is there already in the tree.
   
   The only thing not currently being scheduled to hit
   2.6.29-rcX are the recent changes to support platform
   specified interrupt flags and all of that stuff.
   
   If you want, we can look into pushing that work into
   2.6.29-rcX
  
  That would be great, more platforms to test it on.
 
 Mainline during the -rc series is not for pushing stuff to get 
additional
 testing.  It's for resolving regressions and fixing bugs, not 
introducing
 changes which could cause regressions and bugs.

Does it help that the smsc911x driver is new this cycle?

Without these patches the driver fails to register its interrupt on many 
arm platforms, so it could be said that these patches do fix regressions 
against the smc911x driver it's intended to replace.

On a related note, if these go in during the next merge window, is there a 
mechanism for ensuring the platform support patches in the set are merged 
after these?

Steve
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] Add SMC_MEM_RESERVED for OMAP platform.

2008-11-17 Thread Steve . Glendinning
Hi Stanley,

Jeff has merged the smsc911x driver into -next, this is intended to 
replace smc911x moving forward.  I'll forward the patchset to you 
off-list, it includes platform_data support for several platforms so 
adding support for omap should be simple.

 diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
 index cc7d85b..d1b3b9b 100644
 --- a/drivers/net/smc911x.h
 +++ b/drivers/net/smc911x.h
 @@ -42,6 +42,16 @@
#define SMC_USE_16BIT  0
#define SMC_USE_32BIT  1
#define SMC_IRQ_SENSE  IRQF_TRIGGER_LOW
 +#elif defined(CONFIG_ARCH_OMAP34XX)
 +  #define SMC_USE_16BIT  0
 +  #define SMC_USE_32BIT  1
 +  #define SMC_IRQ_SENSE  IRQF_TRIGGER_LOW
 +  #define SMC_MEM_RESERVED   1
 +#elif defined(CONFIG_ARCH_OMAP24XX)
 +  #define SMC_USE_16BIT  0
 +  #define SMC_USE_32BIT  1
 +  #define SMC_IRQ_SENSE  IRQF_TRIGGER_LOW
 +  #define SMC_MEM_RESERVED   1
  #else
  /*
   * Default configuration

nack - this platform-specific configuration shouldn't be in the driver, 
SMC_DYNAMIC_BUS_CONFIG was added so this can be specified in 
platform_data.

Regards,
--
Steve Glendinning
SMSC GmbH
m: +44 777 933 9124
e: [EMAIL PROTECTED]

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html