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  linux-hardening  linux-cve-announce  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]
Message-Id: <1209732735-24443-2-git-send-email-nskamat@ti.com>
Date:	Fri,  2 May 2008 07:52:13 -0500
From:	Nishant Kamat <nskamat@...com>
To:	netdev@...r.kernel.org
Cc:	Nishant Kamat <nskamat@...com>
Subject: [PATCH 1/3] NET: SMC911X: Driver works for SMC9211 too

The smc911x driver can support SMC9211 also. This patch adds 9211
in the table of supported chip ids, and fixes the ID verification
to care about only 4 nibbles.

Signed-off-by: Nishant Kamat <nskamat@...com>
---
 drivers/net/smc911x.c |    4 ++--
 drivers/net/smc911x.h |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 76cc1d3..00b9b3e 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -1,6 +1,6 @@
 /*
  * smc911x.c
- * This is a driver for SMSC's LAN911{5,6,7,8} single-chip Ethernet devices.
+ * Driver for SMSC's LAN9{115,116,117,118, 211} single-chip Ethernet devices.
  *
  * Copyright (C) 2005 Sensoria Corp
  *	   Derived from the unified SMC91x driver by Nicolas Pitre
@@ -1902,7 +1902,7 @@ static int __init smc911x_probe(struct net_device *dev, unsigned long ioaddr)
 	 * recognize.	These might need to be added to later,
 	 * as future revisions could be added.
 	 */
-	chip_id = SMC_GET_PN();
+	chip_id = 0xffff & SMC_GET_PN();
 	DBG(SMC_DEBUG_MISC, "%s: id probe returned 0x%04x\n", CARDNAME, chip_id);
 	for(i=0;chip_ids[i].id != 0; i++) {
 		if (chip_ids[i].id == chip_id) break;
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 7defa63..a416c61 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -1,5 +1,6 @@
 /*------------------------------------------------------------------------
- . smc911x.h - macros for SMSC's LAN911{5,6,7,8} single-chip Ethernet device.
+ . smc911x.h - macros for SMSC's LAN9{115,116,117,118,211} single-chip
+ . Ethernet device.
  .
  . Copyright (C) 2005 Sensoria Corp.
  . Derived from the unified SMC91x driver by Nicolas Pitre
@@ -608,6 +609,7 @@ smc_pxa_dma_outsw(struct device *dev, u_long ioaddr, u_long physaddr,
 #define CHIP_9116	0x116
 #define CHIP_9117	0x117
 #define CHIP_9118	0x118
+#define CHIP_9211	0x9211
 
 struct chip_id {
 	u16 id;
@@ -619,6 +621,7 @@ static const struct chip_id chip_ids[] =  {
 	{ CHIP_9116, "LAN9116" },
 	{ CHIP_9117, "LAN9117" },
 	{ CHIP_9118, "LAN9118" },
+	{ CHIP_9211, "LAN9211" },
 	{ 0, NULL },
 };
 
-- 
1.5.3.2

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