diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-11 12:20:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-11 12:20:29 -0500 |
commit | 0a4cf2c8786219b4871c37240ab9787a61d843ee (patch) | |
tree | a126516733f3a757711754bbac189417c79d8bcb | |
parent | 4694516d1987303dd83bfd0efdd36fa5b65d701b (diff) | |
parent | df02c6ff2e3937379b31ea161b53229134fe92f7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
dsa: fix master interface allmulti/promisc handling
dsa: fix skb->pkt_type when mac address of slave interface differs
net: fix setting of skb->tail in skb_recycle_check()
net: fix /proc/net/snmp as memory corruptor
mac80211: fix a buffer overrun in station debug code
netfilter: payload_len is be16, add size of struct rather than size of pointer
ipv6: fix ip6_mr_init error path
[4/4] dca: fixup initialization dependency
[3/4] I/OAT: fix async_tx.callback checking
[2/4] I/OAT: fix dma_pin_iovec_pages() error handling
[1/4] I/OAT: fix channel resources free for not allocated channels
ssb: Fix DMA-API compilation for non-PCI systems
SSB: hide empty sub menu
vlan: Fix typos in proc output string
[netdrvr] usb/hso: Cleanup rfkill error handling
sfc: Correct address of gPXE boot configuration in EEPROM
el3_common_init() should be __devinit, not __init
hso: rfkill type should be WWAN
mlx4_en: Start port error flow bug fix
af_key: mark policy as dead before destroying
-rw-r--r-- | drivers/dca/dca-core.c | 2 | ||||
-rw-r--r-- | drivers/dma/ioat_dma.c | 11 | ||||
-rw-r--r-- | drivers/dma/iovlock.c | 17 | ||||
-rw-r--r-- | drivers/net/mlx4/en_netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/sfc/ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 12 | ||||
-rw-r--r-- | drivers/ssb/Kconfig | 5 | ||||
-rw-r--r-- | include/linux/ssb/ssb.h | 42 | ||||
-rw-r--r-- | net/8021q/vlanproc.c | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 | ||||
-rw-r--r-- | net/dsa/slave.c | 72 | ||||
-rw-r--r-- | net/dsa/tag_dsa.c | 1 | ||||
-rw-r--r-- | net/dsa/tag_edsa.c | 1 | ||||
-rw-r--r-- | net/dsa/tag_trailer.c | 1 | ||||
-rw-r--r-- | net/ipv4/proc.c | 58 | ||||
-rw-r--r-- | net/ipv6/ip6mr.c | 9 | ||||
-rw-r--r-- | net/key/af_key.c | 1 | ||||
-rw-r--r-- | net/mac80211/debugfs_sta.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_xmit.c | 3 |
19 files changed, 178 insertions, 69 deletions
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index ec249d2db633..d883e1b8bb8c 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c | |||
@@ -270,6 +270,6 @@ static void __exit dca_exit(void) | |||
270 | dca_sysfs_exit(); | 270 | dca_sysfs_exit(); |
271 | } | 271 | } |
272 | 272 | ||
273 | module_init(dca_init); | 273 | subsys_initcall(dca_init); |
274 | module_exit(dca_exit); | 274 | module_exit(dca_exit); |
275 | 275 | ||
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index b0438c4f0c30..ecd743f7cc61 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c | |||
@@ -525,7 +525,7 @@ static dma_cookie_t ioat1_tx_submit(struct dma_async_tx_descriptor *tx) | |||
525 | } | 525 | } |
526 | 526 | ||
527 | hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS; | 527 | hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS; |
528 | if (new->async_tx.callback) { | 528 | if (first->async_tx.callback) { |
529 | hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN; | 529 | hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN; |
530 | if (first != new) { | 530 | if (first != new) { |
531 | /* move callback into to last desc */ | 531 | /* move callback into to last desc */ |
@@ -617,7 +617,7 @@ static dma_cookie_t ioat2_tx_submit(struct dma_async_tx_descriptor *tx) | |||
617 | } | 617 | } |
618 | 618 | ||
619 | hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_CP_STS; | 619 | hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_CP_STS; |
620 | if (new->async_tx.callback) { | 620 | if (first->async_tx.callback) { |
621 | hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN; | 621 | hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN; |
622 | if (first != new) { | 622 | if (first != new) { |
623 | /* move callback into to last desc */ | 623 | /* move callback into to last desc */ |
@@ -807,6 +807,12 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan) | |||
807 | struct ioat_desc_sw *desc, *_desc; | 807 | struct ioat_desc_sw *desc, *_desc; |
808 | int in_use_descs = 0; | 808 | int in_use_descs = 0; |
809 | 809 | ||
810 | /* Before freeing channel resources first check | ||
811 | * if they have been previously allocated for this channel. | ||
812 | */ | ||
813 | if (ioat_chan->desccount == 0) | ||
814 | return; | ||
815 | |||
810 | tasklet_disable(&ioat_chan->cleanup_task); | 816 | tasklet_disable(&ioat_chan->cleanup_task); |
811 | ioat_dma_memcpy_cleanup(ioat_chan); | 817 | ioat_dma_memcpy_cleanup(ioat_chan); |
812 | 818 | ||
@@ -869,6 +875,7 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan) | |||
869 | ioat_chan->last_completion = ioat_chan->completion_addr = 0; | 875 | ioat_chan->last_completion = ioat_chan->completion_addr = 0; |
870 | ioat_chan->pending = 0; | 876 | ioat_chan->pending = 0; |
871 | ioat_chan->dmacount = 0; | 877 | ioat_chan->dmacount = 0; |
878 | ioat_chan->desccount = 0; | ||
872 | ioat_chan->watchdog_completion = 0; | 879 | ioat_chan->watchdog_completion = 0; |
873 | ioat_chan->last_compl_desc_addr_hw = 0; | 880 | ioat_chan->last_compl_desc_addr_hw = 0; |
874 | ioat_chan->watchdog_tcp_cookie = | 881 | ioat_chan->watchdog_tcp_cookie = |
diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c index e763d723e4cf..9f6fe46a9b87 100644 --- a/drivers/dma/iovlock.c +++ b/drivers/dma/iovlock.c | |||
@@ -55,7 +55,6 @@ struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len) | |||
55 | int nr_iovecs = 0; | 55 | int nr_iovecs = 0; |
56 | int iovec_len_used = 0; | 56 | int iovec_len_used = 0; |
57 | int iovec_pages_used = 0; | 57 | int iovec_pages_used = 0; |
58 | long err; | ||
59 | 58 | ||
60 | /* don't pin down non-user-based iovecs */ | 59 | /* don't pin down non-user-based iovecs */ |
61 | if (segment_eq(get_fs(), KERNEL_DS)) | 60 | if (segment_eq(get_fs(), KERNEL_DS)) |
@@ -72,23 +71,21 @@ struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len) | |||
72 | local_list = kmalloc(sizeof(*local_list) | 71 | local_list = kmalloc(sizeof(*local_list) |
73 | + (nr_iovecs * sizeof (struct dma_page_list)) | 72 | + (nr_iovecs * sizeof (struct dma_page_list)) |
74 | + (iovec_pages_used * sizeof (struct page*)), GFP_KERNEL); | 73 | + (iovec_pages_used * sizeof (struct page*)), GFP_KERNEL); |
75 | if (!local_list) { | 74 | if (!local_list) |
76 | err = -ENOMEM; | ||
77 | goto out; | 75 | goto out; |
78 | } | ||
79 | 76 | ||
80 | /* list of pages starts right after the page list array */ | 77 | /* list of pages starts right after the page list array */ |
81 | pages = (struct page **) &local_list->page_list[nr_iovecs]; | 78 | pages = (struct page **) &local_list->page_list[nr_iovecs]; |
82 | 79 | ||
80 | local_list->nr_iovecs = 0; | ||
81 | |||
83 | for (i = 0; i < nr_iovecs; i++) { | 82 | for (i = 0; i < nr_iovecs; i++) { |
84 | struct dma_page_list *page_list = &local_list->page_list[i]; | 83 | struct dma_page_list *page_list = &local_list->page_list[i]; |
85 | 84 | ||
86 | len -= iov[i].iov_len; | 85 | len -= iov[i].iov_len; |
87 | 86 | ||
88 | if (!access_ok(VERIFY_WRITE, iov[i].iov_base, iov[i].iov_len)) { | 87 | if (!access_ok(VERIFY_WRITE, iov[i].iov_base, iov[i].iov_len)) |
89 | err = -EFAULT; | ||
90 | goto unpin; | 88 | goto unpin; |
91 | } | ||
92 | 89 | ||
93 | page_list->nr_pages = num_pages_spanned(&iov[i]); | 90 | page_list->nr_pages = num_pages_spanned(&iov[i]); |
94 | page_list->base_address = iov[i].iov_base; | 91 | page_list->base_address = iov[i].iov_base; |
@@ -109,10 +106,8 @@ struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len) | |||
109 | NULL); | 106 | NULL); |
110 | up_read(¤t->mm->mmap_sem); | 107 | up_read(¤t->mm->mmap_sem); |
111 | 108 | ||
112 | if (ret != page_list->nr_pages) { | 109 | if (ret != page_list->nr_pages) |
113 | err = -ENOMEM; | ||
114 | goto unpin; | 110 | goto unpin; |
115 | } | ||
116 | 111 | ||
117 | local_list->nr_iovecs = i + 1; | 112 | local_list->nr_iovecs = i + 1; |
118 | } | 113 | } |
@@ -122,7 +117,7 @@ struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len) | |||
122 | unpin: | 117 | unpin: |
123 | dma_unpin_iovec_pages(local_list); | 118 | dma_unpin_iovec_pages(local_list); |
124 | out: | 119 | out: |
125 | return ERR_PTR(err); | 120 | return NULL; |
126 | } | 121 | } |
127 | 122 | ||
128 | void dma_unpin_iovec_pages(struct dma_pinned_list *pinned_list) | 123 | void dma_unpin_iovec_pages(struct dma_pinned_list *pinned_list) |
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index a339afbeed38..a3f732418c49 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -706,7 +706,7 @@ tx_err: | |||
706 | mlx4_en_release_rss_steer(priv); | 706 | mlx4_en_release_rss_steer(priv); |
707 | rx_err: | 707 | rx_err: |
708 | for (i = 0; i < priv->rx_ring_num; i++) | 708 | for (i = 0; i < priv->rx_ring_num; i++) |
709 | mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[rx_index]); | 709 | mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[i]); |
710 | cq_err: | 710 | cq_err: |
711 | while (rx_index--) | 711 | while (rx_index--) |
712 | mlx4_en_deactivate_cq(priv, &priv->rx_cq[rx_index]); | 712 | mlx4_en_deactivate_cq(priv, &priv->rx_cq[rx_index]); |
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index fa98af58223e..cd0d0873d978 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -174,8 +174,8 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = { | |||
174 | 174 | ||
175 | /* EEPROM range with gPXE configuration */ | 175 | /* EEPROM range with gPXE configuration */ |
176 | #define EFX_ETHTOOL_EEPROM_MAGIC 0xEFAB | 176 | #define EFX_ETHTOOL_EEPROM_MAGIC 0xEFAB |
177 | #define EFX_ETHTOOL_EEPROM_MIN 0x100U | 177 | #define EFX_ETHTOOL_EEPROM_MIN 0x800U |
178 | #define EFX_ETHTOOL_EEPROM_MAX 0x400U | 178 | #define EFX_ETHTOOL_EEPROM_MAX 0x1800U |
179 | 179 | ||
180 | /************************************************************************** | 180 | /************************************************************************** |
181 | * | 181 | * |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 1164c52e2c0a..8e90891f0e42 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -2184,19 +2184,20 @@ static void hso_create_rfkill(struct hso_device *hso_dev, | |||
2184 | struct usb_interface *interface) | 2184 | struct usb_interface *interface) |
2185 | { | 2185 | { |
2186 | struct hso_net *hso_net = dev2net(hso_dev); | 2186 | struct hso_net *hso_net = dev2net(hso_dev); |
2187 | struct device *dev = hso_dev->dev; | 2187 | struct device *dev = &hso_net->net->dev; |
2188 | char *rfkn; | 2188 | char *rfkn; |
2189 | 2189 | ||
2190 | hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev, | 2190 | hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev, |
2191 | RFKILL_TYPE_WLAN); | 2191 | RFKILL_TYPE_WWAN); |
2192 | if (!hso_net->rfkill) { | 2192 | if (!hso_net->rfkill) { |
2193 | dev_err(dev, "%s - Out of memory", __func__); | 2193 | dev_err(dev, "%s - Out of memory\n", __func__); |
2194 | return; | 2194 | return; |
2195 | } | 2195 | } |
2196 | rfkn = kzalloc(20, GFP_KERNEL); | 2196 | rfkn = kzalloc(20, GFP_KERNEL); |
2197 | if (!rfkn) { | 2197 | if (!rfkn) { |
2198 | rfkill_free(hso_net->rfkill); | 2198 | rfkill_free(hso_net->rfkill); |
2199 | dev_err(dev, "%s - Out of memory", __func__); | 2199 | hso_net->rfkill = NULL; |
2200 | dev_err(dev, "%s - Out of memory\n", __func__); | ||
2200 | return; | 2201 | return; |
2201 | } | 2202 | } |
2202 | snprintf(rfkn, 20, "hso-%d", | 2203 | snprintf(rfkn, 20, "hso-%d", |
@@ -2209,7 +2210,8 @@ static void hso_create_rfkill(struct hso_device *hso_dev, | |||
2209 | kfree(rfkn); | 2210 | kfree(rfkn); |
2210 | hso_net->rfkill->name = NULL; | 2211 | hso_net->rfkill->name = NULL; |
2211 | rfkill_free(hso_net->rfkill); | 2212 | rfkill_free(hso_net->rfkill); |
2212 | dev_err(dev, "%s - Failed to register rfkill", __func__); | 2213 | hso_net->rfkill = NULL; |
2214 | dev_err(dev, "%s - Failed to register rfkill\n", __func__); | ||
2213 | return; | 2215 | return; |
2214 | } | 2216 | } |
2215 | } | 2217 | } |
diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig index 307b1f62d949..b1b947edcf01 100644 --- a/drivers/ssb/Kconfig +++ b/drivers/ssb/Kconfig | |||
@@ -1,10 +1,11 @@ | |||
1 | menu "Sonics Silicon Backplane" | ||
2 | |||
3 | config SSB_POSSIBLE | 1 | config SSB_POSSIBLE |
4 | bool | 2 | bool |
5 | depends on HAS_IOMEM && HAS_DMA | 3 | depends on HAS_IOMEM && HAS_DMA |
6 | default y | 4 | default y |
7 | 5 | ||
6 | menu "Sonics Silicon Backplane" | ||
7 | depends on SSB_POSSIBLE | ||
8 | |||
8 | config SSB | 9 | config SSB |
9 | tristate "Sonics Silicon Backplane support" | 10 | tristate "Sonics Silicon Backplane support" |
10 | depends on SSB_POSSIBLE | 11 | depends on SSB_POSSIBLE |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index e530026eedf7..17d9b58f6379 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -427,12 +427,16 @@ static inline int ssb_dma_mapping_error(struct ssb_device *dev, dma_addr_t addr) | |||
427 | { | 427 | { |
428 | switch (dev->bus->bustype) { | 428 | switch (dev->bus->bustype) { |
429 | case SSB_BUSTYPE_PCI: | 429 | case SSB_BUSTYPE_PCI: |
430 | #ifdef CONFIG_SSB_PCIHOST | ||
430 | return pci_dma_mapping_error(dev->bus->host_pci, addr); | 431 | return pci_dma_mapping_error(dev->bus->host_pci, addr); |
432 | #endif | ||
433 | break; | ||
431 | case SSB_BUSTYPE_SSB: | 434 | case SSB_BUSTYPE_SSB: |
432 | return dma_mapping_error(dev->dev, addr); | 435 | return dma_mapping_error(dev->dev, addr); |
433 | default: | 436 | default: |
434 | __ssb_dma_not_implemented(dev); | 437 | break; |
435 | } | 438 | } |
439 | __ssb_dma_not_implemented(dev); | ||
436 | return -ENOSYS; | 440 | return -ENOSYS; |
437 | } | 441 | } |
438 | 442 | ||
@@ -441,12 +445,16 @@ static inline dma_addr_t ssb_dma_map_single(struct ssb_device *dev, void *p, | |||
441 | { | 445 | { |
442 | switch (dev->bus->bustype) { | 446 | switch (dev->bus->bustype) { |
443 | case SSB_BUSTYPE_PCI: | 447 | case SSB_BUSTYPE_PCI: |
448 | #ifdef CONFIG_SSB_PCIHOST | ||
444 | return pci_map_single(dev->bus->host_pci, p, size, dir); | 449 | return pci_map_single(dev->bus->host_pci, p, size, dir); |
450 | #endif | ||
451 | break; | ||
445 | case SSB_BUSTYPE_SSB: | 452 | case SSB_BUSTYPE_SSB: |
446 | return dma_map_single(dev->dev, p, size, dir); | 453 | return dma_map_single(dev->dev, p, size, dir); |
447 | default: | 454 | default: |
448 | __ssb_dma_not_implemented(dev); | 455 | break; |
449 | } | 456 | } |
457 | __ssb_dma_not_implemented(dev); | ||
450 | return 0; | 458 | return 0; |
451 | } | 459 | } |
452 | 460 | ||
@@ -455,14 +463,18 @@ static inline void ssb_dma_unmap_single(struct ssb_device *dev, dma_addr_t dma_a | |||
455 | { | 463 | { |
456 | switch (dev->bus->bustype) { | 464 | switch (dev->bus->bustype) { |
457 | case SSB_BUSTYPE_PCI: | 465 | case SSB_BUSTYPE_PCI: |
466 | #ifdef CONFIG_SSB_PCIHOST | ||
458 | pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir); | 467 | pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir); |
459 | return; | 468 | return; |
469 | #endif | ||
470 | break; | ||
460 | case SSB_BUSTYPE_SSB: | 471 | case SSB_BUSTYPE_SSB: |
461 | dma_unmap_single(dev->dev, dma_addr, size, dir); | 472 | dma_unmap_single(dev->dev, dma_addr, size, dir); |
462 | return; | 473 | return; |
463 | default: | 474 | default: |
464 | __ssb_dma_not_implemented(dev); | 475 | break; |
465 | } | 476 | } |
477 | __ssb_dma_not_implemented(dev); | ||
466 | } | 478 | } |
467 | 479 | ||
468 | static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev, | 480 | static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev, |
@@ -472,15 +484,19 @@ static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev, | |||
472 | { | 484 | { |
473 | switch (dev->bus->bustype) { | 485 | switch (dev->bus->bustype) { |
474 | case SSB_BUSTYPE_PCI: | 486 | case SSB_BUSTYPE_PCI: |
487 | #ifdef CONFIG_SSB_PCIHOST | ||
475 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, | 488 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, |
476 | size, dir); | 489 | size, dir); |
477 | return; | 490 | return; |
491 | #endif | ||
492 | break; | ||
478 | case SSB_BUSTYPE_SSB: | 493 | case SSB_BUSTYPE_SSB: |
479 | dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir); | 494 | dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir); |
480 | return; | 495 | return; |
481 | default: | 496 | default: |
482 | __ssb_dma_not_implemented(dev); | 497 | break; |
483 | } | 498 | } |
499 | __ssb_dma_not_implemented(dev); | ||
484 | } | 500 | } |
485 | 501 | ||
486 | static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev, | 502 | static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev, |
@@ -490,15 +506,19 @@ static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev, | |||
490 | { | 506 | { |
491 | switch (dev->bus->bustype) { | 507 | switch (dev->bus->bustype) { |
492 | case SSB_BUSTYPE_PCI: | 508 | case SSB_BUSTYPE_PCI: |
509 | #ifdef CONFIG_SSB_PCIHOST | ||
493 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, | 510 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, |
494 | size, dir); | 511 | size, dir); |
495 | return; | 512 | return; |
513 | #endif | ||
514 | break; | ||
496 | case SSB_BUSTYPE_SSB: | 515 | case SSB_BUSTYPE_SSB: |
497 | dma_sync_single_for_device(dev->dev, dma_addr, size, dir); | 516 | dma_sync_single_for_device(dev->dev, dma_addr, size, dir); |
498 | return; | 517 | return; |
499 | default: | 518 | default: |
500 | __ssb_dma_not_implemented(dev); | 519 | break; |
501 | } | 520 | } |
521 | __ssb_dma_not_implemented(dev); | ||
502 | } | 522 | } |
503 | 523 | ||
504 | static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev, | 524 | static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev, |
@@ -509,17 +529,21 @@ static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev, | |||
509 | { | 529 | { |
510 | switch (dev->bus->bustype) { | 530 | switch (dev->bus->bustype) { |
511 | case SSB_BUSTYPE_PCI: | 531 | case SSB_BUSTYPE_PCI: |
532 | #ifdef CONFIG_SSB_PCIHOST | ||
512 | /* Just sync everything. That's all the PCI API can do. */ | 533 | /* Just sync everything. That's all the PCI API can do. */ |
513 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, | 534 | pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr, |
514 | offset + size, dir); | 535 | offset + size, dir); |
515 | return; | 536 | return; |
537 | #endif | ||
538 | break; | ||
516 | case SSB_BUSTYPE_SSB: | 539 | case SSB_BUSTYPE_SSB: |
517 | dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset, | 540 | dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset, |
518 | size, dir); | 541 | size, dir); |
519 | return; | 542 | return; |
520 | default: | 543 | default: |
521 | __ssb_dma_not_implemented(dev); | 544 | break; |
522 | } | 545 | } |
546 | __ssb_dma_not_implemented(dev); | ||
523 | } | 547 | } |
524 | 548 | ||
525 | static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev, | 549 | static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev, |
@@ -530,17 +554,21 @@ static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev, | |||
530 | { | 554 | { |
531 | switch (dev->bus->bustype) { | 555 | switch (dev->bus->bustype) { |
532 | case SSB_BUSTYPE_PCI: | 556 | case SSB_BUSTYPE_PCI: |
557 | #ifdef CONFIG_SSB_PCIHOST | ||
533 | /* Just sync everything. That's all the PCI API can do. */ | 558 | /* Just sync everything. That's all the PCI API can do. */ |
534 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, | 559 | pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr, |
535 | offset + size, dir); | 560 | offset + size, dir); |
536 | return; | 561 | return; |
562 | #endif | ||
563 | break; | ||
537 | case SSB_BUSTYPE_SSB: | 564 | case SSB_BUSTYPE_SSB: |
538 | dma_sync_single_range_for_device(dev->dev, dma_addr, offset, | 565 | dma_sync_single_range_for_device(dev->dev, dma_addr, offset, |
539 | size, dir); | 566 | size, dir); |
540 | return; | 567 | return; |
541 | default: | 568 | default: |
542 | __ssb_dma_not_implemented(dev); | 569 | break; |
543 | } | 570 | } |
571 | __ssb_dma_not_implemented(dev); | ||
544 | } | 572 | } |
545 | 573 | ||
546 | 574 | ||
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 0feefa4e1a4b..3628e0a81b40 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -314,7 +314,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) | |||
314 | dev_info->ingress_priority_map[6], | 314 | dev_info->ingress_priority_map[6], |
315 | dev_info->ingress_priority_map[7]); | 315 | dev_info->ingress_priority_map[7]); |
316 | 316 | ||
317 | seq_printf(seq, "EGRESSS priority Mappings: "); | 317 | seq_printf(seq, " EGRESS priority mappings: "); |
318 | for (i = 0; i < 16; i++) { | 318 | for (i = 0; i < 16; i++) { |
319 | const struct vlan_priority_tci_mapping *mp | 319 | const struct vlan_priority_tci_mapping *mp |
320 | = dev_info->egress_priority_map[i]; | 320 | = dev_info->egress_priority_map[i]; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index ebb6b94f8af2..d49ef8301b5b 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -486,8 +486,8 @@ int skb_recycle_check(struct sk_buff *skb, int skb_size) | |||
486 | shinfo->frag_list = NULL; | 486 | shinfo->frag_list = NULL; |
487 | 487 | ||
488 | memset(skb, 0, offsetof(struct sk_buff, tail)); | 488 | memset(skb, 0, offsetof(struct sk_buff, tail)); |
489 | skb_reset_tail_pointer(skb); | ||
490 | skb->data = skb->head + NET_SKB_PAD; | 489 | skb->data = skb->head + NET_SKB_PAD; |
490 | skb_reset_tail_pointer(skb); | ||
491 | 491 | ||
492 | return 1; | 492 | return 1; |
493 | } | 493 | } |
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 37616884b8a9..1af5a79309e9 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/etherdevice.h> | ||
13 | #include <linux/phy.h> | 14 | #include <linux/phy.h> |
14 | #include "dsa_priv.h" | 15 | #include "dsa_priv.h" |
15 | 16 | ||
@@ -49,11 +50,57 @@ void dsa_slave_mii_bus_init(struct dsa_switch *ds) | |||
49 | /* slave device handling ****************************************************/ | 50 | /* slave device handling ****************************************************/ |
50 | static int dsa_slave_open(struct net_device *dev) | 51 | static int dsa_slave_open(struct net_device *dev) |
51 | { | 52 | { |
53 | struct dsa_slave_priv *p = netdev_priv(dev); | ||
54 | struct net_device *master = p->parent->master_netdev; | ||
55 | int err; | ||
56 | |||
57 | if (!(master->flags & IFF_UP)) | ||
58 | return -ENETDOWN; | ||
59 | |||
60 | if (compare_ether_addr(dev->dev_addr, master->dev_addr)) { | ||
61 | err = dev_unicast_add(master, dev->dev_addr, ETH_ALEN); | ||
62 | if (err < 0) | ||
63 | goto out; | ||
64 | } | ||
65 | |||
66 | if (dev->flags & IFF_ALLMULTI) { | ||
67 | err = dev_set_allmulti(master, 1); | ||
68 | if (err < 0) | ||
69 | goto del_unicast; | ||
70 | } | ||
71 | if (dev->flags & IFF_PROMISC) { | ||
72 | err = dev_set_promiscuity(master, 1); | ||
73 | if (err < 0) | ||
74 | goto clear_allmulti; | ||
75 | } | ||
76 | |||
52 | return 0; | 77 | return 0; |
78 | |||
79 | clear_allmulti: | ||
80 | if (dev->flags & IFF_ALLMULTI) | ||
81 | dev_set_allmulti(master, -1); | ||
82 | del_unicast: | ||
83 | if (compare_ether_addr(dev->dev_addr, master->dev_addr)) | ||
84 | dev_unicast_delete(master, dev->dev_addr, ETH_ALEN); | ||
85 | out: | ||
86 | return err; | ||
53 | } | 87 | } |
54 | 88 | ||
55 | static int dsa_slave_close(struct net_device *dev) | 89 | static int dsa_slave_close(struct net_device *dev) |
56 | { | 90 | { |
91 | struct dsa_slave_priv *p = netdev_priv(dev); | ||
92 | struct net_device *master = p->parent->master_netdev; | ||
93 | |||
94 | dev_mc_unsync(master, dev); | ||
95 | dev_unicast_unsync(master, dev); | ||
96 | if (dev->flags & IFF_ALLMULTI) | ||
97 | dev_set_allmulti(master, -1); | ||
98 | if (dev->flags & IFF_PROMISC) | ||
99 | dev_set_promiscuity(master, -1); | ||
100 | |||
101 | if (compare_ether_addr(dev->dev_addr, master->dev_addr)) | ||
102 | dev_unicast_delete(master, dev->dev_addr, ETH_ALEN); | ||
103 | |||
57 | return 0; | 104 | return 0; |
58 | } | 105 | } |
59 | 106 | ||
@@ -77,9 +124,30 @@ static void dsa_slave_set_rx_mode(struct net_device *dev) | |||
77 | dev_unicast_sync(master, dev); | 124 | dev_unicast_sync(master, dev); |
78 | } | 125 | } |
79 | 126 | ||
80 | static int dsa_slave_set_mac_address(struct net_device *dev, void *addr) | 127 | static int dsa_slave_set_mac_address(struct net_device *dev, void *a) |
81 | { | 128 | { |
82 | memcpy(dev->dev_addr, addr + 2, 6); | 129 | struct dsa_slave_priv *p = netdev_priv(dev); |
130 | struct net_device *master = p->parent->master_netdev; | ||
131 | struct sockaddr *addr = a; | ||
132 | int err; | ||
133 | |||
134 | if (!is_valid_ether_addr(addr->sa_data)) | ||
135 | return -EADDRNOTAVAIL; | ||
136 | |||
137 | if (!(dev->flags & IFF_UP)) | ||
138 | goto out; | ||
139 | |||
140 | if (compare_ether_addr(addr->sa_data, master->dev_addr)) { | ||
141 | err = dev_unicast_add(master, addr->sa_data, ETH_ALEN); | ||
142 | if (err < 0) | ||
143 | return err; | ||
144 | } | ||
145 | |||
146 | if (compare_ether_addr(dev->dev_addr, master->dev_addr)) | ||
147 | dev_unicast_delete(master, dev->dev_addr, ETH_ALEN); | ||
148 | |||
149 | out: | ||
150 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); | ||
83 | 151 | ||
84 | return 0; | 152 | return 0; |
85 | } | 153 | } |
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index bdc0510b53b7..31866543332e 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c | |||
@@ -159,6 +159,7 @@ static int dsa_rcv(struct sk_buff *skb, struct net_device *dev, | |||
159 | 159 | ||
160 | skb->dev = ds->ports[source_port]; | 160 | skb->dev = ds->ports[source_port]; |
161 | skb_push(skb, ETH_HLEN); | 161 | skb_push(skb, ETH_HLEN); |
162 | skb->pkt_type = PACKET_HOST; | ||
162 | skb->protocol = eth_type_trans(skb, skb->dev); | 163 | skb->protocol = eth_type_trans(skb, skb->dev); |
163 | 164 | ||
164 | skb->dev->last_rx = jiffies; | 165 | skb->dev->last_rx = jiffies; |
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index f985ea993843..9f4ce55eae59 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c | |||
@@ -178,6 +178,7 @@ static int edsa_rcv(struct sk_buff *skb, struct net_device *dev, | |||
178 | 178 | ||
179 | skb->dev = ds->ports[source_port]; | 179 | skb->dev = ds->ports[source_port]; |
180 | skb_push(skb, ETH_HLEN); | 180 | skb_push(skb, ETH_HLEN); |
181 | skb->pkt_type = PACKET_HOST; | ||
181 | skb->protocol = eth_type_trans(skb, skb->dev); | 182 | skb->protocol = eth_type_trans(skb, skb->dev); |
182 | 183 | ||
183 | skb->dev->last_rx = jiffies; | 184 | skb->dev->last_rx = jiffies; |
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c index d3117764b2c2..efd26697e716 100644 --- a/net/dsa/tag_trailer.c +++ b/net/dsa/tag_trailer.c | |||
@@ -95,6 +95,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev, | |||
95 | 95 | ||
96 | skb->dev = ds->ports[source_port]; | 96 | skb->dev = ds->ports[source_port]; |
97 | skb_push(skb, ETH_HLEN); | 97 | skb_push(skb, ETH_HLEN); |
98 | skb->pkt_type = PACKET_HOST; | ||
98 | skb->protocol = eth_type_trans(skb, skb->dev); | 99 | skb->protocol = eth_type_trans(skb, skb->dev); |
99 | 100 | ||
100 | skb->dev->last_rx = jiffies; | 101 | skb->dev->last_rx = jiffies; |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 8f5a403f6f6b..a631a1f110ca 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -237,43 +237,45 @@ static const struct snmp_mib snmp4_net_list[] = { | |||
237 | SNMP_MIB_SENTINEL | 237 | SNMP_MIB_SENTINEL |
238 | }; | 238 | }; |
239 | 239 | ||
240 | static void icmpmsg_put_line(struct seq_file *seq, unsigned long *vals, | ||
241 | unsigned short *type, int count) | ||
242 | { | ||
243 | int j; | ||
244 | |||
245 | if (count) { | ||
246 | seq_printf(seq, "\nIcmpMsg:"); | ||
247 | for (j = 0; j < count; ++j) | ||
248 | seq_printf(seq, " %sType%u", | ||
249 | type[j] & 0x100 ? "Out" : "In", | ||
250 | type[j] & 0xff); | ||
251 | seq_printf(seq, "\nIcmpMsg:"); | ||
252 | for (j = 0; j < count; ++j) | ||
253 | seq_printf(seq, " %lu", vals[j]); | ||
254 | } | ||
255 | } | ||
256 | |||
240 | static void icmpmsg_put(struct seq_file *seq) | 257 | static void icmpmsg_put(struct seq_file *seq) |
241 | { | 258 | { |
242 | #define PERLINE 16 | 259 | #define PERLINE 16 |
243 | 260 | ||
244 | int j, i, count; | 261 | int i, count; |
245 | static int out[PERLINE]; | 262 | unsigned short type[PERLINE]; |
263 | unsigned long vals[PERLINE], val; | ||
246 | struct net *net = seq->private; | 264 | struct net *net = seq->private; |
247 | 265 | ||
248 | count = 0; | 266 | count = 0; |
249 | for (i = 0; i < ICMPMSG_MIB_MAX; i++) { | 267 | for (i = 0; i < ICMPMSG_MIB_MAX; i++) { |
250 | 268 | val = snmp_fold_field((void **) net->mib.icmpmsg_statistics, i); | |
251 | if (snmp_fold_field((void **) net->mib.icmpmsg_statistics, i)) | 269 | if (val) { |
252 | out[count++] = i; | 270 | type[count] = i; |
253 | if (count < PERLINE) | 271 | vals[count++] = val; |
254 | continue; | 272 | } |
255 | 273 | if (count == PERLINE) { | |
256 | seq_printf(seq, "\nIcmpMsg:"); | 274 | icmpmsg_put_line(seq, vals, type, count); |
257 | for (j = 0; j < PERLINE; ++j) | 275 | count = 0; |
258 | seq_printf(seq, " %sType%u", i & 0x100 ? "Out" : "In", | 276 | } |
259 | i & 0xff); | ||
260 | seq_printf(seq, "\nIcmpMsg: "); | ||
261 | for (j = 0; j < PERLINE; ++j) | ||
262 | seq_printf(seq, " %lu", | ||
263 | snmp_fold_field((void **) net->mib.icmpmsg_statistics, | ||
264 | out[j])); | ||
265 | seq_putc(seq, '\n'); | ||
266 | } | ||
267 | if (count) { | ||
268 | seq_printf(seq, "\nIcmpMsg:"); | ||
269 | for (j = 0; j < count; ++j) | ||
270 | seq_printf(seq, " %sType%u", out[j] & 0x100 ? "Out" : | ||
271 | "In", out[j] & 0xff); | ||
272 | seq_printf(seq, "\nIcmpMsg:"); | ||
273 | for (j = 0; j < count; ++j) | ||
274 | seq_printf(seq, " %lu", snmp_fold_field((void **) | ||
275 | net->mib.icmpmsg_statistics, out[j])); | ||
276 | } | 277 | } |
278 | icmpmsg_put_line(seq, vals, type, count); | ||
277 | 279 | ||
278 | #undef PERLINE | 280 | #undef PERLINE |
279 | } | 281 | } |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 182f8a177e7f..52a7eb0e2c2c 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -981,14 +981,15 @@ int __init ip6_mr_init(void) | |||
981 | goto proc_cache_fail; | 981 | goto proc_cache_fail; |
982 | #endif | 982 | #endif |
983 | return 0; | 983 | return 0; |
984 | reg_notif_fail: | ||
985 | kmem_cache_destroy(mrt_cachep); | ||
986 | #ifdef CONFIG_PROC_FS | 984 | #ifdef CONFIG_PROC_FS |
987 | proc_vif_fail: | ||
988 | unregister_netdevice_notifier(&ip6_mr_notifier); | ||
989 | proc_cache_fail: | 985 | proc_cache_fail: |
990 | proc_net_remove(&init_net, "ip6_mr_vif"); | 986 | proc_net_remove(&init_net, "ip6_mr_vif"); |
987 | proc_vif_fail: | ||
988 | unregister_netdevice_notifier(&ip6_mr_notifier); | ||
991 | #endif | 989 | #endif |
990 | reg_notif_fail: | ||
991 | del_timer(&ipmr_expire_timer); | ||
992 | kmem_cache_destroy(mrt_cachep); | ||
992 | return err; | 993 | return err; |
993 | } | 994 | } |
994 | 995 | ||
diff --git a/net/key/af_key.c b/net/key/af_key.c index 3440a4637f01..5b22e011653b 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -3188,6 +3188,7 @@ static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt, | |||
3188 | return xp; | 3188 | return xp; |
3189 | 3189 | ||
3190 | out: | 3190 | out: |
3191 | xp->walk.dead = 1; | ||
3191 | xfrm_policy_destroy(xp); | 3192 | xfrm_policy_destroy(xp); |
3192 | return NULL; | 3193 | return NULL; |
3193 | } | 3194 | } |
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 189d0bafa91a..b85c4f27b361 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -199,7 +199,7 @@ static ssize_t sta_agg_status_write(struct file *file, | |||
199 | /* toggle Rx aggregation command */ | 199 | /* toggle Rx aggregation command */ |
200 | tid_num = tid_num - 100; | 200 | tid_num = tid_num - 100; |
201 | if (tid_static_rx[tid_num] == 1) { | 201 | if (tid_static_rx[tid_num] == 1) { |
202 | strcpy(state, "off "); | 202 | strcpy(state, "off"); |
203 | ieee80211_sta_stop_rx_ba_session(sta->sdata, da, tid_num, 0, | 203 | ieee80211_sta_stop_rx_ba_session(sta->sdata, da, tid_num, 0, |
204 | WLAN_REASON_QSTA_REQUIRE_SETUP); | 204 | WLAN_REASON_QSTA_REQUIRE_SETUP); |
205 | sta->ampdu_mlme.tid_state_rx[tid_num] |= | 205 | sta->ampdu_mlme.tid_state_rx[tid_num] |= |
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c index 02ddc2b3ce2e..e90d52f199bc 100644 --- a/net/netfilter/ipvs/ip_vs_xmit.c +++ b/net/netfilter/ipvs/ip_vs_xmit.c | |||
@@ -713,7 +713,8 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, | |||
713 | iph = ipv6_hdr(skb); | 713 | iph = ipv6_hdr(skb); |
714 | iph->version = 6; | 714 | iph->version = 6; |
715 | iph->nexthdr = IPPROTO_IPV6; | 715 | iph->nexthdr = IPPROTO_IPV6; |
716 | iph->payload_len = old_iph->payload_len + sizeof(old_iph); | 716 | iph->payload_len = old_iph->payload_len; |
717 | be16_add_cpu(&iph->payload_len, sizeof(*old_iph)); | ||
717 | iph->priority = old_iph->priority; | 718 | iph->priority = old_iph->priority; |
718 | memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl)); | 719 | memset(&iph->flow_lbl, 0, sizeof(iph->flow_lbl)); |
719 | iph->daddr = rt->rt6i_dst.addr; | 720 | iph->daddr = rt->rt6i_dst.addr; |