[PATCH 5/5] UBUNTU: [Upstream] sky2: print Optima chip name

stephen hemminger shemminger at vyatta.com
Mon Dec 14 08:33:47 GMT 2009


BugLink: http://bugs.launchpad.net/bugs/537168

Off by one in name lookup makes Optima display as (chip 0xbc)

Signed-off-by: Stephen Hemminger <shemminger at vyatta.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit dae3a5112d258764cad9e48439ca7dd05c2edca1)

Signed-off-by: Eric Miao <eric.miao at canonical.com>
---
 drivers/net/sky2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 0678cc0..e5af1c9 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -4493,7 +4493,7 @@ static const char *sky2_name(u8 chipid, char *buf, int sz)
 		"Optima",	/* 0xbc */
 	};

-	if (chipid >= CHIP_ID_YUKON_XL && chipid < CHIP_ID_YUKON_OPT)
+	if (chipid >= CHIP_ID_YUKON_XL && chipid <= CHIP_ID_YUKON_OPT)
 		strncpy(buf, name[chipid - CHIP_ID_YUKON_XL], sz);
 	else
 		snprintf(buf, sz, "(chip %#x)", chipid);
-- 
1.7.0



More information about the kernel-team mailing list