diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-12-22 18:56:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:10:29 -0800 |
commit | ac390c60a833192e87fb09ed8d67f5d1a84306c8 (patch) | |
tree | ad8c6d74992816c08bfc3959f767b51f0aeada95 /drivers/net/chelsio/subr.c | |
parent | 61cf46ad581ba43073d3bcb0be549eb60fbbf9f8 (diff) |
annotate chelsio
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/chelsio/subr.c')
-rw-r--r-- | drivers/net/chelsio/subr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/chelsio/subr.c b/drivers/net/chelsio/subr.c index dc50151bed8..7adf30230c4 100644 --- a/drivers/net/chelsio/subr.c +++ b/drivers/net/chelsio/subr.c @@ -563,10 +563,11 @@ struct chelsio_vpd_t { * written to the Control register. The hardware device will set the flag to a * one when 4B have been transferred to the Data register. */ -int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data) +int t1_seeprom_read(adapter_t *adapter, u32 addr, __le32 *data) { int i = EEPROM_MAX_POLL; u16 val; + u32 v; if (addr >= EEPROMSIZE || (addr & 3)) return -EINVAL; @@ -582,8 +583,8 @@ int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data) adapter->name, addr); return -EIO; } - pci_read_config_dword(adapter->pdev, A_PCICFG_VPD_DATA, data); - *data = le32_to_cpu(*data); + pci_read_config_dword(adapter->pdev, A_PCICFG_VPD_DATA, &v); + *data = cpu_to_le32(v); return 0; } @@ -593,7 +594,7 @@ static int t1_eeprom_vpd_get(adapter_t *adapter, struct chelsio_vpd_t *vpd) for (addr = 0; !ret && addr < sizeof(*vpd); addr += sizeof(u32)) ret = t1_seeprom_read(adapter, addr, - (u32 *)((u8 *)vpd + addr)); + (__le32 *)((u8 *)vpd + addr)); return ret; } |