History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits) e1000e: increase driver version number e1000e: alternate MAC address update e1000e: do not disable receiver on 82574/82583 e1000e: alternate MAC address does not work on device id 0x1060 PCnet: Fix section mismatch bnx2x: disable dcb on 578xx since not supported yet bnx2x: properly clean indirect addresses bnx2x: prevent race between undi_unload and load flows bnx2x: fix select_queue when FCoE is disabled bnx2x: init FCOE FP only once ipv4: some rt_iif -> rt_route_iif conversions net/bridge/netfilter/ebtables.c: use available error handling code net/netlabel/netlabel_kapi.c: add missing cleanup code net/irda: sh_sir: tidyup compile warning net/irda: sh_sir: add missing header net/irda: sh_irda: add missing header slcan: ldisc generated skbs are received in softirq context scm: Capture the full credentials of the scm sender tcp: initialize variable ecn_ok in syncookies path drivers/net/wireless/wl1251: add missing kfree ...

Linus Torvalds committed 15 years ago

Commit ce8a84e2 parents eeca736 d80bcf446 files · +604 −106Browse files

Unified · Split

46 files
  1. Documentation/networking/bonding.txt +29 −0
  2. Documentation/networking/scaling.txt +371 −0
  3. drivers/net/bnx2x/bnx2x_cmn.c +28 −7
  4. drivers/net/bnx2x/bnx2x_dcb.c +1 −1
  5. drivers/net/bnx2x/bnx2x_main.c +19 −4
  6. drivers/net/bnx2x/bnx2x_reg.h +21 −5
  7. drivers/net/can/slcan.c +1 −1
  8. drivers/net/e1000e/82571.c +4 −2
  9. drivers/net/e1000e/e1000.h +1 −0
  10. drivers/net/e1000e/ethtool.c +2 −1
  11. drivers/net/e1000e/lib.c +4 −3
  12. drivers/net/e1000e/netdev.c +6 −3
  13. drivers/net/gianfar_ptp.c +2 −7
  14. drivers/net/irda/sh_irda.c +2 −0
  15. drivers/net/irda/sh_sir.c +3 −1
  16. drivers/net/pcnet32.c +1 −1
  17. drivers/net/phy/dp83640.c +2 −3
  18. drivers/net/slip.c +1 −1
  19. drivers/net/usb/rtl8150.c +0 −1
  20. drivers/net/wireless/ath/ath5k/base.c +14 −9
  21. drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +4 −4
  22. drivers/net/wireless/ath/ath9k/ar9003_phy.h +1 −1
  23. drivers/net/wireless/b43/dma.c +17 −3
  24. drivers/net/wireless/rt2x00/rt2800usb.c +2 −0
  25. drivers/net/wireless/rt2x00/rt73usb.c +1 −0
  26. drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +8 −3
  27. drivers/net/wireless/wl1251/acx.c +1 −5
  28. drivers/net/wireless/wl1251/cmd.c +1 −1
  29. fs/compat_ioctl.c +1 −0
  30. include/linux/netlink.h +1 −1
  31. include/linux/socket.h +4 −2
  32. include/net/inet_sock.h +1 −1
  33. net/bridge/br_if.c +5 −1
  34. net/bridge/br_notify.c +6 −1
  35. net/bridge/netfilter/ebtables.c +2 −1
  36. net/core/scm.c +1 −1
  37. net/ipv4/ip_output.c +1 −0
  38. net/ipv4/ip_sockglue.c +5 −4
  39. net/ipv4/netfilter.c +8 −10
  40. net/ipv4/raw.c +2 −1
  41. net/ipv4/route.c +4 −5
  42. net/ipv4/syncookies.c +1 −1
  43. net/ipv6/syncookies.c +1 −1
  44. net/netfilter/nf_queue.c +1 −0
  45. net/netlabel/netlabel_kapi.c +12 −8
  46. net/sched/sch_prio.c +1 −1
