aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-08-11stmmac: Move the STMicroelectronics driverJeff Kirsher27-11/+37
Move the STMicroelectronics driver into driver/net/ethernet/stmicro/ and make the necessary Kconfig and Makefile changes. CC: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11tehuti: Move the Tehuti driverJeff Kirsher9-8/+34
Move the Tehuti driver into drivers/net/ethernet/tehuti/ and make the necessary Kconfig and Makefile changes. CC: Alexander Indenbaum <baum@tehutinetworks.net> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11pasemic_mac*: Move the PA Semi driverJeff Kirsher10-12/+37
Move the PA Semi driver into drivers/net/ethernet/pasemi/ and make the necessary Kconfig and Makefile changes. CC: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Olof Johansson <olof@lixom.net>
2011-08-11rtnetlink: remove initialization of dev->real_num_tx_queuesJiri Pirko1-1/+0
dev->real_num_tx_queues is correctly set already in alloc_netdev_mqs. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bonding: implement get_tx_queues rtnk_link_opJiri Pirko1-0/+9
If bonding device is created via rtnl, it is created with default number of rx/tx queues. This patch implements callback in bonding so the correct value (previously specified by bonding module param) is used. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: Driver Version changed to 3.0.2.0Rasesh Mody1-1/+1
Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: Remove Obsolete FilesRasesh Mody5-9194/+0
Change details: - Removec bfi_ll.h bna_hw.h bna_ctrl.c and bna_txrx.c due to ENET, MSGQ and TXRX changes for new FW Driver interface and TX RX re-design. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: Remove Unused CodeRasesh Mody6-388/+2
Remove unused code. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: ENET and Tx Rx Redesign EnablementRasesh Mody13-743/+1337
Change details: This patch contains additional structure and function definition changes that are required to enable the new msgq/enet/txrx redesign introduced by the previous 4 patches. - structure and function definition changes to header files as a result of Ethport, Enet, IOCEth, Tx, Rx redesign. - ethtool changes to use new enet function and definitions - Set number of Tx and Rx queues bassed on underlying hardware. Define separate macros for maximum and supported numbers of Tx and Rx queues based on underlying hardware. Take VLAN header into account for MTU calculation. Default to INTx mode when pci_enable_msix() fails. Set a bit in Rx poll routine, check and wait for that bit to be cleared in the cleanup routine before proceeding. - The TX and Rx coalesce settings are programmed in steps of 5 us. The value that are not divisible by 5 are rounded to the next lower number. This was causing the value os 1 to 4 to be rounded to 0, which is an invalid setting. When creating Rx and Tx object, we are currently assigning the default values of Rx and Tx coalescing_timeo. If these values are changed in the driver to a different value, the change is lost during such operations as MTU change. In order to avoid that, pass the configured value of coalescing_timeo before Rx and Tx object creation. Fix bnad_tx_coalescing_timeo_set() so it applies to all the Tx objects. - Reorg uninitialization path in case of pci_probe failure. - Hardware clock setup changes to pass asic generation, port modes and asic mode as part firmware boot parameters to firmware. - FW mailbox interface changes to defined asic specific mailbox interfaces. h/w mailbox interfaces take 8-bit FIDs and 2-bit port id for owner. Cleaned up mailbox definitions and usage for new and old HW. Eliminated usage of ASIC ID. MSI-X vector assignment and programming done by firmware. Fixed host offsets for CPE/RME queue registers. - Implement polling mechanism for FW ready to have poll mechanism replaces the current interrupt based FW READY method. The timer based poll routine in IOC will query the ioc_fwstate register to see if there is a state change in FW, and sends the READY event. Removed infrastructure needed to support mbox READY event from fw as well as IOC code. - Move FW init to HW init. Handle the case where PCI mapping goes away when IOCPF state machine is waiting for semaphore. - Add IOC mbox call back to client indicating that the command is sent. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: Add New HW DefsRasesh Mody1-0/+413
Change details: - Add new file bna_hw_defs.h to support new code MSGQ, ENET and TX RX redign. This makes bna_hw.h obsolete and is removed in a later patch. bna_hw_defs.h removes all unused HW register definition that were part of bna_hw.h. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: Tx and Rx RedesignRasesh Mody1-0/+3787
Change details: - This patch contains the changes as a result of redesigning of Tx, Rx data path setup. In the old design, setting up Txqs, Rxqs were done in the driver. With the new design, most of the hardware setup steps for the Txq, Rxqs are moved to FW. Host driver issues commands to FW through the message queue to setup/teardown tx, rx data path. FW performs necessary steps and responds back to the driver with a status. - As a result of this redesign, the state machine implementation for Tx, Rx objects have changed significantly. Instead of doing the raw register access, these state machines mostly send a command to FW and wait for response and take the next action. In addition to tx, rx datapath setup, this patch also deals with rx filter configuration - such as unicast address, multicast address, vlan filter, promiscuous mode etc. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: Introduce ENET as New Driver and FW InterfaceRasesh Mody2-0/+3030
Change details: - This patch contains the messages, opcodes and structure format for the messages and responses exchanged between driver and the FW. In addition this patch contains the state machine implementation for Ethport, Enet, IOCEth. - Ethport object is responsible for receiving link state events, sending port enable/disable commands to FW. - Enet object is responsible for synchronizing initialization/teardown of tx & rx datapath configuration. - IOCEth object is responsible for init/un-init of IO Controller in the adapter which runs the FW. - This patch also contains code for initialization and resource assignment for Ethport, Enet, IOCEth, Tx, Rx objects. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11bna: MSGQ ImplementationRasesh Mody7-9/+918
Change details: - Currently modules communicate with the FW using 32 byte command and response register. This limits the size of the command and response messages exchanged with the FW to 32 bytes. We need a mechanism to exchange the comamnds and responses exchange with FW that exceeds 32 bytes. - MSGQ implementation provides that facility. It removes the assumption that command/response queue size is precisely calculated to accommodate all concurrent FW commands/responses. The queue depth is made variable now, defined by a macro. A waiting command list is implemented to hold all the commands when there is no place in the command queue. Callback is implemented for each command entry to invoke the module posting the command, when there is space in the command queue and the command was finally posted to the queue. Module/Object information is embedded in the response for tracking purpose. Signed-off-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11enic: Move the Cisco driverJeff Kirsher39-8/+39
Move the Cisco driver into drivers/net/ethernet/cisco/ and make the necessary Kconfig and Makefile changes. CC: Christian Benvenuti <benve@cisco.com> CC: Vasanthy Kolluri <vkolluri@cisco.com> CC: Roopa Prabhu <roprabhu@cisco.com> CC: David Wang <dwang2@cisco.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11ehea/ibm*: Move the IBM driversJeff Kirsher36-52/+79
Move the IBM drivers into drivers/net/ethernet/ibm/ and make the necessary Kconfig and Makefile changes. - Renamed ibm_new_emac to emac - Cleaned up Makefile and Kconfig options which referred to IBM_NEW_EMAC to IBM_EMAC - ibmlana driver is a National Semiconductor SONIC driver so it was not moved CC: Christoph Raisch <raisch@de.ibm.com> CC: Santiago Leon <santil@linux.vnet.ibm.com> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: David Gibson <dwg@au1.ibm.com> CC: Kyle Lucke <klucke@us.ibm.com> CC: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11s2io/vxge: Move the Exar driversJeff Kirsher21-38/+63
Move the Exar drivers into drivers/net/ethernet/neterion/ and make the necessary Kconfig and Makefile changes. CC: Jon Mason <jdmason@kudzu.us> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11myri*: Move the Myricom driversJeff Kirsher11-28/+54
Move the Myricom drivers into drivers/net/ethernet/myricom/ and make the necessary Kconfig and Makefile changes. CC: Andrew Gallatin <gallatin@myri.com> CC: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11mlx4: Move the Mellanox driverJeff Kirsher40-25/+56
Moves the Mellanox driver into drivers/net/ethernet/mellanox/ and make the necessary Kconfig and Makefile changes. CC: Roland Dreier <roland@kernel.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11bna: Move the Brocade driverJeff Kirsher33-16/+47
Moves the Brocade driver into drivers/net/ethernet/brocade/ and make the necessary Kconfig and Makefile changes. CC: Rasesh Mody <rmody@brocade.com> CC: Debashis Dutt <ddutt@brocade.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11be2net: Move the Emulex driverJeff Kirsher16-10/+36
Moves the Emulex driver into drivers/net/ethernet/emulex/ and make the necessary Kconfig and Makefile changes. CC: Sathya Perla <sathya.perla@emulex.com> CC: Subbu Seetharaman <subbu.seetharaman@emulex.com> CC: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11sfc: Move the Solarflare driversJeff Kirsher42-6/+5
Moves the Solarflare drivers into drivers/net/ethernet/sfc/ and make the necessary Kconfig and Makefile changes. CC: Steve Hodgson <shodgson@solarflare.com> CC: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11cassini/niu/sun*: Move the Sun driversJeff Kirsher24-76/+102
Moves the Sun drivers into drivers/net/ethernet/sun/ and make the necessary Kconfig and Makefile changes. Oliver Hartkopp <socketcan@hartkopp.net> suggested removing the sun* prefix on the driver names. This type of change I will leave up to the driver maintainers. CC: Sam Creasey <sammy@sammy.net> CC: Adrian Sun <asun@darksunrising.com> CC: Benjamin Herrenscmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-11ni5010: Move the Racal-Interlan (Micom) driverJeff Kirsher9-27/+40
Moves the Racal-Interlan driver into drivers/net/ethernet/racal/ and make the necessary Kconfig and Makefile changes. CC: "Jan-Pascal van Best" <janpascal@vanbest.org> CC: Andreas Mohr <andi@lisas.de> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-10Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/next-organizeDavid S. Miller355-1467/+1699
2011-08-10i825xx: Move the Intel 82586/82593/82596 based driversJeff Kirsher31-194/+208
Move the drivers that use the i82586/i82593/i82596 chipsets into drivers/net/ethernet/i825xx/ and make the necessary Kconfig and Makefile changes. There were 4 3Com drivers which were initially moved into 3com/, which now reside in i825xx since they all used the i82586 chip. CC: Philip Blundell <philb@gnu.org> CC: Russell King <linux@arm.linux.org.uk> CC: <aris@cathedrallabs.org> CC: Donald Becker <becker@scyld.com> CC: Chris Beauregard <cpbeaure@undergrad.math.uwaterloo.ca> CC: Richard Procter <rnp@paradise.net.nz> CC: Andries Brouwer <aeb@cwi.nl> CC: "M.Hipp" <hippm@informatik.uni-tuebingen.de> CC: Richard Hirst <richard@sleepie.demon.co.uk> CC: Sam Creasey <sammy@oh.verio.com> CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-10smsc: Move the SMC (SMSC) driversJeff Kirsher22-144/+151
Moves the SMC (SMSC) drivers into drivers/net/ethernet/smsc/ and the necessary Kconfig and Makefile changes. Also did some cleanup of NET_VENDOR_SMC Kconfig tag for the 8390 based drivers. CC: Nicolas Pitre <nico@fluxnic.net> CC: Donald Becker <becker@scyld.com> CC: Erik Stahlman <erik@vt.edu> CC: Dustin McIntire <dustin@sensoria.com> CC: Steve Glendinning <steve.glendinning@smsc.com> CC: David Hinds <dahinds@users.sourceforge.net> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-10qlogic: Move the QLogic driversJeff Kirsher32-33/+67
Moves the QLogic drivers into drivers/net/ethernet/qlogic/ and the necessary Kconfig and Makefile changes. CC: Ron Mercer <ron.mercer@qlogic.com> CC: Amit Kumar Salecha <amit.salecha@qlogic.com> CC: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
2011-08-10intel: Move the Intel wired LAN driversJeff Kirsher101-220/+239
Moves the Intel wired LAN drivers into drivers/net/ethernet/intel/ and the necessary Kconfig and Makefile changes. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-10chelsio: Move the Chelsio driversJeff Kirsher78-97/+123
Moves the drivers for the Chelsio chipsets into drivers/net/ethernet/chelsio/ and the necessary Kconfig and Makefile changes. CC: Divy Le Ray <divy@chelsio.com> CC: Dimitris Michailidis <dm@chelsio.com> CC: Casey Leedom <leedom@chelsio.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-10broadcom: Move the Broadcom driversJeff Kirsher44-115/+141
Moves the drivers for Broadcom devices into drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile changes. CC: Eilon Greenstein <eilong@broadcom.com> CC: Michael Chan <mchan@broadcom.com> CC: Matt Carlson <mcarlson@broadcom.com> CC: Gary Zambrano <zambrano@broadcom.com> CC: "Maciej W. Rozycki" <macro@linux-mips.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-108390: Move the 8390 related driversJeff Kirsher41-344/+384
Moves the drivers for the National Semi-conductor 8390 chipset into drivers/net/ethernet/8390/ and the necessary Kconfig and Makefile changes. CC: Donald Becker <becker@scyld.com> CC: Paul Gortmaker <paul.gortmaker@windriver.com> CC: Alain Malek <alain.malek@cryogen.com> CC: Peter De Schrijver <p2@mind.be> CC: "David Huggins-Daines" <dhd@debian.org> CC: Wim Dumon <wimpie@kotnet.org> CC: Yoshinori Sato <ysato@users.sourceforge.jp> CC: David Hinds <dahinds@users.sourceforge.net> CC: Russell King <linux@arm.linux.org.uk> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-10amd: Move AMD (Lance) chipset driversJeff Kirsher37-187/+216
Moves the drivers for the AMD chipsets into drivers/net/ethernet/amd/ and the necessary Kconfig and Makfile changes. The au1000 (Alchemy) driver was also moved into the same directory even though it is not a "Lance" driver. CC: Peter Maydell <pmaydell@chiark.greenend.org.uk> CC: Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de> CC: "Maciej W. Rozycki" <macro@linux-mips.org> CC: Donald Becker <becker@scyld.com> CC: Sam Creasey <sammy@users.qual.net> CC: Miguel de Icaza <miguel@nuclecu.unam.mx> CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de> CC: Don Fry <pcnet32@frontier.com> CC: Geert Uytterhoeven <geert@linux-m68k.org> CC: Russell King <linux@arm.linux.org.uk> CC: David Davies <davies@maniac.ultranet.com> CC: "M.Hipp" <hippm@informatik.uni-tuebingen.de> CC: Pete Popov <ppopov@embeddedalley.com> CC: David Hinds <dahinds@users.sourceforge.net> CC: "Roger C. Pao" <rpao@paonet.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-103c*/acenic/typhoon: Move 3Com Ethernet driversJeff Kirsher20-158/+176
Moves the 3Com drivers into drivers/net/ethernet/3com/ and the necessary Kconfig and Makefile changes. Did not move the following drivers becuase they use a non-3Com chipset: 3c503, 3c505, 3c507, 3c523 and 3c527 CC: Steffen Klassert <klassert@mathematik.tu-chemnitz.de> CC: David Dillow <dave@thedillows.org> CC: Jes Sorensen <jes@trained-monkey.org> CC: Alan Cox <alan@linux.intel.com> CC: David Hinds <dahinds@users.sourceforge.net> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: David Dillow <dave@thedillows.org>
2011-08-10drivers/net/ethernet: Add ethernet dir and config optionJeff Kirsher4-1/+20
This is the initial patch to organize the drivers/net directory structure and networking device driver config options. This patch does the following: - add drivers/net/ethernet/Kconfig - integrate the new files into the existing config Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-09net: fix potential neighbour race in dst_ifdown()Eric Dumazet1-5/+10
Followup of commit f2c31e32b378a (fix NULL dereferences in check_peer_redir()). We need to make sure dst neighbour doesnt change in dst_ifdown(). Fix some sparse errors. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/netDavid S. Miller710-11564/+18518
2011-08-07dp83640: increase receive time stamp buffer sizeRichard Cochran1-3/+2
The dp83640 buffers receive time stamps from special PHY status frames, matching them to received PTP packets in a work queue. Because the timeout for orphaned time stamps is so long and the buffer is so small, the driver can drop time stamps under moderate PTP traffic. This commit fixes the issue by decreasing the timeout to (at least) one timer tick and increasing the buffer size. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Cc: <stable@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07gianfar: fix fiper alignment after resetting the timeRichard Cochran1-7/+2
After resetting the time, the PPS signals on the FIPER output channels are incorrectly offset from the clock time, as can be readily verified by a looping back the FIPER to the external time stamp input. Despite its name, setting the "Fiper Realignment Disable" bit seems to fix the problem, at least on the P2020. Also, following the example code from the Freescale BSP, it is not really necessary to disable and re-enable the timer in order to reprogram the FIPER. (The documentation is rather unclear on this point. It seems that writing to the alarm register also disables the FIPER.) Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Cc: <stable@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07rtl8150: rtl8150_disconnect(...) does not need tasklet_disable(...)huajun li1-1/+0
Executing cmd 'rmmod rtl8150' does not return(if your device connects to host), the root cause is tasklet_disable() causes tasklet_kill() block, remove it from rtl8150_disconnect(). Signed-off-by: Huajun Li <huajun.li.lee@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07ipv4: use dst with ref during bcast/mcast loopbackJulian Anastasov1-0/+1
Make sure skb dst has reference when moving to another context. Currently, I don't see protocols that can hit it when sending broadcasts/multicasts to loopback using noref dsts, so it is just a precaution. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07ipv4: route non-local sources for raw socketJulian Anastasov2-2/+3
The raw sockets can provide source address for routing but their privileges are not considered. We can provide non-local source address, make sure the FLOWI_FLAG_ANYSRC flag is set if socket has privileges for this, i.e. based on hdrincl (IP_HDRINCL) and transparent flags. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07netfilter: TCP and raw fix for ip_route_me_harderJulian Anastasov1-10/+8
TCP in some cases uses different global (raw) socket to send RST and ACK. The transparent flag is not set there. Currently, it is a problem for rerouting after the previous change. Fix it by simplifying the checks in ip_route_me_harder and use FLOWI_FLAG_ANYSRC even for sockets. It looks safe because the initial routing allowed this source address to be used and now we just have to make sure the packet is rerouted. As a side effect this also allows rerouting for normal raw sockets that use spoofed source addresses which was not possible even before we eliminated the ip_route_input call. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07netxen: add vlan LRO supportRajesh Borundia3-10/+107
o To support vlan lro, driver need to program ip address in device. o Same ip addresses need to be program after fw recovery, so sotre them in list. o In case of vlan packet, include vlan header length while calculating ip and tcp headers. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07net: Make userland include of netlink.h more sane.David S. Miller2-3/+5
Currently userland will barf when including linux/netlink.h unless it precisely includes sys/socket.h first. The issue is where the definition of "sa_family_t" comes from. We've been back and forth on how to fix this issue in the past, see: http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/622621 http://thread.gmane.org/gmane.linux.network/143380 Ben Hutchings suggested we take a hint from how we handle the sockaddr_storage type. First we define a "__kernel_sa_family_t" to linux/socket.h that is always defined. Then if __KERNEL__ is defined, we also define "sa_family_t" as equal to "__kernel_sa_family_t". Then in places like linux/netlink.h we use __kernel_sa_family_t in user visible datastructures. Reported-by: Michel Machado <michel@digirati.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07ipv4: Fix ip_getsockopt for IP_PKTOPTIONSDaniel Baluta1-4/+5
IP_PKTOPTIONS is broken for 32-bit applications running in COMPAT mode on 64-bit kernels. This happens because msghdr's msg_flags field is always set to zero. When running in COMPAT mode this should be set to MSG_CMSG_COMPAT instead. Signed-off-by: Tiberiu Szocs-Mihai <tszocs@ixiacom.com> Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07net/usb: Add IPv6 support to the LG-VL600 LTE USB modem driverMark Kamichoff1-0/+19
The LG-VL600 LTE USB modem supports IPv6, but uses and expects an IPv4 ethertype (0x800) for these packets instead of the standard 0x86dd. This patch peeks at the IP version in the L3 header and sets the ethertype appropriately for IPv6 packets. Signed-off-by: Mark Kamichoff <prox@prolixium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07compat_ioctl: add compat handler for PPPIOCGL2TPSTATSFlorian Westphal1-0/+1
fixes following error seen on x86_64 kernel: ioctl32(openl2tpd:7480): Unknown cmd fd(14) cmd(80487436){t:'t';sz:72} arg(ffa7e6c0) on socket:[105094] The argument (struct pppol2tp_ioc_stats) uses "aligned_u64" and thus doesn't need fixups. Cc: James Chapman <jchapman@katalix.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07ipv4: fix the reusing of routing cache entriesJulian Anastasov1-1/+2
compare_keys and ip_route_input_common rely on rt_oif for distinguishing of input and output routes with same keys values. But sometimes the input route has also same hash chain (keyed by iif != 0) with the output routes (keyed by orig_oif=0). Problem visible if running with small number of rhash_entries. Fix them to use rt_route_iif instead. By this way input route can not be returned to users that request output route. The patch fixes the ip_rt_bug errors that were reported in ip_local_out context, mostly for 255.255.255.255 destinations. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07bonding: document two undocumented options.Nicolas de Pesloüan1-0/+29
Commit 655f8919d549ad1872e24d826b6ce42530516d2e bonding: add min links parameter to 802.3ad and commit ebd8e4977a87cb81d93c62a9bff0102a9713722f bonding: add all_slaves_active parameter introduced new options to bonding, but didn't provide the documentation for those options. V2: add the default value for both options. V3: document the exact behavior of min_links default value. Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-07slip: fix NOHZ local_softirq_pending 08 warningMatvejchikov Ilya1-1/+1
When using nanosleep() in an userspace application we get a ratelimit warning: NOHZ: local_softirq_pending 08 According to 481a8199142c050b72bff8a1956a49fd0a75bbe0 the problem is caused by netif_rx() function. This patch replaces netif_rx() with netif_rx_ni() which has to be used from process/softirq context. Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>