aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-22 13:56:33 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:10:29 -0500
commitac390c60a833192e87fb09ed8d67f5d1a84306c8 (patch)
treead8c6d74992816c08bfc3959f767b51f0aeada95 /drivers/net/chelsio
parent61cf46ad581ba43073d3bcb0be549eb60fbbf9f8 (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')
-rw-r--r--drivers/net/chelsio/common.h2
-rw-r--r--drivers/net/chelsio/cxgb2.c2
-rw-r--r--drivers/net/chelsio/subr.c9
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h
index 846ca5383d3c..4bd2455b0fe3 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
379extern const struct board_info *t1_get_board_info(unsigned int board_id); 379extern const struct board_info *t1_get_board_info(unsigned int board_id);
380extern const struct board_info *t1_get_board_info_from_ids(unsigned int devid, 380extern const struct board_info *t1_get_board_info_from_ids(unsigned int devid,
381 unsigned short ssid); 381 unsigned short ssid);
382extern int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data); 382extern int t1_seeprom_read(adapter_t *adapter, u32 addr, __le32 *data);
383extern int t1_get_board_rev(adapter_t *adapter, const struct board_info *bi, 383extern int t1_get_board_rev(adapter_t *adapter, const struct board_info *bi,
384 struct adapter_params *p); 384 struct adapter_params *p);
385extern int t1_init_hw_modules(adapter_t *adapter); 385extern int t1_init_hw_modules(adapter_t *adapter);
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index 16f131396999..a509337eab2d 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,
814 814
815 e->magic = EEPROM_MAGIC(adapter); 815 e->magic = EEPROM_MAGIC(adapter);
816 for (i = e->offset & ~3; i < e->offset + e->len; i += sizeof(u32)) 816 for (i = e->offset & ~3; i < e->offset + e->len; i += sizeof(u32))
817 t1_seeprom_read(adapter, i, (u32 *)&buf[i]); 817 t1_seeprom_read(adapter, i, (__le32 *)&buf[i]);
818 memcpy(data, buf + e->offset, e->len); 818 memcpy(data, buf + e->offset, e->len);
819 return 0; 819 return 0;
820} 820}
diff --git a/drivers/net/chelsio/subr.c b/drivers/net/chelsio/subr.c
index dc50151bed81..7adf30230c4f 100644
--- a/drivers/net/chelsio/subr.c
+++ b/drivers/net/chelsio/subr.c
@@ -563,10 +563,11 @@ struct chelsio_vpd_t {
563 * written to the Control register. The hardware device will set the flag to a 563 * written to the Control register. The hardware device will set the flag to a
564 * one when 4B have been transferred to the Data register. 564 * one when 4B have been transferred to the Data register.
565 */ 565 */
566int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data) 566int t1_seeprom_read(adapter_t *adapter, u32 addr, __le32 *data)
567{ 567{
568 int i = EEPROM_MAX_POLL; 568 int i = EEPROM_MAX_POLL;
569 u16 val; 569 u16 val;
570 u32 v;
570 571
571 if (addr >= EEPROMSIZE || (addr & 3)) 572 if (addr >= EEPROMSIZE || (addr & 3))
572 return -EINVAL; 573 return -EINVAL;
@@ -582,8 +583,8 @@ int t1_seeprom_read(adapter_t *adapter, u32 addr, u32 *data)
582 adapter->name, addr); 583 adapter->name, addr);
583 return -EIO; 584 return -EIO;
584 } 585 }
585 pci_read_config_dword(adapter->pdev, A_PCICFG_VPD_DATA, data); 586 pci_read_config_dword(adapter->pdev, A_PCICFG_VPD_DATA, &v);
586 *data = le32_to_cpu(*data); 587 *data = cpu_to_le32(v);
587 return 0; 588 return 0;
588} 589}
589 590
@@ -593,7 +594,7 @@ static int t1_eeprom_vpd_get(adapter_t *adapter, struct chelsio_vpd_t *vpd)
593 594
594 for (addr = 0; !ret && addr < sizeof(*vpd); addr += sizeof(u32)) 595 for (addr = 0; !ret && addr < sizeof(*vpd); addr += sizeof(u32))
595 ret = t1_seeprom_read(adapter, addr, 596 ret = t1_seeprom_read(adapter, addr,
596 (u32 *)((u8 *)vpd + addr)); 597 (__le32 *)((u8 *)vpd + addr));
597 598
598 return ret; 599 return ret;
599} 600}