aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/typhoon.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-08-23 00:44:39 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:00 -0400
commit03a710ffcb0c4e682087f4cf4f0236d10ed09253 (patch)
tree0454b36233a4d3ea3e694a55d640b6a80db816c3 /drivers/net/typhoon.c
parentc559a5bc9417c00ba2df59397a27eaf8d8e52aec (diff)
typhoon: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/typhoon.c')
-rw-r--r--drivers/net/typhoon.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 43894e95fcb3..72e5e9be7e99 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -300,9 +300,9 @@ struct typhoon {
300 const char * name; 300 const char * name;
301 struct typhoon_shared * shared; 301 struct typhoon_shared * shared;
302 dma_addr_t shared_dma; 302 dma_addr_t shared_dma;
303 u16 xcvr_select; 303 __le16 xcvr_select;
304 u16 wol_events; 304 __le16 wol_events;
305 u32 offload; 305 __le32 offload;
306 306
307 /* unused stuff (future use) */ 307 /* unused stuff (future use) */
308 int capabilities; 308 int capabilities;
@@ -828,7 +828,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
828 first_txd->processFlags |= 828 first_txd->processFlags |=
829 TYPHOON_TX_PF_INSERT_VLAN | TYPHOON_TX_PF_VLAN_PRIORITY; 829 TYPHOON_TX_PF_INSERT_VLAN | TYPHOON_TX_PF_VLAN_PRIORITY;
830 first_txd->processFlags |= 830 first_txd->processFlags |=
831 cpu_to_le32(htons(vlan_tx_tag_get(skb)) << 831 cpu_to_le32(ntohs(vlan_tx_tag_get(skb)) <<
832 TYPHOON_TX_PF_VLAN_TAG_SHIFT); 832 TYPHOON_TX_PF_VLAN_TAG_SHIFT);
833 } 833 }
834 834
@@ -920,7 +920,7 @@ typhoon_set_rx_mode(struct net_device *dev)
920 struct typhoon *tp = netdev_priv(dev); 920 struct typhoon *tp = netdev_priv(dev);
921 struct cmd_desc xp_cmd; 921 struct cmd_desc xp_cmd;
922 u32 mc_filter[2]; 922 u32 mc_filter[2];
923 u16 filter; 923 __le16 filter;
924 924
925 filter = TYPHOON_RX_FILTER_DIRECTED | TYPHOON_RX_FILTER_BROADCAST; 925 filter = TYPHOON_RX_FILTER_DIRECTED | TYPHOON_RX_FILTER_BROADCAST;
926 if(dev->flags & IFF_PROMISC) { 926 if(dev->flags & IFF_PROMISC) {
@@ -1131,7 +1131,7 @@ typhoon_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1131{ 1131{
1132 struct typhoon *tp = netdev_priv(dev); 1132 struct typhoon *tp = netdev_priv(dev);
1133 struct cmd_desc xp_cmd; 1133 struct cmd_desc xp_cmd;
1134 int xcvr; 1134 __le16 xcvr;
1135 int err; 1135 int err;
1136 1136
1137 err = -EINVAL; 1137 err = -EINVAL;
@@ -1536,7 +1536,7 @@ out_timeout:
1536 1536
1537static u32 1537static u32
1538typhoon_clean_tx(struct typhoon *tp, struct transmit_ring *txRing, 1538typhoon_clean_tx(struct typhoon *tp, struct transmit_ring *txRing,
1539 volatile u32 * index) 1539 volatile __le32 * index)
1540{ 1540{
1541 u32 lastRead = txRing->lastRead; 1541 u32 lastRead = txRing->lastRead;
1542 struct tx_desc *tx; 1542 struct tx_desc *tx;
@@ -1572,7 +1572,7 @@ typhoon_clean_tx(struct typhoon *tp, struct transmit_ring *txRing,
1572 1572
1573static void 1573static void
1574typhoon_tx_complete(struct typhoon *tp, struct transmit_ring *txRing, 1574typhoon_tx_complete(struct typhoon *tp, struct transmit_ring *txRing,
1575 volatile u32 * index) 1575 volatile __le32 * index)
1576{ 1576{
1577 u32 lastRead; 1577 u32 lastRead;
1578 int numDesc = MAX_SKB_FRAGS + 1; 1578 int numDesc = MAX_SKB_FRAGS + 1;
@@ -1662,8 +1662,8 @@ typhoon_alloc_rx_skb(struct typhoon *tp, u32 idx)
1662} 1662}
1663 1663
1664static int 1664static int
1665typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile u32 * ready, 1665typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile __le32 * ready,
1666 volatile u32 * cleared, int budget) 1666 volatile __le32 * cleared, int budget)
1667{ 1667{
1668 struct rx_desc *rx; 1668 struct rx_desc *rx;
1669 struct sk_buff *skb, *new_skb; 1669 struct sk_buff *skb, *new_skb;
@@ -1673,7 +1673,7 @@ typhoon_rx(struct typhoon *tp, struct basic_ring *rxRing, volatile u32 * ready,
1673 u32 rxaddr; 1673 u32 rxaddr;
1674 int pkt_len; 1674 int pkt_len;
1675 u32 idx; 1675 u32 idx;
1676 u32 csum_bits; 1676 __le32 csum_bits;
1677 int received; 1677 int received;
1678 1678
1679 received = 0; 1679 received = 0;
@@ -1840,7 +1840,7 @@ typhoon_free_rx_rings(struct typhoon *tp)
1840} 1840}
1841 1841
1842static int 1842static int
1843typhoon_sleep(struct typhoon *tp, pci_power_t state, u16 events) 1843typhoon_sleep(struct typhoon *tp, pci_power_t state, __le16 events)
1844{ 1844{
1845 struct pci_dev *pdev = tp->pdev; 1845 struct pci_dev *pdev = tp->pdev;
1846 void __iomem *ioaddr = tp->ioaddr; 1846 void __iomem *ioaddr = tp->ioaddr;
@@ -1928,8 +1928,8 @@ typhoon_start_runtime(struct typhoon *tp)
1928 goto error_out; 1928 goto error_out;
1929 1929
1930 INIT_COMMAND_NO_RESPONSE(&xp_cmd, TYPHOON_CMD_SET_MAC_ADDRESS); 1930 INIT_COMMAND_NO_RESPONSE(&xp_cmd, TYPHOON_CMD_SET_MAC_ADDRESS);
1931 xp_cmd.parm1 = cpu_to_le16(ntohs(*(u16 *)&dev->dev_addr[0])); 1931 xp_cmd.parm1 = cpu_to_le16(ntohs(*(__be16 *)&dev->dev_addr[0]));
1932 xp_cmd.parm2 = cpu_to_le32(ntohl(*(u32 *)&dev->dev_addr[2])); 1932 xp_cmd.parm2 = cpu_to_le32(ntohl(*(__be32 *)&dev->dev_addr[2]));
1933 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL); 1933 err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL);
1934 if(err < 0) 1934 if(err < 0)
1935 goto error_out; 1935 goto error_out;
@@ -2229,8 +2229,8 @@ typhoon_suspend(struct pci_dev *pdev, pm_message_t state)
2229 } 2229 }
2230 2230
2231 INIT_COMMAND_NO_RESPONSE(&xp_cmd, TYPHOON_CMD_SET_MAC_ADDRESS); 2231 INIT_COMMAND_NO_RESPONSE(&xp_cmd, TYPHOON_CMD_SET_MAC_ADDRESS);
2232 xp_cmd.parm1 = cpu_to_le16(ntohs(*(u16 *)&dev->dev_addr[0])); 2232 xp_cmd.parm1 = cpu_to_le16(ntohs(*(__be16 *)&dev->dev_addr[0]));
2233 xp_cmd.parm2 = cpu_to_le32(ntohl(*(u32 *)&dev->dev_addr[2])); 2233 xp_cmd.parm2 = cpu_to_le32(ntohl(*(__be32 *)&dev->dev_addr[2]));
2234 if(typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) { 2234 if(typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL) < 0) {
2235 printk(KERN_ERR "%s: unable to set mac address in suspend\n", 2235 printk(KERN_ERR "%s: unable to set mac address in suspend\n",
2236 dev->name); 2236 dev->name);
@@ -2465,8 +2465,8 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2465 goto error_out_reset; 2465 goto error_out_reset;
2466 } 2466 }
2467 2467
2468 *(u16 *)&dev->dev_addr[0] = htons(le16_to_cpu(xp_resp[0].parm1)); 2468 *(__be16 *)&dev->dev_addr[0] = htons(le16_to_cpu(xp_resp[0].parm1));
2469 *(u32 *)&dev->dev_addr[2] = htonl(le32_to_cpu(xp_resp[0].parm2)); 2469 *(__be32 *)&dev->dev_addr[2] = htonl(le32_to_cpu(xp_resp[0].parm2));
2470 2470
2471 if(!is_valid_ether_addr(dev->dev_addr)) { 2471 if(!is_valid_ether_addr(dev->dev_addr)) {
2472 printk(ERR_PFX "%s: Could not obtain valid ethernet address, " 2472 printk(ERR_PFX "%s: Could not obtain valid ethernet address, "