diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:46:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:46:17 -0400 |
commit | 529a41e36673b518c9e091f3a8d932b6b9e3c461 (patch) | |
tree | 12416411590cb5d2b7f365f3800e31306909d6ce /drivers/net | |
parent | c3823c479e1f86a0adc7bb76fcfded67b042afc3 (diff) | |
parent | 43837b1e6c5aef803d57009a68db18df13e64892 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
rose: Socket lock was not released before returning to user space
hci_usb: remove code obfuscation
drivers/net/appletalk: use time_before, time_before_eq, etc
drivers/atm: use time_before, time_before_eq, etc
hci_usb: do not initialize static variables to 0
tg3: 5701 DMA corruption fix
atm nicstar: Removal of debug code containing deprecated calls to cli()/sti()
iwlwifi: Fix unconditional access to station->tidp[].agg.
netfilter: Fix SIP conntrack build with NAT disabled.
netfilter: Fix SCTP nat build.
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/appletalk/cops.c | 3 | ||||
-rw-r--r-- | drivers/net/tg3.c | 52 | ||||
-rw-r--r-- | drivers/net/tg3.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 18 |
4 files changed, 63 insertions, 11 deletions
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c index 65b901ebfd62..82e9a5bd0dd2 100644 --- a/drivers/net/appletalk/cops.c +++ b/drivers/net/appletalk/cops.c | |||
@@ -69,6 +69,7 @@ static const char *version = | |||
69 | #include <linux/atalk.h> | 69 | #include <linux/atalk.h> |
70 | #include <linux/spinlock.h> | 70 | #include <linux/spinlock.h> |
71 | #include <linux/bitops.h> | 71 | #include <linux/bitops.h> |
72 | #include <linux/jiffies.h> | ||
72 | 73 | ||
73 | #include <asm/system.h> | 74 | #include <asm/system.h> |
74 | #include <asm/io.h> | 75 | #include <asm/io.h> |
@@ -503,7 +504,7 @@ static void cops_reset(struct net_device *dev, int sleep) | |||
503 | long snap=jiffies; | 504 | long snap=jiffies; |
504 | 505 | ||
505 | /* Let card finish initializing, about 1/3 second */ | 506 | /* Let card finish initializing, about 1/3 second */ |
506 | while(jiffies-snap<HZ/3) | 507 | while (time_before(jiffies, snap + HZ/3)) |
507 | schedule(); | 508 | schedule(); |
508 | } | 509 | } |
509 | else | 510 | else |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 96043c5746d0..bc4c62b8e81a 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #define DRV_MODULE_NAME "tg3" | 65 | #define DRV_MODULE_NAME "tg3" |
66 | #define PFX DRV_MODULE_NAME ": " | 66 | #define PFX DRV_MODULE_NAME ": " |
67 | #define DRV_MODULE_VERSION "3.90" | 67 | #define DRV_MODULE_VERSION "3.91" |
68 | #define DRV_MODULE_RELDATE "April 12, 2008" | 68 | #define DRV_MODULE_RELDATE "April 18, 2008" |
69 | 69 | ||
70 | #define TG3_DEF_MAC_MODE 0 | 70 | #define TG3_DEF_MAC_MODE 0 |
71 | #define TG3_DEF_RX_MODE 0 | 71 | #define TG3_DEF_RX_MODE 0 |
@@ -4135,11 +4135,21 @@ static int tigon3_dma_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb, | |||
4135 | u32 last_plus_one, u32 *start, | 4135 | u32 last_plus_one, u32 *start, |
4136 | u32 base_flags, u32 mss) | 4136 | u32 base_flags, u32 mss) |
4137 | { | 4137 | { |
4138 | struct sk_buff *new_skb = skb_copy(skb, GFP_ATOMIC); | 4138 | struct sk_buff *new_skb; |
4139 | dma_addr_t new_addr = 0; | 4139 | dma_addr_t new_addr = 0; |
4140 | u32 entry = *start; | 4140 | u32 entry = *start; |
4141 | int i, ret = 0; | 4141 | int i, ret = 0; |
4142 | 4142 | ||
4143 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) | ||
4144 | new_skb = skb_copy(skb, GFP_ATOMIC); | ||
4145 | else { | ||
4146 | int more_headroom = 4 - ((unsigned long)skb->data & 3); | ||
4147 | |||
4148 | new_skb = skb_copy_expand(skb, | ||
4149 | skb_headroom(skb) + more_headroom, | ||
4150 | skb_tailroom(skb), GFP_ATOMIC); | ||
4151 | } | ||
4152 | |||
4143 | if (!new_skb) { | 4153 | if (!new_skb) { |
4144 | ret = -1; | 4154 | ret = -1; |
4145 | } else { | 4155 | } else { |
@@ -4462,7 +4472,9 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
4462 | 4472 | ||
4463 | would_hit_hwbug = 0; | 4473 | would_hit_hwbug = 0; |
4464 | 4474 | ||
4465 | if (tg3_4g_overflow_test(mapping, len)) | 4475 | if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG) |
4476 | would_hit_hwbug = 1; | ||
4477 | else if (tg3_4g_overflow_test(mapping, len)) | ||
4466 | would_hit_hwbug = 1; | 4478 | would_hit_hwbug = 1; |
4467 | 4479 | ||
4468 | tg3_set_txd(tp, entry, mapping, len, base_flags, | 4480 | tg3_set_txd(tp, entry, mapping, len, base_flags, |
@@ -11339,6 +11351,38 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
11339 | } | 11351 | } |
11340 | } | 11352 | } |
11341 | 11353 | ||
11354 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701)) { | ||
11355 | static struct tg3_dev_id { | ||
11356 | u32 vendor; | ||
11357 | u32 device; | ||
11358 | } bridge_chipsets[] = { | ||
11359 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_0 }, | ||
11360 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PXH_1 }, | ||
11361 | { }, | ||
11362 | }; | ||
11363 | struct tg3_dev_id *pci_id = &bridge_chipsets[0]; | ||
11364 | struct pci_dev *bridge = NULL; | ||
11365 | |||
11366 | while (pci_id->vendor != 0) { | ||
11367 | bridge = pci_get_device(pci_id->vendor, | ||
11368 | pci_id->device, | ||
11369 | bridge); | ||
11370 | if (!bridge) { | ||
11371 | pci_id++; | ||
11372 | continue; | ||
11373 | } | ||
11374 | if (bridge->subordinate && | ||
11375 | (bridge->subordinate->number <= | ||
11376 | tp->pdev->bus->number) && | ||
11377 | (bridge->subordinate->subordinate >= | ||
11378 | tp->pdev->bus->number)) { | ||
11379 | tp->tg3_flags3 |= TG3_FLG3_5701_DMA_BUG; | ||
11380 | pci_dev_put(bridge); | ||
11381 | break; | ||
11382 | } | ||
11383 | } | ||
11384 | } | ||
11385 | |||
11342 | /* The EPB bridge inside 5714, 5715, and 5780 cannot support | 11386 | /* The EPB bridge inside 5714, 5715, and 5780 cannot support |
11343 | * DMA addresses > 40-bit. This bridge may have other additional | 11387 | * DMA addresses > 40-bit. This bridge may have other additional |
11344 | * 57xx devices behind it in some 4-port NIC designs for example. | 11388 | * 57xx devices behind it in some 4-port NIC designs for example. |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index c1075a73d66c..c688c3ac5035 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2476,6 +2476,7 @@ struct tg3 { | |||
2476 | #define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001 | 2476 | #define TG3_FLG3_NO_NVRAM_ADDR_TRANS 0x00000001 |
2477 | #define TG3_FLG3_ENABLE_APE 0x00000002 | 2477 | #define TG3_FLG3_ENABLE_APE 0x00000002 |
2478 | #define TG3_FLG3_5761_5784_AX_FIXES 0x00000004 | 2478 | #define TG3_FLG3_5761_5784_AX_FIXES 0x00000004 |
2479 | #define TG3_FLG3_5701_DMA_BUG 0x00000008 | ||
2479 | 2480 | ||
2480 | struct timer_list timer; | 2481 | struct timer_list timer; |
2481 | u16 timer_counter; | 2482 | u16 timer_counter; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 0f16f2606f29..9a30e1df311d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -239,28 +239,34 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, | |||
239 | "ps_status: %u\n", station->ps_status); | 239 | "ps_status: %u\n", station->ps_status); |
240 | pos += scnprintf(buf + pos, bufsz - pos, "tid data:\n"); | 240 | pos += scnprintf(buf + pos, bufsz - pos, "tid data:\n"); |
241 | pos += scnprintf(buf + pos, bufsz - pos, | 241 | pos += scnprintf(buf + pos, bufsz - pos, |
242 | "seq_num\t\ttxq_id\t"); | 242 | "seq_num\t\ttxq_id"); |
243 | #ifdef CONFIG_IWL4965_HT | ||
243 | pos += scnprintf(buf + pos, bufsz - pos, | 244 | pos += scnprintf(buf + pos, bufsz - pos, |
244 | "frame_count\twait_for_ba\t"); | 245 | "\tframe_count\twait_for_ba\t"); |
245 | pos += scnprintf(buf + pos, bufsz - pos, | 246 | pos += scnprintf(buf + pos, bufsz - pos, |
246 | "start_idx\tbitmap0\t"); | 247 | "start_idx\tbitmap0\t"); |
247 | pos += scnprintf(buf + pos, bufsz - pos, | 248 | pos += scnprintf(buf + pos, bufsz - pos, |
248 | "bitmap1\trate_n_flags\n"); | 249 | "bitmap1\trate_n_flags"); |
250 | #endif | ||
251 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); | ||
249 | 252 | ||
250 | for (j = 0; j < MAX_TID_COUNT; j++) { | 253 | for (j = 0; j < MAX_TID_COUNT; j++) { |
251 | pos += scnprintf(buf + pos, bufsz - pos, | 254 | pos += scnprintf(buf + pos, bufsz - pos, |
252 | "[%d]:\t\t%u\t", j, | 255 | "[%d]:\t\t%u", j, |
253 | station->tid[j].seq_number); | 256 | station->tid[j].seq_number); |
257 | #ifdef CONFIG_IWL4965_HT | ||
254 | pos += scnprintf(buf + pos, bufsz - pos, | 258 | pos += scnprintf(buf + pos, bufsz - pos, |
255 | "%u\t\t%u\t\t%u\t\t", | 259 | "\t%u\t\t%u\t\t%u\t\t", |
256 | station->tid[j].agg.txq_id, | 260 | station->tid[j].agg.txq_id, |
257 | station->tid[j].agg.frame_count, | 261 | station->tid[j].agg.frame_count, |
258 | station->tid[j].agg.wait_for_ba); | 262 | station->tid[j].agg.wait_for_ba); |
259 | pos += scnprintf(buf + pos, bufsz - pos, | 263 | pos += scnprintf(buf + pos, bufsz - pos, |
260 | "%u\t%llu\t%u\n", | 264 | "%u\t%llu\t%u", |
261 | station->tid[j].agg.start_idx, | 265 | station->tid[j].agg.start_idx, |
262 | (unsigned long long)station->tid[j].agg.bitmap, | 266 | (unsigned long long)station->tid[j].agg.bitmap, |
263 | station->tid[j].agg.rate_n_flags); | 267 | station->tid[j].agg.rate_n_flags); |
268 | #endif | ||
269 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); | ||
264 | } | 270 | } |
265 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); | 271 | pos += scnprintf(buf + pos, bufsz - pos, "\n"); |
266 | } | 272 | } |