linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6] net/sk98lin: correct buggy VPD in ASUS MB
@ 2004-04-07  0:50 Jeff Lightfoot
  2004-04-25  6:48 ` J. Ryan Earl
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Lightfoot @ 2004-04-07  0:50 UTC (permalink / raw)
  To: akpm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 572 bytes --]

The following patch to net/sk98lin/skvpd.c was put together by Marc
Bouget, mbouget at club-internet.fr.  He currently doesn't have time to
interface with linux-kernel so I offered to work that front.

This patch works around a corrupt EEPROM (VPD?) in the ASUS K8V Deluxe
SE motherboard ethernet chipset and allows the network driver to work
correctly.  We have written to ASUS and the sk98lin maintainers but have
not heard anything back.

Does this have a chance to be included in mainline or is there a
preferable way to fix these kind of issues?

  -- Jeff Lightfoot

[-- Attachment #2: skvpd.c.diff --]
[-- Type: text/plain, Size: 746 bytes --]

--- drivers/net/sk98lin/skvpd.c.orig	2004-04-05 17:32:59.000000000 -0700
+++ drivers/net/sk98lin/skvpd.c	2004-04-05 17:33:26.000000000 -0700
@@ -468,6 +468,16 @@
 	
 	pAC->vpd.vpd_size = vpd_size;
 
+	/* Asus K8V Se Deluxe bugfix. Correct VPD content */
+	/* MBo April 2004 */
+	if( ((unsigned char)pAC->vpd.vpd_buf[0x3f] == 0x38) &&
+	    ((unsigned char)pAC->vpd.vpd_buf[0x40] == 0x3c) &&
+	    ((unsigned char)pAC->vpd.vpd_buf[0x41] == 0x45) ) {
+		printk("sk98lin : humm... Asus mainboard with buggy VPD ? correcting data.\n");
+		(unsigned char)pAC->vpd.vpd_buf[0x40] = 0x38;
+	}
+
+
 	/* find the end tag of the RO area */
 	if (!(r = vpd_find_para(pAC, VPD_RV, &rp))) {
 		SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6] net/sk98lin: correct buggy VPD in ASUS MB
  2004-04-07  0:50 [PATCH 2.6] net/sk98lin: correct buggy VPD in ASUS MB Jeff Lightfoot
@ 2004-04-25  6:48 ` J. Ryan Earl
  0 siblings, 0 replies; 2+ messages in thread
From: J. Ryan Earl @ 2004-04-25  6:48 UTC (permalink / raw)
  To: Jeff Lightfoot; +Cc: akpm, linux-kernel

Jeff Lightfoot wrote:

The following patch to net/sk98lin/skvpd.c was put together by Marc
Bouget, mbouget at club-internet.fr.  He currently doesn't have time to
interface with linux-kernel so I offered to work that front.

This patch works around a corrupt EEPROM (VPD?) in the ASUS K8V Deluxe
SE motherboard ethernet chipset and allows the network driver to work
correctly.  We have written to ASUS and the sk98lin maintainers but have
not heard anything back.

Does this have a chance to be included in mainline or is there a
preferable way to fix these kind of issues?

  -- Jeff Lightfoot

------------------------------------------------------------------------

Just to confirm, I experienced this error.  Kernel log as follows:

sk98lin: Network Device Driver v6.22
(C)Copyright 1999-2004 Marvell(R).
eth0:
      PrefPort:A  RlmtMode:Check Link State
eth0: -- ERROR --
        Class:  internal Software error
        Nr:  0x19e
        Msg:  Vpd: Cannot read VPD keys
eth0: -- ERROR --
        Class:  internal Software error
        Nr:  0x19e
        Msg:  Vpd: Cannot read VPD keys
eth0: -- ERROR --
        Class:  internal Software error
        Nr:  0x19e
        Msg:  Vpd: Cannot read VPD keys
eth0: network connection up using port A
    speed:           100
    autonegotiation: yes
    duplex mode:     full
    flowctrl:        symmetric
    irq moderation:  disabled
    scatter-gather:  enabled

And latter in the log I have:
try[18484]: segfault at 0000003000000008 rip 0000002a95e9dcae rsp 
0000007fbfffe230 error 4
try[24948]: segfault at 0000003000000008 rip 0000002a96033cae rsp 
0000007fbfffe250 error 4

>--- drivers/net/sk98lin/skvpd.c.orig	2004-04-05 17:32:59.000000000 -0700
>+++ drivers/net/sk98lin/skvpd.c	2004-04-05 17:33:26.000000000 -0700
>@@ -468,6 +468,16 @@
> 	
> 	pAC->vpd.vpd_size = vpd_size;
> 
>+	/* Asus K8V Se Deluxe bugfix. Correct VPD content */
>+	/* MBo April 2004 */
>+	if( ((unsigned char)pAC->vpd.vpd_buf[0x3f] == 0x38) &&
>+	    ((unsigned char)pAC->vpd.vpd_buf[0x40] == 0x3c) &&
>+	    ((unsigned char)pAC->vpd.vpd_buf[0x41] == 0x45) ) {
>+		printk("sk98lin : humm... Asus mainboard with buggy VPD ? correcting data.\n");
>+		(unsigned char)pAC->vpd.vpd_buf[0x40] = 0x38;
>+	}
>+
>+
> 	/* find the end tag of the RO area */
> 	if (!(r = vpd_find_para(pAC, VPD_RV, &rp))) {
> 		SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
>  
>
With the patch:

sk98lin: Network Device Driver v6.23
(C)Copyright 1999-2004 Marvell(R).
sk98lin : humm... Asus mainboard with buggy VPD ? correcting data.
eth0: Yukon Gigabit Ethernet 10/100/1000Base-T Adapter
      PrefPort:A  RlmtMode:Check Link State
eth0: network connection up using port A
    speed:           100
    autonegotiation: yes
    duplex mode:     full
    flowctrl:        symmetric
    irq moderation:  disabled
    scatter-gather:  enabled

I'm also able poll more information back from the driver with the patch 
applied.  Like ifconfig will return number of packets, etc.

-ryan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-25  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-07  0:50 [PATCH 2.6] net/sk98lin: correct buggy VPD in ASUS MB Jeff Lightfoot
2004-04-25  6:48 ` J. Ryan Earl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).