From 793b883ed12a6ae6e2901ddb5e038b77d6f0c0ac Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 14 Sep 2005 16:06:14 -0700 Subject: [PATCH] sky2: driver update. Here is revised patch against netdev sky2 branch. It includes whitespace fixes, all the changes from the previous review as well as some optimizations and timing fixes to solve some of the hangs. The stall problem is better but not perfect. It appears that under stress the chip can't keep up with the bus and sends a pause frame, then hangs. This version is for testing, and hopefully other eyes might see the root cause of the problem. I don't want to reinvent the ugly watchdog code in the syskonnect version of sk98lin. If you read it you will see, the original driver writer and the hardware developer obviously didn't understand each other. Dual port support is included, but not tested yet. It did require small change to NAPI since both ports share same IRQ. Signed-off-by: Jeff Garzik --- include/linux/netdevice.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c717907896..5e90557715a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -780,11 +780,15 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) } /* Schedule rx intr now? */ +static inline int netif_rx_schedule_test(struct net_device *dev) +{ + return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); +} +/* Schedule only if device is up */ static inline int netif_rx_schedule_prep(struct net_device *dev) { - return netif_running(dev) && - !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); + return netif_running(dev) && netif_rx_schedule_test(dev); } /* Add interface to tail of rx poll list. This assumes that _prep has -- cgit v1.2.3 From c2373ee98982a1c842dfb213c398f388d4227e63 Mon Sep 17 00:00:00 2001 From: Mitch Williams Date: Wed, 9 Nov 2005 10:34:45 -0800 Subject: [PATCH] net: make dev_valid_name public dev_valid_name() is a useful function. Make it public. Signed-off-by: Mitch Williams Acked-by: Jay Vosburgh Signed-off-by: John W. Linville --- include/linux/netdevice.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 936f8b76114..4fceff0e59e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -684,6 +684,7 @@ extern int netif_rx(struct sk_buff *skb); extern int netif_rx_ni(struct sk_buff *skb); #define HAVE_NETIF_RECEIVE_SKB 1 extern int netif_receive_skb(struct sk_buff *skb); +extern int dev_valid_name(const char *name); extern int dev_ioctl(unsigned int cmd, void __user *); extern int dev_ethtool(struct ifreq *); extern unsigned dev_get_flags(const struct net_device *); -- cgit v1.2.3 From 0a1225769763779288d759e904c4f5a660844ce4 Mon Sep 17 00:00:00 2001 From: "shemminger@osdl.org" Date: Wed, 30 Nov 2005 11:45:17 -0800 Subject: [PATCH] sky2: change netif_rx_schedule_test to __netif_schedule_prep I didn't like the name netif_rx_schedule_test(), in earlier patches and changed to __netif_rx_schedule_prep to be more consistent. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik --- include/linux/netdevice.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 07e114d48bb..7fda03d338d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -802,16 +802,16 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) return (1 << debug_value) - 1; } -/* Schedule rx intr now? */ -static inline int netif_rx_schedule_test(struct net_device *dev) +/* Test if receive needs to be scheduled */ +static inline int __netif_rx_schedule_prep(struct net_device *dev) { return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); } -/* Schedule only if device is up */ +/* Test if receive needs to be scheduled but only if up */ static inline int netif_rx_schedule_prep(struct net_device *dev) { - return netif_running(dev) && netif_rx_schedule_test(dev); + return netif_running(dev) && __netif_rx_schedule_prep(dev); } /* Add interface to tail of rx poll list. This assumes that _prep has -- cgit v1.2.3