ixgb endianness annotations

2008-01-29 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a7df90a51944a963d9a4fbe12790630aa4da7aee
Commit: a7df90a51944a963d9a4fbe12790630aa4da7aee
Parent: 8327d000e092f737f7d6602258e5c7575686cc37
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Mon Dec 10 19:00:38 2007 +
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Mon Jan 28 15:07:16 2008 -0800

ixgb endianness annotations

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/ixgb/ixgb_hw.h |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_hw.h b/drivers/net/ixgb/ixgb_hw.h
index af56433..7a7684d 100644
--- a/drivers/net/ixgb/ixgb_hw.h
+++ b/drivers/net/ixgb/ixgb_hw.h
@@ -534,12 +534,12 @@ typedef enum {
  * in which case the structure must be packed in some compiler-specific
  * manner. */
 struct ixgb_rx_desc {
-   uint64_t buff_addr;
-   uint16_t length;
-   uint16_t reserved;
+   __le64 buff_addr;
+   __le16 length;
+   __le16 reserved;
uint8_t status;
uint8_t errors;
-   uint16_t special;
+   __le16 special;
 };
 
 #define IXGB_RX_DESC_STATUS_DD0x01
@@ -567,11 +567,11 @@ struct ixgb_rx_desc {
  * in which case the structure must be packed in some compiler-specific
  * manner. */
 struct ixgb_tx_desc {
-   uint64_t buff_addr;
-   uint32_t cmd_type_len;
+   __le64 buff_addr;
+   __le32 cmd_type_len;
uint8_t status;
uint8_t popts;
-   uint16_t vlan;
+   __le16 vlan;
 };
 
 #define IXGB_TX_DESC_LENGTH_MASK0x000F
@@ -596,14 +596,14 @@ struct ixgb_tx_desc {
 struct ixgb_context_desc {
uint8_t ipcss;
uint8_t ipcso;
-   uint16_t ipcse;
+   __le16 ipcse;
uint8_t tucss;
uint8_t tucso;
-   uint16_t tucse;
-   uint32_t cmd_type_len;
+   __le16 tucse;
+   __le32 cmd_type_len;
uint8_t status;
uint8_t hdr_len;
-   uint16_t mss;
+   __le16 mss;
 };
 
 #define IXGB_CONTEXT_DESC_CMD_TCP 0x0100
-
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


ixgb: endianness

2007-10-11 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c676504ef5fe682bd343149de0e5c57bbf793ff9
Commit: c676504ef5fe682bd343149de0e5c57bbf793ff9
Parent: 3e33545ba6f8ca04b28a015e095662a35a4e2670
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Aug 23 00:47:03 2007 -0400
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Wed Oct 10 16:52:01 2007 -0700

ixgb: endianness

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/ixgb/ixgb_ee.c  |   16 
 drivers/net/ixgb/ixgb_ee.h  |   28 ++--
 drivers/net/ixgb/ixgb_ethtool.c |4 ++--
 drivers/net/ixgb/ixgb_hw.h  |4 ++--
 4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c
index 52c99d0..e8eb0fd 100644
--- a/drivers/net/ixgb/ixgb_ee.c
+++ b/drivers/net/ixgb/ixgb_ee.c
@@ -411,7 +411,7 @@ ixgb_write_eeprom(struct ixgb_hw *hw, uint16_t offset, 
uint16_t data)
ixgb_cleanup_eeprom(hw);
 
/* clear the init_ctrl_reg_1 to signify that the cache is invalidated */
-   ee_map-init_ctrl_reg_1 = le16_to_cpu(EEPROM_ICW1_SIGNATURE_CLEAR);
+   ee_map-init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR);
 
return;
 }
@@ -476,19 +476,19 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
uint16_t ee_data;
ee_data = ixgb_read_eeprom(hw, i);
checksum += ee_data;
-   hw-eeprom[i] = le16_to_cpu(ee_data);
+   hw-eeprom[i] = cpu_to_le16(ee_data);
}
 
if (checksum != (uint16_t) EEPROM_SUM) {
DEBUGOUT(ixgb_ee: Checksum invalid.\n);
/* clear the init_ctrl_reg_1 to signify that the cache is
 * invalidated */
-   ee_map-init_ctrl_reg_1 = 
le16_to_cpu(EEPROM_ICW1_SIGNATURE_CLEAR);
+   ee_map-init_ctrl_reg_1 = 
cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR);
return (FALSE);
}
 
-   if ((ee_map-init_ctrl_reg_1  le16_to_cpu(EEPROM_ICW1_SIGNATURE_MASK))
-!= le16_to_cpu(EEPROM_ICW1_SIGNATURE_VALID)) {
+   if ((ee_map-init_ctrl_reg_1  cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
+!= cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
DEBUGOUT(ixgb_ee: Signature invalid.\n);
return(FALSE);
}
@@ -511,8 +511,8 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
 {
struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw-eeprom;
 
-   if ((ee_map-init_ctrl_reg_1  le16_to_cpu(EEPROM_ICW1_SIGNATURE_MASK))
-   == le16_to_cpu(EEPROM_ICW1_SIGNATURE_VALID)) {
+   if ((ee_map-init_ctrl_reg_1  cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
+   == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
return (TRUE);
} else {
return ixgb_get_eeprom_data(hw);
@@ -528,7 +528,7 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
  * Returns:
  *  Word at indexed offset in eeprom, if valid, 0 otherwise.
  
**/
-uint16_t
+__le16
 ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index)
 {
 
diff --git a/drivers/net/ixgb/ixgb_ee.h b/drivers/net/ixgb/ixgb_ee.h
index ef236b9..7908bf3 100644
--- a/drivers/net/ixgb/ixgb_ee.h
+++ b/drivers/net/ixgb/ixgb_ee.h
@@ -76,22 +76,22 @@
 /* EEPROM structure */
 struct ixgb_ee_map_type {
uint8_t mac_addr[IXGB_ETH_LENGTH_OF_ADDRESS];
-   uint16_t compatibility;
-   uint16_t reserved1[4];
-   uint32_t pba_number;
-   uint16_t init_ctrl_reg_1;
-   uint16_t subsystem_id;
-   uint16_t subvendor_id;
-   uint16_t device_id;
-   uint16_t vendor_id;
-   uint16_t init_ctrl_reg_2;
-   uint16_t oem_reserved[16];
-   uint16_t swdpins_reg;
-   uint16_t circuit_ctrl_reg;
+   __le16 compatibility;
+   __le16 reserved1[4];
+   __le32 pba_number;
+   __le16 init_ctrl_reg_1;
+   __le16 subsystem_id;
+   __le16 subvendor_id;
+   __le16 device_id;
+   __le16 vendor_id;
+   __le16 init_ctrl_reg_2;
+   __le16 oem_reserved[16];
+   __le16 swdpins_reg;
+   __le16 circuit_ctrl_reg;
uint8_t d3_power;
uint8_t d0_power;
-   uint16_t reserved2[28];
-   uint16_t checksum;
+   __le16 reserved2[28];
+   __le16 checksum;
 };
 
 /* EEPROM Functions */
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c
index ddad26b..fddd584 100644
--- a/drivers/net/ixgb/ixgb_ethtool.c
+++ b/drivers/net/ixgb/ixgb_ethtool.c
@@ -422,7 +422,7 @@ ixgb_get_eeprom(struct net_device *netdev,
 {
struct ixgb_adapter *adapter = netdev_priv(netdev);
struct ixgb_hw *hw = adapter-hw;
-   uint16_t *eeprom_buff;
+   __le16 *eeprom_buff;
int i, max_len, first_word, last_word;
int