VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / net / sk98lin / skvpd.c
index adf26b6..eb3c898 100644 (file)
@@ -468,6 +468,17 @@ SK_IOC     IoC)    /* IO Context */
        
        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: Asus mainboard with buggy VPD? "
+                               "Correcting data.\n");
+               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,
@@ -545,7 +556,7 @@ SK_VPD_PARA *p)             /* parameter description struct */
        if (*v != (char)RES_ID) {
                SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
                        ("Error: 0x%x missing\n", RES_ID));
-               return(0);
+               return NULL;
        }
 
        if (strcmp(key, VPD_NAME) == 0) {
@@ -589,7 +600,7 @@ SK_VPD_PARA *p)             /* parameter description struct */
                        ("Key/Len Encoding error\n"));
        }
 #endif /* DEBUG */
-       return(0);
+       return NULL;
 }
 
 /*
@@ -740,7 +751,7 @@ int         op)                     /* operation to do: ADD_KEY or OWR_KEY */
        vpd_size = pAC->vpd.vpd_size;
 
        rtv = 0;
-       ip = 0;
+       ip = NULL;
        if (type == VPD_RW_KEY) {
                /* end tag is "RW" */
                free = pAC->vpd.v.vpd_free_rw;