aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rwsem-spinlock.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-20ipv4: raise IP_MAX_MTU to theoretical limitEric Dumazet1-5/+3
As discussed last year [1], there is no compelling reason to limit IPv4 MTU to 0xFFF0, while real limit is 0xFFFF [1] : http://marc.info/?l=linux-netdev&m=135607247609434&w=2 Willem raised this issue again because some of our internal regression tests broke after lo mtu being set to 65536. IP_MTU reports 0xFFF0, and the test attempts to send a RAW datagram of mtu + 1 bytes, expecting the send() to fail, but it does not. Alexey raised interesting points about TCP MSS, that should be addressed in follow-up patches in TCP stack if needed, as someone could also set an odd mtu anyway. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vhost: Include linux/uio.h instead of linux/socket.hAsias He1-1/+1
memcpy_fromiovec is moved from net/core/iovec.c to lib/iovec.c. linux/uio.h provides the declaration for memcpy_fromiovec. Include linux/uio.h instead of inux/socket.h for it. Signed-off-by: Asias He <asias@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20tcp: trivial: Remove nocache argument from tcp_v4_send_synackChristoph Paasch1-3/+2
The nocache-argument was used in tcp_v4_send_synack as an argument to inet_csk_route_req. However, since ba3f7f04ef2b (ipv4: Kill FLOWI_FLAG_RT_NOCACHE and associated code.) this is no more used. This patch removes the unsued argument from tcp_v4_send_synack. Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20pch_gbe: ethtool cannot change parameters when link is downAnders Larsen1-0/+1
When attempting to change e.g. the advertising mask when the link is down ecmd->speed is -1 causing mii_ethtool_sset() to bail out. This bug bit when connecting to a gigabit switch through a 4-pin (industrial) cable, since link negotiation would not complete (both endpoints claimed to be gigabit-capable, but this is not possible with only 4 pins). Any attempt to fix this by setting autonegation to not offer 1000Mbps failed as the setting would not be accepted while the link was still down... Set ecmd->speed to SPEED_1000 to satisfy mii_ethtool_sset() (the actual value of ecmd->speed doesn't matter as long as it is valid, since a re-negotation is forced afterwards). Signed-off-by: Anders Larsen <al@alarsen.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20moxa: fix missing unlock on error in moxart_mac_start_xmit()Wei Yongjun1-4/+6
Add the missing unlock before return from function moxart_mac_start_xmit() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20sundance: Add myself as a maintainerDenis Kirjanov1-0/+6
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20sundance: Add netpoll supportDenis Kirjanov1-0/+14
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20ipv6: fix checkpatch errors in net/ipv6/addrconf.cdingtianhong1-10/+14
ERROR: code indent should use tabs where possible: fix 2. ERROR: do not use assignment in if condition: fix 5. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20ipv6: convert the uses of ADBG and remove the superfluous parenthesesdingtianhong1-11/+11
Just follow the Joe Perches's opinion, it is a better way to fix the style errors. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: using kfree_rcu() to simplify the codeWei Yongjun1-7/+1
The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8169,sis190: remove unnecessary length checkPeter Wu2-6/+0
The ethtool core will lower the requested length to the one returned by get_regs_len, therefore no additional check is needed in the get_regs function. Reported-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Peter Wu <lekensteyn@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20drivers/net: enic: Generate notification of hardware crashNeel Patel2-1/+2
This patch generates a hardware crash notification (NETDEV_REBOOT) during reset. After a hardware crash, ENIC resets all its resources including queue pair filters programmed by USNIC. USNIC registers for this notification, and on receiving it, reprograms the queue pair filters. Signed-off-by: Neel Patel <neepatel@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20drivers/net: enic: Add an interface for USNIC to interact with firmwareNeel Patel5-1/+83
This patch adds an interface for USNIC to proxy firmware commands through ENIC. Signed-off-by: Neel Patel <neepatel@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20drivers/net: enic: Adding support for Cisco Low Latency NICNeel Patel7-17/+197
This patch, - Adds new firmware commands for the new Cisco Low Latency NIC (aka. USNIC). Signed-off-by: Neel Patel <neepatel@cisco.com> Signed-off-by: Nishank Trivedi <nistrive@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-206lowpan: handle context based source addressAlexander Aring1-3/+46
Handle context based address when an unspecified address is given. For other context based address we print a warning and drop the packet because we don't support it right now. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-206lowpan: lowpan_uncompress_addr with address_modeAlexander Aring2-71/+82
This patch drops the pre and postcount calculation from the lowpan_uncompress_addr function.We use instead a switch/case over address_mode value. The original implementation has several bugs in this function and it was hard to decrypt how it works. To make it maintainable and fix these bugs this patch basically reimplements lowpan_uncompress_addr from scratch. A list of bugs we found in the current implementation: 1) Properly support uncompression of short-address based IPv6 addresses (instead of basically copying garbage) 2) Fix use and uncompression of long-addresses based IPv6 addresses 3) Add missing ff:fe00 in the case of SAM/DAM = 2 and M = 0 Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-206lowpan: add function to uncompress multicast addrAlexander Aring1-19/+59
Add function to uncompress multicast address. This function split the uncompress function for a multicast address in a seperate function. To uncompress a multicast address is different than a other non-multicasts addresses according to rfc6282. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-206lowpan: introduce lowpan_fetch_skb functionAlexander Aring1-0/+12
This patch adds a helper function to parse the ipv6 header to a 6lowpan header in stream. This function checks first if we can pull data with a specific length from a skb. If this seems to be okay, we copy skb data to a destination pointer and run skb_pull. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-206lowpan: Fix fragmentation with link-local compressed addressesDavid Hauweele1-0/+6
When a new 6lowpan fragment is received, a skbuff is allocated for the reassembled packet. However when a 6lowpan packet compresses link-local addresses based on link-layer addresses, the processing function relies on the skb mac control block to find the related link-layer address. This patch copies the control block from the first fragment into the newly allocated skb to keep a trace of the link-layer addresses in case of a link-local compressed address. Edit: small changes on comment issue Signed-off-by: David Hauweele <david@hauweele.net> Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-206lowpan: init ipv6hdr buffer to zeroAlexander Aring1-11/+1
This patch simplify the handling to set fields inside of struct ipv6hdr to zero. Instead of setting some memory regions with memset to zero we initialize the whole ipv6hdr to zero. This is a simplification for parsing the 6lowpan header for the upcomming patches. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Werner Almesberger <werner@almesberger.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20qlcnic: Update version to 5.3.47Himanshu Madhani1-3/+3
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20qlcnic: Add support for 84xx adapters to load firmware from filePratik Pujar2-2/+28
o Use appropriate firmware image file name based on device IDs. Signed-off-by: Pratik Pujar <pratik.pujar@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20qlcnic: Loopback Inter Driver Communication AEN handlerManish Chopra2-9/+37
o Loopback initiator function drivers should process loopback time extend AEN. These AENs are triggered by the loopback time extend mailbox command issued by the target function drivers. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20qlcnic: Add PVID support for 84xx adaptersManish Chopra2-7/+14
o 84xx adapters support VLAN stripping for PVID. Packets don't have VLAN tag inserted in case of PVID. So packet should follow non vlan path. o Use capability bit to set PVID mode. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20qlcnic: Enable support for 844X adapterManish Chopra3-7/+23
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20openvswitch: Add vxlan tunneling support.Pravin B Shelar6-0/+236
Following patch adds vxlan vport type for openvswitch using vxlan api. So now there is vxlan dependency for openvswitch. CC: Jesse Gross <jesse@nicira.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: Add tx-vlan offload support.Pravin B Shelar1-1/+15
Following patch allows transmit side vlan offload for vxlan devices. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: Improve vxlan headroom calculation.Pravin B Shelar1-4/+9
Rather than having static headroom calculation, adjust headroom according to target device. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: Factor out vxlan send api.Pravin B Shelar2-37/+62
Following patch allows more code sharing between vxlan and ovs-vxlan. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: Extend vxlan handlers for openvswitch.Pravin B Shelar2-26/+50
Following patch adds data field to vxlan socket and export vxlan handler api. vh->data is required to store private data per vxlan handler. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: Add vxlan recv demux.Pravin B Shelar1-36/+67
Once we have ovs-vxlan functionality, one UDP port can be assigned to kernel-vxlan or ovs-vxlan port. Therefore following patch adds vxlan demux functionality, so that vxlan or ovs module can register for particular port. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: Restructure vxlan receive.Pravin B Shelar1-15/+7
Use iptunnel_pull_header() for better code sharing. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20vxlan: Restructure vxlan socket apis.Pravin B Shelar1-41/+51
Restructure vxlan-socket management APIs so that it can be shared between vxlan and ovs modules. This patch does not change any functionality. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> v6-v7: - get rid of zero refcnt vs from hashtable. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8152: add commentshayeswang1-0/+5
Add comments. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8152: adjust tx_bottom functionhayeswang1-66/+68
Split some parts of code into another function to simplify tx_bottom(). Use while loop to replace the goto loop. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8152: move some declearation of variableshayeswang1-15/+14
Move some declearation of variables in rx_bottom(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8152: adjust some duplicated codehayeswang1-27/+28
- Use r8152_get_tx_agg for getting tx agg list - Replace submit rx with goto submit Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8152: replace lockflags with flagshayeswang1-24/+24
Replace lockflags with flags. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8152: replace void * with struct r8152 *hayeswang1-2/+4
Change the type of contex of tx_agg and rx_agg from void * to staruc r8152 *. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20r8152: remove clearing the memory to zero for netdev privhayeswang1-1/+0
Remove memset(tp, 0, sizeof(*tp)); Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-20sis900: don't restart auto-negotiation each time after link resume.Denis Kirjanov1-17/+11
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-16Fix TLB gather virtual address range invalidation corner casesLinus Torvalds11-34/+57
Ben Tebulin reported: "Since v3.7.2 on two independent machines a very specific Git repository fails in 9/10 cases on git-fsck due to an SHA1/memory failures. This only occurs on a very specific repository and can be reproduced stably on two independent laptops. Git mailing list ran out of ideas and for me this looks like some very exotic kernel issue" and bisected the failure to the backport of commit 53a59fc67f97 ("mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPT"). That commit itself is not actually buggy, but what it does is to make it much more likely to hit the partial TLB invalidation case, since it introduces a new case in tlb_next_batch() that previously only ever happened when running out of memory. The real bug is that the TLB gather virtual memory range setup is subtly buggered. It was introduced in commit 597e1c3580b7 ("mm/mmu_gather: enable tlb flush range in generic mmu_gather"), and the range handling was already fixed at least once in commit e6c495a96ce0 ("mm: fix the TLB range flushed when __tlb_remove_page() runs out of slots"), but that fix was not complete. The problem with the TLB gather virtual address range is that it isn't set up by the initial tlb_gather_mmu() initialization (which didn't get the TLB range information), but it is set up ad-hoc later by the functions that actually flush the TLB. And so any such case that forgot to update the TLB range entries would potentially miss TLB invalidates. Rather than try to figure out exactly which particular ad-hoc range setup was missing (I personally suspect it's the hugetlb case in zap_huge_pmd(), which didn't have the same logic as zap_pte_range() did), this patch just gets rid of the problem at the source: make the TLB range information available to tlb_gather_mmu(), and initialize it when initializing all the other tlb gather fields. This makes the patch larger, but conceptually much simpler. And the end result is much more understandable; even if you want to play games with partial ranges when invalidating the TLB contents in chunks, now the range information is always there, and anybody who doesn't want to bother with it won't introduce subtle bugs. Ben verified that this fixes his problem. Reported-bisected-and-tested-by: Ben Tebulin <tebulin@googlemail.com> Build-testing-by: Stephen Rothwell <sfr@canb.auug.org.au> Build-testing-by: Richard Weinberger <richard.weinberger@gmail.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-16ALSA: hda - Add a fixup for Gateway LT27Takashi Iwai1-0/+1
Gateway LT27 needs a fixup for the inverted digital mic. Reported-by: "Nathanael D. Noblet" <nathanael@gnat.ca> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-15netlink: Eliminate kmalloc in netlink dump operation.Pravin B Shelar2-56/+44
Following patch stores struct netlink_callback in netlink_sock to avoid allocating and freeing it on every netlink dump msg. Only one dump operation is allowed for a given socket at a time therefore we can safely convert cb pointer to cb struct inside netlink_sock. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-15net/mlx5_core: Support MANAGE_PAGES and QUERY_PAGES firmware command changesMoshe Lazer6-49/+41
In the previous QUERY_PAGES command version we used one command to get the required amount of boot, init and post init pages. The new version uses the op_mod field to specify whether the query is for the required amount of boot, init or post init pages. In addition the output field size for the required amount of pages increased from 16 to 32 bits. In MANAGE_PAGES command the input_num_entries and output_num_entries fields sizes changed from 16 to 32 bits and the PAS tables offset changed to 0x10. In the pages request event the num_pages field also changed to 32 bits. In the HCA-capabilities-layout the size and location of max_qp_mcg field has been changed to support 24 bits. This patch isn't compatible with firmware versions < 5; however, it turns out that the first GA firmware we will publish will not support previous versions so this should be OK. Signed-off-by: Moshe Lazer <moshel@mellanox.com> Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-15tun: signedness bug in tun_get_user()Dan Carpenter1-2/+4
The recent fix d9bf5f1309 "tun: compare with 0 instead of total_len" is not totally correct. Because "len" and "sizeof()" are size_t type, that means they are never less than zero. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-15qlcnic: Update version to 5.2.46.Sucheta Chakraborty1-2/+2
Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-15qlcnic: Dump mailbox command data when a command times outManish Chopra1-0/+1
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-15qlcnic: Fix driver initialization for 83xx adaptersManish Chopra1-7/+7
o Load firmware from file before setting up interrupts. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-15qlcnic: Flush mailbox command list when mailbox is not availableManish Chopra1-1/+6
o Driver was hitting a panic at the time of adapter reset due to invalid command access from the list which had been already freed by the queuing thread. Flush all the pending commands from the list before proceeding with adapter reset Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>