Documentation/networking/bonding.txt+29−0
@@ -238,6 +238,18 @@ ad_select · 237 unmodified lines
238238
239239 This option was added in bonding version 3.4.0.
240240
241+all_slaves_active
242+
243+ Specifies that duplicate frames (received on inactive ports) should be
244+ dropped (0) or delivered (1).
245+
246+ Normally, bonding will drop duplicate frames (received on inactive
247+ ports), which is desirable for most users. But there are some times
248+ it is nice to allow duplicate frames to be delivered.
249+
250+ The default value is 0 (drop duplicate frames received on inactive
251+ ports).
252+
241253 arp_interval
242254
243255 Specifies the ARP link monitoring frequency in milliseconds.
@@ -433,6 +445,23 @@ miimon · 189 unmodified lines
433445 determined. See the High Availability section for additional
434446 information. The default value is 0.
435447
448+min_links
449+
450+ Specifies the minimum number of links that must be active before
451+ asserting carrier. It is similar to the Cisco EtherChannel min-links
452+ feature. This allows setting the minimum number of member ports that
453+ must be up (link-up state) before marking the bond device as up
454+ (carrier on). This is useful for situations where higher level services
455+ such as clustering want to ensure a minimum number of low bandwidth
456+ links are active before switchover. This option only affect 802.3ad
457+ mode.
458+
459+ The default value is 0. This will cause carrier to be asserted (for
460+ 802.3ad mode) whenever there is an active aggregator, regardless of the
461+ number of available links in that aggregator. Note that, because an
462+ aggregator cannot be active without at least one available link,
463+ setting this option to 0 or to 1 has the exact same effect.
464+
436465 mode
437466
438467 Specifies one of the bonding policies. The default is
Documentation/networking/scaling.txt+371−0
@@ -0,0 +1,371 @@
1+Scaling in the Linux Networking Stack
2+
3+
4+Introduction
5+============
6+
7+This document describes a set of complementary techniques in the Linux
8+networking stack to increase parallelism and improve performance for
9+multi-processor systems.
10+
11+The following technologies are described:
12+
13+ RSS: Receive Side Scaling
14+ RPS: Receive Packet Steering
15+ RFS: Receive Flow Steering
16+ Accelerated Receive Flow Steering
17+ XPS: Transmit Packet Steering
18+
19+
20+RSS: Receive Side Scaling
21+=========================
22+
23+Contemporary NICs support multiple receive and transmit descriptor queues
24+(multi-queue). On reception, a NIC can send different packets to different
25+queues to distribute processing among CPUs. The NIC distributes packets by
26+applying a filter to each packet that assigns it to one of a small number
27+of logical flows. Packets for each flow are steered to a separate receive
28+queue, which in turn can be processed by separate CPUs. This mechanism is
29+generally known as “Receive-side Scaling” (RSS). The goal of RSS and
30+the other scaling techniques to increase performance uniformly.
31+Multi-queue distribution can also be used for traffic prioritization, but
32+that is not the focus of these techniques.
33+
34+The filter used in RSS is typically a hash function over the network
35+and/or transport layer headers-- for example, a 4-tuple hash over
36+IP addresses and TCP ports of a packet. The most common hardware
37+implementation of RSS uses a 128-entry indirection table where each entry
38+stores a queue number. The receive queue for a packet is determined
39+by masking out the low order seven bits of the computed hash for the
40+packet (usually a Toeplitz hash), taking this number as a key into the
41+indirection table and reading the corresponding value.
42+
43+Some advanced NICs allow steering packets to queues based on
44+programmable filters. For example, webserver bound TCP port 80 packets
45+can be directed to their own receive queue. Such “n-tuple” filters can
46+be configured from ethtool (--config-ntuple).
47+
48+==== RSS Configuration
49+
50+The driver for a multi-queue capable NIC typically provides a kernel
51+module parameter for specifying the number of hardware queues to
52+configure. In the bnx2x driver, for instance, this parameter is called
53+num_queues. A typical RSS configuration would be to have one receive queue
54+for each CPU if the device supports enough queues, or otherwise at least
55+one for each cache domain at a particular cache level (L1, L2, etc.).
56+
57+The indirection table of an RSS device, which resolves a queue by masked
58+hash, is usually programmed by the driver at initialization. The
59+default mapping is to distribute the queues evenly in the table, but the
60+indirection table can be retrieved and modified at runtime using ethtool
61+commands (--show-rxfh-indir and --set-rxfh-indir). Modifying the
62+indirection table could be done to give different queues different
63+relative weights.
64+
65+== RSS IRQ Configuration
66+
67+Each receive queue has a separate IRQ associated with it. The NIC triggers
68+this to notify a CPU when new packets arrive on the given queue. The
69+signaling path for PCIe devices uses message signaled interrupts (MSI-X),
70+that can route each interrupt to a particular CPU. The active mapping
71+of queues to IRQs can be determined from /proc/interrupts. By default,
72+an IRQ may be handled on any CPU. Because a non-negligible part of packet
73+processing takes place in receive interrupt handling, it is advantageous
74+to spread receive interrupts between CPUs. To manually adjust the IRQ
75+affinity of each interrupt see Documentation/IRQ-affinity. Some systems
76+will be running irqbalance, a daemon that dynamically optimizes IRQ
77+assignments and as a result may override any manual settings.
78+
79+== Suggested Configuration
80+
81+RSS should be enabled when latency is a concern or whenever receive
82+interrupt processing forms a bottleneck. Spreading load between CPUs
83+decreases queue length. For low latency networking, the optimal setting
84+is to allocate as many queues as there are CPUs in the system (or the
85+NIC maximum, if lower). Because the aggregate number of interrupts grows
86+with each additional queue, the most efficient high-rate configuration
87+is likely the one with the smallest number of receive queues where no
88+CPU that processes receive interrupts reaches 100% utilization. Per-cpu
89+load can be observed using the mpstat utility.
90+
91+
92+RPS: Receive Packet Steering
93+============================
94+
95+Receive Packet Steering (RPS) is logically a software implementation of
96+RSS. Being in software, it is necessarily called later in the datapath.
97+Whereas RSS selects the queue and hence CPU that will run the hardware
98+interrupt handler, RPS selects the CPU to perform protocol processing
99+above the interrupt handler. This is accomplished by placing the packet
100+on the desired CPU’s backlog queue and waking up the CPU for processing.
101+RPS has some advantages over RSS: 1) it can be used with any NIC,
102+2) software filters can easily be added to hash over new protocols,
103+3) it does not increase hardware device interrupt rate (although it does
104+introduce inter-processor interrupts (IPIs)).
105+
106+RPS is called during bottom half of the receive interrupt handler, when
107+a driver sends a packet up the network stack with netif_rx() or
108+netif_receive_skb(). These call the get_rps_cpu() function, which
109+selects the queue that should process a packet.
110+
111+The first step in determining the target CPU for RPS is to calculate a
112+flow hash over the packet’s addresses or ports (2-tuple or 4-tuple hash
113+depending on the protocol). This serves as a consistent hash of the
114+associated flow of the packet. The hash is either provided by hardware
115+or will be computed in the stack. Capable hardware can pass the hash in
116+the receive descriptor for the packet; this would usually be the same
117+hash used for RSS (e.g. computed Toeplitz hash). The hash is saved in
118+skb->rx_hash and can be used elsewhere in the stack as a hash of the
119+packet’s flow.
120+
121+Each receive hardware queue has an associated list of CPUs to which
122+RPS may enqueue packets for processing. For each received packet,
123+an index into the list is computed from the flow hash modulo the size
124+of the list. The indexed CPU is the target for processing the packet,
125+and the packet is queued to the tail of that CPU’s backlog queue. At
126+the end of the bottom half routine, IPIs are sent to any CPUs for which
127+packets have been queued to their backlog queue. The IPI wakes backlog
128+processing on the remote CPU, and any queued packets are then processed
129+up the networking stack.
130+
131+==== RPS Configuration
132+
133+RPS requires a kernel compiled with the CONFIG_RPS kconfig symbol (on
134+by default for SMP). Even when compiled in, RPS remains disabled until
135+explicitly configured. The list of CPUs to which RPS may forward traffic
136+can be configured for each receive queue using a sysfs file entry:
137+
138+ /sys/class/net/<dev>/queues/rx-<n>/rps_cpus
139+
140+This file implements a bitmap of CPUs. RPS is disabled when it is zero
141+(the default), in which case packets are processed on the interrupting
142+CPU. Documentation/IRQ-affinity.txt explains how CPUs are assigned to
143+the bitmap.
144+
145+== Suggested Configuration
146+
147+For a single queue device, a typical RPS configuration would be to set
148+the rps_cpus to the CPUs in the same cache domain of the interrupting
149+CPU. If NUMA locality is not an issue, this could also be all CPUs in
150+the system. At high interrupt rate, it might be wise to exclude the
151+interrupting CPU from the map since that already performs much work.
152+
153+For a multi-queue system, if RSS is configured so that a hardware
154+receive queue is mapped to each CPU, then RPS is probably redundant
155+and unnecessary. If there are fewer hardware queues than CPUs, then
156+RPS might be beneficial if the rps_cpus for each queue are the ones that
157+share the same cache domain as the interrupting CPU for that queue.
158+
159+
160+RFS: Receive Flow Steering
161+==========================
162+
163+While RPS steers packets solely based on hash, and thus generally
164+provides good load distribution, it does not take into account
165+application locality. This is accomplished by Receive Flow Steering
166+(RFS). The goal of RFS is to increase datacache hitrate by steering
167+kernel processing of packets to the CPU where the application thread
168+consuming the packet is running. RFS relies on the same RPS mechanisms
169+to enqueue packets onto the backlog of another CPU and to wake up that
170+CPU.
171+
172+In RFS, packets are not forwarded directly by the value of their hash,
173+but the hash is used as index into a flow lookup table. This table maps
174+flows to the CPUs where those flows are being processed. The flow hash
175+(see RPS section above) is used to calculate the index into this table.
176+The CPU recorded in each entry is the one which last processed the flow.
177+If an entry does not hold a valid CPU, then packets mapped to that entry
178+are steered using plain RPS. Multiple table entries may point to the
179+same CPU. Indeed, with many flows and few CPUs, it is very likely that
180+a single application thread handles flows with many different flow hashes.
181+
182+rps_sock_table is a global flow table that contains the *desired* CPU for
183+flows: the CPU that is currently processing the flow in userspace. Each
184+table value is a CPU index that is updated during calls to recvmsg and
185+sendmsg (specifically, inet_recvmsg(), inet_sendmsg(), inet_sendpage()
186+and tcp_splice_read()).
187+
188+When the scheduler moves a thread to a new CPU while it has outstanding
189+receive packets on the old CPU, packets may arrive out of order. To
190+avoid this, RFS uses a second flow table to track outstanding packets
191+for each flow: rps_dev_flow_table is a table specific to each hardware
192+receive queue of each device. Each table value stores a CPU index and a
193+counter. The CPU index represents the *current* CPU onto which packets
194+for this flow are enqueued for further kernel processing. Ideally, kernel
195+and userspace processing occur on the same CPU, and hence the CPU index
196+in both tables is identical. This is likely false if the scheduler has
197+recently migrated a userspace thread while the kernel still has packets
198+enqueued for kernel processing on the old CPU.
199+
200+The counter in rps_dev_flow_table values records the length of the current
201+CPU's backlog when a packet in this flow was last enqueued. Each backlog
202+queue has a head counter that is incremented on dequeue. A tail counter
203+is computed as head counter + queue length. In other words, the counter
204+in rps_dev_flow_table[i] records the last element in flow i that has
205+been enqueued onto the currently designated CPU for flow i (of course,
206+entry i is actually selected by hash and multiple flows may hash to the
207+same entry i).
208+
209+And now the trick for avoiding out of order packets: when selecting the
210+CPU for packet processing (from get_rps_cpu()) the rps_sock_flow table
211+and the rps_dev_flow table of the queue that the packet was received on
212+are compared. If the desired CPU for the flow (found in the
213+rps_sock_flow table) matches the current CPU (found in the rps_dev_flow
214+table), the packet is enqueued onto that CPU’s backlog. If they differ,
215+the current CPU is updated to match the desired CPU if one of the
216+following is true:
217+
218+- The current CPU's queue head counter >= the recorded tail counter
219+ value in rps_dev_flow[i]
220+- The current CPU is unset (equal to NR_CPUS)
221+- The current CPU is offline
222+
223+After this check, the packet is sent to the (possibly updated) current
224+CPU. These rules aim to ensure that a flow only moves to a new CPU when
225+there are no packets outstanding on the old CPU, as the outstanding
226+packets could arrive later than those about to be processed on the new
227+CPU.
228+
229+==== RFS Configuration
230+
231+RFS is only available if the kconfig symbol CONFIG_RFS is enabled (on
232+by default for SMP). The functionality remains disabled until explicitly
233+configured. The number of entries in the global flow table is set through:
234+
235+ /proc/sys/net/core/rps_sock_flow_entries
236+
237+The number of entries in the per-queue flow table are set through:
238+
239+ /sys/class/net/<dev>/queues/tx-<n>/rps_flow_cnt
240+
241+== Suggested Configuration
242+
243+Both of these need to be set before RFS is enabled for a receive queue.
244+Values for both are rounded up to the nearest power of two. The
245+suggested flow count depends on the expected number of active connections
246+at any given time, which may be significantly less than the number of open
247+connections. We have found that a value of 32768 for rps_sock_flow_entries
248+works fairly well on a moderately loaded server.
249+
250+For a single queue device, the rps_flow_cnt value for the single queue
251+would normally be configured to the same value as rps_sock_flow_entries.
252+For a multi-queue device, the rps_flow_cnt for each queue might be
253+configured as rps_sock_flow_entries / N, where N is the number of
254+queues. So for instance, if rps_flow_entries is set to 32768 and there
255+are 16 configured receive queues, rps_flow_cnt for each queue might be
256+configured as 2048.
257+
258+
259+Accelerated RFS
260+===============
261+
262+Accelerated RFS is to RFS what RSS is to RPS: a hardware-accelerated load
263+balancing mechanism that uses soft state to steer flows based on where
264+the application thread consuming the packets of each flow is running.
265+Accelerated RFS should perform better than RFS since packets are sent
266+directly to a CPU local to the thread consuming the data. The target CPU
267+will either be the same CPU where the application runs, or at least a CPU
268+which is local to the application thread’s CPU in the cache hierarchy.
269+
270+To enable accelerated RFS, the networking stack calls the
271+ndo_rx_flow_steer driver function to communicate the desired hardware
272+queue for packets matching a particular flow. The network stack
273+automatically calls this function every time a flow entry in
274+rps_dev_flow_table is updated. The driver in turn uses a device specific
275+method to program the NIC to steer the packets.
276+
277+The hardware queue for a flow is derived from the CPU recorded in
278+rps_dev_flow_table. The stack consults a CPU to hardware queue map which
279+is maintained by the NIC driver. This is an auto-generated reverse map of
280+the IRQ affinity table shown by /proc/interrupts. Drivers can use
281+functions in the cpu_rmap (“CPU affinity reverse map”) kernel library
282+to populate the map. For each CPU, the corresponding queue in the map is
283+set to be one whose processing CPU is closest in cache locality.
284+
285+==== Accelerated RFS Configuration
286+
287+Accelerated RFS is only available if the kernel is compiled with
288+CONFIG_RFS_ACCEL and support is provided by the NIC device and driver.
289+It also requires that ntuple filtering is enabled via ethtool. The map
290+of CPU to queues is automatically deduced from the IRQ affinities
291+configured for each receive queue by the driver, so no additional
292+configuration should be necessary.
293+
294+== Suggested Configuration
295+
296+This technique should be enabled whenever one wants to use RFS and the
297+NIC supports hardware acceleration.
298+
299+XPS: Transmit Packet Steering
300+=============================
301+
302+Transmit Packet Steering is a mechanism for intelligently selecting
303+which transmit queue to use when transmitting a packet on a multi-queue
304+device. To accomplish this, a mapping from CPU to hardware queue(s) is
305+recorded. The goal of this mapping is usually to assign queues
306+exclusively to a subset of CPUs, where the transmit completions for
307+these queues are processed on a CPU within this set. This choice
308+provides two benefits. First, contention on the device queue lock is
309+significantly reduced since fewer CPUs contend for the same queue
310+(contention can be eliminated completely if each CPU has its own
311+transmit queue). Secondly, cache miss rate on transmit completion is
312+reduced, in particular for data cache lines that hold the sk_buff
313+structures.
314+
315+XPS is configured per transmit queue by setting a bitmap of CPUs that
316+may use that queue to transmit. The reverse mapping, from CPUs to
317+transmit queues, is computed and maintained for each network device.
318+When transmitting the first packet in a flow, the function
319+get_xps_queue() is called to select a queue. This function uses the ID
320+of the running CPU as a key into the CPU-to-queue lookup table. If the
321+ID matches a single queue, that is used for transmission. If multiple
322+queues match, one is selected by using the flow hash to compute an index
323+into the set.
324+
325+The queue chosen for transmitting a particular flow is saved in the
326+corresponding socket structure for the flow (e.g. a TCP connection).
327+This transmit queue is used for subsequent packets sent on the flow to
328+prevent out of order (ooo) packets. The choice also amortizes the cost
329+of calling get_xps_queues() over all packets in the connection. To avoid
330+ooo packets, the queue for a flow can subsequently only be changed if
331+skb->ooo_okay is set for a packet in the flow. This flag indicates that
332+there are no outstanding packets in the flow, so the transmit queue can
333+change without the risk of generating out of order packets. The
334+transport layer is responsible for setting ooo_okay appropriately. TCP,
335+for instance, sets the flag when all data for a connection has been
336+acknowledged.
337+
338+==== XPS Configuration
339+
340+XPS is only available if the kconfig symbol CONFIG_XPS is enabled (on by
341+default for SMP). The functionality remains disabled until explicitly
342+configured. To enable XPS, the bitmap of CPUs that may use a transmit
343+queue is configured using the sysfs file entry:
344+
345+/sys/class/net/<dev>/queues/tx-<n>/xps_cpus
346+
347+== Suggested Configuration
348+
349+For a network device with a single transmission queue, XPS configuration
350+has no effect, since there is no choice in this case. In a multi-queue
351+system, XPS is preferably configured so that each CPU maps onto one queue.
352+If there are as many queues as there are CPUs in the system, then each
353+queue can also map onto one CPU, resulting in exclusive pairings that
354+experience no contention. If there are fewer queues than CPUs, then the
355+best CPUs to share a given queue are probably those that share the cache
356+with the CPU that processes transmit completions for that queue
357+(transmit interrupts).
358+
359+
360+Further Information
361+===================
362+RPS and RFS were introduced in kernel 2.6.35. XPS was incorporated into
363+2.6.38. Original patches were submitted by Tom Herbert
364+(therbert@google.com)
365+
366+Accelerated RFS was introduced in 2.6.35. Original patches were
367+submitted by Ben Hutchings (bhutchings@solarflare.com)
368+
369+Authors:
370+Tom Herbert (therbert@google.com)
371+Willem de Bruijn (willemb@google.com)
drivers/net/bnx2x/bnx2x_cmn.c+28−7
@@ -63,8 +63,9 @@ static inline void bnx2x_bz_fp(struct bnx2x *bp, int index) · 62 unmodified lines
6363 fp->disable_tpa = ((bp->flags & TPA_ENABLE_FLAG) == 0);
6464
6565 #ifdef BCM_CNIC
66− /* We don't want TPA on FCoE, FWD and OOO L2 rings */
67− bnx2x_fcoe(bp, disable_tpa) = 1;
66+ /* We don't want TPA on an FCoE L2 ring */
67+ if (IS_FCOE_FP(fp))
68+ fp->disable_tpa = 1;
6869 #endif
6970 }
7071
@@ -1404,10 +1405,9 @@ void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw) · 1333 unmodified lines
14041405 u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb)
14051406 {
14061407 struct bnx2x *bp = netdev_priv(dev);
1408+
14071409 #ifdef BCM_CNIC
1408− if (NO_FCOE(bp))
1409− return skb_tx_hash(dev, skb);
1410− else {
1410+ if (!NO_FCOE(bp)) {
14111411 struct ethhdr *hdr = (struct ethhdr *)skb->data;
14121412 u16 ether_type = ntohs(hdr->h_proto);
14131413
@@ -1424,8 +1424,7 @@ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb) · 10 unmodified lines
14241424 return bnx2x_fcoe_tx(bp, txq_index);
14251425 }
14261426 #endif
1427− /* Select a none-FCoE queue: if FCoE is enabled, exclude FCoE L2 ring
1428− */
1427+ /* select a non-FCoE queue */
14291428 return __skb_tx_hash(dev, skb, BNX2X_NUM_ETH_QUEUES(bp));
14301429 }
14311430
@@ -1448,6 +1447,28 @@ void bnx2x_set_num_queues(struct bnx2x *bp) · 16 unmodified lines
14481447 bp->num_queues += NON_ETH_CONTEXT_USE;
14491448 }
14501449
1450+/**
1451+ * bnx2x_set_real_num_queues - configure netdev->real_num_[tx,rx]_queues
1452+ *
1453+ * @bp: Driver handle
1454+ *
1455+ * We currently support for at most 16 Tx queues for each CoS thus we will
1456+ * allocate a multiple of 16 for ETH L2 rings according to the value of the
1457+ * bp->max_cos.
1458+ *
1459+ * If there is an FCoE L2 queue the appropriate Tx queue will have the next
1460+ * index after all ETH L2 indices.
1461+ *
1462+ * If the actual number of Tx queues (for each CoS) is less than 16 then there
1463+ * will be the holes at the end of each group of 16 ETh L2 indices (0..15,
1464+ * 16..31,...) with indicies that are not coupled with any real Tx queue.
1465+ *
1466+ * The proper configuration of skb->queue_mapping is handled by
1467+ * bnx2x_select_queue() and __skb_tx_hash().
1468+ *
1469+ * bnx2x_setup_tc() takes care of the proper TC mappings so that __skb_tx_hash()
1470+ * will return a proper Tx index if TC is enabled (netdev->num_tc > 0).
1471+ */
14511472 static inline int bnx2x_set_real_num_queues(struct bnx2x *bp)
14521473 {
14531474 int rc, tx, rx;
drivers/net/bnx2x/bnx2x_dcb.c+1−1
@@ -920,7 +920,7 @@ static void bnx2x_dcbx_admin_mib_updated_params(struct bnx2x *bp, · 919 unmodified lines
920920
921921 void bnx2x_dcbx_set_state(struct bnx2x *bp, bool dcb_on, u32 dcbx_enabled)
922922 {
923− if (!CHIP_IS_E1x(bp)) {
923+ if (!CHIP_IS_E1x(bp) && !CHIP_IS_E3(bp)) {
924924 bp->dcb_state = dcb_on;
925925 bp->dcbx_enabled = dcbx_enabled;
926926 } else {
drivers/net/bnx2x/bnx2x_main.c+19−4
@@ -5798,6 +5798,12 @@ static int bnx2x_init_hw_common(struct bnx2x *bp) · 5797 unmodified lines
57985798
57995799 DP(BNX2X_MSG_MCP, "starting common init func %d\n", BP_ABS_FUNC(bp));
58005800
5801+ /*
5802+ * take the UNDI lock to protect undi_unload flow from accessing
5803+ * registers while we're resetting the chip
5804+ */
5805+ bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
5806+
58015807 bnx2x_reset_common(bp);
58025808 REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff);
58035809
@@ -5808,6 +5814,8 @@ static int bnx2x_init_hw_common(struct bnx2x *bp) · 4 unmodified lines
58085814 }
58095815 REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, val);
58105816
5817+ bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI);
5818+
58115819 bnx2x_init_block(bp, BLOCK_MISC, PHASE_COMMON);
58125820
58135821 if (!CHIP_IS_E1x(bp)) {
@@ -10251,10 +10259,17 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev, · 4437 unmodified lines
1025110259 /* clean indirect addresses */
1025210260 pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS,
1025310261 PCICFG_VENDOR_ID_OFFSET);
10254− REG_WR(bp, PXP2_REG_PGL_ADDR_88_F0 + BP_PORT(bp)*16, 0);
10255− REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F0 + BP_PORT(bp)*16, 0);
10256− REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0 + BP_PORT(bp)*16, 0);
10257− REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0 + BP_PORT(bp)*16, 0);
10262+ /* Clean the following indirect addresses for all functions since it
10263+ * is not used by the driver.
10264+ */
10265+ REG_WR(bp, PXP2_REG_PGL_ADDR_88_F0, 0);
10266+ REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F0, 0);
10267+ REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0, 0);
10268+ REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0, 0);
10269+ REG_WR(bp, PXP2_REG_PGL_ADDR_88_F1, 0);
10270+ REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F1, 0);
10271+ REG_WR(bp, PXP2_REG_PGL_ADDR_90_F1, 0);
10272+ REG_WR(bp, PXP2_REG_PGL_ADDR_94_F1, 0);
1025810273
1025910274 /*
1026010275 * Enable internal target-read (in case we are probed after PF FLR).
drivers/net/bnx2x/bnx2x_reg.h+21−5
@@ -3007,11 +3007,27 @@ · 3006 unmodified lines
30073007 /* [R 6] Debug only: Number of used entries in the data FIFO */
30083008 #define PXP2_REG_HST_DATA_FIFO_STATUS 0x12047c
30093009 /* [R 7] Debug only: Number of used entries in the header FIFO */
3010−#define PXP2_REG_HST_HEADER_FIFO_STATUS 0x120478
3011−#define PXP2_REG_PGL_ADDR_88_F0 0x120534
3012−#define PXP2_REG_PGL_ADDR_8C_F0 0x120538
3013−#define PXP2_REG_PGL_ADDR_90_F0 0x12053c
3014−#define PXP2_REG_PGL_ADDR_94_F0 0x120540
3010+#define PXP2_REG_HST_HEADER_FIFO_STATUS 0x120478
3011+#define PXP2_REG_PGL_ADDR_88_F0 0x120534
3012+/* [R 32] GRC address for configuration access to PCIE config address 0x88.
3013+ * any write to this PCIE address will cause a GRC write access to the
3014+ * address that's in t this register */
3015+#define PXP2_REG_PGL_ADDR_88_F1 0x120544
3016+#define PXP2_REG_PGL_ADDR_8C_F0 0x120538
3017+/* [R 32] GRC address for configuration access to PCIE config address 0x8c.
3018+ * any write to this PCIE address will cause a GRC write access to the
3019+ * address that's in t this register */
3020+#define PXP2_REG_PGL_ADDR_8C_F1 0x120548
3021+#define PXP2_REG_PGL_ADDR_90_F0 0x12053c
3022+/* [R 32] GRC address for configuration access to PCIE config address 0x90.
3023+ * any write to this PCIE address will cause a GRC write access to the
3024+ * address that's in t this register */
3025+#define PXP2_REG_PGL_ADDR_90_F1 0x12054c
3026+#define PXP2_REG_PGL_ADDR_94_F0 0x120540
3027+/* [R 32] GRC address for configuration access to PCIE config address 0x94.
3028+ * any write to this PCIE address will cause a GRC write access to the
3029+ * address that's in t this register */
3030+#define PXP2_REG_PGL_ADDR_94_F1 0x120550
30153031 #define PXP2_REG_PGL_CONTROL0 0x120490
30163032 #define PXP2_REG_PGL_CONTROL1 0x120514
30173033 #define PXP2_REG_PGL_DEBUG 0x120520
drivers/net/can/slcan.c+1−1
@@ -197,7 +197,7 @@ static void slc_bump(struct slcan *sl) · 196 unmodified lines
197197 skb->ip_summed = CHECKSUM_UNNECESSARY;
198198 memcpy(skb_put(skb, sizeof(struct can_frame)),
199199 &cf, sizeof(struct can_frame));
200− netif_rx(skb);
200+ netif_rx_ni(skb);
201201
202202 sl->dev->stats.rx_packets++;
203203 sl->dev->stats.rx_bytes += cf.can_dlc;
drivers/net/e1000e/82571.c+4−2
@@ -2085,7 +2085,8 @@ struct e1000_info e1000_82574_info = { · 2084 unmodified lines
20852085 | FLAG_HAS_AMT
20862086 | FLAG_HAS_CTRLEXT_ON_LOAD,
20872087 .flags2 = FLAG2_CHECK_PHY_HANG
2088− | FLAG2_DISABLE_ASPM_L0S,
2088+ | FLAG2_DISABLE_ASPM_L0S
2089+ | FLAG2_NO_DISABLE_RX,
20892090 .pba = 32,
20902091 .max_hw_frame_size = DEFAULT_JUMBO,
20912092 .get_variants = e1000_get_variants_82571,
@@ -2104,7 +2105,8 @@ struct e1000_info e1000_82583_info = { · 12 unmodified lines
21042105 | FLAG_HAS_AMT
21052106 | FLAG_HAS_JUMBO_FRAMES
21062107 | FLAG_HAS_CTRLEXT_ON_LOAD,
2107− .flags2 = FLAG2_DISABLE_ASPM_L0S,
2108+ .flags2 = FLAG2_DISABLE_ASPM_L0S
2109+ | FLAG2_NO_DISABLE_RX,
21082110 .pba = 32,
21092111 .max_hw_frame_size = DEFAULT_JUMBO,
21102112 .get_variants = e1000_get_variants_82571,
drivers/net/e1000e/e1000.h+1−0
@@ -453,6 +453,7 @@ struct e1000_info { · 452 unmodified lines
453453 #define FLAG2_DISABLE_ASPM_L0S (1 << 7)
454454 #define FLAG2_DISABLE_AIM (1 << 8)
455455 #define FLAG2_CHECK_PHY_HANG (1 << 9)
456+#define FLAG2_NO_DISABLE_RX (1 << 10)
456457
457458 #define E1000_RX_DESC_PS(R, i) \
458459 (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
drivers/net/e1000e/ethtool.c+2−1
@@ -1206,7 +1206,8 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter) · 1205 unmodified lines
12061206 rx_ring->next_to_clean = 0;
12071207
12081208 rctl = er32(RCTL);
1209− ew32(RCTL, rctl & ~E1000_RCTL_EN);
1209+ if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
1210+ ew32(RCTL, rctl & ~E1000_RCTL_EN);
12101211 ew32(RDBAL, ((u64) rx_ring->dma & 0xFFFFFFFF));
12111212 ew32(RDBAH, ((u64) rx_ring->dma >> 32));
12121213 ew32(RDLEN, rx_ring->size);
drivers/net/e1000e/lib.c+4−3
@@ -190,7 +190,8 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw) · 189 unmodified lines
190190 /* Check for LOM (vs. NIC) or one of two valid mezzanine cards */
191191 if (!((nvm_data & NVM_COMPAT_LOM) ||
192192 (hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES_DUAL) ||
193− (hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD)))
193+ (hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD) ||
194+ (hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES)))
194195 goto out;
195196
196197 ret_val = e1000_read_nvm(hw, NVM_ALT_MAC_ADDR_PTR, 1,
@@ -200,10 +201,10 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw) · 3 unmodified lines
200201 goto out;
201202 }
202203
203− if (nvm_alt_mac_addr_offset == 0xFFFF) {
204+ if ((nvm_alt_mac_addr_offset == 0xFFFF) ||
205+ (nvm_alt_mac_addr_offset == 0x0000))
204206 /* There is no Alternate MAC Address */
205207 goto out;
206− }
207208
208209 if (hw->bus.func == E1000_FUNC_1)
209210 nvm_alt_mac_addr_offset += E1000_ALT_MAC_ADDRESS_OFFSET_LAN1;
drivers/net/e1000e/netdev.c+6−3
@@ -56,7 +56,7 @@ · 55 unmodified lines
5656
5757 #define DRV_EXTRAVERSION "-k"
5858
59−#define DRV_VERSION "1.3.16" DRV_EXTRAVERSION
59+#define DRV_VERSION "1.4.4" DRV_EXTRAVERSION
6060 char e1000e_driver_name[] = "e1000e";
6161 const char e1000e_driver_version[] = DRV_VERSION;
6262
@@ -2915,7 +2915,8 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) · 2852 unmodified lines
29152915
29162916 /* disable receives while setting up the descriptors */
29172917 rctl = er32(RCTL);
2918− ew32(RCTL, rctl & ~E1000_RCTL_EN);
2918+ if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
2919+ ew32(RCTL, rctl & ~E1000_RCTL_EN);
29192920 e1e_flush();
29202921 usleep_range(10000, 20000);
29212922
@@ -3394,7 +3395,8 @@ void e1000e_down(struct e1000_adapter *adapter) · 472 unmodified lines
33943395
33953396 /* disable receives in the hardware */
33963397 rctl = er32(RCTL);
3397− ew32(RCTL, rctl & ~E1000_RCTL_EN);
3398+ if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))
3399+ ew32(RCTL, rctl & ~E1000_RCTL_EN);
33983400 /* flush and sleep below */
33993401
34003402 netif_stop_queue(netdev);
@@ -3403,6 +3405,7 @@ void e1000e_down(struct e1000_adapter *adapter) · 2 unmodified lines
34033405 tctl = er32(TCTL);
34043406 tctl &= ~E1000_TCTL_EN;
34053407 ew32(TCTL, tctl);
3408+
34063409 /* flush both disables and wait for them to finish */
34073410 e1e_flush();
34083411 usleep_range(10000, 20000);
drivers/net/gianfar_ptp.c+2−7
@@ -193,14 +193,9 @@ static void set_alarm(struct etsects *etsects) · 192 unmodified lines
193193 /* Caller must hold etsects->lock. */
194194 static void set_fipers(struct etsects *etsects)
195195 {
196− u32 tmr_ctrl = gfar_read(&etsects->regs->tmr_ctrl);
197−
198− gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl & (~TE));
199− gfar_write(&etsects->regs->tmr_prsc, etsects->tmr_prsc);
196+ set_alarm(etsects);
200197 gfar_write(&etsects->regs->tmr_fiper1, etsects->tmr_fiper1);
201198 gfar_write(&etsects->regs->tmr_fiper2, etsects->tmr_fiper2);
202− set_alarm(etsects);
203− gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|TE);
204199 }
205200
206201 /*
@@ -511,7 +506,7 @@ static int gianfar_ptp_probe(struct platform_device *dev) · 304 unmodified lines
511506 gfar_write(&etsects->regs->tmr_fiper1, etsects->tmr_fiper1);
512507 gfar_write(&etsects->regs->tmr_fiper2, etsects->tmr_fiper2);
513508 set_alarm(etsects);
514− gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|FS|RTPE|TE);
509+ gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|FS|RTPE|TE|FRD);
515510
516511 spin_unlock_irqrestore(&etsects->lock, flags);
517512
drivers/net/irda/sh_irda.c+2−0
@@ -22,6 +22,8 @@ · 21 unmodified lines
2222 * - DMA transfer support
2323 * - FIFO mode support
2424 */
25+#include <linux/io.h>
26+#include <linux/interrupt.h>
2527 #include <linux/module.h>
2628 #include <linux/platform_device.h>
2729 #include <linux/clk.h>
drivers/net/irda/sh_sir.c+3−1
@@ -12,6 +12,8 @@ · 11 unmodified lines
1212 * published by the Free Software Foundation.
1313 */
1414
15+#include <linux/io.h>
16+#include <linux/interrupt.h>
1517 #include <linux/module.h>
1618 #include <linux/platform_device.h>
1719 #include <linux/slab.h>
@@ -511,7 +513,7 @@ static void sh_sir_tx(struct sh_sir_self *self, int phase) · 493 unmodified lines
511513
512514 static int sh_sir_read_data(struct sh_sir_self *self)
513515 {
514− u16 val;
516+ u16 val = 0;
515517 int timeout = 1024;
516518
517519 while (timeout--) {
drivers/net/pcnet32.c+1−1
@@ -82,7 +82,7 @@ static int cards_found; · 81 unmodified lines
8282 /*
8383 * VLB I/O addresses
8484 */
85−static unsigned int pcnet32_portlist[] __initdata =
85+static unsigned int pcnet32_portlist[] =
8686 { 0x300, 0x320, 0x340, 0x360, 0 };
8787
8888 static int pcnet32_debug;
drivers/net/phy/dp83640.c+2−3
@@ -34,8 +34,7 @@ · 33 unmodified lines
3434 #define PAGESEL 0x13
3535 #define LAYER4 0x02
3636 #define LAYER2 0x01
37−#define MAX_RXTS 4
38−#define MAX_TXTS 4
37+#define MAX_RXTS 64
3938 #define N_EXT_TS 1
4039 #define PSF_PTPVER 2
4140 #define PSF_EVNT 0x4000
@@ -218,7 +217,7 @@ static void phy2rxts(struct phy_rxts *p, struct rxts *rxts) · 176 unmodified lines
218217 rxts->seqid = p->seqid;
219218 rxts->msgtype = (p->msgtype >> 12) & 0xf;
220219 rxts->hash = p->msgtype & 0x0fff;
221− rxts->tmo = jiffies + HZ;
220+ rxts->tmo = jiffies + 2;
222221 }
223222
224223 static u64 phy2txts(struct phy_txts *p)
drivers/net/slip.c+1−1
@@ -367,7 +367,7 @@ static void sl_bump(struct slip *sl) · 366 unmodified lines
367367 memcpy(skb_put(skb, count), sl->rbuff, count);
368368 skb_reset_mac_header(skb);
369369 skb->protocol = htons(ETH_P_IP);
370− netif_rx(skb);
370+ netif_rx_ni(skb);
371371 dev->stats.rx_packets++;
372372 }
373373
drivers/net/usb/rtl8150.c+0−1
@@ -977,7 +977,6 @@ static void rtl8150_disconnect(struct usb_interface *intf) · 976 unmodified lines
977977 usb_set_intfdata(intf, NULL);
978978 if (dev) {
979979 set_bit(RTL8150_UNPLUG, &dev->flags);
980− tasklet_disable(&dev->tl);
981980 tasklet_kill(&dev->tl);
982981 unregister_netdev(dev->netdev);
983982 unlink_all_urbs(dev);
drivers/net/wireless/ath/ath5k/base.c+14−9
@@ -1735,6 +1735,8 @@ ath5k_beacon_setup(struct ath5k_hw *ah, struct ath5k_buf *bf) · 1734 unmodified lines
17351735
17361736 if (dma_mapping_error(ah->dev, bf->skbaddr)) {
17371737 ATH5K_ERR(ah, "beacon DMA mapping failed\n");
1738+ dev_kfree_skb_any(skb);
1739+ bf->skb = NULL;
17381740 return -EIO;
17391741 }
17401742
@@ -1819,8 +1821,6 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif) · 78 unmodified lines
18191821 ath5k_txbuf_free_skb(ah, avf->bbuf);
18201822 avf->bbuf->skb = skb;
18211823 ret = ath5k_beacon_setup(ah, avf->bbuf);
1822− if (ret)
1823− avf->bbuf->skb = NULL;
18241824 out:
18251825 return ret;
18261826 }
@@ -1840,6 +1840,7 @@ ath5k_beacon_send(struct ath5k_hw *ah) · 13 unmodified lines
18401840 struct ath5k_vif *avf;
18411841 struct ath5k_buf *bf;
18421842 struct sk_buff *skb;
1843+ int err;
18431844
18441845 ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_BEACON, "in beacon_send\n");
18451846
@@ -1888,11 +1889,6 @@ ath5k_beacon_send(struct ath5k_hw *ah) · 42 unmodified lines
18881889
18891890 avf = (void *)vif->drv_priv;
18901891 bf = avf->bbuf;
1891− if (unlikely(bf->skb == NULL || ah->opmode == NL80211_IFTYPE_STATION ||
1892− ah->opmode == NL80211_IFTYPE_MONITOR)) {
1893− ATH5K_WARN(ah, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL);
1894− return;
1895− }
18961892
18971893 /*
18981894 * Stop any current dma and put the new frame on the queue.
@@ -1906,8 +1902,17 @@ ath5k_beacon_send(struct ath5k_hw *ah) · 7 unmodified lines
19061902
19071903 /* refresh the beacon for AP or MESH mode */
19081904 if (ah->opmode == NL80211_IFTYPE_AP ||
1909− ah->opmode == NL80211_IFTYPE_MESH_POINT)
1910− ath5k_beacon_update(ah->hw, vif);
1905+ ah->opmode == NL80211_IFTYPE_MESH_POINT) {
1906+ err = ath5k_beacon_update(ah->hw, vif);
1907+ if (err)
1908+ return;
1909+ }
1910+
1911+ if (unlikely(bf->skb == NULL || ah->opmode == NL80211_IFTYPE_STATION ||
1912+ ah->opmode == NL80211_IFTYPE_MONITOR)) {
1913+ ATH5K_WARN(ah, "bf=%p bf_skb=%p\n", bf, bf->skb);
1914+ return;
1915+ }
19111916
19121917 trace_ath5k_tx(ah, bf->skb, &ah->txqs[ah->bhalq]);
19131918
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c+4−4
@@ -307,7 +307,7 @@ static const struct ar9300_eeprom ar9300_default = { · 306 unmodified lines
307307 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
308308 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
309309
310− { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } },
310+ { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
311311 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
312312 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
313313
@@ -884,7 +884,7 @@ static const struct ar9300_eeprom ar9300_x113 = { · 570 unmodified lines
884884 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
885885 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
886886
887− { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } },
887+ { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
888888 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
889889 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
890890
@@ -2040,7 +2040,7 @@ static const struct ar9300_eeprom ar9300_x112 = { · 1149 unmodified lines
20402040 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
20412041 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } },
20422042
2043− { { CTL(60, 1), CTL(60, 0), CTL(0, 0), CTL(0, 0) } },
2043+ { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 0) } },
20442044 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
20452045 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } },
20462046
@@ -3734,7 +3734,7 @@ static void ar9003_hw_internal_regulator_apply(struct ath_hw *ah) · 1687 unmodified lines
37343734 }
37353735 } else {
37363736 reg_pmu_set = (5 << 1) | (7 << 4) |
3737− (1 << 8) | (2 << 14) |
3737+ (2 << 8) | (2 << 14) |
37383738 (6 << 17) | (1 << 20) |
37393739 (3 << 24) | (1 << 28);
37403740 }
drivers/net/wireless/ath/ath9k/ar9003_phy.h+1−1
@@ -850,7 +850,7 @@ · 849 unmodified lines
850850 #define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220)
851851 #define AR_PHY_PDADC_TAB_1 (AR_SM1_BASE + 0x240)
852852 #define AR_PHY_TX_IQCAL_STATUS_B1 (AR_SM1_BASE + 0x48c)
853−#define AR_PHY_TX_IQCAL_CORR_COEFF_B1(_i) (AR_SM_BASE + 0x450 + ((_i) << 2))
853+#define AR_PHY_TX_IQCAL_CORR_COEFF_B1(_i) (AR_SM1_BASE + 0x450 + ((_i) << 2))
854854
855855 /*
856856 * Channel 2 Register Map
drivers/net/wireless/b43/dma.c+17−3
@@ -795,9 +795,23 @@ static u64 supported_dma_mask(struct b43_wldev *dev) · 794 unmodified lines
795795 u32 tmp;
796796 u16 mmio_base;
797797
798− tmp = b43_read32(dev, SSB_TMSHIGH);
799− if (tmp & SSB_TMSHIGH_DMA64)
800− return DMA_BIT_MASK(64);
798+ switch (dev->dev->bus_type) {
799+#ifdef CONFIG_B43_BCMA
800+ case B43_BUS_BCMA:
801+ tmp = bcma_aread32(dev->dev->bdev, BCMA_IOST);
802+ if (tmp & BCMA_IOST_DMA64)
803+ return DMA_BIT_MASK(64);
804+ break;
805+#endif
806+#ifdef CONFIG_B43_SSB
807+ case B43_BUS_SSB:
808+ tmp = ssb_read32(dev->dev->sdev, SSB_TMSHIGH);
809+ if (tmp & SSB_TMSHIGH_DMA64)
810+ return DMA_BIT_MASK(64);
811+ break;
812+#endif
813+ }
814+
801815 mmio_base = b43_dmacontroller_base(0, 0);
802816 b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK);
803817 tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL);
drivers/net/wireless/rt2x00/rt2800usb.c+2−0
@@ -921,6 +921,8 @@ static struct usb_device_id rt2800usb_device_table[] = { · 920 unmodified lines
921921 { USB_DEVICE(0x07d1, 0x3c16) },
922922 /* Draytek */
923923 { USB_DEVICE(0x07fa, 0x7712) },
924+ /* DVICO */
925+ { USB_DEVICE(0x0fe9, 0xb307) },
924926 /* Edimax */
925927 { USB_DEVICE(0x7392, 0x7711) },
926928 { USB_DEVICE(0x7392, 0x7717) },
drivers/net/wireless/rt2x00/rt73usb.c+1−0
@@ -2420,6 +2420,7 @@ static struct usb_device_id rt73usb_device_table[] = { · 2419 unmodified lines
24202420 /* Buffalo */
24212421 { USB_DEVICE(0x0411, 0x00d8) },
24222422 { USB_DEVICE(0x0411, 0x00d9) },
2423+ { USB_DEVICE(0x0411, 0x00e6) },
24232424 { USB_DEVICE(0x0411, 0x00f4) },
24242425 { USB_DEVICE(0x0411, 0x0116) },
24252426 { USB_DEVICE(0x0411, 0x0119) },
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c+8−3
@@ -281,6 +281,8 @@ static struct usb_device_id rtl8192c_usb_ids[] = { · 280 unmodified lines
281281 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817d, rtl92cu_hal_cfg)},
282282 /* 8188CE-VAU USB minCard (b/g mode only) */
283283 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817e, rtl92cu_hal_cfg)},
284+ /* 8188RU in Alfa AWUS036NHR */
285+ {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817f, rtl92cu_hal_cfg)},
284286 /* 8188 Combo for BC4 */
285287 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8754, rtl92cu_hal_cfg)},
286288
@@ -303,20 +305,23 @@ static struct usb_device_id rtl8192c_usb_ids[] = { · 16 unmodified lines
303305 {RTL_USB_DEVICE(0x0eb0, 0x9071, rtl92cu_hal_cfg)}, /*NO Brand - Etop*/
304306 /* HP - Lite-On ,8188CUS Slim Combo */
305307 {RTL_USB_DEVICE(0x103c, 0x1629, rtl92cu_hal_cfg)},
308+ {RTL_USB_DEVICE(0x13d3, 0x3357, rtl92cu_hal_cfg)}, /* AzureWave */
306309 {RTL_USB_DEVICE(0x2001, 0x3308, rtl92cu_hal_cfg)}, /*D-Link - Alpha*/
307310 {RTL_USB_DEVICE(0x2019, 0xab2a, rtl92cu_hal_cfg)}, /*Planex - Abocom*/
308311 {RTL_USB_DEVICE(0x2019, 0xed17, rtl92cu_hal_cfg)}, /*PCI - Edimax*/
309312 {RTL_USB_DEVICE(0x20f4, 0x648b, rtl92cu_hal_cfg)}, /*TRENDnet - Cameo*/
310313 {RTL_USB_DEVICE(0x7392, 0x7811, rtl92cu_hal_cfg)}, /*Edimax - Edimax*/
311− {RTL_USB_DEVICE(0x3358, 0x13d3, rtl92cu_hal_cfg)}, /*Azwave 8188CE-VAU*/
314+ {RTL_USB_DEVICE(0x13d3, 0x3358, rtl92cu_hal_cfg)}, /*Azwave 8188CE-VAU*/
312315 /* Russian customer -Azwave (8188CE-VAU b/g mode only) */
313− {RTL_USB_DEVICE(0x3359, 0x13d3, rtl92cu_hal_cfg)},
316+ {RTL_USB_DEVICE(0x13d3, 0x3359, rtl92cu_hal_cfg)},
317+ {RTL_USB_DEVICE(0x4855, 0x0090, rtl92cu_hal_cfg)}, /* Feixun */
318+ {RTL_USB_DEVICE(0x4855, 0x0091, rtl92cu_hal_cfg)}, /* NetweeN-Feixun */
319+ {RTL_USB_DEVICE(0x9846, 0x9041, rtl92cu_hal_cfg)}, /* Netgear Cameo */
314320
315321 /****** 8192CU ********/
316322 {RTL_USB_DEVICE(0x0586, 0x341f, rtl92cu_hal_cfg)}, /*Zyxel -Abocom*/
317323 {RTL_USB_DEVICE(0x07aa, 0x0056, rtl92cu_hal_cfg)}, /*ATKK-Gemtek*/
318324 {RTL_USB_DEVICE(0x07b8, 0x8178, rtl92cu_hal_cfg)}, /*Funai -Abocom*/
319− {RTL_USB_DEVICE(0x07b8, 0x8178, rtl92cu_hal_cfg)}, /*Abocom -Abocom*/
320325 {RTL_USB_DEVICE(0x2001, 0x3307, rtl92cu_hal_cfg)}, /*D-Link-Cameo*/
321326 {RTL_USB_DEVICE(0x2001, 0x3309, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/
322327 {RTL_USB_DEVICE(0x2001, 0x330a, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/
drivers/net/wireless/wl1251/acx.c+1−5
@@ -140,8 +140,6 @@ int wl1251_acx_sleep_auth(struct wl1251 *wl, u8 sleep_auth) · 139 unmodified lines
140140 auth->sleep_auth = sleep_auth;
141141
142142 ret = wl1251_cmd_configure(wl, ACX_SLEEP_AUTH, auth, sizeof(*auth));
143− if (ret < 0)
144− return ret;
145143
146144 out:
147145 kfree(auth);
@@ -681,10 +679,8 @@ int wl1251_acx_cca_threshold(struct wl1251 *wl) · 533 unmodified lines
681679
682680 ret = wl1251_cmd_configure(wl, ACX_CCA_THRESHOLD,
683681 detection, sizeof(*detection));
684− if (ret < 0) {
682+ if (ret < 0)
685683 wl1251_warning("failed to set cca threshold: %d", ret);
686− return ret;
687− }
688684
689685 out:
690686 kfree(detection);
drivers/net/wireless/wl1251/cmd.c+1−1
@@ -241,7 +241,7 @@ int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable) · 240 unmodified lines
241241 if (ret < 0) {
242242 wl1251_error("tx %s cmd for channel %d failed",
243243 enable ? "start" : "stop", channel);
244− return ret;
244+ goto out;
245245 }
246246
247247 wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d",
fs/compat_ioctl.c+1−0
@@ -1003,6 +1003,7 @@ COMPATIBLE_IOCTL(PPPIOCCONNECT) · 1002 unmodified lines
10031003 COMPATIBLE_IOCTL(PPPIOCDISCONN)
10041004 COMPATIBLE_IOCTL(PPPIOCATTCHAN)
10051005 COMPATIBLE_IOCTL(PPPIOCGCHAN)
1006+COMPATIBLE_IOCTL(PPPIOCGL2TPSTATS)
10061007 /* PPPOX */
10071008 COMPATIBLE_IOCTL(PPPOEIOCSFWD)
10081009 COMPATIBLE_IOCTL(PPPOEIOCDFWD)
include/linux/netlink.h+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
2929 #define MAX_LINKS 32
3030
3131 struct sockaddr_nl {
32− sa_family_t nl_family; /* AF_NETLINK */
32+ __kernel_sa_family_t nl_family; /* AF_NETLINK */
3333 unsigned short nl_pad; /* zero */
3434 __u32 nl_pid; /* port ID */
3535 __u32 nl_groups; /* multicast groups mask */
include/linux/socket.h+4−2
@@ -8,8 +8,10 @@ · 7 unmodified lines
88 #define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
99 /* Implementation specific desired alignment */
1010
11+typedef unsigned short __kernel_sa_family_t;
12+
1113 struct __kernel_sockaddr_storage {
12− unsigned short ss_family; /* address family */
14+ __kernel_sa_family_t ss_family; /* address family */
1315 /* Following field(s) are implementation specific */
1416 char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
1517 /* space to achieve desired size, */
@@ -35,7 +37,7 @@ struct seq_file; · 19 unmodified lines
3537 extern void socket_seq_show(struct seq_file *seq);
3638 #endif
3739
38−typedef unsigned short sa_family_t;
40+typedef __kernel_sa_family_t sa_family_t;
3941
4042 /*
4143 * 1003.1g requires sa_family_t and that sa_data is char.
include/net/inet_sock.h+1−1
@@ -238,7 +238,7 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk) · 237 unmodified lines
238238 {
239239 __u8 flags = 0;
240240
241− if (inet_sk(sk)->transparent)
241+ if (inet_sk(sk)->transparent || inet_sk(sk)->hdrincl)
242242 flags |= FLOWI_FLAG_ANYSRC;
243243 if (sk->sk_protocol == IPPROTO_TCP)
244244 flags |= FLOWI_FLAG_PRECOW_METRICS;
net/bridge/br_if.c+5−1
@@ -417,6 +417,7 @@ put_back: · 416 unmodified lines
417417 int br_del_if(struct net_bridge *br, struct net_device *dev)
418418 {
419419 struct net_bridge_port *p;
420+ bool changed_addr;
420421
421422 p = br_port_get_rtnl(dev);
422423 if (!p || p->br != br)
@@ -425,9 +426,12 @@ int br_del_if(struct net_bridge *br, struct net_device *dev) · 2 unmodified lines
425426 del_nbp(p);
426427
427428 spin_lock_bh(&br->lock);
428− br_stp_recalculate_bridge_id(br);
429+ changed_addr = br_stp_recalculate_bridge_id(br);
429430 spin_unlock_bh(&br->lock);
430431
432+ if (changed_addr)
433+ call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev);
434+
431435 netdev_update_features(br->dev);
432436
433437 return 0;
net/bridge/br_notify.c+6−1
@@ -34,6 +34,7 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v · 33 unmodified lines
3434 struct net_device *dev = ptr;
3535 struct net_bridge_port *p;
3636 struct net_bridge *br;
37+ bool changed_addr;
3738 int err;
3839
3940 /* register of bridge completed, add sysfs entries */
@@ -57,8 +58,12 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v · 17 unmodified lines
5758 case NETDEV_CHANGEADDR:
5859 spin_lock_bh(&br->lock);
5960 br_fdb_changeaddr(p, dev->dev_addr);
60− br_stp_recalculate_bridge_id(br);
61+ changed_addr = br_stp_recalculate_bridge_id(br);
6162 spin_unlock_bh(&br->lock);
63+
64+ if (changed_addr)
65+ call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev);
66+
6267 break;
6368
6469 case NETDEV_CHANGE:
net/bridge/netfilter/ebtables.c+2−1
@@ -1198,7 +1198,8 @@ ebt_register_table(struct net *net, const struct ebt_table *input_table) · 1197 unmodified lines
11981198
11991199 if (table->check && table->check(newinfo, table->valid_hooks)) {
12001200 BUGPRINT("The table doesn't like its own initial data, lol\n");
1201− return ERR_PTR(-EINVAL);
1201+ ret = -EINVAL;
1202+ goto free_chainstack;
12021203 }
12031204
12041205 table->private = newinfo;
net/core/scm.c+1−1
@@ -192,7 +192,7 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) · 191 unmodified lines
192192 goto error;
193193
194194 cred->uid = cred->euid = p->creds.uid;
195− cred->gid = cred->egid = p->creds.uid;
195+ cred->gid = cred->egid = p->creds.gid;
196196 put_cred(p->cred);
197197 p->cred = cred;
198198 }
net/ipv4/ip_output.c+1−0
@@ -122,6 +122,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb) · 121 unmodified lines
122122 newskb->pkt_type = PACKET_LOOPBACK;
123123 newskb->ip_summed = CHECKSUM_UNNECESSARY;
124124 WARN_ON(!skb_dst(newskb));
125+ skb_dst_force(newskb);
125126 netif_rx_ni(newskb);
126127 return 0;
127128 }
net/ipv4/ip_sockglue.c+5−4
@@ -1067,7 +1067,7 @@ EXPORT_SYMBOL(compat_ip_setsockopt); · 1066 unmodified lines
10671067 */
10681068
10691069 static int do_ip_getsockopt(struct sock *sk, int level, int optname,
1070− char __user *optval, int __user *optlen)
1070+ char __user *optval, int __user *optlen, unsigned flags)
10711071 {
10721072 struct inet_sock *inet = inet_sk(sk);
10731073 int val;
@@ -1240,7 +1240,7 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname, · 166 unmodified lines
12401240
12411241 msg.msg_control = optval;
12421242 msg.msg_controllen = len;
1243− msg.msg_flags = 0;
1243+ msg.msg_flags = flags;
12441244
12451245 if (inet->cmsg_flags & IP_CMSG_PKTINFO) {
12461246 struct in_pktinfo info;
@@ -1294,7 +1294,7 @@ int ip_getsockopt(struct sock *sk, int level, · 47 unmodified lines
12941294 {
12951295 int err;
12961296
1297− err = do_ip_getsockopt(sk, level, optname, optval, optlen);
1297+ err = do_ip_getsockopt(sk, level, optname, optval, optlen, 0);
12981298 #ifdef CONFIG_NETFILTER
12991299 /* we need to exclude all possible ENOPROTOOPTs except default case */
13001300 if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS &&
@@ -1327,7 +1327,8 @@ int compat_ip_getsockopt(struct sock *sk, int level, int optname, · 26 unmodified lines
13271327 return compat_mc_getsockopt(sk, level, optname, optval, optlen,
13281328 ip_getsockopt);
13291329
1330− err = do_ip_getsockopt(sk, level, optname, optval, optlen);
1330+ err = do_ip_getsockopt(sk, level, optname, optval, optlen,
1331+ MSG_CMSG_COMPAT);
13311332
13321333 #ifdef CONFIG_NETFILTER
13331334 /* we need to exclude all possible ENOPROTOOPTs except default case */
net/ipv4/netfilter.c+8−10
@@ -18,17 +18,15 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type) · 17 unmodified lines
1818 struct rtable *rt;
1919 struct flowi4 fl4 = {};
2020 __be32 saddr = iph->saddr;
21− __u8 flags = 0;
21+ __u8 flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : 0;
2222 unsigned int hh_len;
2323
24− if (!skb->sk && addr_type != RTN_LOCAL) {
25− if (addr_type == RTN_UNSPEC)
26− addr_type = inet_addr_type(net, saddr);
27− if (addr_type == RTN_LOCAL || addr_type == RTN_UNICAST)
28− flags |= FLOWI_FLAG_ANYSRC;
29− else
30− saddr = 0;
31− }
24+ if (addr_type == RTN_UNSPEC)
25+ addr_type = inet_addr_type(net, saddr);
26+ if (addr_type == RTN_LOCAL || addr_type == RTN_UNICAST)
27+ flags |= FLOWI_FLAG_ANYSRC;
28+ else
29+ saddr = 0;
3230
3331 /* some non-standard hacks like ipt_REJECT.c:send_reset() can cause
3432 * packets with foreign saddr to appear on the NF_INET_LOCAL_OUT hook.
@@ -38,7 +36,7 @@ int ip_route_me_harder(struct sk_buff *skb, unsigned addr_type) · 3 unmodified lines
3836 fl4.flowi4_tos = RT_TOS(iph->tos);
3937 fl4.flowi4_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0;
4038 fl4.flowi4_mark = skb->mark;
41− fl4.flowi4_flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : flags;
39+ fl4.flowi4_flags = flags;
4240 rt = ip_route_output_key(net, &fl4);
4341 if (IS_ERR(rt))
4442 return -1;
net/ipv4/raw.c+2−1
@@ -563,7 +563,8 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, · 562 unmodified lines
563563 flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos,
564564 RT_SCOPE_UNIVERSE,
565565 inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol,
566− FLOWI_FLAG_CAN_SLEEP, daddr, saddr, 0, 0);
566+ inet_sk_flowi_flags(sk) | FLOWI_FLAG_CAN_SLEEP,
567+ daddr, saddr, 0, 0);
567568
568569 if (!inet->hdrincl) {
569570 err = raw_probe_proto_opt(&fl4, msg);
net/ipv4/route.c+4−5
@@ -722,7 +722,7 @@ static inline bool compare_hash_inputs(const struct rtable *rt1, · 721 unmodified lines
722722 {
723723 return ((((__force u32)rt1->rt_key_dst ^ (__force u32)rt2->rt_key_dst) |
724724 ((__force u32)rt1->rt_key_src ^ (__force u32)rt2->rt_key_src) |
725− (rt1->rt_iif ^ rt2->rt_iif)) == 0);
725+ (rt1->rt_route_iif ^ rt2->rt_route_iif)) == 0);
726726 }
727727
728728 static inline int compare_keys(struct rtable *rt1, struct rtable *rt2)
@@ -731,8 +731,8 @@ static inline int compare_keys(struct rtable *rt1, struct rtable *rt2) · 2 unmodified lines
731731 ((__force u32)rt1->rt_key_src ^ (__force u32)rt2->rt_key_src) |
732732 (rt1->rt_mark ^ rt2->rt_mark) |
733733 (rt1->rt_key_tos ^ rt2->rt_key_tos) |
734− (rt1->rt_oif ^ rt2->rt_oif) |
735− (rt1->rt_iif ^ rt2->rt_iif)) == 0;
734+ (rt1->rt_route_iif ^ rt2->rt_route_iif) |
735+ (rt1->rt_oif ^ rt2->rt_oif)) == 0;
736736 }
737737
738738 static inline int compare_netns(struct rtable *rt1, struct rtable *rt2)
@@ -2320,8 +2320,7 @@ int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr, · 1581 unmodified lines
23202320 rth = rcu_dereference(rth->dst.rt_next)) {
23212321 if ((((__force u32)rth->rt_key_dst ^ (__force u32)daddr) |
23222322 ((__force u32)rth->rt_key_src ^ (__force u32)saddr) |
2323− (rth->rt_iif ^ iif) |
2324− rth->rt_oif |
2323+ (rth->rt_route_iif ^ iif) |
23252324 (rth->rt_key_tos ^ tos)) == 0 &&
23262325 rth->rt_mark == skb->mark &&
23272326 net_eq(dev_net(rth->dst.dev), net) &&
net/ipv4/syncookies.c+1−1
@@ -276,7 +276,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, · 275 unmodified lines
276276 int mss;
277277 struct rtable *rt;
278278 __u8 rcv_wscale;
279− bool ecn_ok;
279+ bool ecn_ok = false;
280280
281281 if (!sysctl_tcp_syncookies || !th->ack || th->rst)
282282 goto out;
net/ipv6/syncookies.c+1−1
@@ -165,7 +165,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) · 164 unmodified lines
165165 int mss;
166166 struct dst_entry *dst;
167167 __u8 rcv_wscale;
168− bool ecn_ok;
168+ bool ecn_ok = false;
169169
170170 if (!sysctl_tcp_syncookies || !th->ack || th->rst)
171171 goto out;
net/netfilter/nf_queue.c+1−0
@@ -312,6 +312,7 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict) · 311 unmodified lines
312312 }
313313 break;
314314 case NF_STOLEN:
315+ break;
315316 default:
316317 kfree_skb(skb);
317318 }
net/netlabel/netlabel_kapi.c+12−8
@@ -341,11 +341,11 @@ int netlbl_cfg_cipsov4_map_add(u32 doi, · 340 unmodified lines
341341
342342 entry = kzalloc(sizeof(*entry), GFP_ATOMIC);
343343 if (entry == NULL)
344− return -ENOMEM;
344+ goto out_entry;
345345 if (domain != NULL) {
346346 entry->domain = kstrdup(domain, GFP_ATOMIC);
347347 if (entry->domain == NULL)
348− goto cfg_cipsov4_map_add_failure;
348+ goto out_domain;
349349 }
350350
351351 if (addr == NULL && mask == NULL) {
@@ -354,13 +354,13 @@ int netlbl_cfg_cipsov4_map_add(u32 doi, · 2 unmodified lines
354354 } else if (addr != NULL && mask != NULL) {
355355 addrmap = kzalloc(sizeof(*addrmap), GFP_ATOMIC);
356356 if (addrmap == NULL)
357− goto cfg_cipsov4_map_add_failure;
357+ goto out_addrmap;
358358 INIT_LIST_HEAD(&addrmap->list4);
359359 INIT_LIST_HEAD(&addrmap->list6);
360360
361361 addrinfo = kzalloc(sizeof(*addrinfo), GFP_ATOMIC);
362362 if (addrinfo == NULL)
363− goto cfg_cipsov4_map_add_failure;
363+ goto out_addrinfo;
364364 addrinfo->type_def.cipsov4 = doi_def;
365365 addrinfo->type = NETLBL_NLTYPE_CIPSOV4;
366366 addrinfo->list.addr = addr->s_addr & mask->s_addr;
@@ -374,7 +374,7 @@ int netlbl_cfg_cipsov4_map_add(u32 doi, · 7 unmodified lines
374374 entry->type = NETLBL_NLTYPE_ADDRSELECT;
375375 } else {
376376 ret_val = -EINVAL;
377− goto cfg_cipsov4_map_add_failure;
377+ goto out_addrmap;
378378 }
379379
380380 ret_val = netlbl_domhsh_add(entry, audit_info);
@@ -384,11 +384,15 @@ int netlbl_cfg_cipsov4_map_add(u32 doi, · 3 unmodified lines
384384 return 0;
385385
386386 cfg_cipsov4_map_add_failure:
387− cipso_v4_doi_putdef(doi_def);
387+ kfree(addrinfo);
388+out_addrinfo:
389+ kfree(addrmap);
390+out_addrmap:
388391 kfree(entry->domain);
392+out_domain:
389393 kfree(entry);
390− kfree(addrmap);
391− kfree(addrinfo);
394+out_entry:
395+ cipso_v4_doi_putdef(doi_def);
392396 return ret_val;
393397 }
394398
net/sched/sch_prio.c+1−1
@@ -112,7 +112,7 @@ static struct sk_buff *prio_dequeue(struct Qdisc *sch) · 111 unmodified lines
112112
113113 for (prio = 0; prio < q->bands; prio++) {
114114 struct Qdisc *qdisc = q->queues[prio];
115− struct sk_buff *skb = qdisc->dequeue(qdisc);
115+ struct sk_buff *skb = qdisc_dequeue_peeked(qdisc);
116116 if (skb) {
117117 qdisc_bstats_update(sch, skb);
118118 sch->q.qlen--;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t