diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-27 02:48:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-27 02:48:40 -0500 |
commit | 5b9ab2ec04ec1e1e53939768805612ac191d7ba2 (patch) | |
tree | 22d29905c148d2d743b3eccb585fbe60fb91e25a | |
parent | 851fd7bd88524bb4e20f3def3127cd9167d6d0cf (diff) | |
parent | 3ec192559033ed457f0d7856838654c100fc659f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/hp-plus.c
drivers/net/wireless/ath5k/base.c
drivers/net/wireless/ath9k/recv.c
net/wireless/reg.c
31 files changed, 215 insertions, 85 deletions
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index e06829aa75b0..5f3baca3620d 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
@@ -113,7 +113,7 @@ obj-$(CONFIG_EL2) += 3c503.o 8390p.o | |||
113 | obj-$(CONFIG_NE2000) += ne.o 8390p.o | 113 | obj-$(CONFIG_NE2000) += ne.o 8390p.o |
114 | obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o | 114 | obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o |
115 | obj-$(CONFIG_HPLAN) += hp.o 8390p.o | 115 | obj-$(CONFIG_HPLAN) += hp.o 8390p.o |
116 | obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390.o | 116 | obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390p.o |
117 | obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o | 117 | obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o |
118 | obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o | 118 | obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o |
119 | obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o | 119 | obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o |
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index ca80289fc04d..1da70070c2fa 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -1035,10 +1035,6 @@ MODULE_PARM_DESC(copybreak, "Receive copy threshold"); | |||
1035 | * @pdev: the PCI device that received the packet | 1035 | * @pdev: the PCI device that received the packet |
1036 | * @fl: the SGE free list holding the packet | 1036 | * @fl: the SGE free list holding the packet |
1037 | * @len: the actual packet length, excluding any SGE padding | 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 | * Get the next packet from a free list and complete setup of the | 1039 | * Get the next packet from a free list and complete setup of the |
1044 | * sk_buff. If the packet is small we make a copy and recycle the | 1040 | * sk_buff. If the packet is small we make a copy and recycle the |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index ca5d3f58329d..65fd9797d028 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -343,7 +343,6 @@ no_buffers: | |||
343 | /** | 343 | /** |
344 | * e1000_alloc_jumbo_rx_buffers - Replace used jumbo receive buffers | 344 | * e1000_alloc_jumbo_rx_buffers - Replace used jumbo receive buffers |
345 | * @adapter: address of board private structure | 345 | * @adapter: address of board private structure |
346 | * @rx_ring: pointer to receive ring structure | ||
347 | * @cleaned_count: number of buffers to allocate this pass | 346 | * @cleaned_count: number of buffers to allocate this pass |
348 | **/ | 347 | **/ |
349 | 348 | ||
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index c34411cba6b4..b507dbc16e62 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
@@ -161,14 +161,14 @@ out: | |||
161 | static const struct net_device_ops hpp_netdev_ops = { | 161 | static const struct net_device_ops hpp_netdev_ops = { |
162 | .ndo_open = hpp_open, | 162 | .ndo_open = hpp_open, |
163 | .ndo_stop = hpp_close, | 163 | .ndo_stop = hpp_close, |
164 | .ndo_start_xmit = ei_start_xmit, | 164 | .ndo_start_xmit = eip_start_xmit, |
165 | .ndo_tx_timeout = ei_tx_timeout, | 165 | .ndo_tx_timeout = eip_tx_timeout, |
166 | .ndo_get_stats = ei_get_stats, | 166 | .ndo_get_stats = eip_get_stats, |
167 | .ndo_set_multicast_list = ei_set_multicast_list, | 167 | .ndo_set_multicast_list = eip_set_multicast_list, |
168 | .ndo_validate_addr = eth_validate_addr, | 168 | .ndo_validate_addr = eth_validate_addr, |
169 | .ndo_change_mtu = eth_change_mtu, | 169 | .ndo_change_mtu = eth_change_mtu, |
170 | #ifdef CONFIG_NET_POLL_CONTROLLER | 170 | #ifdef CONFIG_NET_POLL_CONTROLLER |
171 | .ndo_poll_controller = ei_poll, | 171 | .ndo_poll_controller = eip_poll, |
172 | #endif | 172 | #endif |
173 | }; | 173 | }; |
174 | 174 | ||
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index ab37ab03a45c..d7daf12ab07d 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -1975,7 +1975,6 @@ static void igb_configure_rx(struct igb_adapter *adapter) | |||
1975 | 1975 | ||
1976 | /** | 1976 | /** |
1977 | * igb_free_tx_resources - Free Tx Resources per Queue | 1977 | * igb_free_tx_resources - Free Tx Resources per Queue |
1978 | * @adapter: board private structure | ||
1979 | * @tx_ring: Tx descriptor ring for a specific queue | 1978 | * @tx_ring: Tx descriptor ring for a specific queue |
1980 | * | 1979 | * |
1981 | * Free all transmit software resources | 1980 | * Free all transmit software resources |
@@ -2028,7 +2027,6 @@ static void igb_unmap_and_free_tx_resource(struct igb_adapter *adapter, | |||
2028 | 2027 | ||
2029 | /** | 2028 | /** |
2030 | * igb_clean_tx_ring - Free Tx Buffers | 2029 | * igb_clean_tx_ring - Free Tx Buffers |
2031 | * @adapter: board private structure | ||
2032 | * @tx_ring: ring to be cleaned | 2030 | * @tx_ring: ring to be cleaned |
2033 | **/ | 2031 | **/ |
2034 | static void igb_clean_tx_ring(struct igb_ring *tx_ring) | 2032 | static void igb_clean_tx_ring(struct igb_ring *tx_ring) |
@@ -2075,7 +2073,6 @@ static void igb_clean_all_tx_rings(struct igb_adapter *adapter) | |||
2075 | 2073 | ||
2076 | /** | 2074 | /** |
2077 | * igb_free_rx_resources - Free Rx Resources | 2075 | * igb_free_rx_resources - Free Rx Resources |
2078 | * @adapter: board private structure | ||
2079 | * @rx_ring: ring to clean the resources from | 2076 | * @rx_ring: ring to clean the resources from |
2080 | * | 2077 | * |
2081 | * Free all receive software resources | 2078 | * Free all receive software resources |
@@ -2115,7 +2112,6 @@ static void igb_free_all_rx_resources(struct igb_adapter *adapter) | |||
2115 | 2112 | ||
2116 | /** | 2113 | /** |
2117 | * igb_clean_rx_ring - Free Rx Buffers per Queue | 2114 | * igb_clean_rx_ring - Free Rx Buffers per Queue |
2118 | * @adapter: board private structure | ||
2119 | * @rx_ring: ring to free buffers from | 2115 | * @rx_ring: ring to free buffers from |
2120 | **/ | 2116 | **/ |
2121 | static void igb_clean_rx_ring(struct igb_ring *rx_ring) | 2117 | static void igb_clean_rx_ring(struct igb_ring *rx_ring) |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 15d511cc2989..7e1cc6efc64c 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1352,7 +1352,6 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter) | |||
1352 | * ixgbe_intr - legacy mode Interrupt Handler | 1352 | * ixgbe_intr - legacy mode Interrupt Handler |
1353 | * @irq: interrupt number | 1353 | * @irq: interrupt number |
1354 | * @data: pointer to a network interface device structure | 1354 | * @data: pointer to a network interface device structure |
1355 | * @pt_regs: CPU registers structure | ||
1356 | **/ | 1355 | **/ |
1357 | static irqreturn_t ixgbe_intr(int irq, void *data) | 1356 | static irqreturn_t ixgbe_intr(int irq, void *data) |
1358 | { | 1357 | { |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index c9890b4a8a32..0afa72095810 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -778,6 +778,7 @@ static struct pcmcia_device_id axnet_ids[] = { | |||
778 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2), | 778 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2), |
779 | PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), | 779 | PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), |
780 | PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609), | 780 | PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609), |
781 | PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875), | ||
781 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04), | 782 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04), |
782 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116), | 783 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FastEtherCard", 0x281f1c5d, 0x7ef26116), |
783 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058), | 784 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "FEP501", 0x281f1c5d, 0x2e272058), |
@@ -1173,7 +1174,6 @@ static int axnet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1173 | * ax_interrupt - handle the interrupts from an 8390 | 1174 | * ax_interrupt - handle the interrupts from an 8390 |
1174 | * @irq: interrupt number | 1175 | * @irq: interrupt number |
1175 | * @dev_id: a pointer to the net_device | 1176 | * @dev_id: a pointer to the net_device |
1176 | * @regs: unused | ||
1177 | * | 1177 | * |
1178 | * Handle the ether interface interrupts. We pull packets from | 1178 | * Handle the ether interface interrupts. We pull packets from |
1179 | * the 8390 via the card specific functions and fire them at the networking | 1179 | * the 8390 via the card specific functions and fire them at the networking |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 69625373a8ed..c38ed777f0a8 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -1692,7 +1692,6 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
1692 | PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8), | 1692 | PCMCIA_DEVICE_PROD_ID12("National Semiconductor", "InfoMover NE4100", 0x36e1191f, 0xa6617ec8), |
1693 | PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76), | 1693 | PCMCIA_DEVICE_PROD_ID12("NEC", "PC-9801N-J12", 0x18df0ba0, 0xbc912d76), |
1694 | PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e), | 1694 | PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA410TX", 0x9aa79dc3, 0x60e5bc0e), |
1695 | PCMCIA_DEVICE_PROD_ID12("NETGEAR", "FA411", 0x9aa79dc3, 0x40fad875), | ||
1696 | PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f), | 1695 | PCMCIA_DEVICE_PROD_ID12("Network Everywhere", "Fast Ethernet 10/100 PC Card", 0x820a67b6, 0x31ed1a5f), |
1697 | PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1), | 1696 | PCMCIA_DEVICE_PROD_ID12("NextCom K.K.", "Next Hawk", 0xaedaec74, 0xad050ef1), |
1698 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b), | 1697 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "10/100Mbps Ethernet Card", 0x281f1c5d, 0x6e41773b), |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index b344a0b55dbf..29546a206045 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -227,8 +227,17 @@ struct phy_device * get_phy_device(struct mii_bus *bus, int addr) | |||
227 | if (r) | 227 | if (r) |
228 | return ERR_PTR(r); | 228 | return ERR_PTR(r); |
229 | 229 | ||
230 | /* If the phy_id is all Fs or all 0s, there is no device there */ | 230 | /* If the phy_id is mostly Fs, there is no device there */ |
231 | if ((0xffff == phy_id) || (0x00 == phy_id)) | 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 | return NULL; | 241 | return NULL; |
233 | 242 | ||
234 | dev = phy_device_create(bus, addr, phy_id); | 243 | dev = phy_device_create(bus, addr, phy_id); |
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index 8874497b6bbf..dd3b2447e85a 100644 --- a/drivers/net/phy/vitesse.c +++ b/drivers/net/phy/vitesse.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #define MII_VSC8244_IMASK_DUPLEX 0x1000 | 34 | #define MII_VSC8244_IMASK_DUPLEX 0x1000 |
35 | #define MII_VSC8244_IMASK_MASK 0xf000 | 35 | #define MII_VSC8244_IMASK_MASK 0xf000 |
36 | 36 | ||
37 | #define MII_VSC8221_IMASK_MASK 0xa000 | ||
38 | |||
37 | /* Vitesse Interrupt Status Register */ | 39 | /* Vitesse Interrupt Status Register */ |
38 | #define MII_VSC8244_ISTAT 0x1a | 40 | #define MII_VSC8244_ISTAT 0x1a |
39 | #define MII_VSC8244_ISTAT_STATUS 0x8000 | 41 | #define MII_VSC8244_ISTAT_STATUS 0x8000 |
@@ -49,6 +51,12 @@ | |||
49 | #define MII_VSC8244_AUXCONSTAT_GBIT 0x0010 | 51 | #define MII_VSC8244_AUXCONSTAT_GBIT 0x0010 |
50 | #define MII_VSC8244_AUXCONSTAT_100 0x0008 | 52 | #define MII_VSC8244_AUXCONSTAT_100 0x0008 |
51 | 53 | ||
54 | #define MII_VSC8221_AUXCONSTAT_INIT 0x0004 /* need to set this bit? */ | ||
55 | #define MII_VSC8221_AUXCONSTAT_RESERVED 0x0004 | ||
56 | |||
57 | #define PHY_ID_VSC8244 0x000fc6c0 | ||
58 | #define PHY_ID_VSC8221 0x000fc550 | ||
59 | |||
52 | MODULE_DESCRIPTION("Vitesse PHY driver"); | 60 | MODULE_DESCRIPTION("Vitesse PHY driver"); |
53 | MODULE_AUTHOR("Kriston Carson"); | 61 | MODULE_AUTHOR("Kriston Carson"); |
54 | MODULE_LICENSE("GPL"); | 62 | MODULE_LICENSE("GPL"); |
@@ -95,13 +103,15 @@ static int vsc824x_ack_interrupt(struct phy_device *phydev) | |||
95 | return (err < 0) ? err : 0; | 103 | return (err < 0) ? err : 0; |
96 | } | 104 | } |
97 | 105 | ||
98 | static int vsc824x_config_intr(struct phy_device *phydev) | 106 | static int vsc82xx_config_intr(struct phy_device *phydev) |
99 | { | 107 | { |
100 | int err; | 108 | int err; |
101 | 109 | ||
102 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) | 110 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) |
103 | err = phy_write(phydev, MII_VSC8244_IMASK, | 111 | err = phy_write(phydev, MII_VSC8244_IMASK, |
104 | MII_VSC8244_IMASK_MASK); | 112 | phydev->drv->phy_id == PHY_ID_VSC8244 ? |
113 | MII_VSC8244_IMASK_MASK : | ||
114 | MII_VSC8221_IMASK_MASK); | ||
105 | else { | 115 | else { |
106 | /* | 116 | /* |
107 | * The Vitesse PHY cannot clear the interrupt | 117 | * The Vitesse PHY cannot clear the interrupt |
@@ -120,7 +130,7 @@ static int vsc824x_config_intr(struct phy_device *phydev) | |||
120 | 130 | ||
121 | /* Vitesse 824x */ | 131 | /* Vitesse 824x */ |
122 | static struct phy_driver vsc8244_driver = { | 132 | static struct phy_driver vsc8244_driver = { |
123 | .phy_id = 0x000fc6c0, | 133 | .phy_id = PHY_ID_VSC8244, |
124 | .name = "Vitesse VSC8244", | 134 | .name = "Vitesse VSC8244", |
125 | .phy_id_mask = 0x000fffc0, | 135 | .phy_id_mask = 0x000fffc0, |
126 | .features = PHY_GBIT_FEATURES, | 136 | .features = PHY_GBIT_FEATURES, |
@@ -129,19 +139,55 @@ static struct phy_driver vsc8244_driver = { | |||
129 | .config_aneg = &genphy_config_aneg, | 139 | .config_aneg = &genphy_config_aneg, |
130 | .read_status = &genphy_read_status, | 140 | .read_status = &genphy_read_status, |
131 | .ack_interrupt = &vsc824x_ack_interrupt, | 141 | .ack_interrupt = &vsc824x_ack_interrupt, |
132 | .config_intr = &vsc824x_config_intr, | 142 | .config_intr = &vsc82xx_config_intr, |
133 | .driver = { .owner = THIS_MODULE,}, | 143 | .driver = { .owner = THIS_MODULE,}, |
134 | }; | 144 | }; |
135 | 145 | ||
136 | static int __init vsc8244_init(void) | 146 | static int vsc8221_config_init(struct phy_device *phydev) |
137 | { | 147 | { |
138 | return phy_driver_register(&vsc8244_driver); | 148 | int err; |
149 | |||
150 | err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, | ||
151 | MII_VSC8221_AUXCONSTAT_INIT); | ||
152 | return err; | ||
153 | |||
154 | /* Perhaps we should set EXT_CON1 based on the interface? | ||
155 | Options are 802.3Z SerDes or SGMII */ | ||
156 | } | ||
157 | |||
158 | /* Vitesse 8221 */ | ||
159 | static struct phy_driver vsc8221_driver = { | ||
160 | .phy_id = PHY_ID_VSC8221, | ||
161 | .phy_id_mask = 0x000ffff0, | ||
162 | .name = "Vitesse VSC8221", | ||
163 | .features = PHY_GBIT_FEATURES, | ||
164 | .flags = PHY_HAS_INTERRUPT, | ||
165 | .config_init = &vsc8221_config_init, | ||
166 | .config_aneg = &genphy_config_aneg, | ||
167 | .read_status = &genphy_read_status, | ||
168 | .ack_interrupt = &vsc824x_ack_interrupt, | ||
169 | .config_intr = &vsc82xx_config_intr, | ||
170 | .driver = { .owner = THIS_MODULE,}, | ||
171 | }; | ||
172 | |||
173 | static int __init vsc82xx_init(void) | ||
174 | { | ||
175 | int err; | ||
176 | |||
177 | err = phy_driver_register(&vsc8244_driver); | ||
178 | if (err < 0) | ||
179 | return err; | ||
180 | err = phy_driver_register(&vsc8221_driver); | ||
181 | if (err < 0) | ||
182 | phy_driver_unregister(&vsc8244_driver); | ||
183 | return err; | ||
139 | } | 184 | } |
140 | 185 | ||
141 | static void __exit vsc8244_exit(void) | 186 | static void __exit vsc82xx_exit(void) |
142 | { | 187 | { |
143 | phy_driver_unregister(&vsc8244_driver); | 188 | phy_driver_unregister(&vsc8244_driver); |
189 | phy_driver_unregister(&vsc8221_driver); | ||
144 | } | 190 | } |
145 | 191 | ||
146 | module_init(vsc8244_init); | 192 | module_init(vsc82xx_init); |
147 | module_exit(vsc8244_exit); | 193 | module_exit(vsc82xx_exit); |
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index eb715f1bcd48..4acd41a093ad 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -1634,7 +1634,6 @@ sis900_start_xmit(struct sk_buff *skb, struct net_device *net_dev) | |||
1634 | * sis900_interrupt - sis900 interrupt handler | 1634 | * sis900_interrupt - sis900 interrupt handler |
1635 | * @irq: the irq number | 1635 | * @irq: the irq number |
1636 | * @dev_instance: the client data object | 1636 | * @dev_instance: the client data object |
1637 | * @regs: snapshot of processor context | ||
1638 | * | 1637 | * |
1639 | * The interrupt handler does all of the Rx thread work, | 1638 | * The interrupt handler does all of the Rx thread work, |
1640 | * and cleans up after the Tx thread | 1639 | * and cleans up after the Tx thread |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index b6435d0d71f9..07599b492359 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -672,7 +672,6 @@ write_hash: | |||
672 | /** | 672 | /** |
673 | * spider_net_prepare_tx_descr - fill tx descriptor with skb data | 673 | * spider_net_prepare_tx_descr - fill tx descriptor with skb data |
674 | * @card: card structure | 674 | * @card: card structure |
675 | * @descr: descriptor structure to fill out | ||
676 | * @skb: packet to use | 675 | * @skb: packet to use |
677 | * | 676 | * |
678 | * returns 0 on success, <0 on failure. | 677 | * returns 0 on success, <0 on failure. |
@@ -867,7 +866,6 @@ spider_net_release_tx_chain(struct spider_net_card *card, int brutal) | |||
867 | /** | 866 | /** |
868 | * spider_net_kick_tx_dma - enables TX DMA processing | 867 | * spider_net_kick_tx_dma - enables TX DMA processing |
869 | * @card: card structure | 868 | * @card: card structure |
870 | * @descr: descriptor address to enable TX processing at | ||
871 | * | 869 | * |
872 | * This routine will start the transmit DMA running if | 870 | * This routine will start the transmit DMA running if |
873 | * it is not already running. This routine ned only be | 871 | * it is not already running. This routine ned only be |
@@ -1637,7 +1635,6 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg, | |||
1637 | * spider_net_interrupt - interrupt handler for spider_net | 1635 | * spider_net_interrupt - interrupt handler for spider_net |
1638 | * @irq: interrupt number | 1636 | * @irq: interrupt number |
1639 | * @ptr: pointer to net_device | 1637 | * @ptr: pointer to net_device |
1640 | * @regs: PU registers | ||
1641 | * | 1638 | * |
1642 | * returns IRQ_HANDLED, if interrupt was for driver, or IRQ_NONE, if no | 1639 | * returns IRQ_HANDLED, if interrupt was for driver, or IRQ_NONE, if no |
1643 | * interrupt found raised by card. | 1640 | * interrupt found raised by card. |
@@ -2419,7 +2416,6 @@ spider_net_undo_pci_setup(struct spider_net_card *card) | |||
2419 | 2416 | ||
2420 | /** | 2417 | /** |
2421 | * spider_net_setup_pci_dev - sets up the device in terms of PCI operations | 2418 | * spider_net_setup_pci_dev - sets up the device in terms of PCI operations |
2422 | * @card: card structure | ||
2423 | * @pdev: PCI device | 2419 | * @pdev: PCI device |
2424 | * | 2420 | * |
2425 | * Returns the card structure or NULL if any errors occur | 2421 | * Returns the card structure or NULL if any errors occur |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 44be8dfbcf17..6f935cd30176 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -1713,7 +1713,7 @@ static void gem_init_phy(struct gem *gp) | |||
1713 | /* Reset PCS unit. */ | 1713 | /* Reset PCS unit. */ |
1714 | val = readl(gp->regs + PCS_MIICTRL); | 1714 | val = readl(gp->regs + PCS_MIICTRL); |
1715 | val |= PCS_MIICTRL_RST; | 1715 | val |= PCS_MIICTRL_RST; |
1716 | writeb(val, gp->regs + PCS_MIICTRL); | 1716 | writel(val, gp->regs + PCS_MIICTRL); |
1717 | 1717 | ||
1718 | limit = 32; | 1718 | limit = 32; |
1719 | while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) { | 1719 | while (readl(gp->regs + PCS_MIICTRL) & PCS_MIICTRL_RST) { |
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 4bcea5a9d70b..0e4317010ed0 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -240,7 +240,12 @@ static int ath5k_get_tx_stats(struct ieee80211_hw *hw, | |||
240 | struct ieee80211_tx_queue_stats *stats); | 240 | struct ieee80211_tx_queue_stats *stats); |
241 | static u64 ath5k_get_tsf(struct ieee80211_hw *hw); | 241 | static u64 ath5k_get_tsf(struct ieee80211_hw *hw); |
242 | static void ath5k_reset_tsf(struct ieee80211_hw *hw); | 242 | static void ath5k_reset_tsf(struct ieee80211_hw *hw); |
243 | static int ath5k_beacon_update(struct ath5k_softc *sc, struct sk_buff *skb); | 243 | static int ath5k_beacon_update(struct ath5k_softc *sc, |
244 | struct sk_buff *skb); | ||
245 | static void ath5k_bss_info_changed(struct ieee80211_hw *hw, | ||
246 | struct ieee80211_vif *vif, | ||
247 | struct ieee80211_bss_conf *bss_conf, | ||
248 | u32 changes); | ||
244 | 249 | ||
245 | static struct ieee80211_ops ath5k_hw_ops = { | 250 | static struct ieee80211_ops ath5k_hw_ops = { |
246 | .tx = ath5k_tx, | 251 | .tx = ath5k_tx, |
@@ -257,6 +262,7 @@ static struct ieee80211_ops ath5k_hw_ops = { | |||
257 | .get_tx_stats = ath5k_get_tx_stats, | 262 | .get_tx_stats = ath5k_get_tx_stats, |
258 | .get_tsf = ath5k_get_tsf, | 263 | .get_tsf = ath5k_get_tsf, |
259 | .reset_tsf = ath5k_reset_tsf, | 264 | .reset_tsf = ath5k_reset_tsf, |
265 | .bss_info_changed = ath5k_bss_info_changed, | ||
260 | }; | 266 | }; |
261 | 267 | ||
262 | /* | 268 | /* |
@@ -2961,7 +2967,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw, | |||
2961 | sc->opmode != NL80211_IFTYPE_MESH_POINT && | 2967 | sc->opmode != NL80211_IFTYPE_MESH_POINT && |
2962 | test_bit(ATH_STAT_PROMISC, sc->status)) | 2968 | test_bit(ATH_STAT_PROMISC, sc->status)) |
2963 | rfilt |= AR5K_RX_FILTER_PROM; | 2969 | rfilt |= AR5K_RX_FILTER_PROM; |
2964 | if (sc->opmode == NL80211_IFTYPE_STATION || | 2970 | if ((sc->opmode == NL80211_IFTYPE_STATION && sc->assoc) || |
2965 | sc->opmode == NL80211_IFTYPE_ADHOC || | 2971 | sc->opmode == NL80211_IFTYPE_ADHOC || |
2966 | sc->opmode == NL80211_IFTYPE_AP) | 2972 | sc->opmode == NL80211_IFTYPE_AP) |
2967 | rfilt |= AR5K_RX_FILTER_BEACON; | 2973 | rfilt |= AR5K_RX_FILTER_BEACON; |
@@ -3101,4 +3107,32 @@ ath5k_beacon_update(struct ath5k_softc *sc, struct sk_buff *skb) | |||
3101 | 3107 | ||
3102 | return ret; | 3108 | return ret; |
3103 | } | 3109 | } |
3110 | static void | ||
3111 | set_beacon_filter(struct ieee80211_hw *hw, bool enable) | ||
3112 | { | ||
3113 | struct ath5k_softc *sc = hw->priv; | ||
3114 | struct ath5k_hw *ah = sc->ah; | ||
3115 | u32 rfilt; | ||
3116 | rfilt = ath5k_hw_get_rx_filter(ah); | ||
3117 | if (enable) | ||
3118 | rfilt |= AR5K_RX_FILTER_BEACON; | ||
3119 | else | ||
3120 | rfilt &= ~AR5K_RX_FILTER_BEACON; | ||
3121 | ath5k_hw_set_rx_filter(ah, rfilt); | ||
3122 | sc->filter_flags = rfilt; | ||
3123 | } | ||
3104 | 3124 | ||
3125 | static void ath5k_bss_info_changed(struct ieee80211_hw *hw, | ||
3126 | struct ieee80211_vif *vif, | ||
3127 | struct ieee80211_bss_conf *bss_conf, | ||
3128 | u32 changes) | ||
3129 | { | ||
3130 | struct ath5k_softc *sc = hw->priv; | ||
3131 | if (changes & BSS_CHANGED_ASSOC) { | ||
3132 | mutex_lock(&sc->lock); | ||
3133 | sc->assoc = bss_conf->assoc; | ||
3134 | if (sc->opmode == NL80211_IFTYPE_STATION) | ||
3135 | set_beacon_filter(hw, sc->assoc); | ||
3136 | mutex_unlock(&sc->lock); | ||
3137 | } | ||
3138 | } | ||
diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h index 06d1054ca94b..facc60ddada2 100644 --- a/drivers/net/wireless/ath5k/base.h +++ b/drivers/net/wireless/ath5k/base.h | |||
@@ -179,6 +179,7 @@ struct ath5k_softc { | |||
179 | 179 | ||
180 | struct timer_list calib_tim; /* calibration timer */ | 180 | struct timer_list calib_tim; /* calibration timer */ |
181 | int power_level; /* Requested tx power in dbm */ | 181 | int power_level; /* Requested tx power in dbm */ |
182 | bool assoc; /* assocate state */ | ||
182 | }; | 183 | }; |
183 | 184 | ||
184 | #define ath5k_hw_hasbssidmask(_ah) \ | 185 | #define ath5k_hw_hasbssidmask(_ah) \ |
diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c index 19980cbd5d5f..ccaeb5c219d2 100644 --- a/drivers/net/wireless/ath5k/debug.c +++ b/drivers/net/wireless/ath5k/debug.c | |||
@@ -417,19 +417,19 @@ ath5k_debug_init_device(struct ath5k_softc *sc) | |||
417 | sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), | 417 | sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), |
418 | ath5k_global_debugfs); | 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 | sc->debug.debugfs_phydir, sc, &fops_debug); | 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 | sc->debug.debugfs_phydir, sc, &fops_registers); | 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 | sc->debug.debugfs_phydir, sc, &fops_tsf); | 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 | sc->debug.debugfs_phydir, sc, &fops_beacon); | 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 | sc->debug.debugfs_phydir, sc, &fops_reset); | 433 | sc->debug.debugfs_phydir, sc, &fops_reset); |
434 | } | 434 | } |
435 | 435 | ||
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c index 377d2df05316..e80d9b9b61a0 100644 --- a/drivers/net/wireless/ath9k/beacon.c +++ b/drivers/net/wireless/ath9k/beacon.c | |||
@@ -167,7 +167,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) | |||
167 | skb = (struct sk_buff *)bf->bf_mpdu; | 167 | skb = (struct sk_buff *)bf->bf_mpdu; |
168 | if (skb) { | 168 | if (skb) { |
169 | pci_unmap_single(sc->pdev, bf->bf_dmacontext, | 169 | pci_unmap_single(sc->pdev, bf->bf_dmacontext, |
170 | skb_end_pointer(skb) - skb->head, | 170 | skb->len, |
171 | PCI_DMA_TODEVICE); | 171 | PCI_DMA_TODEVICE); |
172 | } | 172 | } |
173 | 173 | ||
@@ -190,7 +190,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) | |||
190 | 190 | ||
191 | bf->bf_buf_addr = bf->bf_dmacontext = | 191 | bf->bf_buf_addr = bf->bf_dmacontext = |
192 | pci_map_single(sc->pdev, skb->data, | 192 | pci_map_single(sc->pdev, skb->data, |
193 | skb_end_pointer(skb) - skb->head, | 193 | skb->len, |
194 | PCI_DMA_TODEVICE); | 194 | PCI_DMA_TODEVICE); |
195 | 195 | ||
196 | skb = ieee80211_get_buffered_bc(sc->hw, vif); | 196 | skb = ieee80211_get_buffered_bc(sc->hw, vif); |
@@ -338,7 +338,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id) | |||
338 | if (bf->bf_mpdu != NULL) { | 338 | if (bf->bf_mpdu != NULL) { |
339 | skb = (struct sk_buff *)bf->bf_mpdu; | 339 | skb = (struct sk_buff *)bf->bf_mpdu; |
340 | pci_unmap_single(sc->pdev, bf->bf_dmacontext, | 340 | pci_unmap_single(sc->pdev, bf->bf_dmacontext, |
341 | skb_end_pointer(skb) - skb->head, | 341 | skb->len, |
342 | PCI_DMA_TODEVICE); | 342 | PCI_DMA_TODEVICE); |
343 | dev_kfree_skb_any(skb); | 343 | dev_kfree_skb_any(skb); |
344 | bf->bf_mpdu = NULL; | 344 | bf->bf_mpdu = NULL; |
@@ -398,7 +398,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id) | |||
398 | 398 | ||
399 | bf->bf_buf_addr = bf->bf_dmacontext = | 399 | bf->bf_buf_addr = bf->bf_dmacontext = |
400 | pci_map_single(sc->pdev, skb->data, | 400 | pci_map_single(sc->pdev, skb->data, |
401 | skb_end_pointer(skb) - skb->head, | 401 | skb->len, |
402 | PCI_DMA_TODEVICE); | 402 | PCI_DMA_TODEVICE); |
403 | bf->bf_mpdu = skb; | 403 | bf->bf_mpdu = skb; |
404 | 404 | ||
@@ -419,7 +419,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vap *avp) | |||
419 | if (bf->bf_mpdu != NULL) { | 419 | if (bf->bf_mpdu != NULL) { |
420 | struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu; | 420 | struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu; |
421 | pci_unmap_single(sc->pdev, bf->bf_dmacontext, | 421 | pci_unmap_single(sc->pdev, bf->bf_dmacontext, |
422 | skb_end_pointer(skb) - skb->head, | 422 | skb->len, |
423 | PCI_DMA_TODEVICE); | 423 | PCI_DMA_TODEVICE); |
424 | dev_kfree_skb_any(skb); | 424 | dev_kfree_skb_any(skb); |
425 | bf->bf_mpdu = NULL; | 425 | bf->bf_mpdu = NULL; |
diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c index 743ad228b833..e49e32356e92 100644 --- a/drivers/net/wireless/ath9k/recv.c +++ b/drivers/net/wireless/ath9k/recv.c | |||
@@ -41,9 +41,12 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf) | |||
41 | ASSERT(skb != NULL); | 41 | ASSERT(skb != NULL); |
42 | ds->ds_vdata = skb->data; | 42 | ds->ds_vdata = skb->data; |
43 | 43 | ||
44 | /* setup rx descriptors */ | 44 | /* setup rx descriptors. The sc_rxbufsize here tells the harware |
45 | ath9k_hw_setuprxdesc(ah, ds, | 45 | * how much data it can DMA to us and that we are prepared |
46 | skb_tailroom(skb), /* buffer size */ | 46 | * to process */ |
47 | ath9k_hw_setuprxdesc(ah, | ||
48 | ds, | ||
49 | sc->sc_rxbufsize, | ||
47 | 0); | 50 | 0); |
48 | 51 | ||
49 | if (sc->sc_rxlink == NULL) | 52 | if (sc->sc_rxlink == NULL) |
@@ -88,6 +91,13 @@ static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc, u32 len) | |||
88 | * in rx'd frames. | 91 | * in rx'd frames. |
89 | */ | 92 | */ |
90 | 93 | ||
94 | /* Note: the kernel can allocate a value greater than | ||
95 | * what we ask it to give us. We really only need 4 KB as that | ||
96 | * is this hardware supports and in fact we need at least 3849 | ||
97 | * as that is the MAX AMSDU size this hardware supports. | ||
98 | * Unfortunately this means we may get 8 KB here from the | ||
99 | * kernel... and that is actually what is observed on some | ||
100 | * systems :( */ | ||
91 | skb = dev_alloc_skb(len + sc->sc_cachelsz - 1); | 101 | skb = dev_alloc_skb(len + sc->sc_cachelsz - 1); |
92 | if (skb != NULL) { | 102 | if (skb != NULL) { |
93 | off = ((unsigned long) skb->data) % sc->sc_cachelsz; | 103 | off = ((unsigned long) skb->data) % sc->sc_cachelsz; |
@@ -298,7 +308,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) | |||
298 | 308 | ||
299 | bf->bf_mpdu = skb; | 309 | bf->bf_mpdu = skb; |
300 | bf->bf_buf_addr = pci_map_single(sc->pdev, skb->data, | 310 | bf->bf_buf_addr = pci_map_single(sc->pdev, skb->data, |
301 | skb_end_pointer(skb) - skb->head, | 311 | sc->sc_rxbufsize, |
302 | PCI_DMA_FROMDEVICE); | 312 | PCI_DMA_FROMDEVICE); |
303 | bf->bf_dmacontext = bf->bf_buf_addr; | 313 | bf->bf_dmacontext = bf->bf_buf_addr; |
304 | } | 314 | } |
@@ -544,9 +554,9 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
544 | if (!requeue_skb) | 554 | if (!requeue_skb) |
545 | goto requeue; | 555 | goto requeue; |
546 | 556 | ||
547 | /* Sync and unmap the frame */ | 557 | pci_dma_sync_single_for_cpu(sc->pdev, |
548 | pci_dma_sync_single_for_cpu(sc->pdev, bf->bf_buf_addr, | 558 | bf->bf_buf_addr, |
549 | skb_tailroom(skb), | 559 | sc->sc_rxbufsize, |
550 | PCI_DMA_FROMDEVICE); | 560 | PCI_DMA_FROMDEVICE); |
551 | pci_unmap_single(sc->pdev, bf->bf_buf_addr, | 561 | pci_unmap_single(sc->pdev, bf->bf_buf_addr, |
552 | sc->sc_rxbufsize, | 562 | sc->sc_rxbufsize, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c8ce84a1eef4..7888250117dc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1228,9 +1228,11 @@ void iwl_rx_handle(struct iwl_priv *priv) | |||
1228 | 1228 | ||
1229 | rxq->queue[i] = NULL; | 1229 | rxq->queue[i] = NULL; |
1230 | 1230 | ||
1231 | pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->aligned_dma_addr, | 1231 | dma_sync_single_range_for_cpu( |
1232 | priv->hw_params.rx_buf_size, | 1232 | &priv->pci_dev->dev, rxb->real_dma_addr, |
1233 | PCI_DMA_FROMDEVICE); | 1233 | rxb->aligned_dma_addr - rxb->real_dma_addr, |
1234 | priv->hw_params.rx_buf_size, | ||
1235 | PCI_DMA_FROMDEVICE); | ||
1234 | pkt = (struct iwl_rx_packet *)rxb->skb->data; | 1236 | pkt = (struct iwl_rx_packet *)rxb->skb->data; |
1235 | 1237 | ||
1236 | /* Reclaim a command buffer only if this packet is a response | 1238 | /* Reclaim a command buffer only if this packet is a response |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 5049a47030ac..5f4f85f56cb7 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/acpi.h> | 23 | #include <linux/acpi.h> |
24 | #include <linux/kallsyms.h> | 24 | #include <linux/kallsyms.h> |
25 | #include <linux/dmi.h> | ||
25 | #include "pci.h" | 26 | #include "pci.h" |
26 | 27 | ||
27 | int isa_dma_bridge_buggy; | 28 | int isa_dma_bridge_buggy; |
@@ -1828,6 +1829,22 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS, | |||
1828 | PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, | 1829 | PCI_DEVICE_ID_SERVERWORKS_HT1000_PXB, |
1829 | ht_enable_msi_mapping); | 1830 | ht_enable_msi_mapping); |
1830 | 1831 | ||
1832 | /* The P5N32-SLI Premium motherboard from Asus has a problem with msi | ||
1833 | * for the MCP55 NIC. It is not yet determined whether the msi problem | ||
1834 | * also affects other devices. As for now, turn off msi for this device. | ||
1835 | */ | ||
1836 | static void __devinit nvenet_msi_disable(struct pci_dev *dev) | ||
1837 | { | ||
1838 | if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) { | ||
1839 | dev_info(&dev->dev, | ||
1840 | "Disabling msi for MCP55 NIC on P5N32-SLI Premium\n"); | ||
1841 | dev->no_msi = 1; | ||
1842 | } | ||
1843 | } | ||
1844 | DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, | ||
1845 | PCI_DEVICE_ID_NVIDIA_NVENET_15, | ||
1846 | nvenet_msi_disable); | ||
1847 | |||
1831 | static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) | 1848 | static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) |
1832 | { | 1849 | { |
1833 | struct pci_dev *host_bridge; | 1850 | struct pci_dev *host_bridge; |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index be41b609c88f..e52ce475d19f 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -251,7 +251,7 @@ struct xt_target_param { | |||
251 | */ | 251 | */ |
252 | struct xt_tgchk_param { | 252 | struct xt_tgchk_param { |
253 | const char *table; | 253 | const char *table; |
254 | void *entryinfo; | 254 | const void *entryinfo; |
255 | const struct xt_target *target; | 255 | const struct xt_target *target; |
256 | void *targinfo; | 256 | void *targinfo; |
257 | unsigned int hook_mask; | 257 | unsigned int hook_mask; |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index cac811e51f6d..c7190846e128 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -31,6 +31,7 @@ struct request_sock_ops { | |||
31 | int family; | 31 | int family; |
32 | int obj_size; | 32 | int obj_size; |
33 | struct kmem_cache *slab; | 33 | struct kmem_cache *slab; |
34 | char *slab_name; | ||
34 | int (*rtx_syn_ack)(struct sock *sk, | 35 | int (*rtx_syn_ack)(struct sock *sk, |
35 | struct request_sock *req); | 36 | struct request_sock *req); |
36 | void (*send_ack)(struct sock *sk, struct sk_buff *skb, | 37 | void (*send_ack)(struct sock *sk, struct sk_buff *skb, |
diff --git a/include/net/timewait_sock.h b/include/net/timewait_sock.h index 1e1ee3253fd8..97c3b14da55d 100644 --- a/include/net/timewait_sock.h +++ b/include/net/timewait_sock.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | struct timewait_sock_ops { | 17 | struct timewait_sock_ops { |
18 | struct kmem_cache *twsk_slab; | 18 | struct kmem_cache *twsk_slab; |
19 | char *twsk_slab_name; | ||
19 | unsigned int twsk_obj_size; | 20 | unsigned int twsk_obj_size; |
20 | int (*twsk_unique)(struct sock *sk, | 21 | int (*twsk_unique)(struct sock *sk, |
21 | struct sock *sktw, void *twp); | 22 | struct sock *sktw, void *twp); |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index db6176d96e71..274194b78247 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -101,6 +101,17 @@ static inline __be16 pppoe_proto(const struct sk_buff *skb) | |||
101 | pppoe_proto(skb) == htons(PPP_IPV6) && \ | 101 | pppoe_proto(skb) == htons(PPP_IPV6) && \ |
102 | brnf_filter_pppoe_tagged) | 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 | .entries = ATOMIC_INIT(0), | ||
113 | }; | ||
114 | |||
104 | /* | 115 | /* |
105 | * Initialize bogus route table used to keep netfilter happy. | 116 | * Initialize bogus route table used to keep netfilter happy. |
106 | * Currently, we fill in the PMTU entry because netfilter | 117 | * Currently, we fill in the PMTU entry because netfilter |
@@ -117,6 +128,7 @@ void br_netfilter_rtable_init(struct net_bridge *br) | |||
117 | rt->u.dst.path = &rt->u.dst; | 128 | rt->u.dst.path = &rt->u.dst; |
118 | rt->u.dst.metrics[RTAX_MTU - 1] = 1500; | 129 | rt->u.dst.metrics[RTAX_MTU - 1] = 1500; |
119 | rt->u.dst.flags = DST_NOXFRM; | 130 | rt->u.dst.flags = DST_NOXFRM; |
131 | rt->u.dst.ops = &fake_dst_ops; | ||
120 | } | 132 | } |
121 | 133 | ||
122 | static inline struct rtable *bridge_parent_rtable(const struct net_device *dev) | 134 | static inline struct rtable *bridge_parent_rtable(const struct net_device *dev) |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index e03d77d4c1c9..b1f628741f4c 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -149,7 +149,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here) | |||
149 | 149 | ||
150 | void skb_truesize_bug(struct sk_buff *skb) | 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 | "len=%u, sizeof(sk_buff)=%Zd\n", | 153 | "len=%u, sizeof(sk_buff)=%Zd\n", |
154 | skb->truesize, skb->len, sizeof(struct sk_buff)); | 154 | skb->truesize, skb->len, sizeof(struct sk_buff)); |
155 | } | 155 | } |
diff --git a/net/core/sock.c b/net/core/sock.c index b28764558a7d..ac4f0e79226b 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -2043,9 +2043,6 @@ static inline void release_proto_idx(struct proto *prot) | |||
2043 | 2043 | ||
2044 | int proto_register(struct proto *prot, int alloc_slab) | 2044 | int proto_register(struct proto *prot, int alloc_slab) |
2045 | { | 2045 | { |
2046 | char *request_sock_slab_name = NULL; | ||
2047 | char *timewait_sock_slab_name; | ||
2048 | |||
2049 | if (alloc_slab) { | 2046 | if (alloc_slab) { |
2050 | prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, | 2047 | prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, |
2051 | SLAB_HWCACHE_ALIGN | prot->slab_flags, | 2048 | SLAB_HWCACHE_ALIGN | prot->slab_flags, |
@@ -2060,12 +2057,12 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
2060 | if (prot->rsk_prot != NULL) { | 2057 | if (prot->rsk_prot != NULL) { |
2061 | static const char mask[] = "request_sock_%s"; | 2058 | static const char mask[] = "request_sock_%s"; |
2062 | 2059 | ||
2063 | request_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); | 2060 | prot->rsk_prot->slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); |
2064 | if (request_sock_slab_name == NULL) | 2061 | if (prot->rsk_prot->slab_name == NULL) |
2065 | goto out_free_sock_slab; | 2062 | goto out_free_sock_slab; |
2066 | 2063 | ||
2067 | sprintf(request_sock_slab_name, mask, prot->name); | 2064 | sprintf(prot->rsk_prot->slab_name, mask, prot->name); |
2068 | prot->rsk_prot->slab = kmem_cache_create(request_sock_slab_name, | 2065 | prot->rsk_prot->slab = kmem_cache_create(prot->rsk_prot->slab_name, |
2069 | prot->rsk_prot->obj_size, 0, | 2066 | prot->rsk_prot->obj_size, 0, |
2070 | SLAB_HWCACHE_ALIGN, NULL); | 2067 | SLAB_HWCACHE_ALIGN, NULL); |
2071 | 2068 | ||
@@ -2079,14 +2076,14 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
2079 | if (prot->twsk_prot != NULL) { | 2076 | if (prot->twsk_prot != NULL) { |
2080 | static const char mask[] = "tw_sock_%s"; | 2077 | static const char mask[] = "tw_sock_%s"; |
2081 | 2078 | ||
2082 | timewait_sock_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); | 2079 | prot->twsk_prot->twsk_slab_name = kmalloc(strlen(prot->name) + sizeof(mask) - 1, GFP_KERNEL); |
2083 | 2080 | ||
2084 | if (timewait_sock_slab_name == NULL) | 2081 | if (prot->twsk_prot->twsk_slab_name == NULL) |
2085 | goto out_free_request_sock_slab; | 2082 | goto out_free_request_sock_slab; |
2086 | 2083 | ||
2087 | sprintf(timewait_sock_slab_name, mask, prot->name); | 2084 | sprintf(prot->twsk_prot->twsk_slab_name, mask, prot->name); |
2088 | prot->twsk_prot->twsk_slab = | 2085 | prot->twsk_prot->twsk_slab = |
2089 | kmem_cache_create(timewait_sock_slab_name, | 2086 | kmem_cache_create(prot->twsk_prot->twsk_slab_name, |
2090 | prot->twsk_prot->twsk_obj_size, | 2087 | prot->twsk_prot->twsk_obj_size, |
2091 | 0, | 2088 | 0, |
2092 | SLAB_HWCACHE_ALIGN | | 2089 | SLAB_HWCACHE_ALIGN | |
@@ -2104,14 +2101,14 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
2104 | return 0; | 2101 | return 0; |
2105 | 2102 | ||
2106 | out_free_timewait_sock_slab_name: | 2103 | out_free_timewait_sock_slab_name: |
2107 | kfree(timewait_sock_slab_name); | 2104 | kfree(prot->twsk_prot->twsk_slab_name); |
2108 | out_free_request_sock_slab: | 2105 | out_free_request_sock_slab: |
2109 | if (prot->rsk_prot && prot->rsk_prot->slab) { | 2106 | if (prot->rsk_prot && prot->rsk_prot->slab) { |
2110 | kmem_cache_destroy(prot->rsk_prot->slab); | 2107 | kmem_cache_destroy(prot->rsk_prot->slab); |
2111 | prot->rsk_prot->slab = NULL; | 2108 | prot->rsk_prot->slab = NULL; |
2112 | } | 2109 | } |
2113 | out_free_request_sock_slab_name: | 2110 | out_free_request_sock_slab_name: |
2114 | kfree(request_sock_slab_name); | 2111 | kfree(prot->rsk_prot->slab_name); |
2115 | out_free_sock_slab: | 2112 | out_free_sock_slab: |
2116 | kmem_cache_destroy(prot->slab); | 2113 | kmem_cache_destroy(prot->slab); |
2117 | prot->slab = NULL; | 2114 | prot->slab = NULL; |
@@ -2134,18 +2131,14 @@ void proto_unregister(struct proto *prot) | |||
2134 | } | 2131 | } |
2135 | 2132 | ||
2136 | if (prot->rsk_prot != NULL && prot->rsk_prot->slab != NULL) { | 2133 | if (prot->rsk_prot != NULL && prot->rsk_prot->slab != NULL) { |
2137 | const char *name = kmem_cache_name(prot->rsk_prot->slab); | ||
2138 | |||
2139 | kmem_cache_destroy(prot->rsk_prot->slab); | 2134 | kmem_cache_destroy(prot->rsk_prot->slab); |
2140 | kfree(name); | 2135 | kfree(prot->rsk_prot->slab_name); |
2141 | prot->rsk_prot->slab = NULL; | 2136 | prot->rsk_prot->slab = NULL; |
2142 | } | 2137 | } |
2143 | 2138 | ||
2144 | if (prot->twsk_prot != NULL && prot->twsk_prot->twsk_slab != NULL) { | 2139 | if (prot->twsk_prot != NULL && prot->twsk_prot->twsk_slab != NULL) { |
2145 | const char *name = kmem_cache_name(prot->twsk_prot->twsk_slab); | ||
2146 | |||
2147 | kmem_cache_destroy(prot->twsk_prot->twsk_slab); | 2140 | kmem_cache_destroy(prot->twsk_prot->twsk_slab); |
2148 | kfree(name); | 2141 | kfree(prot->twsk_prot->twsk_slab_name); |
2149 | prot->twsk_prot->twsk_slab = NULL; | 2142 | prot->twsk_prot->twsk_slab = NULL; |
2150 | } | 2143 | } |
2151 | } | 2144 | } |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c069ecb81ea5..76f840917bcb 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -722,7 +722,8 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb) | |||
722 | static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, | 722 | static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, |
723 | unsigned int mss_now) | 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 | /* Avoid the costly divide in the normal | 727 | /* Avoid the costly divide in the normal |
727 | * non-TSO case. | 728 | * non-TSO case. |
728 | */ | 729 | */ |
@@ -1163,7 +1164,9 @@ static int tcp_init_tso_segs(struct sock *sk, struct sk_buff *skb, | |||
1163 | { | 1164 | { |
1164 | int tso_segs = tcp_skb_pcount(skb); | 1165 | int tso_segs = tcp_skb_pcount(skb); |
1165 | 1166 | ||
1166 | if (!tso_segs || (tso_segs > 1 && tcp_skb_mss(skb) != mss_now)) { | 1167 | if (!tso_segs || |
1168 | (tso_segs > 1 && (tcp_skb_mss(skb) != mss_now || | ||
1169 | tcp_urg_mode(tcp_sk(sk))))) { | ||
1167 | tcp_set_skb_tso_segs(sk, skb, mss_now); | 1170 | tcp_set_skb_tso_segs(sk, skb, mss_now); |
1168 | tso_segs = tcp_skb_pcount(skb); | 1171 | tso_segs = tcp_skb_pcount(skb); |
1169 | } | 1172 | } |
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 63f36e9d1af8..b3ce28d35611 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -271,6 +271,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev, | |||
271 | __u32 *mode, char *extra) | 271 | __u32 *mode, char *extra) |
272 | { | 272 | { |
273 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 273 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
274 | struct ieee80211_local *local = sdata->local; | ||
274 | int type; | 275 | int type; |
275 | 276 | ||
276 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 277 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
@@ -281,6 +282,13 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev, | |||
281 | type = NL80211_IFTYPE_STATION; | 282 | type = NL80211_IFTYPE_STATION; |
282 | break; | 283 | break; |
283 | case IW_MODE_ADHOC: | 284 | case IW_MODE_ADHOC: |
285 | /* Setting ad-hoc mode on non ibss channel is not | ||
286 | * supported. | ||
287 | */ | ||
288 | if (local->oper_channel && | ||
289 | (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS)) | ||
290 | return -EOPNOTSUPP; | ||
291 | |||
284 | type = NL80211_IFTYPE_ADHOC; | 292 | type = NL80211_IFTYPE_ADHOC; |
285 | break; | 293 | break; |
286 | case IW_MODE_REPEAT: | 294 | case IW_MODE_REPEAT: |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 622d7c671cb7..233fdd2d7d21 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -305,9 +305,7 @@ void nf_conntrack_hash_insert(struct nf_conn *ct) | |||
305 | hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); | 305 | hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); |
306 | repl_hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); | 306 | repl_hash = hash_conntrack(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); |
307 | 307 | ||
308 | spin_lock_bh(&nf_conntrack_lock); | ||
309 | __nf_conntrack_hash_insert(ct, hash, repl_hash); | 308 | __nf_conntrack_hash_insert(ct, hash, repl_hash); |
310 | spin_unlock_bh(&nf_conntrack_lock); | ||
311 | } | 309 | } |
312 | EXPORT_SYMBOL_GPL(nf_conntrack_hash_insert); | 310 | EXPORT_SYMBOL_GPL(nf_conntrack_hash_insert); |
313 | 311 | ||
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index a040d46f85d6..5f4a6516b3b6 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -1090,7 +1090,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1090 | struct nf_conn_help *help; | 1090 | struct nf_conn_help *help; |
1091 | struct nf_conntrack_helper *helper; | 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 | if (ct == NULL || IS_ERR(ct)) | 1094 | if (ct == NULL || IS_ERR(ct)) |
1095 | return -ENOMEM; | 1095 | return -ENOMEM; |
1096 | 1096 | ||
@@ -1138,7 +1138,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
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 | #if defined(CONFIG_NF_CONNTRACK_MARK) | 1143 | #if defined(CONFIG_NF_CONNTRACK_MARK) |
1144 | if (cda[CTA_MARK]) | 1144 | if (cda[CTA_MARK]) |
@@ -1212,13 +1212,14 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb, | |||
1212 | atomic_inc(&master_ct->ct_general.use); | 1212 | atomic_inc(&master_ct->ct_general.use); |
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | spin_unlock_bh(&nf_conntrack_lock); | ||
1216 | err = -ENOENT; | 1215 | err = -ENOENT; |
1217 | if (nlh->nlmsg_flags & NLM_F_CREATE) | 1216 | if (nlh->nlmsg_flags & NLM_F_CREATE) |
1218 | err = ctnetlink_create_conntrack(cda, | 1217 | err = ctnetlink_create_conntrack(cda, |
1219 | &otuple, | 1218 | &otuple, |
1220 | &rtuple, | 1219 | &rtuple, |
1221 | master_ct); | 1220 | master_ct); |
1221 | spin_unlock_bh(&nf_conntrack_lock); | ||
1222 | |||
1222 | if (err < 0 && master_ct) | 1223 | if (err < 0 && master_ct) |
1223 | nf_ct_put(master_ct); | 1224 | nf_ct_put(master_ct); |
1224 | 1225 | ||
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index a7f1ce11bc22..0c1cc7612800 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -1072,6 +1072,10 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1072 | unsigned char *asmptr; | 1072 | unsigned char *asmptr; |
1073 | int n, size, qbit = 0; | 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 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) | 1079 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) |
1076 | return -EINVAL; | 1080 | return -EINVAL; |
1077 | 1081 | ||
@@ -1265,6 +1269,12 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1265 | skb_reset_transport_header(skb); | 1269 | skb_reset_transport_header(skb); |
1266 | copied = skb->len; | 1270 | copied = skb->len; |
1267 | 1271 | ||
1272 | /* ROSE empty frame has no meaning : ignore it */ | ||
1273 | if (copied == 0) { | ||
1274 | skb_free_datagram(sk, skb); | ||
1275 | return copied; | ||
1276 | } | ||
1277 | |||
1268 | if (copied > size) { | 1278 | if (copied > size) { |
1269 | copied = size; | 1279 | copied = size; |
1270 | msg->msg_flags |= MSG_TRUNC; | 1280 | msg->msg_flags |= MSG_TRUNC; |