Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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
...

+605 -107
+29
Documentation/networking/bonding.txt
··· 238 238 239 239 This option was added in bonding version 3.4.0. 240 240 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 + 241 253 arp_interval 242 254 243 255 Specifies the ARP link monitoring frequency in milliseconds. ··· 444 432 The use_carrier option, below, affects how the link state is 445 433 determined. See the High Availability section for additional 446 434 information. The default value is 0. 435 + 436 + min_links 437 + 438 + Specifies the minimum number of links that must be active before 439 + asserting carrier. It is similar to the Cisco EtherChannel min-links 440 + feature. This allows setting the minimum number of member ports that 441 + must be up (link-up state) before marking the bond device as up 442 + (carrier on). This is useful for situations where higher level services 443 + such as clustering want to ensure a minimum number of low bandwidth 444 + links are active before switchover. This option only affect 802.3ad 445 + mode. 446 + 447 + The default value is 0. This will cause carrier to be asserted (for 448 + 802.3ad mode) whenever there is an active aggregator, regardless of the 449 + number of available links in that aggregator. Note that, because an 450 + aggregator cannot be active without at least one available link, 451 + setting this option to 0 or to 1 has the exact same effect. 447 452 448 453 mode 449 454
+371
Documentation/networking/scaling.txt
··· 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)
+28 -7
drivers/net/bnx2x/bnx2x_cmn.c
··· 63 63 fp->disable_tpa = ((bp->flags & TPA_ENABLE_FLAG) == 0); 64 64 65 65 #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; 68 69 #endif 69 70 } 70 71 ··· 1405 1404 u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb) 1406 1405 { 1407 1406 struct bnx2x *bp = netdev_priv(dev); 1407 + 1408 1408 #ifdef BCM_CNIC 1409 - if (NO_FCOE(bp)) 1410 - return skb_tx_hash(dev, skb); 1411 - else { 1409 + if (!NO_FCOE(bp)) { 1412 1410 struct ethhdr *hdr = (struct ethhdr *)skb->data; 1413 1411 u16 ether_type = ntohs(hdr->h_proto); 1414 1412 ··· 1424 1424 return bnx2x_fcoe_tx(bp, txq_index); 1425 1425 } 1426 1426 #endif 1427 - /* Select a none-FCoE queue: if FCoE is enabled, exclude FCoE L2 ring 1428 - */ 1427 + /* select a non-FCoE queue */ 1429 1428 return __skb_tx_hash(dev, skb, BNX2X_NUM_ETH_QUEUES(bp)); 1430 1429 } 1431 1430 ··· 1447 1448 bp->num_queues += NON_ETH_CONTEXT_USE; 1448 1449 } 1449 1450 1451 + /** 1452 + * bnx2x_set_real_num_queues - configure netdev->real_num_[tx,rx]_queues 1453 + * 1454 + * @bp: Driver handle 1455 + * 1456 + * We currently support for at most 16 Tx queues for each CoS thus we will 1457 + * allocate a multiple of 16 for ETH L2 rings according to the value of the 1458 + * bp->max_cos. 1459 + * 1460 + * If there is an FCoE L2 queue the appropriate Tx queue will have the next 1461 + * index after all ETH L2 indices. 1462 + * 1463 + * If the actual number of Tx queues (for each CoS) is less than 16 then there 1464 + * will be the holes at the end of each group of 16 ETh L2 indices (0..15, 1465 + * 16..31,...) with indicies that are not coupled with any real Tx queue. 1466 + * 1467 + * The proper configuration of skb->queue_mapping is handled by 1468 + * bnx2x_select_queue() and __skb_tx_hash(). 1469 + * 1470 + * bnx2x_setup_tc() takes care of the proper TC mappings so that __skb_tx_hash() 1471 + * will return a proper Tx index if TC is enabled (netdev->num_tc > 0). 1472 + */ 1450 1473 static inline int bnx2x_set_real_num_queues(struct bnx2x *bp) 1451 1474 { 1452 1475 int rc, tx, rx;
+1 -1
drivers/net/bnx2x/bnx2x_dcb.c
··· 920 920 921 921 void bnx2x_dcbx_set_state(struct bnx2x *bp, bool dcb_on, u32 dcbx_enabled) 922 922 { 923 - if (!CHIP_IS_E1x(bp)) { 923 + if (!CHIP_IS_E1x(bp) && !CHIP_IS_E3(bp)) { 924 924 bp->dcb_state = dcb_on; 925 925 bp->dcbx_enabled = dcbx_enabled; 926 926 } else {
+19 -4
drivers/net/bnx2x/bnx2x_main.c
··· 5798 5798 5799 5799 DP(BNX2X_MSG_MCP, "starting common init func %d\n", BP_ABS_FUNC(bp)); 5800 5800 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 + 5801 5807 bnx2x_reset_common(bp); 5802 5808 REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, 0xffffffff); 5803 5809 ··· 5813 5807 val |= MISC_REGISTERS_RESET_REG_2_MSTAT1; 5814 5808 } 5815 5809 REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, val); 5810 + 5811 + bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_UNDI); 5816 5812 5817 5813 bnx2x_init_block(bp, BLOCK_MISC, PHASE_COMMON); 5818 5814 ··· 10259 10251 /* clean indirect addresses */ 10260 10252 pci_write_config_dword(bp->pdev, PCICFG_GRC_ADDRESS, 10261 10253 PCICFG_VENDOR_ID_OFFSET); 10262 - REG_WR(bp, PXP2_REG_PGL_ADDR_88_F0 + BP_PORT(bp)*16, 0); 10263 - REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F0 + BP_PORT(bp)*16, 0); 10264 - REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0 + BP_PORT(bp)*16, 0); 10265 - REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0 + BP_PORT(bp)*16, 0); 10254 + /* Clean the following indirect addresses for all functions since it 10255 + * is not used by the driver. 10256 + */ 10257 + REG_WR(bp, PXP2_REG_PGL_ADDR_88_F0, 0); 10258 + REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F0, 0); 10259 + REG_WR(bp, PXP2_REG_PGL_ADDR_90_F0, 0); 10260 + REG_WR(bp, PXP2_REG_PGL_ADDR_94_F0, 0); 10261 + REG_WR(bp, PXP2_REG_PGL_ADDR_88_F1, 0); 10262 + REG_WR(bp, PXP2_REG_PGL_ADDR_8C_F1, 0); 10263 + REG_WR(bp, PXP2_REG_PGL_ADDR_90_F1, 0); 10264 + REG_WR(bp, PXP2_REG_PGL_ADDR_94_F1, 0); 10266 10265 10267 10266 /* 10268 10267 * Enable internal target-read (in case we are probed after PF FLR).
+21 -5
drivers/net/bnx2x/bnx2x_reg.h
··· 3007 3007 /* [R 6] Debug only: Number of used entries in the data FIFO */ 3008 3008 #define PXP2_REG_HST_DATA_FIFO_STATUS 0x12047c 3009 3009 /* [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 3015 3031 #define PXP2_REG_PGL_CONTROL0 0x120490 3016 3032 #define PXP2_REG_PGL_CONTROL1 0x120514 3017 3033 #define PXP2_REG_PGL_DEBUG 0x120520
+1 -1
drivers/net/can/slcan.c
··· 197 197 skb->ip_summed = CHECKSUM_UNNECESSARY; 198 198 memcpy(skb_put(skb, sizeof(struct can_frame)), 199 199 &cf, sizeof(struct can_frame)); 200 - netif_rx(skb); 200 + netif_rx_ni(skb); 201 201 202 202 sl->dev->stats.rx_packets++; 203 203 sl->dev->stats.rx_bytes += cf.can_dlc;
+4 -2
drivers/net/e1000e/82571.c
··· 2085 2085 | FLAG_HAS_AMT 2086 2086 | FLAG_HAS_CTRLEXT_ON_LOAD, 2087 2087 .flags2 = FLAG2_CHECK_PHY_HANG 2088 - | FLAG2_DISABLE_ASPM_L0S, 2088 + | FLAG2_DISABLE_ASPM_L0S 2089 + | FLAG2_NO_DISABLE_RX, 2089 2090 .pba = 32, 2090 2091 .max_hw_frame_size = DEFAULT_JUMBO, 2091 2092 .get_variants = e1000_get_variants_82571, ··· 2105 2104 | FLAG_HAS_AMT 2106 2105 | FLAG_HAS_JUMBO_FRAMES 2107 2106 | FLAG_HAS_CTRLEXT_ON_LOAD, 2108 - .flags2 = FLAG2_DISABLE_ASPM_L0S, 2107 + .flags2 = FLAG2_DISABLE_ASPM_L0S 2108 + | FLAG2_NO_DISABLE_RX, 2109 2109 .pba = 32, 2110 2110 .max_hw_frame_size = DEFAULT_JUMBO, 2111 2111 .get_variants = e1000_get_variants_82571,
+1
drivers/net/e1000e/e1000.h
··· 453 453 #define FLAG2_DISABLE_ASPM_L0S (1 << 7) 454 454 #define FLAG2_DISABLE_AIM (1 << 8) 455 455 #define FLAG2_CHECK_PHY_HANG (1 << 9) 456 + #define FLAG2_NO_DISABLE_RX (1 << 10) 456 457 457 458 #define E1000_RX_DESC_PS(R, i) \ 458 459 (&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
+2 -1
drivers/net/e1000e/ethtool.c
··· 1206 1206 rx_ring->next_to_clean = 0; 1207 1207 1208 1208 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); 1210 1211 ew32(RDBAL, ((u64) rx_ring->dma & 0xFFFFFFFF)); 1211 1212 ew32(RDBAH, ((u64) rx_ring->dma >> 32)); 1212 1213 ew32(RDLEN, rx_ring->size);
+4 -3
drivers/net/e1000e/lib.c
··· 190 190 /* Check for LOM (vs. NIC) or one of two valid mezzanine cards */ 191 191 if (!((nvm_data & NVM_COMPAT_LOM) || 192 192 (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))) 194 195 goto out; 195 196 196 197 ret_val = e1000_read_nvm(hw, NVM_ALT_MAC_ADDR_PTR, 1, ··· 201 200 goto out; 202 201 } 203 202 204 - if (nvm_alt_mac_addr_offset == 0xFFFF) { 203 + if ((nvm_alt_mac_addr_offset == 0xFFFF) || 204 + (nvm_alt_mac_addr_offset == 0x0000)) 205 205 /* There is no Alternate MAC Address */ 206 206 goto out; 207 - } 208 207 209 208 if (hw->bus.func == E1000_FUNC_1) 210 209 nvm_alt_mac_addr_offset += E1000_ALT_MAC_ADDRESS_OFFSET_LAN1;
+6 -3
drivers/net/e1000e/netdev.c
··· 56 56 57 57 #define DRV_EXTRAVERSION "-k" 58 58 59 - #define DRV_VERSION "1.3.16" DRV_EXTRAVERSION 59 + #define DRV_VERSION "1.4.4" DRV_EXTRAVERSION 60 60 char e1000e_driver_name[] = "e1000e"; 61 61 const char e1000e_driver_version[] = DRV_VERSION; 62 62 ··· 2915 2915 2916 2916 /* disable receives while setting up the descriptors */ 2917 2917 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); 2919 2920 e1e_flush(); 2920 2921 usleep_range(10000, 20000); 2921 2922 ··· 3395 3394 3396 3395 /* disable receives in the hardware */ 3397 3396 rctl = er32(RCTL); 3398 - ew32(RCTL, rctl & ~E1000_RCTL_EN); 3397 + if (!(adapter->flags2 & FLAG2_NO_DISABLE_RX)) 3398 + ew32(RCTL, rctl & ~E1000_RCTL_EN); 3399 3399 /* flush and sleep below */ 3400 3400 3401 3401 netif_stop_queue(netdev); ··· 3405 3403 tctl = er32(TCTL); 3406 3404 tctl &= ~E1000_TCTL_EN; 3407 3405 ew32(TCTL, tctl); 3406 + 3408 3407 /* flush both disables and wait for them to finish */ 3409 3408 e1e_flush(); 3410 3409 usleep_range(10000, 20000);
+2 -7
drivers/net/gianfar_ptp.c
··· 193 193 /* Caller must hold etsects->lock. */ 194 194 static void set_fipers(struct etsects *etsects) 195 195 { 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); 200 197 gfar_write(&etsects->regs->tmr_fiper1, etsects->tmr_fiper1); 201 198 gfar_write(&etsects->regs->tmr_fiper2, etsects->tmr_fiper2); 202 - set_alarm(etsects); 203 - gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|TE); 204 199 } 205 200 206 201 /* ··· 506 511 gfar_write(&etsects->regs->tmr_fiper1, etsects->tmr_fiper1); 507 512 gfar_write(&etsects->regs->tmr_fiper2, etsects->tmr_fiper2); 508 513 set_alarm(etsects); 509 - gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|FS|RTPE|TE); 514 + gfar_write(&etsects->regs->tmr_ctrl, tmr_ctrl|FS|RTPE|TE|FRD); 510 515 511 516 spin_unlock_irqrestore(&etsects->lock, flags); 512 517
+2
drivers/net/irda/sh_irda.c
··· 22 22 * - DMA transfer support 23 23 * - FIFO mode support 24 24 */ 25 + #include <linux/io.h> 26 + #include <linux/interrupt.h> 25 27 #include <linux/module.h> 26 28 #include <linux/platform_device.h> 27 29 #include <linux/clk.h>
+3 -1
drivers/net/irda/sh_sir.c
··· 12 12 * published by the Free Software Foundation. 13 13 */ 14 14 15 + #include <linux/io.h> 16 + #include <linux/interrupt.h> 15 17 #include <linux/module.h> 16 18 #include <linux/platform_device.h> 17 19 #include <linux/slab.h> ··· 513 511 514 512 static int sh_sir_read_data(struct sh_sir_self *self) 515 513 { 516 - u16 val; 514 + u16 val = 0; 517 515 int timeout = 1024; 518 516 519 517 while (timeout--) {
+1 -1
drivers/net/pcnet32.c
··· 82 82 /* 83 83 * VLB I/O addresses 84 84 */ 85 - static unsigned int pcnet32_portlist[] __initdata = 85 + static unsigned int pcnet32_portlist[] = 86 86 { 0x300, 0x320, 0x340, 0x360, 0 }; 87 87 88 88 static int pcnet32_debug;
+2 -3
drivers/net/phy/dp83640.c
··· 34 34 #define PAGESEL 0x13 35 35 #define LAYER4 0x02 36 36 #define LAYER2 0x01 37 - #define MAX_RXTS 4 38 - #define MAX_TXTS 4 37 + #define MAX_RXTS 64 39 38 #define N_EXT_TS 1 40 39 #define PSF_PTPVER 2 41 40 #define PSF_EVNT 0x4000 ··· 217 218 rxts->seqid = p->seqid; 218 219 rxts->msgtype = (p->msgtype >> 12) & 0xf; 219 220 rxts->hash = p->msgtype & 0x0fff; 220 - rxts->tmo = jiffies + HZ; 221 + rxts->tmo = jiffies + 2; 221 222 } 222 223 223 224 static u64 phy2txts(struct phy_txts *p)
+1 -1
drivers/net/slip.c
··· 367 367 memcpy(skb_put(skb, count), sl->rbuff, count); 368 368 skb_reset_mac_header(skb); 369 369 skb->protocol = htons(ETH_P_IP); 370 - netif_rx(skb); 370 + netif_rx_ni(skb); 371 371 dev->stats.rx_packets++; 372 372 } 373 373
-1
drivers/net/usb/rtl8150.c
··· 977 977 usb_set_intfdata(intf, NULL); 978 978 if (dev) { 979 979 set_bit(RTL8150_UNPLUG, &dev->flags); 980 - tasklet_disable(&dev->tl); 981 980 tasklet_kill(&dev->tl); 982 981 unregister_netdev(dev->netdev); 983 982 unlink_all_urbs(dev);
+14 -9
drivers/net/wireless/ath/ath5k/base.c
··· 1735 1735 1736 1736 if (dma_mapping_error(ah->dev, bf->skbaddr)) { 1737 1737 ATH5K_ERR(ah, "beacon DMA mapping failed\n"); 1738 + dev_kfree_skb_any(skb); 1739 + bf->skb = NULL; 1738 1740 return -EIO; 1739 1741 } 1740 1742 ··· 1821 1819 ath5k_txbuf_free_skb(ah, avf->bbuf); 1822 1820 avf->bbuf->skb = skb; 1823 1821 ret = ath5k_beacon_setup(ah, avf->bbuf); 1824 - if (ret) 1825 - avf->bbuf->skb = NULL; 1826 1822 out: 1827 1823 return ret; 1828 1824 } ··· 1840 1840 struct ath5k_vif *avf; 1841 1841 struct ath5k_buf *bf; 1842 1842 struct sk_buff *skb; 1843 + int err; 1843 1844 1844 1845 ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_BEACON, "in beacon_send\n"); 1845 1846 ··· 1889 1888 1890 1889 avf = (void *)vif->drv_priv; 1891 1890 bf = avf->bbuf; 1892 - if (unlikely(bf->skb == NULL || ah->opmode == NL80211_IFTYPE_STATION || 1893 - ah->opmode == NL80211_IFTYPE_MONITOR)) { 1894 - ATH5K_WARN(ah, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL); 1895 - return; 1896 - } 1897 1891 1898 1892 /* 1899 1893 * Stop any current dma and put the new frame on the queue. ··· 1902 1906 1903 1907 /* refresh the beacon for AP or MESH mode */ 1904 1908 if (ah->opmode == NL80211_IFTYPE_AP || 1905 - ah->opmode == NL80211_IFTYPE_MESH_POINT) 1906 - ath5k_beacon_update(ah->hw, vif); 1909 + ah->opmode == NL80211_IFTYPE_MESH_POINT) { 1910 + err = ath5k_beacon_update(ah->hw, vif); 1911 + if (err) 1912 + return; 1913 + } 1914 + 1915 + if (unlikely(bf->skb == NULL || ah->opmode == NL80211_IFTYPE_STATION || 1916 + ah->opmode == NL80211_IFTYPE_MONITOR)) { 1917 + ATH5K_WARN(ah, "bf=%p bf_skb=%p\n", bf, bf->skb); 1918 + return; 1919 + } 1907 1920 1908 1921 trace_ath5k_tx(ah, bf->skb, &ah->txqs[ah->bhalq]); 1909 1922
+4 -4
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
··· 307 307 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 308 308 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, 309 309 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) } }, 311 311 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 312 312 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 313 313 ··· 884 884 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 885 885 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, 886 886 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) } }, 888 888 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 889 889 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 890 890 ··· 2040 2040 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 2041 2041 { { CTL(60, 1), CTL(60, 0), CTL(60, 0), CTL(60, 1) } }, 2042 2042 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) } }, 2044 2044 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 2045 2045 { { CTL(60, 0), CTL(60, 1), CTL(60, 0), CTL(60, 0) } }, 2046 2046 ··· 3734 3734 } 3735 3735 } else { 3736 3736 reg_pmu_set = (5 << 1) | (7 << 4) | 3737 - (1 << 8) | (2 << 14) | 3737 + (2 << 8) | (2 << 14) | 3738 3738 (6 << 17) | (1 << 20) | 3739 3739 (3 << 24) | (1 << 28); 3740 3740 }
+1 -1
drivers/net/wireless/ath/ath9k/ar9003_phy.h
··· 850 850 #define AR_PHY_TPC_11_B1 (AR_SM1_BASE + 0x220) 851 851 #define AR_PHY_PDADC_TAB_1 (AR_SM1_BASE + 0x240) 852 852 #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)) 854 854 855 855 /* 856 856 * Channel 2 Register Map
+17 -3
drivers/net/wireless/b43/dma.c
··· 795 795 u32 tmp; 796 796 u16 mmio_base; 797 797 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 + 801 815 mmio_base = b43_dmacontroller_base(0, 0); 802 816 b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK); 803 817 tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL);
+2
drivers/net/wireless/rt2x00/rt2800usb.c
··· 921 921 { USB_DEVICE(0x07d1, 0x3c16) }, 922 922 /* Draytek */ 923 923 { USB_DEVICE(0x07fa, 0x7712) }, 924 + /* DVICO */ 925 + { USB_DEVICE(0x0fe9, 0xb307) }, 924 926 /* Edimax */ 925 927 { USB_DEVICE(0x7392, 0x7711) }, 926 928 { USB_DEVICE(0x7392, 0x7717) },
+1
drivers/net/wireless/rt2x00/rt73usb.c
··· 2420 2420 /* Buffalo */ 2421 2421 { USB_DEVICE(0x0411, 0x00d8) }, 2422 2422 { USB_DEVICE(0x0411, 0x00d9) }, 2423 + { USB_DEVICE(0x0411, 0x00e6) }, 2423 2424 { USB_DEVICE(0x0411, 0x00f4) }, 2424 2425 { USB_DEVICE(0x0411, 0x0116) }, 2425 2426 { USB_DEVICE(0x0411, 0x0119) },
+8 -3
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
··· 281 281 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817d, rtl92cu_hal_cfg)}, 282 282 /* 8188CE-VAU USB minCard (b/g mode only) */ 283 283 {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)}, 284 286 /* 8188 Combo for BC4 */ 285 287 {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8754, rtl92cu_hal_cfg)}, 286 288 ··· 305 303 {RTL_USB_DEVICE(0x0eb0, 0x9071, rtl92cu_hal_cfg)}, /*NO Brand - Etop*/ 306 304 /* HP - Lite-On ,8188CUS Slim Combo */ 307 305 {RTL_USB_DEVICE(0x103c, 0x1629, rtl92cu_hal_cfg)}, 306 + {RTL_USB_DEVICE(0x13d3, 0x3357, rtl92cu_hal_cfg)}, /* AzureWave */ 308 307 {RTL_USB_DEVICE(0x2001, 0x3308, rtl92cu_hal_cfg)}, /*D-Link - Alpha*/ 309 308 {RTL_USB_DEVICE(0x2019, 0xab2a, rtl92cu_hal_cfg)}, /*Planex - Abocom*/ 310 309 {RTL_USB_DEVICE(0x2019, 0xed17, rtl92cu_hal_cfg)}, /*PCI - Edimax*/ 311 310 {RTL_USB_DEVICE(0x20f4, 0x648b, rtl92cu_hal_cfg)}, /*TRENDnet - Cameo*/ 312 311 {RTL_USB_DEVICE(0x7392, 0x7811, rtl92cu_hal_cfg)}, /*Edimax - Edimax*/ 313 - {RTL_USB_DEVICE(0x3358, 0x13d3, rtl92cu_hal_cfg)}, /*Azwave 8188CE-VAU*/ 312 + {RTL_USB_DEVICE(0x13d3, 0x3358, rtl92cu_hal_cfg)}, /*Azwave 8188CE-VAU*/ 314 313 /* Russian customer -Azwave (8188CE-VAU b/g mode only) */ 315 - {RTL_USB_DEVICE(0x3359, 0x13d3, rtl92cu_hal_cfg)}, 314 + {RTL_USB_DEVICE(0x13d3, 0x3359, rtl92cu_hal_cfg)}, 315 + {RTL_USB_DEVICE(0x4855, 0x0090, rtl92cu_hal_cfg)}, /* Feixun */ 316 + {RTL_USB_DEVICE(0x4855, 0x0091, rtl92cu_hal_cfg)}, /* NetweeN-Feixun */ 317 + {RTL_USB_DEVICE(0x9846, 0x9041, rtl92cu_hal_cfg)}, /* Netgear Cameo */ 316 318 317 319 /****** 8192CU ********/ 318 320 {RTL_USB_DEVICE(0x0586, 0x341f, rtl92cu_hal_cfg)}, /*Zyxel -Abocom*/ 319 321 {RTL_USB_DEVICE(0x07aa, 0x0056, rtl92cu_hal_cfg)}, /*ATKK-Gemtek*/ 320 322 {RTL_USB_DEVICE(0x07b8, 0x8178, rtl92cu_hal_cfg)}, /*Funai -Abocom*/ 321 - {RTL_USB_DEVICE(0x07b8, 0x8178, rtl92cu_hal_cfg)}, /*Abocom -Abocom*/ 322 323 {RTL_USB_DEVICE(0x2001, 0x3307, rtl92cu_hal_cfg)}, /*D-Link-Cameo*/ 323 324 {RTL_USB_DEVICE(0x2001, 0x3309, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/ 324 325 {RTL_USB_DEVICE(0x2001, 0x330a, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/
+1 -5
drivers/net/wireless/wl1251/acx.c
··· 140 140 auth->sleep_auth = sleep_auth; 141 141 142 142 ret = wl1251_cmd_configure(wl, ACX_SLEEP_AUTH, auth, sizeof(*auth)); 143 - if (ret < 0) 144 - return ret; 145 143 146 144 out: 147 145 kfree(auth); ··· 679 681 680 682 ret = wl1251_cmd_configure(wl, ACX_CCA_THRESHOLD, 681 683 detection, sizeof(*detection)); 682 - if (ret < 0) { 684 + if (ret < 0) 683 685 wl1251_warning("failed to set cca threshold: %d", ret); 684 - return ret; 685 - } 686 686 687 687 out: 688 688 kfree(detection);
+1 -1
drivers/net/wireless/wl1251/cmd.c
··· 241 241 if (ret < 0) { 242 242 wl1251_error("tx %s cmd for channel %d failed", 243 243 enable ? "start" : "stop", channel); 244 - return ret; 244 + goto out; 245 245 } 246 246 247 247 wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d",
+1
fs/compat_ioctl.c
··· 1003 1003 COMPATIBLE_IOCTL(PPPIOCDISCONN) 1004 1004 COMPATIBLE_IOCTL(PPPIOCATTCHAN) 1005 1005 COMPATIBLE_IOCTL(PPPIOCGCHAN) 1006 + COMPATIBLE_IOCTL(PPPIOCGL2TPSTATS) 1006 1007 /* PPPOX */ 1007 1008 COMPATIBLE_IOCTL(PPPOEIOCSFWD) 1008 1009 COMPATIBLE_IOCTL(PPPOEIOCDFWD)
+1 -1
include/linux/netlink.h
··· 29 29 #define MAX_LINKS 32 30 30 31 31 struct sockaddr_nl { 32 - sa_family_t nl_family; /* AF_NETLINK */ 32 + __kernel_sa_family_t nl_family; /* AF_NETLINK */ 33 33 unsigned short nl_pad; /* zero */ 34 34 __u32 nl_pid; /* port ID */ 35 35 __u32 nl_groups; /* multicast groups mask */
+4 -2
include/linux/socket.h
··· 8 8 #define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) 9 9 /* Implementation specific desired alignment */ 10 10 11 + typedef unsigned short __kernel_sa_family_t; 12 + 11 13 struct __kernel_sockaddr_storage { 12 - unsigned short ss_family; /* address family */ 14 + __kernel_sa_family_t ss_family; /* address family */ 13 15 /* Following field(s) are implementation specific */ 14 16 char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; 15 17 /* space to achieve desired size, */ ··· 37 35 extern void socket_seq_show(struct seq_file *seq); 38 36 #endif 39 37 40 - typedef unsigned short sa_family_t; 38 + typedef __kernel_sa_family_t sa_family_t; 41 39 42 40 /* 43 41 * 1003.1g requires sa_family_t and that sa_data is char.
+1 -1
include/net/inet_sock.h
··· 238 238 { 239 239 __u8 flags = 0; 240 240 241 - if (inet_sk(sk)->transparent) 241 + if (inet_sk(sk)->transparent || inet_sk(sk)->hdrincl) 242 242 flags |= FLOWI_FLAG_ANYSRC; 243 243 if (sk->sk_protocol == IPPROTO_TCP) 244 244 flags |= FLOWI_FLAG_PRECOW_METRICS;
+5 -1
net/bridge/br_if.c
··· 417 417 int br_del_if(struct net_bridge *br, struct net_device *dev) 418 418 { 419 419 struct net_bridge_port *p; 420 + bool changed_addr; 420 421 421 422 p = br_port_get_rtnl(dev); 422 423 if (!p || p->br != br) ··· 426 425 del_nbp(p); 427 426 428 427 spin_lock_bh(&br->lock); 429 - br_stp_recalculate_bridge_id(br); 428 + changed_addr = br_stp_recalculate_bridge_id(br); 430 429 spin_unlock_bh(&br->lock); 430 + 431 + if (changed_addr) 432 + call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev); 431 433 432 434 netdev_update_features(br->dev); 433 435
+6 -1
net/bridge/br_notify.c
··· 34 34 struct net_device *dev = ptr; 35 35 struct net_bridge_port *p; 36 36 struct net_bridge *br; 37 + bool changed_addr; 37 38 int err; 38 39 39 40 /* register of bridge completed, add sysfs entries */ ··· 58 57 case NETDEV_CHANGEADDR: 59 58 spin_lock_bh(&br->lock); 60 59 br_fdb_changeaddr(p, dev->dev_addr); 61 - br_stp_recalculate_bridge_id(br); 60 + changed_addr = br_stp_recalculate_bridge_id(br); 62 61 spin_unlock_bh(&br->lock); 62 + 63 + if (changed_addr) 64 + call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev); 65 + 63 66 break; 64 67 65 68 case NETDEV_CHANGE:
+2 -1
net/bridge/netfilter/ebtables.c
··· 1198 1198 1199 1199 if (table->check && table->check(newinfo, table->valid_hooks)) { 1200 1200 BUGPRINT("The table doesn't like its own initial data, lol\n"); 1201 - return ERR_PTR(-EINVAL); 1201 + ret = -EINVAL; 1202 + goto free_chainstack; 1202 1203 } 1203 1204 1204 1205 table->private = newinfo;
+1 -1
net/core/scm.c
··· 192 192 goto error; 193 193 194 194 cred->uid = cred->euid = p->creds.uid; 195 - cred->gid = cred->egid = p->creds.uid; 195 + cred->gid = cred->egid = p->creds.gid; 196 196 put_cred(p->cred); 197 197 p->cred = cred; 198 198 }
+1
net/ipv4/ip_output.c
··· 122 122 newskb->pkt_type = PACKET_LOOPBACK; 123 123 newskb->ip_summed = CHECKSUM_UNNECESSARY; 124 124 WARN_ON(!skb_dst(newskb)); 125 + skb_dst_force(newskb); 125 126 netif_rx_ni(newskb); 126 127 return 0; 127 128 }
+5 -4
net/ipv4/ip_sockglue.c
··· 1067 1067 */ 1068 1068 1069 1069 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) 1071 1071 { 1072 1072 struct inet_sock *inet = inet_sk(sk); 1073 1073 int val; ··· 1240 1240 1241 1241 msg.msg_control = optval; 1242 1242 msg.msg_controllen = len; 1243 - msg.msg_flags = 0; 1243 + msg.msg_flags = flags; 1244 1244 1245 1245 if (inet->cmsg_flags & IP_CMSG_PKTINFO) { 1246 1246 struct in_pktinfo info; ··· 1294 1294 { 1295 1295 int err; 1296 1296 1297 - err = do_ip_getsockopt(sk, level, optname, optval, optlen); 1297 + err = do_ip_getsockopt(sk, level, optname, optval, optlen, 0); 1298 1298 #ifdef CONFIG_NETFILTER 1299 1299 /* we need to exclude all possible ENOPROTOOPTs except default case */ 1300 1300 if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS && ··· 1327 1327 return compat_mc_getsockopt(sk, level, optname, optval, optlen, 1328 1328 ip_getsockopt); 1329 1329 1330 - err = do_ip_getsockopt(sk, level, optname, optval, optlen); 1330 + err = do_ip_getsockopt(sk, level, optname, optval, optlen, 1331 + MSG_CMSG_COMPAT); 1331 1332 1332 1333 #ifdef CONFIG_NETFILTER 1333 1334 /* we need to exclude all possible ENOPROTOOPTs except default case */
+8 -10
net/ipv4/netfilter.c
··· 18 18 struct rtable *rt; 19 19 struct flowi4 fl4 = {}; 20 20 __be32 saddr = iph->saddr; 21 - __u8 flags = 0; 21 + __u8 flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : 0; 22 22 unsigned int hh_len; 23 23 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; 32 30 33 31 /* some non-standard hacks like ipt_REJECT.c:send_reset() can cause 34 32 * packets with foreign saddr to appear on the NF_INET_LOCAL_OUT hook. ··· 36 38 fl4.flowi4_tos = RT_TOS(iph->tos); 37 39 fl4.flowi4_oif = skb->sk ? skb->sk->sk_bound_dev_if : 0; 38 40 fl4.flowi4_mark = skb->mark; 39 - fl4.flowi4_flags = skb->sk ? inet_sk_flowi_flags(skb->sk) : flags; 41 + fl4.flowi4_flags = flags; 40 42 rt = ip_route_output_key(net, &fl4); 41 43 if (IS_ERR(rt)) 42 44 return -1;
+2 -1
net/ipv4/raw.c
··· 563 563 flowi4_init_output(&fl4, ipc.oif, sk->sk_mark, tos, 564 564 RT_SCOPE_UNIVERSE, 565 565 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); 567 568 568 569 if (!inet->hdrincl) { 569 570 err = raw_probe_proto_opt(&fl4, msg);
+4 -5
net/ipv4/route.c
··· 722 722 { 723 723 return ((((__force u32)rt1->rt_key_dst ^ (__force u32)rt2->rt_key_dst) | 724 724 ((__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); 726 726 } 727 727 728 728 static inline int compare_keys(struct rtable *rt1, struct rtable *rt2) ··· 731 731 ((__force u32)rt1->rt_key_src ^ (__force u32)rt2->rt_key_src) | 732 732 (rt1->rt_mark ^ rt2->rt_mark) | 733 733 (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; 736 736 } 737 737 738 738 static inline int compare_netns(struct rtable *rt1, struct rtable *rt2) ··· 2320 2320 rth = rcu_dereference(rth->dst.rt_next)) { 2321 2321 if ((((__force u32)rth->rt_key_dst ^ (__force u32)daddr) | 2322 2322 ((__force u32)rth->rt_key_src ^ (__force u32)saddr) | 2323 - (rth->rt_iif ^ iif) | 2324 - rth->rt_oif | 2323 + (rth->rt_route_iif ^ iif) | 2325 2324 (rth->rt_key_tos ^ tos)) == 0 && 2326 2325 rth->rt_mark == skb->mark && 2327 2326 net_eq(dev_net(rth->dst.dev), net) &&
+1 -1
net/ipv4/syncookies.c
··· 276 276 int mss; 277 277 struct rtable *rt; 278 278 __u8 rcv_wscale; 279 - bool ecn_ok; 279 + bool ecn_ok = false; 280 280 281 281 if (!sysctl_tcp_syncookies || !th->ack || th->rst) 282 282 goto out;
+1 -1
net/ipv6/syncookies.c
··· 165 165 int mss; 166 166 struct dst_entry *dst; 167 167 __u8 rcv_wscale; 168 - bool ecn_ok; 168 + bool ecn_ok = false; 169 169 170 170 if (!sysctl_tcp_syncookies || !th->ack || th->rst) 171 171 goto out;
+1
net/netfilter/nf_queue.c
··· 312 312 } 313 313 break; 314 314 case NF_STOLEN: 315 + break; 315 316 default: 316 317 kfree_skb(skb); 317 318 }
+13 -9
net/netlabel/netlabel_kapi.c
··· 341 341 342 342 entry = kzalloc(sizeof(*entry), GFP_ATOMIC); 343 343 if (entry == NULL) 344 - return -ENOMEM; 344 + goto out_entry; 345 345 if (domain != NULL) { 346 346 entry->domain = kstrdup(domain, GFP_ATOMIC); 347 347 if (entry->domain == NULL) 348 - goto cfg_cipsov4_map_add_failure; 348 + goto out_domain; 349 349 } 350 350 351 351 if (addr == NULL && mask == NULL) { ··· 354 354 } else if (addr != NULL && mask != NULL) { 355 355 addrmap = kzalloc(sizeof(*addrmap), GFP_ATOMIC); 356 356 if (addrmap == NULL) 357 - goto cfg_cipsov4_map_add_failure; 357 + goto out_addrmap; 358 358 INIT_LIST_HEAD(&addrmap->list4); 359 359 INIT_LIST_HEAD(&addrmap->list6); 360 360 361 361 addrinfo = kzalloc(sizeof(*addrinfo), GFP_ATOMIC); 362 362 if (addrinfo == NULL) 363 - goto cfg_cipsov4_map_add_failure; 363 + goto out_addrinfo; 364 364 addrinfo->type_def.cipsov4 = doi_def; 365 365 addrinfo->type = NETLBL_NLTYPE_CIPSOV4; 366 366 addrinfo->list.addr = addr->s_addr & mask->s_addr; ··· 374 374 entry->type = NETLBL_NLTYPE_ADDRSELECT; 375 375 } else { 376 376 ret_val = -EINVAL; 377 - goto cfg_cipsov4_map_add_failure; 377 + goto out_addrmap; 378 378 } 379 379 380 380 ret_val = netlbl_domhsh_add(entry, audit_info); ··· 384 384 return 0; 385 385 386 386 cfg_cipsov4_map_add_failure: 387 - cipso_v4_doi_putdef(doi_def); 388 - kfree(entry->domain); 389 - kfree(entry); 390 - kfree(addrmap); 391 387 kfree(addrinfo); 388 + out_addrinfo: 389 + kfree(addrmap); 390 + out_addrmap: 391 + kfree(entry->domain); 392 + out_domain: 393 + kfree(entry); 394 + out_entry: 395 + cipso_v4_doi_putdef(doi_def); 392 396 return ret_val; 393 397 } 394 398
+1 -1
net/sched/sch_prio.c
··· 112 112 113 113 for (prio = 0; prio < q->bands; prio++) { 114 114 struct Qdisc *qdisc = q->queues[prio]; 115 - struct sk_buff *skb = qdisc->dequeue(qdisc); 115 + struct sk_buff *skb = qdisc_dequeue_peeked(qdisc); 116 116 if (skb) { 117 117 qdisc_bstats_update(sch, skb); 118 118 sch->q.qlen--;