Commit bf50d115 authored by Ben Collins's avatar Ben Collins

[PATCH] More IEEE1394 updates

 - Cleanup Makefile.
 - Fix potentional crash in dv1394 module unload.
 - Why does ARM's memcpy not return void*? Oh well, work around it in
  eth1394 by not expecting standard behavior.
parent 13d67773
...@@ -18,13 +18,6 @@ obj-$(CONFIG_IEEE1394_CMP) += cmp.o ...@@ -18,13 +18,6 @@ obj-$(CONFIG_IEEE1394_CMP) += cmp.o
clean-files := oui.c clean-files := oui.c
ieee1394.o: $(ieee1394-objs)
$(LD) $(LDFLAGS) -r -o $@ $(ieee1394-objs)
ifeq ($(obj),)
obj = .
endif
$(obj)/oui.o: $(obj)/oui.c $(obj)/oui.o: $(obj)/oui.c
$(obj)/oui.c: $(obj)/oui.db $(obj)/oui2c.sh $(obj)/oui.c: $(obj)/oui.db $(obj)/oui2c.sh
$(CONFIG_SHELL) $(obj)/oui2c.sh < $(obj)/oui.db > $(obj)/oui.c $(CONFIG_SHELL) $(obj)/oui2c.sh < $(obj)/oui.db > $(obj)/oui.c
...@@ -2703,7 +2703,7 @@ static void dv1394_remove_host (struct hpsb_host *host) ...@@ -2703,7 +2703,7 @@ static void dv1394_remove_host (struct hpsb_host *host)
struct ti_ohci *ohci; struct ti_ohci *ohci;
struct video_card *video = NULL; struct video_card *video = NULL;
unsigned long flags; unsigned long flags;
struct list_head *lh; struct list_head *lh, *templh;
char buf[32]; char buf[32];
int n; int n;
...@@ -2717,7 +2717,7 @@ static void dv1394_remove_host (struct hpsb_host *host) ...@@ -2717,7 +2717,7 @@ static void dv1394_remove_host (struct hpsb_host *host)
/* find the corresponding video_cards */ /* find the corresponding video_cards */
spin_lock_irqsave(&dv1394_cards_lock, flags); spin_lock_irqsave(&dv1394_cards_lock, flags);
if(!list_empty(&dv1394_cards)) { if(!list_empty(&dv1394_cards)) {
list_for_each(lh, &dv1394_cards) { list_for_each_safe(lh, templh, &dv1394_cards) {
video = list_entry(lh, struct video_card, list); video = list_entry(lh, struct video_card, list);
if((video->id >> 2) == ohci->id) if((video->id >> 2) == ohci->id)
dv1394_un_init(video); dv1394_un_init(video);
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
printk(KERN_ERR fmt, ## args) printk(KERN_ERR fmt, ## args)
static char version[] __devinitdata = static char version[] __devinitdata =
"$Rev: 801 $ Ben Collins <bcollins@debian.org>"; "$Rev: 806 $ Ben Collins <bcollins@debian.org>";
/* Our ieee1394 highlevel driver */ /* Our ieee1394 highlevel driver */
#define ETHER1394_DRIVER_NAME "ether1394" #define ETHER1394_DRIVER_NAME "ether1394"
...@@ -221,7 +221,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev ...@@ -221,7 +221,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev
unsigned char arp_data[2*(dev->addr_len+4)]; unsigned char arp_data[2*(dev->addr_len+4)];
/* Copy the main data that we need */ /* Copy the main data that we need */
arp_ptr = memcpy (arp_data, arp_ptr + sizeof(struct arphdr), sizeof (arp_data)); memcpy (arp_data, arp_ptr + sizeof(struct arphdr), sizeof (arp_data));
/* Extend the buffer enough for our new header */ /* Extend the buffer enough for our new header */
skb_put (skb, sizeof (struct eth1394_arp) - skb_put (skb, sizeof (struct eth1394_arp) -
...@@ -229,7 +229,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev ...@@ -229,7 +229,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev
#define PROCESS_MEMBER(ptr,val,len) \ #define PROCESS_MEMBER(ptr,val,len) \
memcpy (val, ptr, len); ptr += len memcpy (val, ptr, len); ptr += len
arp_ptr += arp1394->hw_addr_len; arp_ptr = arp_data + arp1394->hw_addr_len;
PROCESS_MEMBER (arp_ptr, &arp1394->sip, arp1394->ip_addr_len); PROCESS_MEMBER (arp_ptr, &arp1394->sip, arp1394->ip_addr_len);
arp_ptr += arp1394->hw_addr_len; arp_ptr += arp1394->hw_addr_len;
PROCESS_MEMBER (arp_ptr, &arp1394->tip, arp1394->ip_addr_len); PROCESS_MEMBER (arp_ptr, &arp1394->tip, arp1394->ip_addr_len);
...@@ -529,7 +529,7 @@ static inline unsigned short ether1394_parse_encap (struct sk_buff *skb, struct ...@@ -529,7 +529,7 @@ static inline unsigned short ether1394_parse_encap (struct sk_buff *skb, struct
spin_unlock_irqrestore (&priv->lock, flags); spin_unlock_irqrestore (&priv->lock, flags);
#define PROCESS_MEMBER(ptr,val,len) \ #define PROCESS_MEMBER(ptr,val,len) \
ptr = memcpy (ptr, val, len) + len memcpy (ptr, val, len); ptr += len
PROCESS_MEMBER (arp_ptr, src_hw, dev->addr_len); PROCESS_MEMBER (arp_ptr, src_hw, dev->addr_len);
PROCESS_MEMBER (arp_ptr, &arp1394.sip, 4); PROCESS_MEMBER (arp_ptr, &arp1394.sip, 4);
PROCESS_MEMBER (arp_ptr, dest_hw, dev->addr_len); PROCESS_MEMBER (arp_ptr, dest_hw, dev->addr_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment