Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203658
b: refs/heads/master
c: df1086f
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and David S. Miller committed Jul 21, 2010
1 parent b147a7b commit 19dfc5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11fe883936980fe242869d671092a466cf1db3e3
refs/heads/master: df1086fb2e160521eda5b19a37b9e25dbc805c39
16 changes: 4 additions & 12 deletions trunk/drivers/net/cxgb3/t3_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,6 @@ int t3_seeprom_wp(struct adapter *adapter, int enable)
return t3_seeprom_write(adapter, EEPROM_STAT_ADDR, enable ? 0xc : 0);
}

/*
* Convert a character holding a hex digit to a number.
*/
static unsigned int hex2int(unsigned char c)
{
return isdigit(c) ? c - '0' : toupper(c) - 'A' + 10;
}

/**
* get_vpd_params - read VPD parameters from VPD EEPROM
* @adapter: adapter to read
Expand Down Expand Up @@ -727,15 +719,15 @@ static int get_vpd_params(struct adapter *adapter, struct vpd_params *p)
p->port_type[0] = uses_xaui(adapter) ? 1 : 2;
p->port_type[1] = uses_xaui(adapter) ? 6 : 2;
} else {
p->port_type[0] = hex2int(vpd.port0_data[0]);
p->port_type[1] = hex2int(vpd.port1_data[0]);
p->port_type[0] = hex_to_bin(vpd.port0_data[0]);
p->port_type[1] = hex_to_bin(vpd.port1_data[0]);
p->xauicfg[0] = simple_strtoul(vpd.xaui0cfg_data, NULL, 16);
p->xauicfg[1] = simple_strtoul(vpd.xaui1cfg_data, NULL, 16);
}

for (i = 0; i < 6; i++)
p->eth_base[i] = hex2int(vpd.na_data[2 * i]) * 16 +
hex2int(vpd.na_data[2 * i + 1]);
p->eth_base[i] = hex_to_bin(vpd.na_data[2 * i]) * 16 +
hex_to_bin(vpd.na_data[2 * i + 1]);
return 0;
}

Expand Down

0 comments on commit 19dfc5d

Please sign in to comment.