lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Jun 2008 20:47:38 +0200
From:	Peter Korsgaard <jacmet@...site.dk>
To:	Steve Glendinning <steve.glendinning@...c.com>
Cc:	Michael.Hennerich@...log.com, Enrik.Berkhan@...com,
	hennerich@...ckfin.uclinux.org, ian.saturley@...c.com,
	uclinux-dist-devel@...ckfin.uclinux.org, catalin.marinas@....com,
	netdev@...r.kernel.org, Bahadir Balban <Bahadir.Balban@....com>,
	Dustin Mcintire <dustin@...soria.com>,
	Bill Gatliff <bgat@...lgatliff.com>
Subject: Re: [PATCH] SMSC LAN911x and LAN921x vendor driver

>>>>> "Steve" == Steve Glendinning <steve.glendinning@...c.com> writes:

Hi,

 Steve> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
 Steve> index 9f6cc8a..8f12a8e 100644
 Steve> --- a/drivers/net/Kconfig
 Steve> +++ b/drivers/net/Kconfig
 Steve> @@ -967,6 +967,19 @@ config SMC911X
 Steve>  	  called smc911x.  If you want to compile it as a module, say M 
 Steve>  	  here and read <file:Documentation/kbuild/modules.txt>
 
 Steve> +config SMSC911X
 Steve> +	tristate "SMSC LAN911x/LAN921x families embedded ethernet support"
 Steve> +	depends on NET_ETHERNET
 Steve> +	select CRC32
 Steve> +	select MII
 Steve> +	---help---
 Steve> +	  Say Y here if you want support for SMSC LAN911x and LAN921x families
 Steve> +	  of ethernet controllers.
 Steve> +
 Steve> +	  To compile this driver as a module, choose M here and read
 Steve> +	  <file:Documentation/networking/net-modules.txt>. The module
 Steve> +	  will be called smsc911x.
 Steve> +

What is the point of 2 drivers for the same hardware? Either fix the
existing driver or remove the old one and reuse the Kconfig symbols
for the new one so the existing defconfig continues to work.

Like I said last year, I would really prefer the first option:

http://thread.gmane.org/gmane.linux.network/66703/focus=67812

You also don't seem to have added the big endian test I mentioned
further in the thread.

 Steve> +static void smsc911x_mdio_write(struct net_device *dev, int phy_id,
 Steve> +				int location, int val)
 Steve> +{
 Steve> +	struct smsc911x_data *pdata = netdev_priv(dev);
 Steve> +	unsigned long flags;
 Steve> +
 Steve> +	spin_lock_irqsave(&pdata->phy_lock, flags);
 Steve> +	smsc911x_phy_write(pdata, location, val);
 Steve> +	spin_unlock_irqrestore(&pdata->phy_lock, flags);
 Steve> +}
 Steve> +
 Steve> +/* Autodetects and initialises external phy for SMSC9115 and SMSC9117 flavors.
 Steve> + * If something goes wrong, returns -ENODEV to revert back to internal phy.
 Steve> + * Performed at initialisation only, so interrupts are enabled */
 Steve> +static int smsc911x_phy_initialise_external(struct smsc911x_data *pdata)

Any reason why you don't use phylib?

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists