Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   sky2: print Optima chip name (http://www.linux-archive.org/ubuntu-kernel-team/355550-sky2-print-optima-chip-name.html)

stephen hemminger 12-14-2009 07:33 AM

sky2: print Optima chip name
 
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@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit dae3a5112d258764cad9e48439ca7dd05c2edca1)

Signed-off-by: Eric Miao <eric.miao@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

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Eric Miao 04-12-2010 06:34 AM

sky2: print Optima chip name
 


All times are GMT. The time now is 07:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.