Jesse Keating 2f82dd
From: stephen hemminger <shemminger@vyatta.com>
Jesse Keating 2f82dd
Date: Mon, 14 Dec 2009 08:33:47 +0000 (+0000)
Jesse Keating 2f82dd
Subject: sky2: print Optima chip name
Jesse Keating 2f82dd
X-Git-Tag: v2.6.33-rc1~59^2~9
Jesse Keating 2f82dd
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=dae3a5112d258764cad9e48439ca7dd05c2edca1
Jesse Keating 2f82dd
Jesse Keating 2f82dd
sky2: print Optima chip name
Jesse Keating 2f82dd
Jesse Keating 2f82dd
Off by one in name lookup makes Optima display as (chip 0xbc)
Jesse Keating 2f82dd
Jesse Keating 2f82dd
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Jesse Keating 2f82dd
Signed-off-by: David S. Miller <davem@davemloft.net>
Jesse Keating 2f82dd
---
Jesse Keating 2f82dd
Jesse Keating 2f82dd
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
Jesse Keating 2f82dd
index 89a05d6..9431f64 100644
Jesse Keating 2f82dd
--- a/drivers/net/sky2.c
Jesse Keating 2f82dd
+++ b/drivers/net/sky2.c
Jesse Keating 2f82dd
@@ -4530,7 +4530,7 @@ static const char *sky2_name(u8 chipid, char *buf, int sz)
Jesse Keating 2f82dd
 		"Optima",	/* 0xbc */
Jesse Keating 2f82dd
 	};
Jesse Keating 2f82dd
 
Jesse Keating 2f82dd
-	if (chipid >= CHIP_ID_YUKON_XL && chipid < CHIP_ID_YUKON_OPT)
Jesse Keating 2f82dd
+	if (chipid >= CHIP_ID_YUKON_XL && chipid <= CHIP_ID_YUKON_OPT)
Jesse Keating 2f82dd
 		strncpy(buf, name[chipid - CHIP_ID_YUKON_XL], sz);
Jesse Keating 2f82dd
 	else
Jesse Keating 2f82dd
 		snprintf(buf, sz, "(chip %#x)", chipid);