aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/eth1394.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/eth1394.c')
-rw-r--r--drivers/ieee1394/eth1394.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index 930d47f053cf..1a919df809f8 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -92,7 +92,7 @@ struct partial_datagram {
92 struct list_head list; 92 struct list_head list;
93 u16 dgl; 93 u16 dgl;
94 u16 dg_size; 94 u16 dg_size;
95 u16 ether_type; 95 __be16 ether_type;
96 struct sk_buff *skb; 96 struct sk_buff *skb;
97 char *pbuf; 97 char *pbuf;
98 struct list_head frag_info; 98 struct list_head frag_info;
@@ -181,7 +181,7 @@ static void ether1394_remove_host(struct hpsb_host *host);
181static void ether1394_host_reset(struct hpsb_host *host); 181static void ether1394_host_reset(struct hpsb_host *host);
182 182
183/* Function for incoming 1394 packets */ 183/* Function for incoming 1394 packets */
184static struct hpsb_address_ops addr_ops = { 184const static struct hpsb_address_ops addr_ops = {
185 .write = ether1394_write, 185 .write = ether1394_write,
186}; 186};
187 187
@@ -764,7 +764,7 @@ static int ether1394_header_parse(const struct sk_buff *skb,
764static int ether1394_header_cache(const struct neighbour *neigh, 764static int ether1394_header_cache(const struct neighbour *neigh,
765 struct hh_cache *hh) 765 struct hh_cache *hh)
766{ 766{
767 unsigned short type = hh->hh_type; 767 __be16 type = hh->hh_type;
768 struct net_device *dev = neigh->dev; 768 struct net_device *dev = neigh->dev;
769 struct eth1394hdr *eth = 769 struct eth1394hdr *eth =
770 (struct eth1394hdr *)((u8 *)hh->hh_data + 16 - ETH1394_HLEN); 770 (struct eth1394hdr *)((u8 *)hh->hh_data + 16 - ETH1394_HLEN);
@@ -792,7 +792,7 @@ static void ether1394_header_cache_update(struct hh_cache *hh,
792 ******************************************/ 792 ******************************************/
793 793
794/* Copied from net/ethernet/eth.c */ 794/* Copied from net/ethernet/eth.c */
795static u16 ether1394_type_trans(struct sk_buff *skb, struct net_device *dev) 795static __be16 ether1394_type_trans(struct sk_buff *skb, struct net_device *dev)
796{ 796{
797 struct eth1394hdr *eth; 797 struct eth1394hdr *eth;
798 unsigned char *rawp; 798 unsigned char *rawp;
@@ -826,17 +826,17 @@ static u16 ether1394_type_trans(struct sk_buff *skb, struct net_device *dev)
826 826
827/* Parse an encapsulated IP1394 header into an ethernet frame packet. 827/* Parse an encapsulated IP1394 header into an ethernet frame packet.
828 * We also perform ARP translation here, if need be. */ 828 * We also perform ARP translation here, if need be. */
829static u16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev, 829static __be16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev,
830 nodeid_t srcid, nodeid_t destid, 830 nodeid_t srcid, nodeid_t destid,
831 u16 ether_type) 831 __be16 ether_type)
832{ 832{
833 struct eth1394_priv *priv = netdev_priv(dev); 833 struct eth1394_priv *priv = netdev_priv(dev);
834 u64 dest_hw; 834 __be64 dest_hw;
835 unsigned short ret = 0; 835 __be16 ret = 0;
836 836
837 /* Setup our hw addresses. We use these to build the ethernet header. */ 837 /* Setup our hw addresses. We use these to build the ethernet header. */
838 if (destid == (LOCAL_BUS | ALL_NODES)) 838 if (destid == (LOCAL_BUS | ALL_NODES))
839 dest_hw = ~0ULL; /* broadcast */ 839 dest_hw = ~cpu_to_be64(0); /* broadcast */
840 else 840 else
841 dest_hw = cpu_to_be64((u64)priv->host->csr.guid_hi << 32 | 841 dest_hw = cpu_to_be64((u64)priv->host->csr.guid_hi << 32 |
842 priv->host->csr.guid_lo); 842 priv->host->csr.guid_lo);
@@ -870,7 +870,7 @@ static u16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev,
870 node = eth1394_find_node_guid(&priv->ip_node_list, 870 node = eth1394_find_node_guid(&priv->ip_node_list,
871 be64_to_cpu(guid)); 871 be64_to_cpu(guid));
872 if (!node) 872 if (!node)
873 return 0; 873 return cpu_to_be16(0);
874 874
875 node_info = 875 node_info =
876 (struct eth1394_node_info *)node->ud->device.driver_data; 876 (struct eth1394_node_info *)node->ud->device.driver_data;
@@ -1060,7 +1060,7 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid,
1060 unsigned long flags; 1060 unsigned long flags;
1061 struct eth1394_priv *priv = netdev_priv(dev); 1061 struct eth1394_priv *priv = netdev_priv(dev);
1062 union eth1394_hdr *hdr = (union eth1394_hdr *)buf; 1062 union eth1394_hdr *hdr = (union eth1394_hdr *)buf;
1063 u16 ether_type = 0; /* initialized to clear warning */ 1063 __be16 ether_type = cpu_to_be16(0); /* initialized to clear warning */
1064 int hdr_len; 1064 int hdr_len;
1065 struct unit_directory *ud = priv->ud_list[NODEID_TO_NODE(srcid)]; 1065 struct unit_directory *ud = priv->ud_list[NODEID_TO_NODE(srcid)];
1066 struct eth1394_node_info *node_info; 1066 struct eth1394_node_info *node_info;
@@ -1254,7 +1254,7 @@ static int ether1394_write(struct hpsb_host *host, int srcid, int destid,
1254 1254
1255static void ether1394_iso(struct hpsb_iso *iso) 1255static void ether1394_iso(struct hpsb_iso *iso)
1256{ 1256{
1257 quadlet_t *data; 1257 __be32 *data;
1258 char *buf; 1258 char *buf;
1259 struct eth1394_host_info *hi; 1259 struct eth1394_host_info *hi;
1260 struct net_device *dev; 1260 struct net_device *dev;
@@ -1278,7 +1278,7 @@ static void ether1394_iso(struct hpsb_iso *iso)
1278 for (i = 0; i < nready; i++) { 1278 for (i = 0; i < nready; i++) {
1279 struct hpsb_iso_packet_info *info = 1279 struct hpsb_iso_packet_info *info =
1280 &iso->infos[(iso->first_packet + i) % iso->buf_packets]; 1280 &iso->infos[(iso->first_packet + i) % iso->buf_packets];
1281 data = (quadlet_t *)(iso->data_buf.kvirt + info->offset); 1281 data = (__be32 *)(iso->data_buf.kvirt + info->offset);
1282 1282
1283 /* skip over GASP header */ 1283 /* skip over GASP header */
1284 buf = (char *)data + 8; 1284 buf = (char *)data + 8;
@@ -1610,7 +1610,7 @@ static int ether1394_tx(struct sk_buff *skb, struct net_device *dev)
1610 if (max_payload < dg_size + hdr_type_len[ETH1394_HDR_LF_UF]) 1610 if (max_payload < dg_size + hdr_type_len[ETH1394_HDR_LF_UF])
1611 priv->bc_dgl++; 1611 priv->bc_dgl++;
1612 } else { 1612 } else {
1613 __be64 guid = get_unaligned((u64 *)hdr_buf.h_dest); 1613 __be64 guid = get_unaligned((__be64 *)hdr_buf.h_dest);
1614 1614
1615 node = eth1394_find_node_guid(&priv->ip_node_list, 1615 node = eth1394_find_node_guid(&priv->ip_node_list,
1616 be64_to_cpu(guid)); 1616 be64_to_cpu(guid));