annotate chelsio
authorAl Viro <viro@ftp.linux.org.uk>
Sat, 22 Dec 2007 18:56:33 +0000 (18:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:10:29 +0000 (15:10 -0800)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/chelsio/common.h
drivers/net/chelsio/cxgb2.c
drivers/net/chelsio/subr.c

index 846ca5383d3c875364bac967772d3290efdfd9f6..4bd2455b0fe31b50bc20fba8f6a35e90ccc323fd 100644 (file)
@@ -379,7 +379,7 @@ extern int t1_link_start(struct cphy *phy, struct cmac *mac, struct link_config
 extern const struct board_info *t1_get_board_info(unsigned int board_id);
 extern const struct board_info *t1_get_board_info_from_ids(unsigned int devid,
                                                    unsigned short ssid);
-extern int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data);
+extern int t1_seeprom_read(adapter_t *adapter, u32 addr, __le32 *data);
 extern int t1_get_board_rev(adapter_t *adapter, const struct board_info *bi,
                     struct adapter_params *p);
 extern int t1_init_hw_modules(adapter_t *adapter);
index 16f1313969997af961bdd4fb82a15ad206a9df09..a509337eab2dd44d562e131f814599138d133dfe 100644 (file)
@@ -814,7 +814,7 @@ static int get_eeprom(struct net_device *dev, struct ethtool_eeprom *e,
 
        e->magic = EEPROM_MAGIC(adapter);
        for (i = e->offset & ~3; i < e->offset + e->len; i += sizeof(u32))
-               t1_seeprom_read(adapter, i, (u32 *)&buf[i]);
+               t1_seeprom_read(adapter, i, (__le32 *)&buf[i]);
        memcpy(data, buf + e->offset, e->len);
        return 0;
 }
index dc50151bed811c01610a1bbe632c678812b53c70..7adf30230c4f7123d03d91e2f9c500f26d4a49f8 100644 (file)
@@ -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;
 }