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: (30 commits)
MAINTAINERS: add netdev to ATM
ATM: horizon, fix hrz_probe fail path
pppol2tp: Add missing sock_put() in pppol2tp_release()
net: Fix soft lockups/OOM issues w/ unix garbage collector
macvlan: don't broadcast PAUSE frames to macvlan devices
Phonet: fix oops in phonet_address_del() on non-Phonet device
netfilter: ctnetlink: fix GFP_KERNEL allocation under spinlock
sungem: Fix PCS_MIICTRL register write in gem_init_phy().
net: make skb_truesize_bug() call WARN()
net: hp-plus uses eip_poll
net/wireless/reg.c: fix bad WARN_ON in if statement
ath5k: disable beacon filter when station is not associated
ath5k: fix Security issue in DebugFS part of ath5k
ath9k: correct expected max RX buffer size
ath9k: Fix SW-IOMMU bounce buffer starvation
mac80211 : Fix setting ad-hoc mode and non-ibss channel
iwlagn: fix DMA sync
phylib: Add Vitesse VSC8221 SGMII PHY
rose: zero length frame filtering in af_rose.c
bridge: netfilter: fix update_pmtu crash with GRE
...

+229 -85
+1
MAINTAINERS
··· 779 779 P: Chas Williams 780 780 M: chas@cmf.nrl.navy.mil 781 781 L: linux-atm-general@lists.sourceforge.net (subscribers-only) 782 + L: netdev@vger.kernel.org 782 783 W: http://linux-atm.sourceforge.net 783 784 S: Maintained 784 785
+1 -1
drivers/atm/horizon.c
··· 2705 2705 2706 2706 /* XXX DEV_LABEL is a guess */ 2707 2707 if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL)) { 2708 - return -EINVAL; 2708 + err = -EINVAL; 2709 2709 goto out_disable; 2710 2710 } 2711 2711
+1 -1
drivers/net/Makefile
··· 114 114 obj-$(CONFIG_NE2000) += ne.o 8390p.o 115 115 obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o 116 116 obj-$(CONFIG_HPLAN) += hp.o 8390p.o 117 - obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o 117 + obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390p.o 118 118 obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o 119 119 obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o 120 120 obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o
-4
drivers/net/chelsio/sge.c
··· 1035 1035 * @pdev: the PCI device that received the packet 1036 1036 * @fl: the SGE free list holding the packet 1037 1037 * @len: the actual packet length, excluding any SGE padding 1038 - * @dma_pad: padding at beginning of buffer left by SGE DMA 1039 - * @skb_pad: padding to be used if the packet is copied 1040 - * @copy_thres: length threshold under which a packet should be copied 1041 - * @drop_thres: # of remaining buffers before we start dropping packets 1042 1038 * 1043 1039 * Get the next packet from a free list and complete setup of the 1044 1040 * sk_buff. If the packet is small we make a copy and recycle the
-1
drivers/net/e1000e/netdev.c
··· 345 345 /** 346 346 * e1000_alloc_jumbo_rx_buffers - Replace used jumbo receive buffers 347 347 * @adapter: address of board private structure 348 - * @rx_ring: pointer to receive ring structure 349 348 * @cleaned_count: number of buffers to allocate this pass 350 349 **/ 351 350
+1 -1
drivers/net/hp-plus.c
··· 230 230 dev->open = &hpp_open; 231 231 dev->stop = &hpp_close; 232 232 #ifdef CONFIG_NET_POLL_CONTROLLER 233 - dev->poll_controller = ei_poll; 233 + dev->poll_controller = eip_poll; 234 234 #endif 235 235 236 236 ei_status.name = name;
-4
drivers/net/igb/igb_main.c
··· 1980 1980 1981 1981 /** 1982 1982 * igb_free_tx_resources - Free Tx Resources per Queue 1983 - * @adapter: board private structure 1984 1983 * @tx_ring: Tx descriptor ring for a specific queue 1985 1984 * 1986 1985 * Free all transmit software resources ··· 2032 2033 2033 2034 /** 2034 2035 * igb_clean_tx_ring - Free Tx Buffers 2035 - * @adapter: board private structure 2036 2036 * @tx_ring: ring to be cleaned 2037 2037 **/ 2038 2038 static void igb_clean_tx_ring(struct igb_ring *tx_ring) ··· 2078 2080 2079 2081 /** 2080 2082 * igb_free_rx_resources - Free Rx Resources 2081 - * @adapter: board private structure 2082 2083 * @rx_ring: ring to clean the resources from 2083 2084 * 2084 2085 * Free all receive software resources ··· 2117 2120 2118 2121 /** 2119 2122 * igb_clean_rx_ring - Free Rx Buffers per Queue 2120 - * @adapter: board private structure 2121 2123 * @rx_ring: ring to free buffers from 2122 2124 **/ 2123 2125 static void igb_clean_rx_ring(struct igb_ring *rx_ring)
-1
drivers/net/ixgbe/ixgbe_main.c
··· 1320 1320 * ixgbe_intr - legacy mode Interrupt Handler 1321 1321 * @irq: interrupt number 1322 1322 * @data: pointer to a network interface device structure 1323 - * @pt_regs: CPU registers structure 1324 1323 **/ 1325 1324 static irqreturn_t ixgbe_intr(int irq, void *data) 1326 1325 {
+3
drivers/net/macvlan.c
··· 70 70 struct sk_buff *nskb; 71 71 unsigned int i; 72 72 73 + if (skb->protocol == htons(ETH_P_PAUSE)) 74 + return; 75 + 73 76 for (i = 0; i < MACVLAN_HASH_SIZE; i++) { 74 77 hlist_for_each_entry_rcu(vlan, n, &port->vlan_hash[i], hlist) { 75 78 dev = vlan->dev;
+1 -1
drivers/net/pcmcia/axnet_cs.c
··· 779 779 PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2), 780 780 PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), 781 781 PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609), 782 + PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875), 782 783 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04), 783 784 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116), 784 785 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058), ··· 1175 1174 * ax_interrupt - handle the interrupts from an 8390 1176 1175 * @irq: interrupt number 1177 1176 * @dev_id: a pointer to the net_device 1178 - * @regs: unused 1179 1177 * 1180 1178 * Handle the ether interface interrupts. We pull packets from 1181 1179 * the 8390 via the card specific functions and fire them at the networking
-1
drivers/net/pcmcia/pcnet_cs.c
··· 1693 1693 PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8), 1694 1694 PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76), 1695 1695 PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e), 1696 - PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875), 1697 1696 PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f), 1698 1697 PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1), 1699 1698 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b),
+11 -2
drivers/net/phy/phy_device.c
··· 227 227 if (r) 228 228 return ERR_PTR(r); 229 229 230 - /* If the phy_id is all Fs or all 0s, there is no device there */ 231 - if ((0xffff == phy_id) || (0x00 == phy_id)) 230 + /* If the phy_id is mostly Fs, there is no device there */ 231 + if ((phy_id & 0x1fffffff) == 0x1fffffff) 232 + return NULL; 233 + 234 + /* 235 + * Broken hardware is sometimes missing the pull down resistor on the 236 + * MDIO line, which results in reads to non-existent devices returning 237 + * 0 rather than 0xffff. Catch this here and treat 0 as a non-existent 238 + * device as well. 239 + */ 240 + if (phy_id == 0) 232 241 return NULL; 233 242 234 243 dev = phy_device_create(bus, addr, phy_id);
+55 -9
drivers/net/phy/vitesse.c
··· 34 34 #define MII_VSC8244_IMASK_DUPLEX 0x1000 35 35 #define MII_VSC8244_IMASK_MASK 0xf000 36 36 37 + #define MII_VSC8221_IMASK_MASK 0xa000 38 + 37 39 /* Vitesse Interrupt Status Register */ 38 40 #define MII_VSC8244_ISTAT 0x1a 39 41 #define MII_VSC8244_ISTAT_STATUS 0x8000 ··· 50 48 #define MII_VSC8244_AUXCONSTAT_SPEED 0x0018 51 49 #define MII_VSC8244_AUXCONSTAT_GBIT 0x0010 52 50 #define MII_VSC8244_AUXCONSTAT_100 0x0008 51 + 52 + #define MII_VSC8221_AUXCONSTAT_INIT 0x0004 /* need to set this bit? */ 53 + #define MII_VSC8221_AUXCONSTAT_RESERVED 0x0004 54 + 55 + #define PHY_ID_VSC8244 0x000fc6c0 56 + #define PHY_ID_VSC8221 0x000fc550 53 57 54 58 MODULE_DESCRIPTION("Vitesse PHY driver"); 55 59 MODULE_AUTHOR("Kriston Carson"); ··· 103 95 return (err < 0) ? err : 0; 104 96 } 105 97 106 - static int vsc824x_config_intr(struct phy_device *phydev) 98 + static int vsc82xx_config_intr(struct phy_device *phydev) 107 99 { 108 100 int err; 109 101 110 102 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) 111 103 err = phy_write(phydev, MII_VSC8244_IMASK, 112 - MII_VSC8244_IMASK_MASK); 104 + phydev->drv->phy_id == PHY_ID_VSC8244 ? 105 + MII_VSC8244_IMASK_MASK : 106 + MII_VSC8221_IMASK_MASK); 113 107 else { 114 108 /* 115 109 * The Vitesse PHY cannot clear the interrupt ··· 130 120 131 121 /* Vitesse 824x */ 132 122 static struct phy_driver vsc8244_driver = { 133 - .phy_id = 0x000fc6c0, 123 + .phy_id = PHY_ID_VSC8244, 134 124 .name = "Vitesse VSC8244", 135 125 .phy_id_mask = 0x000fffc0, 136 126 .features = PHY_GBIT_FEATURES, ··· 139 129 .config_aneg = &genphy_config_aneg, 140 130 .read_status = &genphy_read_status, 141 131 .ack_interrupt = &vsc824x_ack_interrupt, 142 - .config_intr = &vsc824x_config_intr, 132 + .config_intr = &vsc82xx_config_intr, 143 133 .driver = { .owner = THIS_MODULE,}, 144 134 }; 145 135 146 - static int __init vsc8244_init(void) 136 + static int vsc8221_config_init(struct phy_device *phydev) 147 137 { 148 - return phy_driver_register(&vsc8244_driver); 138 + int err; 139 + 140 + err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, 141 + MII_VSC8221_AUXCONSTAT_INIT); 142 + return err; 143 + 144 + /* Perhaps we should set EXT_CON1 based on the interface? 145 + Options are 802.3Z SerDes or SGMII */ 149 146 } 150 147 151 - static void __exit vsc8244_exit(void) 148 + /* Vitesse 8221 */ 149 + static struct phy_driver vsc8221_driver = { 150 + .phy_id = PHY_ID_VSC8221, 151 + .phy_id_mask = 0x000ffff0, 152 + .name = "Vitesse VSC8221", 153 + .features = PHY_GBIT_FEATURES, 154 + .flags = PHY_HAS_INTERRUPT, 155 + .config_init = &vsc8221_config_init, 156 + .config_aneg = &genphy_config_aneg, 157 + .read_status = &genphy_read_status, 158 + .ack_interrupt = &vsc824x_ack_interrupt, 159 + .config_intr = &vsc82xx_config_intr, 160 + .driver = { .owner = THIS_MODULE,}, 161 + }; 162 + 163 + static int __init vsc82xx_init(void) 164 + { 165 + int err; 166 + 167 + err = phy_driver_register(&vsc8244_driver); 168 + if (err < 0) 169 + return err; 170 + err = phy_driver_register(&vsc8221_driver); 171 + if (err < 0) 172 + phy_driver_unregister(&vsc8244_driver); 173 + return err; 174 + } 175 + 176 + static void __exit vsc82xx_exit(void) 152 177 { 153 178 phy_driver_unregister(&vsc8244_driver); 179 + phy_driver_unregister(&vsc8221_driver); 154 180 } 155 181 156 - module_init(vsc8244_init); 157 - module_exit(vsc8244_exit); 182 + module_init(vsc82xx_init); 183 + module_exit(vsc82xx_exit);
+1
drivers/net/pppol2tp.c
··· 1353 1353 kfree_skb(skb); 1354 1354 sock_put(sk); 1355 1355 } 1356 + sock_put(sk); 1356 1357 } 1357 1358 1358 1359 release_sock(sk);
-1
drivers/net/sis900.c
··· 1630 1630 * sis900_interrupt - sis900 interrupt handler 1631 1631 * @irq: the irq number 1632 1632 * @dev_instance: the client data object 1633 - * @regs: snapshot of processor context 1634 1633 * 1635 1634 * The interrupt handler does all of the Rx thread work, 1636 1635 * and cleans up after the Tx thread
-4
drivers/net/spider_net.c
··· 672 672 /** 673 673 * spider_net_prepare_tx_descr - fill tx descriptor with skb data 674 674 * @card: card structure 675 - * @descr: descriptor structure to fill out 676 675 * @skb: packet to use 677 676 * 678 677 * returns 0 on success, <0 on failure. ··· 866 867 /** 867 868 * spider_net_kick_tx_dma - enables TX DMA processing 868 869 * @card: card structure 869 - * @descr: descriptor address to enable TX processing at 870 870 * 871 871 * This routine will start the transmit DMA running if 872 872 * it is not already running. This routine ned only be ··· 1635 1637 * spider_net_interrupt - interrupt handler for spider_net 1636 1638 * @irq: interrupt number 1637 1639 * @ptr: pointer to net_device 1638 - * @regs: PU registers 1639 1640 * 1640 1641 * returns IRQ_HANDLED, if interrupt was for driver, or IRQ_NONE, if no 1641 1642 * interrupt found raised by card. ··· 2416 2419 2417 2420 /** 2418 2421 * spider_net_setup_pci_dev - sets up the device in terms of PCI operations 2419 - * @card: card structure 2420 2422 * @pdev: PCI device 2421 2423 * 2422 2424 * Returns the card structure or NULL if any errors occur
+1 -1
drivers/net/sungem.c
··· 1714 1714 /* Reset PCS unit. */ 1715 1715 val = readl(gp->regs + PCS_MIICTRL); 1716 1716 val |= PCS_MIICTRL_RST; 1717 - writeb(val, gp->regs + PCS_MIICTRL); 1717 + writel(val, gp->regs + PCS_MIICTRL); 1718 1718 1719 1719 limit = 32; 1720 1720 while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) {
+34 -1
drivers/net/wireless/ath5k/base.c
··· 240 240 static void ath5k_reset_tsf(struct ieee80211_hw *hw); 241 241 static int ath5k_beacon_update(struct ieee80211_hw *hw, 242 242 struct sk_buff *skb); 243 + static void ath5k_bss_info_changed(struct ieee80211_hw *hw, 244 + struct ieee80211_vif *vif, 245 + struct ieee80211_bss_conf *bss_conf, 246 + u32 changes); 243 247 244 248 static struct ieee80211_ops ath5k_hw_ops = { 245 249 .tx = ath5k_tx, ··· 260 256 .get_tx_stats = ath5k_get_tx_stats, 261 257 .get_tsf = ath5k_get_tsf, 262 258 .reset_tsf = ath5k_reset_tsf, 259 + .bss_info_changed = ath5k_bss_info_changed, 263 260 }; 264 261 265 262 /* ··· 2947 2942 sc->opmode != NL80211_IFTYPE_MESH_POINT && 2948 2943 test_bit(ATH_STAT_PROMISC, sc->status)) 2949 2944 rfilt |= AR5K_RX_FILTER_PROM; 2950 - if (sc->opmode == NL80211_IFTYPE_STATION || 2945 + if ((sc->opmode == NL80211_IFTYPE_STATION && sc->assoc) || 2951 2946 sc->opmode == NL80211_IFTYPE_ADHOC) { 2952 2947 rfilt |= AR5K_RX_FILTER_BEACON; 2953 2948 } ··· 3088 3083 end: 3089 3084 return ret; 3090 3085 } 3086 + static void 3087 + set_beacon_filter(struct ieee80211_hw *hw, bool enable) 3088 + { 3089 + struct ath5k_softc *sc = hw->priv; 3090 + struct ath5k_hw *ah = sc->ah; 3091 + u32 rfilt; 3092 + rfilt = ath5k_hw_get_rx_filter(ah); 3093 + if (enable) 3094 + rfilt |= AR5K_RX_FILTER_BEACON; 3095 + else 3096 + rfilt &= ~AR5K_RX_FILTER_BEACON; 3097 + ath5k_hw_set_rx_filter(ah, rfilt); 3098 + sc->filter_flags = rfilt; 3099 + } 3091 3100 3101 + static void ath5k_bss_info_changed(struct ieee80211_hw *hw, 3102 + struct ieee80211_vif *vif, 3103 + struct ieee80211_bss_conf *bss_conf, 3104 + u32 changes) 3105 + { 3106 + struct ath5k_softc *sc = hw->priv; 3107 + if (changes & BSS_CHANGED_ASSOC) { 3108 + mutex_lock(&sc->lock); 3109 + sc->assoc = bss_conf->assoc; 3110 + if (sc->opmode == NL80211_IFTYPE_STATION) 3111 + set_beacon_filter(hw, sc->assoc); 3112 + mutex_unlock(&sc->lock); 3113 + } 3114 + }
+1
drivers/net/wireless/ath5k/base.h
··· 179 179 180 180 struct timer_list calib_tim; /* calibration timer */ 181 181 int power_level; /* Requested tx power in dbm */ 182 + bool assoc; /* assocate state */ 182 183 }; 183 184 184 185 #define ath5k_hw_hasbssidmask(_ah) \
+5 -5
drivers/net/wireless/ath5k/debug.c
··· 417 417 sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), 418 418 ath5k_global_debugfs); 419 419 420 - sc->debug.debugfs_debug = debugfs_create_file("debug", 0666, 420 + sc->debug.debugfs_debug = debugfs_create_file("debug", S_IWUSR | S_IRUGO, 421 421 sc->debug.debugfs_phydir, sc, &fops_debug); 422 422 423 - sc->debug.debugfs_registers = debugfs_create_file("registers", 0444, 423 + sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUGO, 424 424 sc->debug.debugfs_phydir, sc, &fops_registers); 425 425 426 - sc->debug.debugfs_tsf = debugfs_create_file("tsf", 0666, 426 + sc->debug.debugfs_tsf = debugfs_create_file("tsf", S_IWUSR | S_IRUGO, 427 427 sc->debug.debugfs_phydir, sc, &fops_tsf); 428 428 429 - sc->debug.debugfs_beacon = debugfs_create_file("beacon", 0666, 429 + sc->debug.debugfs_beacon = debugfs_create_file("beacon", S_IWUSR | S_IRUGO, 430 430 sc->debug.debugfs_phydir, sc, &fops_beacon); 431 431 432 - sc->debug.debugfs_reset = debugfs_create_file("reset", 0222, 432 + sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR, 433 433 sc->debug.debugfs_phydir, sc, &fops_reset); 434 434 } 435 435
+5 -5
drivers/net/wireless/ath9k/beacon.c
··· 170 170 skb = (struct sk_buff *)bf->bf_mpdu; 171 171 if (skb) { 172 172 pci_unmap_single(sc->pdev, bf->bf_dmacontext, 173 - skb_end_pointer(skb) - skb->head, 173 + skb->len, 174 174 PCI_DMA_TODEVICE); 175 175 } 176 176 ··· 193 193 194 194 bf->bf_buf_addr = bf->bf_dmacontext = 195 195 pci_map_single(sc->pdev, skb->data, 196 - skb_end_pointer(skb) - skb->head, 196 + skb->len, 197 197 PCI_DMA_TODEVICE); 198 198 199 199 skb = ieee80211_get_buffered_bc(sc->hw, avp->av_if_data); ··· 352 352 if (bf->bf_mpdu != NULL) { 353 353 skb = (struct sk_buff *)bf->bf_mpdu; 354 354 pci_unmap_single(sc->pdev, bf->bf_dmacontext, 355 - skb_end_pointer(skb) - skb->head, 355 + skb->len, 356 356 PCI_DMA_TODEVICE); 357 357 dev_kfree_skb_any(skb); 358 358 bf->bf_mpdu = NULL; ··· 412 412 413 413 bf->bf_buf_addr = bf->bf_dmacontext = 414 414 pci_map_single(sc->pdev, skb->data, 415 - skb_end_pointer(skb) - skb->head, 415 + skb->len, 416 416 PCI_DMA_TODEVICE); 417 417 bf->bf_mpdu = skb; 418 418 ··· 439 439 if (bf->bf_mpdu != NULL) { 440 440 struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu; 441 441 pci_unmap_single(sc->pdev, bf->bf_dmacontext, 442 - skb_end_pointer(skb) - skb->head, 442 + skb->len, 443 443 PCI_DMA_TODEVICE); 444 444 dev_kfree_skb_any(skb); 445 445 bf->bf_mpdu = NULL;
+14 -5
drivers/net/wireless/ath9k/recv.c
··· 49 49 ASSERT(skb != NULL); 50 50 ds->ds_vdata = skb->data; 51 51 52 - /* setup rx descriptors */ 52 + /* setup rx descriptors. The sc_rxbufsize here tells the harware 53 + * how much data it can DMA to us and that we are prepared 54 + * to process */ 53 55 ath9k_hw_setuprxdesc(ah, 54 56 ds, 55 - skb_tailroom(skb), /* buffer size */ 57 + sc->sc_rxbufsize, 56 58 0); 57 59 58 60 if (sc->sc_rxlink == NULL) ··· 400 398 * in rx'd frames. 401 399 */ 402 400 401 + /* Note: the kernel can allocate a value greater than 402 + * what we ask it to give us. We really only need 4 KB as that 403 + * is this hardware supports and in fact we need at least 3849 404 + * as that is the MAX AMSDU size this hardware supports. 405 + * Unfortunately this means we may get 8 KB here from the 406 + * kernel... and that is actually what is observed on some 407 + * systems :( */ 403 408 skb = dev_alloc_skb(len + sc->sc_cachelsz - 1); 404 409 if (skb != NULL) { 405 410 off = ((unsigned long) skb->data) % sc->sc_cachelsz; ··· 465 456 if (nskb != NULL) { 466 457 bf->bf_mpdu = nskb; 467 458 bf->bf_buf_addr = pci_map_single(sc->pdev, nskb->data, 468 - skb_end_pointer(nskb) - nskb->head, 459 + sc->sc_rxbufsize, 469 460 PCI_DMA_FROMDEVICE); 470 461 bf->bf_dmacontext = bf->bf_buf_addr; 471 462 ATH_RX_CONTEXT(nskb)->ctx_rxbuf = bf; ··· 551 542 552 543 bf->bf_mpdu = skb; 553 544 bf->bf_buf_addr = pci_map_single(sc->pdev, skb->data, 554 - skb_end_pointer(skb) - skb->head, 545 + sc->sc_rxbufsize, 555 546 PCI_DMA_FROMDEVICE); 556 547 bf->bf_dmacontext = bf->bf_buf_addr; 557 548 ATH_RX_CONTEXT(skb)->ctx_rxbuf = bf; ··· 1016 1007 1017 1008 pci_dma_sync_single_for_cpu(sc->pdev, 1018 1009 bf->bf_buf_addr, 1019 - skb_tailroom(skb), 1010 + sc->sc_rxbufsize, 1020 1011 PCI_DMA_FROMDEVICE); 1021 1012 pci_unmap_single(sc->pdev, 1022 1013 bf->bf_buf_addr,
+5 -3
drivers/net/wireless/iwlwifi/iwl-agn.c
··· 1384 1384 1385 1385 rxq->queue[i] = NULL; 1386 1386 1387 - pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr, 1388 - priv->hw_params.rx_buf_size, 1389 - PCI_DMA_FROMDEVICE); 1387 + dma_sync_single_range_for_cpu( 1388 + &priv->pci_dev->dev, rxb->real_dma_addr, 1389 + rxb->aligned_dma_addr - rxb->real_dma_addr, 1390 + priv->hw_params.rx_buf_size, 1391 + PCI_DMA_FROMDEVICE); 1390 1392 pkt = (struct iwl_rx_packet *)rxb->skb->data; 1391 1393 1392 1394 /* Reclaim a command buffer only if this packet is a response
+17
drivers/pci/quirks.c
··· 22 22 #include <linux/delay.h> 23 23 #include <linux/acpi.h> 24 24 #include <linux/kallsyms.h> 25 + #include <linux/dmi.h> 25 26 #include "pci.h" 26 27 27 28 int isa_dma_bridge_buggy; ··· 1828 1827 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, 1829 1828 PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, 1830 1829 ht_enable_msi_mapping); 1830 + 1831 + /* The P5N32-SLI Premium motherboard from Asus has a problem with msi 1832 + * for the MCP55 NIC. It is not yet determined whether the msi problem 1833 + * also affects other devices. As for now, turn off msi for this device. 1834 + */ 1835 + static void __devinit nvenet_msi_disable(struct pci_dev *dev) 1836 + { 1837 + if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) { 1838 + dev_info(&dev->dev, 1839 + "Disabling msi for MCP55 NIC on P5N32-SLI Premium\n"); 1840 + dev->no_msi = 1; 1841 + } 1842 + } 1843 + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 1844 + PCI_DEVICE_ID_NVIDIA_NVENET_15, 1845 + nvenet_msi_disable); 1831 1846 1832 1847 static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) 1833 1848 {
+1 -1
include/linux/netfilter/x_tables.h
··· 251 251 */ 252 252 struct xt_tgchk_param { 253 253 const char *table; 254 - void *entryinfo; 254 + const void *entryinfo; 255 255 const struct xt_target *target; 256 256 void *targinfo; 257 257 unsigned int hook_mask;
+1
include/net/af_unix.h
··· 9 9 extern void unix_inflight(struct file *fp); 10 10 extern void unix_notinflight(struct file *fp); 11 11 extern void unix_gc(void); 12 + extern void wait_for_unix_gc(void); 12 13 13 14 #define UNIX_HASH_SIZE 256 14 15
+1
include/net/request_sock.h
··· 31 31 int family; 32 32 int obj_size; 33 33 struct kmem_cache *slab; 34 + char *slab_name; 34 35 int (*rtx_syn_ack)(struct sock *sk, 35 36 struct request_sock *req); 36 37 void (*send_ack)(struct sock *sk, struct sk_buff *skb,
+1
include/net/timewait_sock.h
··· 16 16 17 17 struct timewait_sock_ops { 18 18 struct kmem_cache *twsk_slab; 19 + char *twsk_slab_name; 19 20 unsigned int twsk_obj_size; 20 21 int (*twsk_unique)(struct sock *sk, 21 22 struct sock *sktw, void *twp);
+13
net/bridge/br_netfilter.c
··· 101 101 pppoe_proto(skb) == htons(PPP_IPV6) && \ 102 102 brnf_filter_pppoe_tagged) 103 103 104 + static void fake_update_pmtu(struct dst_entry *dst, u32 mtu) 105 + { 106 + } 107 + 108 + static struct dst_ops fake_dst_ops = { 109 + .family = AF_INET, 110 + .protocol = __constant_htons(ETH_P_IP), 111 + .update_pmtu = fake_update_pmtu, 112 + .entry_size = sizeof(struct rtable), 113 + .entries = ATOMIC_INIT(0), 114 + }; 115 + 104 116 /* 105 117 * Initialize bogus route table used to keep netfilter happy. 106 118 * Currently, we fill in the PMTU entry because netfilter ··· 129 117 rt->u.dst.path = &rt->u.dst; 130 118 rt->u.dst.metrics[RTAX_MTU - 1] = 1500; 131 119 rt->u.dst.flags = DST_NOXFRM; 120 + rt->u.dst.ops = &fake_dst_ops; 132 121 } 133 122 134 123 static inline struct rtable *bridge_parent_rtable(const struct net_device *dev)
+1 -1
net/core/skbuff.c
··· 149 149 150 150 void skb_truesize_bug(struct sk_buff *skb) 151 151 { 152 - printk(KERN_ERR "SKB BUG: Invalid truesize (%u) " 152 + WARN(net_ratelimit(), KERN_ERR "SKB BUG: Invalid truesize (%u) " 153 153 "len=%u, sizeof(sk_buff)=%Zd\n", 154 154 skb->truesize, skb->len, sizeof(struct sk_buff)); 155 155 }
+12 -19
net/core/sock.c
··· 2035 2035 2036 2036 int proto_register(struct proto *prot, int alloc_slab) 2037 2037 { 2038 - char *request_sock_slab_name = NULL; 2039 - char *timewait_sock_slab_name; 2040 - 2041 2038 if (alloc_slab) { 2042 2039 prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, 2043 2040 SLAB_HWCACHE_ALIGN, NULL); ··· 2048 2051 if (prot->rsk_prot != NULL) { 2049 2052 static const char mask[] = "request_sock_%s"; 2050 2053 2051 - request_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); 2052 - if (request_sock_slab_name == NULL) 2054 + prot->rsk_prot->slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); 2055 + if (prot->rsk_prot->slab_name == NULL) 2053 2056 goto out_free_sock_slab; 2054 2057 2055 - sprintf(request_sock_slab_name, mask, prot->name); 2056 - prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name, 2058 + sprintf(prot->rsk_prot->slab_name, mask, prot->name); 2059 + prot->rsk_prot->slab = kmem_cache_create(prot->rsk_prot->slab_name, 2057 2060 prot->rsk_prot->obj_size, 0, 2058 2061 SLAB_HWCACHE_ALIGN, NULL); 2059 2062 ··· 2067 2070 if (prot->twsk_prot != NULL) { 2068 2071 static const char mask[] = "tw_sock_%s"; 2069 2072 2070 - timewait_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); 2073 + prot->twsk_prot->twsk_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); 2071 2074 2072 - if (timewait_sock_slab_name == NULL) 2075 + if (prot->twsk_prot->twsk_slab_name == NULL) 2073 2076 goto out_free_request_sock_slab; 2074 2077 2075 - sprintf(timewait_sock_slab_name, mask, prot->name); 2078 + sprintf(prot->twsk_prot->twsk_slab_name, mask, prot->name); 2076 2079 prot->twsk_prot->twsk_slab = 2077 - kmem_cache_create(timewait_sock_slab_name, 2080 + kmem_cache_create(prot->twsk_prot->twsk_slab_name, 2078 2081 prot->twsk_prot->twsk_obj_size, 2079 2082 0, SLAB_HWCACHE_ALIGN, 2080 2083 NULL); ··· 2090 2093 return 0; 2091 2094 2092 2095 out_free_timewait_sock_slab_name: 2093 - kfree(timewait_sock_slab_name); 2096 + kfree(prot->twsk_prot->twsk_slab_name); 2094 2097 out_free_request_sock_slab: 2095 2098 if (prot->rsk_prot && prot->rsk_prot->slab) { 2096 2099 kmem_cache_destroy(prot->rsk_prot->slab); 2097 2100 prot->rsk_prot->slab = NULL; 2098 2101 } 2099 2102 out_free_request_sock_slab_name: 2100 - kfree(request_sock_slab_name); 2103 + kfree(prot->rsk_prot->slab_name); 2101 2104 out_free_sock_slab: 2102 2105 kmem_cache_destroy(prot->slab); 2103 2106 prot->slab = NULL; ··· 2120 2123 } 2121 2124 2122 2125 if (prot->rsk_prot != NULL && prot->rsk_prot->slab != NULL) { 2123 - const char *name = kmem_cache_name(prot->rsk_prot->slab); 2124 - 2125 2126 kmem_cache_destroy(prot->rsk_prot->slab); 2126 - kfree(name); 2127 + kfree(prot->rsk_prot->slab_name); 2127 2128 prot->rsk_prot->slab = NULL; 2128 2129 } 2129 2130 2130 2131 if (prot->twsk_prot != NULL && prot->twsk_prot->twsk_slab != NULL) { 2131 - const char *name = kmem_cache_name(prot->twsk_prot->twsk_slab); 2132 - 2133 2132 kmem_cache_destroy(prot->twsk_prot->twsk_slab); 2134 - kfree(name); 2133 + kfree(prot->twsk_prot->twsk_slab_name); 2135 2134 prot->twsk_prot->twsk_slab = NULL; 2136 2135 } 2137 2136 }
+5 -2
net/ipv4/tcp_output.c
··· 722 722 static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, 723 723 unsigned int mss_now) 724 724 { 725 - if (skb->len <= mss_now || !sk_can_gso(sk)) { 725 + if (skb->len <= mss_now || !sk_can_gso(sk) || 726 + tcp_urg_mode(tcp_sk(sk))) { 726 727 /* Avoid the costly divide in the normal 727 728 * non-TSO case. 728 729 */ ··· 1164 1163 { 1165 1164 int tso_segs = tcp_skb_pcount(skb); 1166 1165 1167 - if (!tso_segs || (tso_segs > 1 && tcp_skb_mss(skb) != mss_now)) { 1166 + if (!tso_segs || 1167 + (tso_segs > 1 && (tcp_skb_mss(skb) != mss_now || 1168 + tcp_urg_mode(tcp_sk(sk))))) { 1168 1169 tcp_set_skb_tso_segs(sk, skb, mss_now); 1169 1170 tso_segs = tcp_skb_pcount(skb); 1170 1171 }
+8
net/mac80211/wext.c
··· 271 271 __u32 *mode, char *extra) 272 272 { 273 273 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 274 + struct ieee80211_local *local = sdata->local; 274 275 int type; 275 276 276 277 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) ··· 282 281 type = NL80211_IFTYPE_STATION; 283 282 break; 284 283 case IW_MODE_ADHOC: 284 + /* Setting ad-hoc mode on non ibss channel is not 285 + * supported. 286 + */ 287 + if (local->oper_channel && 288 + (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS)) 289 + return -EOPNOTSUPP; 290 + 285 291 type = NL80211_IFTYPE_ADHOC; 286 292 break; 287 293 case IW_MODE_REPEAT:
-2
net/netfilter/nf_conntrack_core.c
··· 305 305 hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); 306 306 repl_hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); 307 307 308 - spin_lock_bh(&nf_conntrack_lock); 309 308 __nf_conntrack_hash_insert(ct, hash, repl_hash); 310 - spin_unlock_bh(&nf_conntrack_lock); 311 309 } 312 310 EXPORT_SYMBOL_GPL(nf_conntrack_hash_insert); 313 311
+4 -3
net/netfilter/nf_conntrack_netlink.c
··· 1090 1090 struct nf_conn_help *help; 1091 1091 struct nf_conntrack_helper *helper; 1092 1092 1093 - ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_KERNEL); 1093 + ct = nf_conntrack_alloc(&init_net, otuple, rtuple, GFP_ATOMIC); 1094 1094 if (ct == NULL || IS_ERR(ct)) 1095 1095 return -ENOMEM; 1096 1096 ··· 1138 1138 } 1139 1139 } 1140 1140 1141 - nf_ct_acct_ext_add(ct, GFP_KERNEL); 1141 + nf_ct_acct_ext_add(ct, GFP_ATOMIC); 1142 1142 1143 1143 #if defined(CONFIG_NF_CONNTRACK_MARK) 1144 1144 if (cda[CTA_MARK]) ··· 1212 1212 atomic_inc(&master_ct->ct_general.use); 1213 1213 } 1214 1214 1215 - spin_unlock_bh(&nf_conntrack_lock); 1216 1215 err = -ENOENT; 1217 1216 if (nlh->nlmsg_flags & NLM_F_CREATE) 1218 1217 err = ctnetlink_create_conntrack(cda, 1219 1218 &otuple, 1220 1219 &rtuple, 1221 1220 master_ct); 1221 + spin_unlock_bh(&nf_conntrack_lock); 1222 + 1222 1223 if (err < 0 && master_ct) 1223 1224 nf_ct_put(master_ct); 1224 1225
+1 -1
net/phonet/pn_dev.c
··· 115 115 pnd = __phonet_get(dev); 116 116 if (!pnd || !test_and_clear_bit(addr >> 2, pnd->addrs)) 117 117 err = -EADDRNOTAVAIL; 118 - if (bitmap_empty(pnd->addrs, 64)) 118 + else if (bitmap_empty(pnd->addrs, 64)) 119 119 __phonet_device_free(pnd); 120 120 spin_unlock_bh(&pndevs.lock); 121 121 return err;
+10
net/rose/af_rose.c
··· 1072 1072 unsigned char *asmptr; 1073 1073 int n, size, qbit = 0; 1074 1074 1075 + /* ROSE empty frame has no meaning : don't send */ 1076 + if (len == 0) 1077 + return 0; 1078 + 1075 1079 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) 1076 1080 return -EINVAL; 1077 1081 ··· 1268 1264 1269 1265 skb_reset_transport_header(skb); 1270 1266 copied = skb->len; 1267 + 1268 + /* ROSE empty frame has no meaning : ignore it */ 1269 + if (copied == 0) { 1270 + skb_free_datagram(sk, skb); 1271 + return copied; 1272 + } 1271 1273 1272 1274 if (copied > size) { 1273 1275 copied = size;
+2
net/unix/af_unix.c
··· 1343 1343 1344 1344 if (NULL == siocb->scm) 1345 1345 siocb->scm = &tmp_scm; 1346 + wait_for_unix_gc(); 1346 1347 err = scm_send(sock, msg, siocb->scm); 1347 1348 if (err < 0) 1348 1349 return err; ··· 1494 1493 1495 1494 if (NULL == siocb->scm) 1496 1495 siocb->scm = &tmp_scm; 1496 + wait_for_unix_gc(); 1497 1497 err = scm_send(sock, msg, siocb->scm); 1498 1498 if (err < 0) 1499 1499 return err;
+10 -3
net/unix/garbage.c
··· 80 80 #include <linux/file.h> 81 81 #include <linux/proc_fs.h> 82 82 #include <linux/mutex.h> 83 + #include <linux/wait.h> 83 84 84 85 #include <net/sock.h> 85 86 #include <net/af_unix.h> ··· 92 91 static LIST_HEAD(gc_inflight_list); 93 92 static LIST_HEAD(gc_candidates); 94 93 static DEFINE_SPINLOCK(unix_gc_lock); 94 + static DECLARE_WAIT_QUEUE_HEAD(unix_gc_wait); 95 95 96 96 unsigned int unix_tot_inflight; 97 97 ··· 268 266 list_move_tail(&u->link, &gc_candidates); 269 267 } 270 268 271 - /* The external entry point: unix_gc() */ 269 + static bool gc_in_progress = false; 272 270 271 + void wait_for_unix_gc(void) 272 + { 273 + wait_event(unix_gc_wait, gc_in_progress == false); 274 + } 275 + 276 + /* The external entry point: unix_gc() */ 273 277 void unix_gc(void) 274 278 { 275 - static bool gc_in_progress = false; 276 - 277 279 struct unix_sock *u; 278 280 struct unix_sock *next; 279 281 struct sk_buff_head hitlist; ··· 382 376 /* All candidates should have been detached by now. */ 383 377 BUG_ON(!list_empty(&gc_candidates)); 384 378 gc_in_progress = false; 379 + wake_up(&unix_gc_wait); 385 380 386 381 out: 387 382 spin_unlock(&unix_gc_lock);
+2 -2
net/wireless/reg.c
··· 343 343 return 0; 344 344 return -EALREADY; 345 345 } 346 - if (WARN_ON(!is_alpha2_set(alpha2) || !is_an_alpha2(alpha2)), 346 + if (WARN(!is_alpha2_set(alpha2) || !is_an_alpha2(alpha2), 347 347 "Invalid Country IE regulatory hint passed " 348 - "to the wireless core\n") 348 + "to the wireless core\n")) 349 349 return -EINVAL; 350 350 /* We ignore Country IE hints for now, as we haven't yet 351 351 * added the dot11MultiDomainCapabilityEnabled flag