diff options
30 files changed, 214 insertions, 125 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 77f277e1b4b9..e18baa410b50 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1545,6 +1545,13 @@ W: http://www.fi.muni.cz/~kas/cosa/ | |||
1545 | S: Maintained | 1545 | S: Maintained |
1546 | F: drivers/net/wan/cosa* | 1546 | F: drivers/net/wan/cosa* |
1547 | 1547 | ||
1548 | CPMAC ETHERNET DRIVER | ||
1549 | P: Florian Fainelli | ||
1550 | M: florian@openwrt.org | ||
1551 | L: netdev@vger.kernel.org | ||
1552 | S: Maintained | ||
1553 | F: drivers/net/cpmac.c | ||
1554 | |||
1548 | CPU FREQUENCY DRIVERS | 1555 | CPU FREQUENCY DRIVERS |
1549 | P: Dave Jones | 1556 | P: Dave Jones |
1550 | M: davej@redhat.com | 1557 | M: davej@redhat.com |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 8d9aa49de145..d2137efbd455 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -480,9 +480,13 @@ static int pnp_registered; | |||
480 | 480 | ||
481 | #ifdef CONFIG_EISA | 481 | #ifdef CONFIG_EISA |
482 | static struct eisa_device_id el3_eisa_ids[] = { | 482 | static struct eisa_device_id el3_eisa_ids[] = { |
483 | { "TCM5090" }, | ||
484 | { "TCM5091" }, | ||
483 | { "TCM5092" }, | 485 | { "TCM5092" }, |
484 | { "TCM5093" }, | 486 | { "TCM5093" }, |
487 | { "TCM5094" }, | ||
485 | { "TCM5095" }, | 488 | { "TCM5095" }, |
489 | { "TCM5098" }, | ||
486 | { "" } | 490 | { "" } |
487 | }; | 491 | }; |
488 | MODULE_DEVICE_TABLE(eisa, el3_eisa_ids); | 492 | MODULE_DEVICE_TABLE(eisa, el3_eisa_ids); |
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index f07a1e956417..774c2b45bdb8 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
@@ -105,7 +105,7 @@ obj-$(CONFIG_HAMACHI) += hamachi.o | |||
105 | obj-$(CONFIG_NET) += Space.o loopback.o | 105 | obj-$(CONFIG_NET) += Space.o loopback.o |
106 | obj-$(CONFIG_SEEQ8005) += seeq8005.o | 106 | obj-$(CONFIG_SEEQ8005) += seeq8005.o |
107 | obj-$(CONFIG_NET_SB1000) += sb1000.o | 107 | obj-$(CONFIG_NET_SB1000) += sb1000.o |
108 | obj-$(CONFIG_MAC8390) += mac8390.o 8390.o | 108 | obj-$(CONFIG_MAC8390) += mac8390.o |
109 | obj-$(CONFIG_APNE) += apne.o 8390.o | 109 | obj-$(CONFIG_APNE) += apne.o 8390.o |
110 | obj-$(CONFIG_PCMCIA_PCNET) += 8390.o | 110 | obj-$(CONFIG_PCMCIA_PCNET) += 8390.o |
111 | obj-$(CONFIG_HP100) += hp100.o | 111 | obj-$(CONFIG_HP100) += hp100.o |
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c index a01383d53a03..e1ae10cf30c1 100644 --- a/drivers/net/atl1e/atl1e_main.c +++ b/drivers/net/atl1e/atl1e_main.c | |||
@@ -37,6 +37,7 @@ char atl1e_driver_version[] = DRV_VERSION; | |||
37 | */ | 37 | */ |
38 | static struct pci_device_id atl1e_pci_tbl[] = { | 38 | static struct pci_device_id atl1e_pci_tbl[] = { |
39 | {PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATTANSIC_L1E)}, | 39 | {PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, PCI_DEVICE_ID_ATTANSIC_L1E)}, |
40 | {PCI_DEVICE(PCI_VENDOR_ID_ATTANSIC, 0x1066)}, | ||
40 | /* required last entry */ | 41 | /* required last entry */ |
41 | { 0 } | 42 | { 0 } |
42 | }; | 43 | }; |
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index fccfbf2cf932..560f3873d347 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -82,6 +82,12 @@ | |||
82 | 82 | ||
83 | #include "atl1.h" | 83 | #include "atl1.h" |
84 | 84 | ||
85 | #define ATLX_DRIVER_VERSION "2.1.3" | ||
86 | MODULE_AUTHOR("Xiong Huang <xiong.huang@atheros.com>, \ | ||
87 | Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>"); | ||
88 | MODULE_LICENSE("GPL"); | ||
89 | MODULE_VERSION(ATLX_DRIVER_VERSION); | ||
90 | |||
85 | /* Temporary hack for merging atl1 and atl2 */ | 91 | /* Temporary hack for merging atl1 and atl2 */ |
86 | #include "atlx.c" | 92 | #include "atlx.c" |
87 | 93 | ||
diff --git a/drivers/net/atlx/atlx.h b/drivers/net/atlx/atlx.h index 297a03da6b7f..14054b75aa62 100644 --- a/drivers/net/atlx/atlx.h +++ b/drivers/net/atlx/atlx.h | |||
@@ -29,12 +29,6 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | 31 | ||
32 | #define ATLX_DRIVER_VERSION "2.1.3" | ||
33 | MODULE_AUTHOR("Xiong Huang <xiong.huang@atheros.com>, \ | ||
34 | Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>"); | ||
35 | MODULE_LICENSE("GPL"); | ||
36 | MODULE_VERSION(ATLX_DRIVER_VERSION); | ||
37 | |||
38 | #define ATLX_ERR_PHY 2 | 32 | #define ATLX_ERR_PHY 2 |
39 | #define ATLX_ERR_PHY_SPEED 7 | 33 | #define ATLX_ERR_PHY_SPEED 7 |
40 | #define ATLX_ERR_PHY_RES 8 | 34 | #define ATLX_ERR_PHY_RES 8 |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 955a46958b7f..c15fc281f79f 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -927,22 +927,7 @@ static int bfin_mac_open(struct net_device *dev) | |||
927 | return 0; | 927 | return 0; |
928 | } | 928 | } |
929 | 929 | ||
930 | static const struct net_device_ops bfin_mac_netdev_ops = { | ||
931 | .ndo_open = bfin_mac_open, | ||
932 | .ndo_stop = bfin_mac_close, | ||
933 | .ndo_start_xmit = bfin_mac_hard_start_xmit, | ||
934 | .ndo_set_mac_address = bfin_mac_set_mac_address, | ||
935 | .ndo_tx_timeout = bfin_mac_timeout, | ||
936 | .ndo_set_multicast_list = bfin_mac_set_multicast_list, | ||
937 | .ndo_validate_addr = eth_validate_addr, | ||
938 | .ndo_change_mtu = eth_change_mtu, | ||
939 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
940 | .ndo_poll_controller = bfin_mac_poll, | ||
941 | #endif | ||
942 | }; | ||
943 | |||
944 | /* | 930 | /* |
945 | * | ||
946 | * this makes the board clean up everything that it can | 931 | * this makes the board clean up everything that it can |
947 | * and not talk to the outside world. Caused by | 932 | * and not talk to the outside world. Caused by |
948 | * an 'ifconfig ethX down' | 933 | * an 'ifconfig ethX down' |
@@ -967,6 +952,20 @@ static int bfin_mac_close(struct net_device *dev) | |||
967 | return 0; | 952 | return 0; |
968 | } | 953 | } |
969 | 954 | ||
955 | static const struct net_device_ops bfin_mac_netdev_ops = { | ||
956 | .ndo_open = bfin_mac_open, | ||
957 | .ndo_stop = bfin_mac_close, | ||
958 | .ndo_start_xmit = bfin_mac_hard_start_xmit, | ||
959 | .ndo_set_mac_address = bfin_mac_set_mac_address, | ||
960 | .ndo_tx_timeout = bfin_mac_timeout, | ||
961 | .ndo_set_multicast_list = bfin_mac_set_multicast_list, | ||
962 | .ndo_validate_addr = eth_validate_addr, | ||
963 | .ndo_change_mtu = eth_change_mtu, | ||
964 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
965 | .ndo_poll_controller = bfin_mac_poll, | ||
966 | #endif | ||
967 | }; | ||
968 | |||
970 | static int __devinit bfin_mac_probe(struct platform_device *pdev) | 969 | static int __devinit bfin_mac_probe(struct platform_device *pdev) |
971 | { | 970 | { |
972 | struct net_device *ndev; | 971 | struct net_device *ndev; |
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h index 322434ac42fc..e48e508b9632 100644 --- a/drivers/net/cxgb3/adapter.h +++ b/drivers/net/cxgb3/adapter.h | |||
@@ -85,8 +85,8 @@ struct fl_pg_chunk { | |||
85 | struct page *page; | 85 | struct page *page; |
86 | void *va; | 86 | void *va; |
87 | unsigned int offset; | 87 | unsigned int offset; |
88 | u64 *p_cnt; | 88 | unsigned long *p_cnt; |
89 | DECLARE_PCI_UNMAP_ADDR(mapping); | 89 | dma_addr_t mapping; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | struct rx_desc; | 92 | struct rx_desc; |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 4bc26568b2f6..aef3ab21f5f7 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2453,14 +2453,16 @@ static void check_link_status(struct adapter *adapter) | |||
2453 | for_each_port(adapter, i) { | 2453 | for_each_port(adapter, i) { |
2454 | struct net_device *dev = adapter->port[i]; | 2454 | struct net_device *dev = adapter->port[i]; |
2455 | struct port_info *p = netdev_priv(dev); | 2455 | struct port_info *p = netdev_priv(dev); |
2456 | int link_fault; | ||
2456 | 2457 | ||
2457 | spin_lock_irq(&adapter->work_lock); | 2458 | spin_lock_irq(&adapter->work_lock); |
2458 | if (p->link_fault) { | 2459 | link_fault = p->link_fault; |
2460 | spin_unlock_irq(&adapter->work_lock); | ||
2461 | |||
2462 | if (link_fault) { | ||
2459 | t3_link_fault(adapter, i); | 2463 | t3_link_fault(adapter, i); |
2460 | spin_unlock_irq(&adapter->work_lock); | ||
2461 | continue; | 2464 | continue; |
2462 | } | 2465 | } |
2463 | spin_unlock_irq(&adapter->work_lock); | ||
2464 | 2466 | ||
2465 | if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) { | 2467 | if (!(p->phy.caps & SUPPORTED_IRQ) && netif_running(dev)) { |
2466 | t3_xgm_intr_disable(adapter, i); | 2468 | t3_xgm_intr_disable(adapter, i); |
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 0b978827874b..29c79eb43beb 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c | |||
@@ -355,7 +355,7 @@ static void clear_rx_desc(struct pci_dev *pdev, const struct sge_fl *q, | |||
355 | (*d->pg_chunk.p_cnt)--; | 355 | (*d->pg_chunk.p_cnt)--; |
356 | if (!*d->pg_chunk.p_cnt) | 356 | if (!*d->pg_chunk.p_cnt) |
357 | pci_unmap_page(pdev, | 357 | pci_unmap_page(pdev, |
358 | pci_unmap_addr(&d->pg_chunk, mapping), | 358 | d->pg_chunk.mapping, |
359 | q->alloc_size, PCI_DMA_FROMDEVICE); | 359 | q->alloc_size, PCI_DMA_FROMDEVICE); |
360 | 360 | ||
361 | put_page(d->pg_chunk.page); | 361 | put_page(d->pg_chunk.page); |
@@ -454,7 +454,7 @@ static int alloc_pg_chunk(struct adapter *adapter, struct sge_fl *q, | |||
454 | q->pg_chunk.offset = 0; | 454 | q->pg_chunk.offset = 0; |
455 | mapping = pci_map_page(adapter->pdev, q->pg_chunk.page, | 455 | mapping = pci_map_page(adapter->pdev, q->pg_chunk.page, |
456 | 0, q->alloc_size, PCI_DMA_FROMDEVICE); | 456 | 0, q->alloc_size, PCI_DMA_FROMDEVICE); |
457 | pci_unmap_addr_set(&q->pg_chunk, mapping, mapping); | 457 | q->pg_chunk.mapping = mapping; |
458 | } | 458 | } |
459 | sd->pg_chunk = q->pg_chunk; | 459 | sd->pg_chunk = q->pg_chunk; |
460 | 460 | ||
@@ -511,8 +511,7 @@ static int refill_fl(struct adapter *adap, struct sge_fl *q, int n, gfp_t gfp) | |||
511 | nomem: q->alloc_failed++; | 511 | nomem: q->alloc_failed++; |
512 | break; | 512 | break; |
513 | } | 513 | } |
514 | mapping = pci_unmap_addr(&sd->pg_chunk, mapping) + | 514 | mapping = sd->pg_chunk.mapping + sd->pg_chunk.offset; |
515 | sd->pg_chunk.offset; | ||
516 | pci_unmap_addr_set(sd, dma_addr, mapping); | 515 | pci_unmap_addr_set(sd, dma_addr, mapping); |
517 | 516 | ||
518 | add_one_rx_chunk(mapping, d, q->gen); | 517 | add_one_rx_chunk(mapping, d, q->gen); |
@@ -882,7 +881,7 @@ recycle: | |||
882 | (*sd->pg_chunk.p_cnt)--; | 881 | (*sd->pg_chunk.p_cnt)--; |
883 | if (!*sd->pg_chunk.p_cnt) | 882 | if (!*sd->pg_chunk.p_cnt) |
884 | pci_unmap_page(adap->pdev, | 883 | pci_unmap_page(adap->pdev, |
885 | pci_unmap_addr(&sd->pg_chunk, mapping), | 884 | sd->pg_chunk.mapping, |
886 | fl->alloc_size, | 885 | fl->alloc_size, |
887 | PCI_DMA_FROMDEVICE); | 886 | PCI_DMA_FROMDEVICE); |
888 | if (!skb) { | 887 | if (!skb) { |
@@ -2091,7 +2090,7 @@ static void lro_add_page(struct adapter *adap, struct sge_qset *qs, | |||
2091 | (*sd->pg_chunk.p_cnt)--; | 2090 | (*sd->pg_chunk.p_cnt)--; |
2092 | if (!*sd->pg_chunk.p_cnt) | 2091 | if (!*sd->pg_chunk.p_cnt) |
2093 | pci_unmap_page(adap->pdev, | 2092 | pci_unmap_page(adap->pdev, |
2094 | pci_unmap_addr(&sd->pg_chunk, mapping), | 2093 | sd->pg_chunk.mapping, |
2095 | fl->alloc_size, | 2094 | fl->alloc_size, |
2096 | PCI_DMA_FROMDEVICE); | 2095 | PCI_DMA_FROMDEVICE); |
2097 | 2096 | ||
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c index 6a454476bb17..870d44992c70 100644 --- a/drivers/net/cxgb3/t3_hw.c +++ b/drivers/net/cxgb3/t3_hw.c | |||
@@ -1288,6 +1288,11 @@ void t3_link_fault(struct adapter *adapter, int port_id) | |||
1288 | A_XGM_INT_STATUS + mac->offset); | 1288 | A_XGM_INT_STATUS + mac->offset); |
1289 | link_fault &= F_LINKFAULTCHANGE; | 1289 | link_fault &= F_LINKFAULTCHANGE; |
1290 | 1290 | ||
1291 | link_ok = lc->link_ok; | ||
1292 | speed = lc->speed; | ||
1293 | duplex = lc->duplex; | ||
1294 | fc = lc->fc; | ||
1295 | |||
1291 | phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); | 1296 | phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); |
1292 | 1297 | ||
1293 | if (link_fault) { | 1298 | if (link_fault) { |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 74667e521431..05e87a59f1c6 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -4035,8 +4035,9 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
4035 | PCI_DMA_FROMDEVICE); | 4035 | PCI_DMA_FROMDEVICE); |
4036 | 4036 | ||
4037 | length = le16_to_cpu(rx_desc->length); | 4037 | length = le16_to_cpu(rx_desc->length); |
4038 | 4038 | /* !EOP means multiple descriptors were used to store a single | |
4039 | if (unlikely(!(status & E1000_RXD_STAT_EOP))) { | 4039 | * packet, also make sure the frame isn't just CRC only */ |
4040 | if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) { | ||
4040 | /* All receives must fit into a single buffer */ | 4041 | /* All receives must fit into a single buffer */ |
4041 | E1000_DBG("%s: Receive packet consumed multiple" | 4042 | E1000_DBG("%s: Receive packet consumed multiple" |
4042 | " buffers\n", netdev->name); | 4043 | " buffers\n", netdev->name); |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index d0b1d9f17a5d..1dce5550f553 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -898,6 +898,12 @@ enum { | |||
898 | }; | 898 | }; |
899 | static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED; | 899 | static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED; |
900 | 900 | ||
901 | /* | ||
902 | * Power down phy when interface is down (persists through reboot; | ||
903 | * older Linux and other OSes may not power it up again) | ||
904 | */ | ||
905 | static int phy_power_down = 0; | ||
906 | |||
901 | static inline struct fe_priv *get_nvpriv(struct net_device *dev) | 907 | static inline struct fe_priv *get_nvpriv(struct net_device *dev) |
902 | { | 908 | { |
903 | return netdev_priv(dev); | 909 | return netdev_priv(dev); |
@@ -1503,7 +1509,10 @@ static int phy_init(struct net_device *dev) | |||
1503 | 1509 | ||
1504 | /* restart auto negotiation, power down phy */ | 1510 | /* restart auto negotiation, power down phy */ |
1505 | mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); | 1511 | mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); |
1506 | mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE | BMCR_PDOWN); | 1512 | mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE); |
1513 | if (phy_power_down) { | ||
1514 | mii_control |= BMCR_PDOWN; | ||
1515 | } | ||
1507 | if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { | 1516 | if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { |
1508 | return PHY_ERROR; | 1517 | return PHY_ERROR; |
1509 | } | 1518 | } |
@@ -5534,7 +5543,7 @@ static int nv_close(struct net_device *dev) | |||
5534 | 5543 | ||
5535 | nv_drain_rxtx(dev); | 5544 | nv_drain_rxtx(dev); |
5536 | 5545 | ||
5537 | if (np->wolenabled) { | 5546 | if (np->wolenabled || !phy_power_down) { |
5538 | nv_txrx_gate(dev, false); | 5547 | nv_txrx_gate(dev, false); |
5539 | writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); | 5548 | writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); |
5540 | nv_start_rx(dev); | 5549 | nv_start_rx(dev); |
@@ -6390,6 +6399,8 @@ module_param(dma_64bit, int, 0); | |||
6390 | MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); | 6399 | MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); |
6391 | module_param(phy_cross, int, 0); | 6400 | module_param(phy_cross, int, 0); |
6392 | MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0."); | 6401 | MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0."); |
6402 | module_param(phy_power_down, int, 0); | ||
6403 | MODULE_PARM_DESC(phy_power_down, "Power down phy and disable link when interface is down (1), or leave phy powered up (0)."); | ||
6393 | 6404 | ||
6394 | MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>"); | 6405 | MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>"); |
6395 | MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); | 6406 | MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); |
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 91317bc11154..2cd94338b5d3 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
@@ -259,7 +259,7 @@ extern const char gfar_driver_version[]; | |||
259 | (IEVENT_RXC | IEVENT_BSY | IEVENT_EBERR | IEVENT_MSRO | \ | 259 | (IEVENT_RXC | IEVENT_BSY | IEVENT_EBERR | IEVENT_MSRO | \ |
260 | IEVENT_BABT | IEVENT_TXC | IEVENT_TXE | IEVENT_LC \ | 260 | IEVENT_BABT | IEVENT_TXC | IEVENT_TXE | IEVENT_LC \ |
261 | | IEVENT_CRL | IEVENT_XFUN | IEVENT_DPE | IEVENT_PERR \ | 261 | | IEVENT_CRL | IEVENT_XFUN | IEVENT_DPE | IEVENT_PERR \ |
262 | | IEVENT_MAG) | 262 | | IEVENT_MAG | IEVENT_BABR) |
263 | 263 | ||
264 | #define IMASK_INIT_CLEAR 0x00000000 | 264 | #define IMASK_INIT_CLEAR 0x00000000 |
265 | #define IMASK_BABR 0x80000000 | 265 | #define IMASK_BABR 0x80000000 |
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c index 0585df1e2c1b..f8fa0c3f0f64 100644 --- a/drivers/net/mac8390.c +++ b/drivers/net/mac8390.c | |||
@@ -304,7 +304,7 @@ struct net_device * __init mac8390_probe(int unit) | |||
304 | if (!MACH_IS_MAC) | 304 | if (!MACH_IS_MAC) |
305 | return ERR_PTR(-ENODEV); | 305 | return ERR_PTR(-ENODEV); |
306 | 306 | ||
307 | dev = alloc_ei_netdev(); | 307 | dev = ____alloc_ei_netdev(0); |
308 | if (!dev) | 308 | if (!dev) |
309 | return ERR_PTR(-ENOMEM); | 309 | return ERR_PTR(-ENOMEM); |
310 | 310 | ||
@@ -481,15 +481,15 @@ void cleanup_module(void) | |||
481 | static const struct net_device_ops mac8390_netdev_ops = { | 481 | static const struct net_device_ops mac8390_netdev_ops = { |
482 | .ndo_open = mac8390_open, | 482 | .ndo_open = mac8390_open, |
483 | .ndo_stop = mac8390_close, | 483 | .ndo_stop = mac8390_close, |
484 | .ndo_start_xmit = ei_start_xmit, | 484 | .ndo_start_xmit = __ei_start_xmit, |
485 | .ndo_tx_timeout = ei_tx_timeout, | 485 | .ndo_tx_timeout = __ei_tx_timeout, |
486 | .ndo_get_stats = ei_get_stats, | 486 | .ndo_get_stats = __ei_get_stats, |
487 | .ndo_set_multicast_list = ei_set_multicast_list, | 487 | .ndo_set_multicast_list = __ei_set_multicast_list, |
488 | .ndo_validate_addr = eth_validate_addr, | 488 | .ndo_validate_addr = eth_validate_addr, |
489 | .ndo_set_mac_address = eth_mac_addr, | 489 | .ndo_set_mac_address = eth_mac_addr, |
490 | .ndo_change_mtu = eth_change_mtu, | 490 | .ndo_change_mtu = eth_change_mtu, |
491 | #ifdef CONFIG_NET_POLL_CONTROLLER | 491 | #ifdef CONFIG_NET_POLL_CONTROLLER |
492 | .ndo_poll_controller = ei_poll, | 492 | .ndo_poll_controller = __ei_poll, |
493 | #endif | 493 | #endif |
494 | }; | 494 | }; |
495 | 495 | ||
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 3719d1ac3950..5dc7466ad035 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c | |||
@@ -388,7 +388,7 @@ void mlx4_en_poll_tx_cq(unsigned long data) | |||
388 | 388 | ||
389 | INC_PERF_COUNTER(priv->pstats.tx_poll); | 389 | INC_PERF_COUNTER(priv->pstats.tx_poll); |
390 | 390 | ||
391 | if (!spin_trylock(&ring->comp_lock)) { | 391 | if (!spin_trylock_irq(&ring->comp_lock)) { |
392 | mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT); | 392 | mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT); |
393 | return; | 393 | return; |
394 | } | 394 | } |
@@ -401,7 +401,7 @@ void mlx4_en_poll_tx_cq(unsigned long data) | |||
401 | if (inflight && priv->port_up) | 401 | if (inflight && priv->port_up) |
402 | mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT); | 402 | mod_timer(&cq->timer, jiffies + MLX4_EN_TX_POLL_TIMEOUT); |
403 | 403 | ||
404 | spin_unlock(&ring->comp_lock); | 404 | spin_unlock_irq(&ring->comp_lock); |
405 | } | 405 | } |
406 | 406 | ||
407 | static struct mlx4_en_tx_desc *mlx4_en_bounce_to_desc(struct mlx4_en_priv *priv, | 407 | static struct mlx4_en_tx_desc *mlx4_en_bounce_to_desc(struct mlx4_en_priv *priv, |
@@ -444,9 +444,9 @@ static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind) | |||
444 | 444 | ||
445 | /* Poll the CQ every mlx4_en_TX_MODER_POLL packets */ | 445 | /* Poll the CQ every mlx4_en_TX_MODER_POLL packets */ |
446 | if ((++ring->poll_cnt & (MLX4_EN_TX_POLL_MODER - 1)) == 0) | 446 | if ((++ring->poll_cnt & (MLX4_EN_TX_POLL_MODER - 1)) == 0) |
447 | if (spin_trylock(&ring->comp_lock)) { | 447 | if (spin_trylock_irq(&ring->comp_lock)) { |
448 | mlx4_en_process_tx_cq(priv->dev, cq); | 448 | mlx4_en_process_tx_cq(priv->dev, cq); |
449 | spin_unlock(&ring->comp_lock); | 449 | spin_unlock_irq(&ring->comp_lock); |
450 | } | 450 | } |
451 | } | 451 | } |
452 | 452 | ||
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 7fa88d2b4c99..e94316b7868b 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3561,54 +3561,64 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) | |||
3561 | int handled = 0; | 3561 | int handled = 0; |
3562 | int status; | 3562 | int status; |
3563 | 3563 | ||
3564 | /* loop handling interrupts until we have no new ones or | ||
3565 | * we hit a invalid/hotplug case. | ||
3566 | */ | ||
3564 | status = RTL_R16(IntrStatus); | 3567 | status = RTL_R16(IntrStatus); |
3568 | while (status && status != 0xffff) { | ||
3569 | handled = 1; | ||
3565 | 3570 | ||
3566 | /* hotplug/major error/no more work/shared irq */ | 3571 | /* Handle all of the error cases first. These will reset |
3567 | if ((status == 0xffff) || !status) | 3572 | * the chip, so just exit the loop. |
3568 | goto out; | 3573 | */ |
3569 | 3574 | if (unlikely(!netif_running(dev))) { | |
3570 | handled = 1; | 3575 | rtl8169_asic_down(ioaddr); |
3576 | break; | ||
3577 | } | ||
3571 | 3578 | ||
3572 | if (unlikely(!netif_running(dev))) { | 3579 | /* Work around for rx fifo overflow */ |
3573 | rtl8169_asic_down(ioaddr); | 3580 | if (unlikely(status & RxFIFOOver) && |
3574 | goto out; | 3581 | (tp->mac_version == RTL_GIGA_MAC_VER_11)) { |
3575 | } | 3582 | netif_stop_queue(dev); |
3583 | rtl8169_tx_timeout(dev); | ||
3584 | break; | ||
3585 | } | ||
3576 | 3586 | ||
3577 | status &= tp->intr_mask; | 3587 | if (unlikely(status & SYSErr)) { |
3578 | RTL_W16(IntrStatus, | 3588 | rtl8169_pcierr_interrupt(dev); |
3579 | (status & RxFIFOOver) ? (status | RxOverflow) : status); | 3589 | break; |
3590 | } | ||
3580 | 3591 | ||
3581 | if (!(status & tp->intr_event)) | 3592 | if (status & LinkChg) |
3582 | goto out; | 3593 | rtl8169_check_link_status(dev, tp, ioaddr); |
3583 | 3594 | ||
3584 | /* Work around for rx fifo overflow */ | 3595 | /* We need to see the lastest version of tp->intr_mask to |
3585 | if (unlikely(status & RxFIFOOver) && | 3596 | * avoid ignoring an MSI interrupt and having to wait for |
3586 | (tp->mac_version == RTL_GIGA_MAC_VER_11)) { | 3597 | * another event which may never come. |
3587 | netif_stop_queue(dev); | 3598 | */ |
3588 | rtl8169_tx_timeout(dev); | 3599 | smp_rmb(); |
3589 | goto out; | 3600 | if (status & tp->intr_mask & tp->napi_event) { |
3590 | } | 3601 | RTL_W16(IntrMask, tp->intr_event & ~tp->napi_event); |
3602 | tp->intr_mask = ~tp->napi_event; | ||
3603 | |||
3604 | if (likely(napi_schedule_prep(&tp->napi))) | ||
3605 | __napi_schedule(&tp->napi); | ||
3606 | else if (netif_msg_intr(tp)) { | ||
3607 | printk(KERN_INFO "%s: interrupt %04x in poll\n", | ||
3608 | dev->name, status); | ||
3609 | } | ||
3610 | } | ||
3591 | 3611 | ||
3592 | if (unlikely(status & SYSErr)) { | 3612 | /* We only get a new MSI interrupt when all active irq |
3593 | rtl8169_pcierr_interrupt(dev); | 3613 | * sources on the chip have been acknowledged. So, ack |
3594 | goto out; | 3614 | * everything we've seen and check if new sources have become |
3615 | * active to avoid blocking all interrupts from the chip. | ||
3616 | */ | ||
3617 | RTL_W16(IntrStatus, | ||
3618 | (status & RxFIFOOver) ? (status | RxOverflow) : status); | ||
3619 | status = RTL_R16(IntrStatus); | ||
3595 | } | 3620 | } |
3596 | 3621 | ||
3597 | if (status & LinkChg) | ||
3598 | rtl8169_check_link_status(dev, tp, ioaddr); | ||
3599 | |||
3600 | if (status & tp->napi_event) { | ||
3601 | RTL_W16(IntrMask, tp->intr_event & ~tp->napi_event); | ||
3602 | tp->intr_mask = ~tp->napi_event; | ||
3603 | |||
3604 | if (likely(napi_schedule_prep(&tp->napi))) | ||
3605 | __napi_schedule(&tp->napi); | ||
3606 | else if (netif_msg_intr(tp)) { | ||
3607 | printk(KERN_INFO "%s: interrupt %04x in poll\n", | ||
3608 | dev->name, status); | ||
3609 | } | ||
3610 | } | ||
3611 | out: | ||
3612 | return IRQ_RETVAL(handled); | 3622 | return IRQ_RETVAL(handled); |
3613 | } | 3623 | } |
3614 | 3624 | ||
@@ -3624,13 +3634,15 @@ static int rtl8169_poll(struct napi_struct *napi, int budget) | |||
3624 | 3634 | ||
3625 | if (work_done < budget) { | 3635 | if (work_done < budget) { |
3626 | napi_complete(napi); | 3636 | napi_complete(napi); |
3627 | tp->intr_mask = 0xffff; | 3637 | |
3628 | /* | 3638 | /* We need for force the visibility of tp->intr_mask |
3629 | * 20040426: the barrier is not strictly required but the | 3639 | * for other CPUs, as we can loose an MSI interrupt |
3630 | * behavior of the irq handler could be less predictable | 3640 | * and potentially wait for a retransmit timeout if we don't. |
3631 | * without it. Btw, the lack of flush for the posted pci | 3641 | * The posted write to IntrMask is safe, as it will |
3632 | * write is safe - FR | 3642 | * eventually make it to the chip and we won't loose anything |
3643 | * until it does. | ||
3633 | */ | 3644 | */ |
3645 | tp->intr_mask = 0xffff; | ||
3634 | smp_wmb(); | 3646 | smp_wmb(); |
3635 | RTL_W16(IntrMask, tp->intr_event); | 3647 | RTL_W16(IntrMask, tp->intr_event); |
3636 | } | 3648 | } |
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index a67d29290ba0..867324163ca2 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig | |||
@@ -431,6 +431,7 @@ config RTL8187 | |||
431 | ASUS P5B Deluxe | 431 | ASUS P5B Deluxe |
432 | Toshiba Satellite Pro series of laptops | 432 | Toshiba Satellite Pro series of laptops |
433 | Asus Wireless Link | 433 | Asus Wireless Link |
434 | Linksys WUSB54GC-EU | ||
434 | 435 | ||
435 | Thanks to Realtek for their support! | 436 | Thanks to Realtek for their support! |
436 | 437 | ||
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c index cea7f1466c54..4efbdbe6d6bf 100644 --- a/drivers/net/wireless/at76c50x-usb.c +++ b/drivers/net/wireless/at76c50x-usb.c | |||
@@ -1873,18 +1873,18 @@ static void at76_dwork_hw_scan(struct work_struct *work) | |||
1873 | if (ret != CMD_STATUS_COMPLETE) { | 1873 | if (ret != CMD_STATUS_COMPLETE) { |
1874 | queue_delayed_work(priv->hw->workqueue, &priv->dwork_hw_scan, | 1874 | queue_delayed_work(priv->hw->workqueue, &priv->dwork_hw_scan, |
1875 | SCAN_POLL_INTERVAL); | 1875 | SCAN_POLL_INTERVAL); |
1876 | goto exit; | 1876 | mutex_unlock(&priv->mtx); |
1877 | return; | ||
1877 | } | 1878 | } |
1878 | 1879 | ||
1879 | ieee80211_scan_completed(priv->hw, false); | ||
1880 | |||
1881 | if (is_valid_ether_addr(priv->bssid)) | 1880 | if (is_valid_ether_addr(priv->bssid)) |
1882 | at76_join(priv); | 1881 | at76_join(priv); |
1883 | 1882 | ||
1884 | ieee80211_wake_queues(priv->hw); | ||
1885 | |||
1886 | exit: | ||
1887 | mutex_unlock(&priv->mtx); | 1883 | mutex_unlock(&priv->mtx); |
1884 | |||
1885 | ieee80211_scan_completed(priv->hw, false); | ||
1886 | |||
1887 | ieee80211_wake_queues(priv->hw); | ||
1888 | } | 1888 | } |
1889 | 1889 | ||
1890 | static int at76_hw_scan(struct ieee80211_hw *hw, | 1890 | static int at76_hw_scan(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c index 3f22cc0c9679..294250e294dd 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c | |||
@@ -74,6 +74,8 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
74 | {USB_DEVICE(0x18E8, 0x6232), .driver_info = DEVICE_RTL8187}, | 74 | {USB_DEVICE(0x18E8, 0x6232), .driver_info = DEVICE_RTL8187}, |
75 | /* AirLive */ | 75 | /* AirLive */ |
76 | {USB_DEVICE(0x1b75, 0x8187), .driver_info = DEVICE_RTL8187}, | 76 | {USB_DEVICE(0x1b75, 0x8187), .driver_info = DEVICE_RTL8187}, |
77 | /* Linksys */ | ||
78 | {USB_DEVICE(0x1737, 0x0073), .driver_info = DEVICE_RTL8187B}, | ||
77 | {} | 79 | {} |
78 | }; | 80 | }; |
79 | 81 | ||
diff --git a/firmware/cis/.gitignore b/firmware/cis/.gitignore new file mode 100644 index 000000000000..1de39847f261 --- /dev/null +++ b/firmware/cis/.gitignore | |||
@@ -0,0 +1 @@ | |||
*.cis | |||
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index 3066789b972a..b2f384d42611 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
@@ -35,6 +35,9 @@ enum tcp_conntrack { | |||
35 | /* Has unacknowledged data */ | 35 | /* Has unacknowledged data */ |
36 | #define IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10 | 36 | #define IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED 0x10 |
37 | 37 | ||
38 | /* The field td_maxack has been set */ | ||
39 | #define IP_CT_TCP_FLAG_MAXACK_SET 0x20 | ||
40 | |||
38 | struct nf_ct_tcp_flags { | 41 | struct nf_ct_tcp_flags { |
39 | __u8 flags; | 42 | __u8 flags; |
40 | __u8 mask; | 43 | __u8 mask; |
@@ -46,6 +49,7 @@ struct ip_ct_tcp_state { | |||
46 | u_int32_t td_end; /* max of seq + len */ | 49 | u_int32_t td_end; /* max of seq + len */ |
47 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ | 50 | u_int32_t td_maxend; /* max of ack + max(win, 1) */ |
48 | u_int32_t td_maxwin; /* max(win) */ | 51 | u_int32_t td_maxwin; /* max(win) */ |
52 | u_int32_t td_maxack; /* max of ack */ | ||
49 | u_int8_t td_scale; /* window scale factor */ | 53 | u_int8_t td_scale; /* window scale factor */ |
50 | u_int8_t flags; /* per direction options */ | 54 | u_int8_t flags; /* per direction options */ |
51 | }; | 55 | }; |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 4cc3624bd22d..95f7a7a544b4 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -90,9 +90,6 @@ static void add_conn(struct work_struct *work) | |||
90 | struct hci_conn *conn = container_of(work, struct hci_conn, work_add); | 90 | struct hci_conn *conn = container_of(work, struct hci_conn, work_add); |
91 | struct hci_dev *hdev = conn->hdev; | 91 | struct hci_dev *hdev = conn->hdev; |
92 | 92 | ||
93 | /* ensure previous del is complete */ | ||
94 | flush_work(&conn->work_del); | ||
95 | |||
96 | dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); | 93 | dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); |
97 | 94 | ||
98 | if (device_add(&conn->dev) < 0) { | 95 | if (device_add(&conn->dev) < 0) { |
@@ -118,9 +115,6 @@ static void del_conn(struct work_struct *work) | |||
118 | struct hci_conn *conn = container_of(work, struct hci_conn, work_del); | 115 | struct hci_conn *conn = container_of(work, struct hci_conn, work_del); |
119 | struct hci_dev *hdev = conn->hdev; | 116 | struct hci_dev *hdev = conn->hdev; |
120 | 117 | ||
121 | /* ensure previous add is complete */ | ||
122 | flush_work(&conn->work_add); | ||
123 | |||
124 | if (!device_is_registered(&conn->dev)) | 118 | if (!device_is_registered(&conn->dev)) |
125 | return; | 119 | return; |
126 | 120 | ||
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index a453aac91bd3..c6743eec9b7d 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c | |||
@@ -158,6 +158,11 @@ void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event) | |||
158 | } | 158 | } |
159 | EXPORT_SYMBOL_GPL(tcp_vegas_cwnd_event); | 159 | EXPORT_SYMBOL_GPL(tcp_vegas_cwnd_event); |
160 | 160 | ||
161 | static inline u32 tcp_vegas_ssthresh(struct tcp_sock *tp) | ||
162 | { | ||
163 | return min(tp->snd_ssthresh, tp->snd_cwnd-1); | ||
164 | } | ||
165 | |||
161 | static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | 166 | static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) |
162 | { | 167 | { |
163 | struct tcp_sock *tp = tcp_sk(sk); | 168 | struct tcp_sock *tp = tcp_sk(sk); |
@@ -221,11 +226,10 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
221 | */ | 226 | */ |
222 | diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT; | 227 | diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT; |
223 | 228 | ||
224 | if (diff > gamma && tp->snd_ssthresh > 2 ) { | 229 | if (diff > gamma && tp->snd_cwnd <= tp->snd_ssthresh) { |
225 | /* Going too fast. Time to slow down | 230 | /* Going too fast. Time to slow down |
226 | * and switch to congestion avoidance. | 231 | * and switch to congestion avoidance. |
227 | */ | 232 | */ |
228 | tp->snd_ssthresh = 2; | ||
229 | 233 | ||
230 | /* Set cwnd to match the actual rate | 234 | /* Set cwnd to match the actual rate |
231 | * exactly: | 235 | * exactly: |
@@ -235,6 +239,7 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
235 | * utilization. | 239 | * utilization. |
236 | */ | 240 | */ |
237 | tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1); | 241 | tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1); |
242 | tp->snd_ssthresh = tcp_vegas_ssthresh(tp); | ||
238 | 243 | ||
239 | } else if (tp->snd_cwnd <= tp->snd_ssthresh) { | 244 | } else if (tp->snd_cwnd <= tp->snd_ssthresh) { |
240 | /* Slow start. */ | 245 | /* Slow start. */ |
@@ -250,6 +255,8 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
250 | * we slow down. | 255 | * we slow down. |
251 | */ | 256 | */ |
252 | tp->snd_cwnd--; | 257 | tp->snd_cwnd--; |
258 | tp->snd_ssthresh | ||
259 | = tcp_vegas_ssthresh(tp); | ||
253 | } else if (diff < alpha) { | 260 | } else if (diff < alpha) { |
254 | /* We don't have enough extra packets | 261 | /* We don't have enough extra packets |
255 | * in the network, so speed up. | 262 | * in the network, so speed up. |
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c index 8e757dd53396..aee0d6bea309 100644 --- a/net/netfilter/nf_conntrack_proto_dccp.c +++ b/net/netfilter/nf_conntrack_proto_dccp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/netfilter/nfnetlink_conntrack.h> | 22 | #include <linux/netfilter/nfnetlink_conntrack.h> |
23 | #include <net/netfilter/nf_conntrack.h> | 23 | #include <net/netfilter/nf_conntrack.h> |
24 | #include <net/netfilter/nf_conntrack_l4proto.h> | 24 | #include <net/netfilter/nf_conntrack_l4proto.h> |
25 | #include <net/netfilter/nf_conntrack_ecache.h> | ||
25 | #include <net/netfilter/nf_log.h> | 26 | #include <net/netfilter/nf_log.h> |
26 | 27 | ||
27 | static DEFINE_RWLOCK(dccp_lock); | 28 | static DEFINE_RWLOCK(dccp_lock); |
@@ -553,6 +554,9 @@ static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb, | |||
553 | ct->proto.dccp.state = new_state; | 554 | ct->proto.dccp.state = new_state; |
554 | write_unlock_bh(&dccp_lock); | 555 | write_unlock_bh(&dccp_lock); |
555 | 556 | ||
557 | if (new_state != old_state) | ||
558 | nf_conntrack_event_cache(IPCT_PROTOINFO, ct); | ||
559 | |||
556 | dn = dccp_pernet(net); | 560 | dn = dccp_pernet(net); |
557 | nf_ct_refresh_acct(ct, ctinfo, skb, dn->dccp_timeout[new_state]); | 561 | nf_ct_refresh_acct(ct, ctinfo, skb, dn->dccp_timeout[new_state]); |
558 | 562 | ||
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index b5ccf2b4b2e7..97a6e93d742e 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -634,6 +634,14 @@ static bool tcp_in_window(const struct nf_conn *ct, | |||
634 | sender->td_end = end; | 634 | sender->td_end = end; |
635 | sender->flags |= IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED; | 635 | sender->flags |= IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED; |
636 | } | 636 | } |
637 | if (tcph->ack) { | ||
638 | if (!(sender->flags & IP_CT_TCP_FLAG_MAXACK_SET)) { | ||
639 | sender->td_maxack = ack; | ||
640 | sender->flags |= IP_CT_TCP_FLAG_MAXACK_SET; | ||
641 | } else if (after(ack, sender->td_maxack)) | ||
642 | sender->td_maxack = ack; | ||
643 | } | ||
644 | |||
637 | /* | 645 | /* |
638 | * Update receiver data. | 646 | * Update receiver data. |
639 | */ | 647 | */ |
@@ -919,6 +927,16 @@ static int tcp_packet(struct nf_conn *ct, | |||
919 | return -NF_ACCEPT; | 927 | return -NF_ACCEPT; |
920 | case TCP_CONNTRACK_CLOSE: | 928 | case TCP_CONNTRACK_CLOSE: |
921 | if (index == TCP_RST_SET | 929 | if (index == TCP_RST_SET |
930 | && (ct->proto.tcp.seen[!dir].flags & IP_CT_TCP_FLAG_MAXACK_SET) | ||
931 | && before(ntohl(th->seq), ct->proto.tcp.seen[!dir].td_maxack)) { | ||
932 | /* Invalid RST */ | ||
933 | write_unlock_bh(&tcp_lock); | ||
934 | if (LOG_INVALID(net, IPPROTO_TCP)) | ||
935 | nf_log_packet(pf, 0, skb, NULL, NULL, NULL, | ||
936 | "nf_ct_tcp: invalid RST "); | ||
937 | return -NF_ACCEPT; | ||
938 | } | ||
939 | if (index == TCP_RST_SET | ||
922 | && ((test_bit(IPS_SEEN_REPLY_BIT, &ct->status) | 940 | && ((test_bit(IPS_SEEN_REPLY_BIT, &ct->status) |
923 | && ct->proto.tcp.last_index == TCP_SYN_SET) | 941 | && ct->proto.tcp.last_index == TCP_SYN_SET) |
924 | || (!test_bit(IPS_ASSURED_BIT, &ct->status) | 942 | || (!test_bit(IPS_ASSURED_BIT, &ct->status) |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index fd326ac27ec8..66a6dd5c519a 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -581,6 +581,12 @@ nfulnl_log_packet(u_int8_t pf, | |||
581 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hw)) | 581 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hw)) |
582 | + nla_total_size(sizeof(struct nfulnl_msg_packet_timestamp)); | 582 | + nla_total_size(sizeof(struct nfulnl_msg_packet_timestamp)); |
583 | 583 | ||
584 | if (in && skb_mac_header_was_set(skb)) { | ||
585 | size += nla_total_size(skb->dev->hard_header_len) | ||
586 | + nla_total_size(sizeof(u_int16_t)) /* hwtype */ | ||
587 | + nla_total_size(sizeof(u_int16_t)); /* hwlen */ | ||
588 | } | ||
589 | |||
584 | spin_lock_bh(&inst->lock); | 590 | spin_lock_bh(&inst->lock); |
585 | 591 | ||
586 | if (inst->flags & NFULNL_CFG_F_SEQ) | 592 | if (inst->flags & NFULNL_CFG_F_SEQ) |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index a5b5369c30f9..219dcdbe388c 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -926,7 +926,7 @@ static int dl_seq_show(struct seq_file *s, void *v) | |||
926 | if (!hlist_empty(&htable->hash[*bucket])) { | 926 | if (!hlist_empty(&htable->hash[*bucket])) { |
927 | hlist_for_each_entry(ent, pos, &htable->hash[*bucket], node) | 927 | hlist_for_each_entry(ent, pos, &htable->hash[*bucket], node) |
928 | if (dl_seq_real_show(ent, htable->family, s)) | 928 | if (dl_seq_real_show(ent, htable->family, s)) |
929 | return 1; | 929 | return -1; |
930 | } | 930 | } |
931 | return 0; | 931 | return 0; |
932 | } | 932 | } |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0759f32e9dca..09cdcdfe7e91 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -135,6 +135,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
135 | unsigned long cl; | 135 | unsigned long cl; |
136 | unsigned long fh; | 136 | unsigned long fh; |
137 | int err; | 137 | int err; |
138 | int tp_created = 0; | ||
138 | 139 | ||
139 | if (net != &init_net) | 140 | if (net != &init_net) |
140 | return -EINVAL; | 141 | return -EINVAL; |
@@ -266,10 +267,7 @@ replay: | |||
266 | goto errout; | 267 | goto errout; |
267 | } | 268 | } |
268 | 269 | ||
269 | spin_lock_bh(root_lock); | 270 | tp_created = 1; |
270 | tp->next = *back; | ||
271 | *back = tp; | ||
272 | spin_unlock_bh(root_lock); | ||
273 | 271 | ||
274 | } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) | 272 | } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) |
275 | goto errout; | 273 | goto errout; |
@@ -296,8 +294,11 @@ replay: | |||
296 | switch (n->nlmsg_type) { | 294 | switch (n->nlmsg_type) { |
297 | case RTM_NEWTFILTER: | 295 | case RTM_NEWTFILTER: |
298 | err = -EEXIST; | 296 | err = -EEXIST; |
299 | if (n->nlmsg_flags & NLM_F_EXCL) | 297 | if (n->nlmsg_flags & NLM_F_EXCL) { |
298 | if (tp_created) | ||
299 | tcf_destroy(tp); | ||
300 | goto errout; | 300 | goto errout; |
301 | } | ||
301 | break; | 302 | break; |
302 | case RTM_DELTFILTER: | 303 | case RTM_DELTFILTER: |
303 | err = tp->ops->delete(tp, fh); | 304 | err = tp->ops->delete(tp, fh); |
@@ -314,8 +315,18 @@ replay: | |||
314 | } | 315 | } |
315 | 316 | ||
316 | err = tp->ops->change(tp, cl, t->tcm_handle, tca, &fh); | 317 | err = tp->ops->change(tp, cl, t->tcm_handle, tca, &fh); |
317 | if (err == 0) | 318 | if (err == 0) { |
319 | if (tp_created) { | ||
320 | spin_lock_bh(root_lock); | ||
321 | tp->next = *back; | ||
322 | *back = tp; | ||
323 | spin_unlock_bh(root_lock); | ||
324 | } | ||
318 | tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER); | 325 | tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER); |
326 | } else { | ||
327 | if (tp_created) | ||
328 | tcf_destroy(tp); | ||
329 | } | ||
319 | 330 | ||
320 | errout: | 331 | errout: |
321 | if (cl) | 332 | if (cl) |
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 1ab4542e61e0..0f815cc6a3db 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c | |||
@@ -98,8 +98,7 @@ static int cls_cgroup_classify(struct sk_buff *skb, struct tcf_proto *tp, | |||
98 | struct tcf_result *res) | 98 | struct tcf_result *res) |
99 | { | 99 | { |
100 | struct cls_cgroup_head *head = tp->root; | 100 | struct cls_cgroup_head *head = tp->root; |
101 | struct cgroup_cls_state *cs; | 101 | u32 classid; |
102 | int ret = 0; | ||
103 | 102 | ||
104 | /* | 103 | /* |
105 | * Due to the nature of the classifier it is required to ignore all | 104 | * Due to the nature of the classifier it is required to ignore all |
@@ -115,17 +114,18 @@ static int cls_cgroup_classify(struct sk_buff *skb, struct tcf_proto *tp, | |||
115 | return -1; | 114 | return -1; |
116 | 115 | ||
117 | rcu_read_lock(); | 116 | rcu_read_lock(); |
118 | cs = task_cls_state(current); | 117 | classid = task_cls_state(current)->classid; |
119 | if (cs->classid && tcf_em_tree_match(skb, &head->ematches, NULL)) { | ||
120 | res->classid = cs->classid; | ||
121 | res->class = 0; | ||
122 | ret = tcf_exts_exec(skb, &head->exts, res); | ||
123 | } else | ||
124 | ret = -1; | ||
125 | |||
126 | rcu_read_unlock(); | 118 | rcu_read_unlock(); |
127 | 119 | ||
128 | return ret; | 120 | if (!classid) |
121 | return -1; | ||
122 | |||
123 | if (!tcf_em_tree_match(skb, &head->ematches, NULL)) | ||
124 | return -1; | ||
125 | |||
126 | res->classid = classid; | ||
127 | res->class = 0; | ||
128 | return tcf_exts_exec(skb, &head->exts, res); | ||
129 | } | 129 | } |
130 | 130 | ||
131 | static unsigned long cls_cgroup_get(struct tcf_proto *tp, u32 handle) | 131 | static unsigned long cls_cgroup_get(struct tcf_proto *tp, u32 handle) |