Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac390c60a833192e87fb09ed8d67f5d1a84306c8
Commit:     ac390c60a833192e87fb09ed8d67f5d1a84306c8
Parent:     61cf46ad581ba43073d3bcb0be549eb60fbbf9f8
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 22 18:56:33 2007 +0000
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:10:29 2008 -0800

    annotate chelsio
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/chelsio/common.h |    2 +-
 drivers/net/chelsio/cxgb2.c  |    2 +-
 drivers/net/chelsio/subr.c   |    9 +++++----
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h
index 846ca53..4bd2455 100644
--- a/drivers/net/chelsio/common.h
+++ b/drivers/net/chelsio/common.h
@@ -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);
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index 16f1313..a509337 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -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;
 }
diff --git a/drivers/net/chelsio/subr.c b/drivers/net/chelsio/subr.c
index dc50151..7adf302 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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to