diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/hci_usb.c | 3 | ||||
-rw-r--r-- | drivers/net/loopback.c | 39 | ||||
-rw-r--r-- | drivers/net/tg3.c | 19 |
4 files changed, 36 insertions, 26 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index e7c800f4c3ad..07eafbc5dc3a 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -711,6 +711,7 @@ static void dtl1_release(struct pcmcia_device *link) | |||
711 | 711 | ||
712 | static struct pcmcia_device_id dtl1_ids[] = { | 712 | static struct pcmcia_device_id dtl1_ids[] = { |
713 | PCMCIA_DEVICE_PROD_ID12("Nokia Mobile Phones", "DTL-1", 0xe1bfdd64, 0xe168480d), | 713 | PCMCIA_DEVICE_PROD_ID12("Nokia Mobile Phones", "DTL-1", 0xe1bfdd64, 0xe168480d), |
714 | PCMCIA_DEVICE_PROD_ID12("Nokia Mobile Phones", "DTL-4", 0xe1bfdd64, 0x9102bc82), | ||
714 | PCMCIA_DEVICE_PROD_ID12("Socket", "CF", 0xb38bcc2e, 0x44ebf863), | 715 | PCMCIA_DEVICE_PROD_ID12("Socket", "CF", 0xb38bcc2e, 0x44ebf863), |
715 | PCMCIA_DEVICE_PROD_ID12("Socket", "CF+ Personal Network Card", 0xb38bcc2e, 0xe732bae3), | 716 | PCMCIA_DEVICE_PROD_ID12("Socket", "CF+ Personal Network Card", 0xb38bcc2e, 0xe732bae3), |
716 | PCMCIA_DEVICE_NULL | 717 | PCMCIA_DEVICE_NULL |
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index 7565642a007a..fdea58ae16b2 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -118,6 +118,9 @@ static struct usb_device_id blacklist_ids[] = { | |||
118 | /* IBM/Lenovo ThinkPad with Broadcom chip */ | 118 | /* IBM/Lenovo ThinkPad with Broadcom chip */ |
119 | { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU }, | 119 | { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU }, |
120 | 120 | ||
121 | /* ANYCOM Bluetooth USB-200 and USB-250 */ | ||
122 | { USB_DEVICE(0x0a5c, 0x2111), .driver_info = HCI_RESET }, | ||
123 | |||
121 | /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ | 124 | /* Microsoft Wireless Transceiver for Bluetooth 2.0 */ |
122 | { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, | 125 | { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET }, |
123 | 126 | ||
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 4178b4b1d2df..82c10dec1b5a 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -58,7 +58,11 @@ | |||
58 | #include <linux/tcp.h> | 58 | #include <linux/tcp.h> |
59 | #include <linux/percpu.h> | 59 | #include <linux/percpu.h> |
60 | 60 | ||
61 | static DEFINE_PER_CPU(struct net_device_stats, loopback_stats); | 61 | struct pcpu_lstats { |
62 | unsigned long packets; | ||
63 | unsigned long bytes; | ||
64 | }; | ||
65 | static DEFINE_PER_CPU(struct pcpu_lstats, pcpu_lstats); | ||
62 | 66 | ||
63 | #define LOOPBACK_OVERHEAD (128 + MAX_HEADER + 16 + 16) | 67 | #define LOOPBACK_OVERHEAD (128 + MAX_HEADER + 16 + 16) |
64 | 68 | ||
@@ -128,7 +132,7 @@ static void emulate_large_send_offload(struct sk_buff *skb) | |||
128 | */ | 132 | */ |
129 | static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) | 133 | static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) |
130 | { | 134 | { |
131 | struct net_device_stats *lb_stats; | 135 | struct pcpu_lstats *lb_stats; |
132 | 136 | ||
133 | skb_orphan(skb); | 137 | skb_orphan(skb); |
134 | 138 | ||
@@ -149,16 +153,14 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) | |||
149 | #endif | 153 | #endif |
150 | dev->last_rx = jiffies; | 154 | dev->last_rx = jiffies; |
151 | 155 | ||
152 | lb_stats = &per_cpu(loopback_stats, get_cpu()); | 156 | /* it's OK to use __get_cpu_var() because BHs are off */ |
153 | lb_stats->rx_bytes += skb->len; | 157 | lb_stats = &__get_cpu_var(pcpu_lstats); |
154 | lb_stats->tx_bytes = lb_stats->rx_bytes; | 158 | lb_stats->bytes += skb->len; |
155 | lb_stats->rx_packets++; | 159 | lb_stats->packets++; |
156 | lb_stats->tx_packets = lb_stats->rx_packets; | ||
157 | put_cpu(); | ||
158 | 160 | ||
159 | netif_rx(skb); | 161 | netif_rx(skb); |
160 | 162 | ||
161 | return(0); | 163 | return 0; |
162 | } | 164 | } |
163 | 165 | ||
164 | static struct net_device_stats loopback_stats; | 166 | static struct net_device_stats loopback_stats; |
@@ -166,20 +168,21 @@ static struct net_device_stats loopback_stats; | |||
166 | static struct net_device_stats *get_stats(struct net_device *dev) | 168 | static struct net_device_stats *get_stats(struct net_device *dev) |
167 | { | 169 | { |
168 | struct net_device_stats *stats = &loopback_stats; | 170 | struct net_device_stats *stats = &loopback_stats; |
171 | unsigned long bytes = 0; | ||
172 | unsigned long packets = 0; | ||
169 | int i; | 173 | int i; |
170 | 174 | ||
171 | memset(stats, 0, sizeof(struct net_device_stats)); | ||
172 | |||
173 | for_each_possible_cpu(i) { | 175 | for_each_possible_cpu(i) { |
174 | struct net_device_stats *lb_stats; | 176 | const struct pcpu_lstats *lb_stats; |
175 | 177 | ||
176 | lb_stats = &per_cpu(loopback_stats, i); | 178 | lb_stats = &per_cpu(pcpu_lstats, i); |
177 | stats->rx_bytes += lb_stats->rx_bytes; | 179 | bytes += lb_stats->bytes; |
178 | stats->tx_bytes += lb_stats->tx_bytes; | 180 | packets += lb_stats->packets; |
179 | stats->rx_packets += lb_stats->rx_packets; | ||
180 | stats->tx_packets += lb_stats->tx_packets; | ||
181 | } | 181 | } |
182 | 182 | stats->rx_packets = packets; | |
183 | stats->tx_packets = packets; | ||
184 | stats->rx_bytes = bytes; | ||
185 | stats->tx_bytes = bytes; | ||
183 | return stats; | 186 | return stats; |
184 | } | 187 | } |
185 | 188 | ||
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 327836b1014e..8e398499c045 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.66" | 71 | #define DRV_MODULE_VERSION "3.67" |
72 | #define DRV_MODULE_RELDATE "September 23, 2006" | 72 | #define DRV_MODULE_RELDATE "October 18, 2006" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -129,7 +129,7 @@ | |||
129 | #define RX_JUMBO_PKT_BUF_SZ (9046 + tp->rx_offset + 64) | 129 | #define RX_JUMBO_PKT_BUF_SZ (9046 + tp->rx_offset + 64) |
130 | 130 | ||
131 | /* minimum number of free TX descriptors required to wake up TX process */ | 131 | /* minimum number of free TX descriptors required to wake up TX process */ |
132 | #define TG3_TX_WAKEUP_THRESH (TG3_TX_RING_SIZE / 4) | 132 | #define TG3_TX_WAKEUP_THRESH(tp) ((tp)->tx_pending / 4) |
133 | 133 | ||
134 | /* number of ETHTOOL_GSTATS u64's */ | 134 | /* number of ETHTOOL_GSTATS u64's */ |
135 | #define TG3_NUM_STATS (sizeof(struct tg3_ethtool_stats)/sizeof(u64)) | 135 | #define TG3_NUM_STATS (sizeof(struct tg3_ethtool_stats)/sizeof(u64)) |
@@ -3075,10 +3075,10 @@ static void tg3_tx(struct tg3 *tp) | |||
3075 | smp_mb(); | 3075 | smp_mb(); |
3076 | 3076 | ||
3077 | if (unlikely(netif_queue_stopped(tp->dev) && | 3077 | if (unlikely(netif_queue_stopped(tp->dev) && |
3078 | (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH))) { | 3078 | (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH(tp)))) { |
3079 | netif_tx_lock(tp->dev); | 3079 | netif_tx_lock(tp->dev); |
3080 | if (netif_queue_stopped(tp->dev) && | 3080 | if (netif_queue_stopped(tp->dev) && |
3081 | (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH)) | 3081 | (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH(tp))) |
3082 | netif_wake_queue(tp->dev); | 3082 | netif_wake_queue(tp->dev); |
3083 | netif_tx_unlock(tp->dev); | 3083 | netif_tx_unlock(tp->dev); |
3084 | } | 3084 | } |
@@ -3928,7 +3928,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3928 | tp->tx_prod = entry; | 3928 | tp->tx_prod = entry; |
3929 | if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { | 3929 | if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { |
3930 | netif_stop_queue(dev); | 3930 | netif_stop_queue(dev); |
3931 | if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH) | 3931 | if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH(tp)) |
3932 | netif_wake_queue(tp->dev); | 3932 | netif_wake_queue(tp->dev); |
3933 | } | 3933 | } |
3934 | 3934 | ||
@@ -4143,7 +4143,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
4143 | tp->tx_prod = entry; | 4143 | tp->tx_prod = entry; |
4144 | if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { | 4144 | if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) { |
4145 | netif_stop_queue(dev); | 4145 | netif_stop_queue(dev); |
4146 | if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH) | 4146 | if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH(tp)) |
4147 | netif_wake_queue(tp->dev); | 4147 | netif_wake_queue(tp->dev); |
4148 | } | 4148 | } |
4149 | 4149 | ||
@@ -8106,7 +8106,10 @@ static int tg3_set_ringparam(struct net_device *dev, struct ethtool_ringparam *e | |||
8106 | 8106 | ||
8107 | if ((ering->rx_pending > TG3_RX_RING_SIZE - 1) || | 8107 | if ((ering->rx_pending > TG3_RX_RING_SIZE - 1) || |
8108 | (ering->rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) || | 8108 | (ering->rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) || |
8109 | (ering->tx_pending > TG3_TX_RING_SIZE - 1)) | 8109 | (ering->tx_pending > TG3_TX_RING_SIZE - 1) || |
8110 | (ering->tx_pending <= MAX_SKB_FRAGS) || | ||
8111 | ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG) && | ||
8112 | (ering->tx_pending <= (MAX_SKB_FRAGS * 3)))) | ||
8110 | return -EINVAL; | 8113 | return -EINVAL; |
8111 | 8114 | ||
8112 | if (netif_running(dev)) { | 8115 | if (netif_running(dev)) { |