[PATCH] sk98lin workaround Asus K8V SE Deluxe buggy firmware

Linux Kernel Mailing List <[email protected]> Wed, 09 Mar 2005 12:57:01 +0000
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1569, 2005/03/09 09:57:01-03:00, [email protected]

	[PATCH] sk98lin workaround Asus K8V SE Deluxe buggy firmware
	
	The EEPROM (or whatever that is) on Asus K8V SE Deluxe motherboards
	contains buggy firmware.  This buggy firmware has one flipped bit, and
	causes the sk98lin driver refuses to work correctly.  Please look at
	this thread:
	
	  http://www.ussg.iu.edu/hypermail/linux/kernel/0404.0/1439.html
	
	It contains a patch for 2.6 that fixs the problem.  Enclosed is a copy
	of this patch for 2.4.29.
	
	
	Signed-Off-By: Philippe Troin <[email protected]>



 skvpd.c |    9 +++++++++
 1 files changed, 9 insertions(+)


diff -Nru a/drivers/net/sk98lin/skvpd.c b/drivers/net/sk98lin/skvpd.c
--- a/drivers/net/sk98lin/skvpd.c	2005-03-10 08:04:40 -08:00
+++ b/drivers/net/sk98lin/skvpd.c	2005-03-10 08:04:40 -08:00
@@ -466,6 +466,15 @@
 	
 	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(KERN_INFO "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,