summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
AgeCommit message (Collapse)Author
2016-12-25clocksource: Use a plain u64 instead of cycle_tThomas Gleixner
There is no point in having an extra type for extra confusion. u64 is unambiguous. Conversion was done with the following coccinelle script: @rem@ @@ -typedef u64 cycle_t; @fix@ typedef cycle_t; @@ -cycle_t +u64 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org>
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds
This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
Pull networking fixes from David Miller: 1) We have to be careful to not try and place a checksum after the end of a rawv6 packet, fix from Dave Jones with help from Hannes Frederic Sowa. 2) Missing memory barriers in tcp_tasklet_func() lead to crashes, from Eric Dumazet. 3) Several bug fixes for the new XDP support in virtio_net, from Jason Wang. 4) Increase headroom in RX skbs in be2net driver to accomodate encapsulations such as geneve. From Kalesh A P. 5) Fix SKB frag unmapping on TX in mvpp2, from Thomas Petazzoni. 6) Pre-pulling UDP headers created a regression in RECVORIGDSTADDR socket option support, from Willem de Bruijn. 7) UID based routing added a potential OOPS in ip_do_redirect() when we see an SKB without a socket attached. We just need it for the network namespace which we can get from skb->dev instead. Fix from Lorenzo Colitti. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (30 commits) sctp: fix recovering from 0 win with small data chunks sctp: do not loose window information if in rwnd_over virtio-net: XDP support for small buffers virtio-net: remove big packet XDP codes virtio-net: forbid XDP when VIRTIO_NET_F_GUEST_UFO is support virtio-net: make rx buf size estimation works for XDP virtio-net: unbreak csumed packets for XDP_PASS virtio-net: correctly handle XDP_PASS for linearized packets virtio-net: fix page miscount during XDP linearizing virtio-net: correctly xmit linearized page on XDP_TX virtio-net: remove the warning before XDP linearizing mlxsw: spectrum_router: Correctly remove nexthop groups mlxsw: spectrum_router: Don't reflect dead neighs neigh: Send netevent after marking neigh as dead ipv6: handle -EFAULT from skb_copy_bits inet: fix IP(V6)_RECVORIGDSTADDR for udp sockets net/sched: cls_flower: Mandate mask when matching on flags net/sched: act_tunnel_key: Fix setting UDP dst port in metadata under IPv6 stmmac: CSR clock configuration fix net: ipv4: Don't crash if passing a null sk to ip_do_redirect. ...
2016-12-23Merge tag 'scsi-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull late SCSI updates from James Bottomley: "This is mostly stuff which missed the initial pull. There's a new driver: qedi, and some ufs, ibmvscsis and ncr5380 updates plus some assorted driver fixes and also a fix for the bug where if a device goes into a blocked state between configuration and sysfs device add (which can be a long time under async probing) it would become permanently blocked" * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (30 commits) scsi: avoid a permanent stop of the scsi device's request queue scsi: mpt3sas: Recognize and act on iopriority info scsi: qla2xxx: Fix Target mode handling with Multiqueue changes. scsi: qla2xxx: Add Block Multi Queue functionality. scsi: qla2xxx: Add multiple queue pair functionality. scsi: qla2xxx: Utilize pci_alloc_irq_vectors/pci_free_irq_vectors calls. scsi: qla2xxx: Only allow operational MBX to proceed during RESET. scsi: hpsa: remove memory allocate failure message scsi: Update 3ware driver email addresses scsi: zfcp: fix rport unblock race with LUN recovery scsi: zfcp: do not trace pure benign residual HBA responses at default level scsi: zfcp: fix use-after-"free" in FC ingress path after TMF scsi: libcxgbi: return error if interface is not up scsi: cxgb4i: libcxgbi: add missing module_put() scsi: cxgb4i: libcxgbi: cxgb4: add T6 iSCSI completion feature scsi: cxgb4i: libcxgbi: add active open cmd for T6 adapters scsi: cxgb4i: use cxgb4_tp_smt_idx() to get smt_idx scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework. scsi: aacraid: remove wildcard for series 9 controllers scsi: ibmvscsi: add write memory barrier to CRQ processing ...
2016-12-23mlxsw: spectrum_router: Correctly remove nexthop groupsIdo Schimmel
At the end of the nexthop initialization process we determine whether the nexthop should be offloaded or not based on the NUD state of the neighbour representing it. After all the nexthops were initialized we refresh the nexthop group and potentially offload it to the device, in case some of the nexthops were resolved. Make the destruction of a nexthop group symmetric with its creation by marking all nexthops as invalid and then refresh the nexthop group to make sure it was removed from the device's tables. Fixes: b2157149b0b0 ("mlxsw: spectrum_router: Add the nexthop neigh activity update") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-23mlxsw: spectrum_router: Don't reflect dead neighsIdo Schimmel
When a neighbour is considered to be dead, we should remove it from the device's table regardless of its NUD state. Without this patch, after setting a port to be administratively down we get the following errors when we periodically try to update the kernel about neighbours activity: [ 461.947268] mlxsw_spectrum 0000:03:00.0 sw1p3: Failed to find matching neighbour for IP=192.168.100.2 Fixes: a6bf9e933daf ("mlxsw: spectrum_router: Offload neighbours based on NUD state change") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-23stmmac: CSR clock configuration fixjpinto
When testing stmmac with my QoS reference design I checked a problem in the CSR clock configuration that was impossibilitating the phy discovery, since every read operation returned 0x0000ffff. This patch fixes the issue. Signed-off-by: Joao Pinto <jpinto@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-21net: mvpp2: fix dma unmapping of TX buffers for fragmentsThomas Petazzoni
Since commit 71ce391dfb784 ("net: mvpp2: enable proper per-CPU TX buffers unmapping"), we are not correctly DMA unmapping TX buffers for fragments. Indeed, the mvpp2_txq_inc_put() function only stores in the txq_cpu->tx_buffs[] array the physical address of the buffer to be DMA-unmapped when skb != NULL. In addition, when DMA-unmapping, we use skb_headlen(skb) to get the size to be unmapped. Both of this works fine for TX descriptors that are associated directly to a SKB, but not the ones that are used for fragments, with a NULL pointer as skb: - We have a NULL physical address when calling DMA unmap - skb_headlen(skb) crashes because skb is NULL This causes random crashes when fragments are used. To solve this problem, we need to: - Store the physical address of the buffer to be unmapped unconditionally, regardless of whether it is tied to a SKB or not. - Store the length of the buffer to be unmapped, which requires a new field. Instead of adding a third array to store the length of the buffer to be unmapped, and as suggested by David Miller, this commit refactors the tx_buffs[] and tx_skb[] arrays of 'struct mvpp2_txq_pcpu' into a separate structure 'mvpp2_txq_pcpu_buf', to which a 'size' field is added. Therefore, instead of having three arrays to allocate/free, we have a single one, which also improve data locality, reducing the impact on the CPU cache. Fixes: 71ce391dfb784 ("net: mvpp2: enable proper per-CPU TX buffers unmapping") Reported-by: Raphael G <raphael.glon@corp.ovh.com> Cc: Raphael G <raphael.glon@corp.ovh.com> Cc: stable@vger.kernel.org Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-21net: ethernet: stmmac: dwmac-rk: make clk enablement first in powerupHeiko Stübner
Right now the dwmac-rk tries to set up the GRF-specific speed and link options before enabling clocks, phys etc and on previous socs this works because the GRF is supplied on the whole by one clock. On the rk3399 however the GRF (General Register Files) clock-supply has been split into multiple clocks and while there is no specific grf-gmac clock like for other sub-blocks, it seems the mac-specific portions are actually supplied by the general mac clock. This results in hangs on rk3399 boards if the driver is build as module. When built in te problem of course doesn't surface, as the clocks are of course still on at the stage before clock_disable_unused. To solve this, simply move the clock enablement to the first position in the powerup callback. This is also a good idea in general to enable clocks before everything else. Tested on rk3288, rk3368 and rk3399 the dwmac still works on all of them. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-21be2net: Increase skb headroom size to 256 bytesKalesh A P
The driver currently allocates 128 bytes of skb headroom. This was found to be insufficient with some configurations like Geneve tunnels, which resulted in skb head reallocations. Increase the headroom to 256 bytes to fix this. Signed-off-by: Kalesh A P <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20net/mlx5: use rb_entry()Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20ethernet: sfc: Add Kconfig entry for vendor SolarflareTobias Klauser
Since commit 5a6681e22c14 ("sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver") there are two drivers for Solarflare devices, but both still show up directly beneath "Ethernet driver support" in the Kconfig. Follow the pattern of other vendors and group them beneath an own vendor Kconfig entry for Solarflare. Cc: Edward Cree <ecree@solarflare.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20net: hix5hd2_gmac: fix compatible strings nameDongpo Li
The SoC hix5hd2 compatible string has the suffix "-gmac" and we should not change its compatible string. So we should name all the compatible string with the suffix "-gmac". Creating a new name suffix "-gemac" is unnecessary. We also add another SoC compatible string in dt binding documentation and describe which generic version the SoC belongs to. Fixes: d0fb6ba75dc0 ("net: hix5hd2_gmac: add generic compatible string") Signed-off-by: Dongpo Li <lidongpo@hisilicon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20net: netcp: ethss: fix 10gbe host port tx pri map configurationWingMan Kwok
This patch adds the missing 10gbe host port tx priority map configurations. Signed-off-by: WingMan Kwok <w-kwok2@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20net: netcp: ethss: fix errors in ethtool opsWingMan Kwok
In ethtool ops, it needs to retrieve the corresponding ethss module (gbe or xgbe) from the net_device structure. Prior to this patch, the retrieving procedure only checks for the gbe module. This patch fixes the issue by checking the xgbe module if the net_device structure does not correspond to the gbe module. Signed-off-by: WingMan Kwok <w-kwok2@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20fsl/fman: enable compilation on ARM64Madalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20fsl/fman: A007273 only applies to PPC SoCsMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Reviewed-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20powerpc: fsl/fman: remove fsl,fman from of_device_ids[]Madalin Bucur
The fsl/fman drivers will use of_platform_populate() on all supported platforms. Call of_platform_populate() to probe the FMan sub-nodes. Signed-off-by: Igal Liberman <igal.liberman@freescale.com> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Acked-by: Scott Wood <oss@buserror.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-20fsl/fman: fix 1G support for QSGMII interfacesMadalin Bucur
QSGMII ports were not advertising 1G speed. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Reviewed-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-19stmmac: fix memory barriersPavel Machek
Fix up memory barriers in stmmac driver. They are meant to protect against DMA engine, so smp_ variants are certainly wrong, and dma_ variants are preferable. Signed-off-by: Pavel Machek <pavel@denx.de> Tested-by: Niklas Cassel <niklas.cassel@axis.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-19net: ethernet: cavium: octeon: octeon_mgmt: Handle return NULL error from ↵Arvind Yadav
devm_ioremap Here, If devm_ioremap will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
Pull networking fixes and cleanups from David Miller: 1) Revert bogus nla_ok() change, from Alexey Dobriyan. 2) Various bpf validator fixes from Daniel Borkmann. 3) Add some necessary SET_NETDEV_DEV() calls to hsis_femac and hip04 drivers, from Dongpo Li. 4) Several ethtool ksettings conversions from Philippe Reynes. 5) Fix bugs in inet port management wrt. soreuseport, from Tom Herbert. 6) XDP support for virtio_net, from John Fastabend. 7) Fix NAT handling within a vrf, from David Ahern. 8) Endianness fixes in dpaa_eth driver, from Claudiu Manoil * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (63 commits) net: mv643xx_eth: fix build failure isdn: Constify some function parameters mlxsw: spectrum: Mark split ports as such cgroup: Fix CGROUP_BPF config qed: fix old-style function definition net: ipv6: check route protocol when deleting routes r6040: move spinlock in r6040_close as SOFTIRQ-unsafe lock order detected irda: w83977af_ir: cleanup an indent issue net: sfc: use new api ethtool_{get|set}_link_ksettings net: davicom: dm9000: use new api ethtool_{get|set}_link_ksettings net: cirrus: ep93xx: use new api ethtool_{get|set}_link_ksettings net: chelsio: cxgb3: use new api ethtool_{get|set}_link_ksettings net: chelsio: cxgb2: use new api ethtool_{get|set}_link_ksettings bpf: fix mark_reg_unknown_value for spilled regs on map value marking bpf: fix overflow in prog accounting bpf: dynamically allocate digest scratch buffer gtp: Fix initialization of Flags octet in GTPv1 header gtp: gtp_check_src_ms_ipv4() always return success net/x25: use designated initializers isdn: use designated initializers ...
2016-12-17net: mv643xx_eth: fix build failureSudip Mukherjee
The build of sparc allmodconfig fails with the error: "of_irq_to_resource" [drivers/net/ethernet/marvell/mv643xx_eth.ko] undefined! of_irq_to_resource() is defined when CONFIG_OF_IRQ is defined. And also CONFIG_OF_IRQ can only be defined if CONFIG_IRQ is defined. So we can safely use #if defined(CONFIG_OF_IRQ) in the code. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17mlxsw: spectrum: Mark split ports as suchIdo Schimmel
When a port is split we should mark it as such, as otherwise the split ports aren't renamed correctly (e.g. sw1p3 -> sw1p3s1) and the unsplit operation fails: $ devlink port split sw1p3 count 4 $ devlink port unsplit eth0 devlink answers: Invalid argument [ 598.565307] mlxsw_spectrum 0000:03:00.0 eth0: Port wasn't split Fixes: 67963a33b4fd ("mlxsw: Make devlink port instances independent of spectrum/switchx2 port instances") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reported-by: Tamir Winetroub <tamirw@mellanox.com> Reviewed-by: Elad Raz <eladr@mellanox.com> Tested-by: Tamir Winetroub <tamirw@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17qed: fix old-style function definitionArnd Bergmann
The newly added file causes a harmless warning, with "make W=1": drivers/net/ethernet/qlogic/qed/qed_iscsi.c: In function 'qed_get_iscsi_ops': drivers/net/ethernet/qlogic/qed/qed_iscsi.c:1268:29: warning: old-style function definition [-Wold-style-definition] This makes it a proper prototype. Fixes: fc831825f99e ("qed: Add support for hardware offloaded iSCSI.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17r6040: move spinlock in r6040_close as SOFTIRQ-unsafe lock order detectedManuel Bessler
'ifconfig eth0 down' makes r6040_close() trigger: INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected Fixed by moving calls to phy_stop(), napi_disable(), netif_stop_queue() to outside of the module's private spin_lock_irq block. Found on a Versalogic Tomcat SBC with a Vortex86 SoC s1660e_5150:~# sudo ifconfig eth0 down [ 61.306415] ====================================================== [ 61.306415] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] [ 61.306415] 4.9.0-gb898d2d-manuel #1 Not tainted [ 61.306415] ------------------------------------------------------ [ 61.306415] ifconfig/449 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: [ 61.306415] (&dev->lock){+.+...}, at: [<c1336276>] phy_stop+0x16/0x80 [ 61.306415] and this task is already holding: [ 61.306415] (&(&lp->lock)->rlock){+.-...}, at: [<d0934c84>] r6040_close+0x24/0x230 [r6040] which would create a new lock dependency: [ 61.306415] (&(&lp->lock)->rlock){+.-...} -> (&dev->lock){+.+...} [ 61.306415] but this new dependency connects a SOFTIRQ-irq-safe lock: [ 61.306415] (&(&lp->lock)->rlock){+.-...} [ 61.306415] ... which became SOFTIRQ-irq-safe at: [ 61.306415] [ 61.306415] [<c1075bc5>] __lock_acquire+0x555/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14bb334>] _raw_spin_lock_irqsave+0x24/0x40 [ 61.306415] [ 61.306415] [<d0934ac0>] r6040_start_xmit+0x30/0x1d0 [r6040] [ 61.306415] [ 61.306415] [<c13a7d4d>] dev_hard_start_xmit+0x9d/0x2d0 [ 61.306415] [ 61.306415] [<c13c8a38>] sch_direct_xmit+0xa8/0x140 [ 61.306415] [ 61.306415] [<c13a8436>] __dev_queue_xmit+0x416/0x780 [ 61.306415] [ 61.306415] [<c13a87aa>] dev_queue_xmit+0xa/0x10 [ 61.306415] [ 61.306415] [<c13b4837>] neigh_resolve_output+0x147/0x220 [ 61.306415] [ 61.306415] [<c144541b>] ip6_finish_output2+0x2fb/0x910 [ 61.306415] [ 61.306415] [<c14494e6>] ip6_finish_output+0xa6/0x1a0 [ 61.306415] [ 61.306415] [<c1449635>] ip6_output+0x55/0x320 [ 61.306415] [ 61.306415] [<c146f4d2>] mld_sendpack+0x352/0x560 [ 61.306415] [ 61.306415] [<c146fe55>] mld_ifc_timer_expire+0x155/0x280 [ 61.306415] [ 61.306415] [<c108b081>] call_timer_fn+0x81/0x270 [ 61.306415] [ 61.306415] [<c108b331>] expire_timers+0xc1/0x180 [ 61.306415] [ 61.306415] [<c108b4f7>] run_timer_softirq+0x77/0x150 [ 61.306415] [ 61.306415] [<c1043d04>] __do_softirq+0xb4/0x3d0 [ 61.306415] [ 61.306415] [<c101a15c>] do_softirq_own_stack+0x1c/0x30 [ 61.306415] [ 61.306415] [<c104416e>] irq_exit+0x8e/0xa0 [ 61.306415] [ 61.306415] [<c1019d31>] do_IRQ+0x51/0x100 [ 61.306415] [ 61.306415] [<c14bc176>] common_interrupt+0x36/0x40 [ 61.306415] [ 61.306415] [<c1134928>] set_root+0x68/0xf0 [ 61.306415] [ 61.306415] [<c1136120>] path_init+0x400/0x640 [ 61.306415] [ 61.306415] [<c11386bf>] path_lookupat+0xf/0xe0 [ 61.306415] [ 61.306415] [<c1139ebc>] filename_lookup+0x6c/0x100 [ 61.306415] [ 61.306415] [<c1139fd5>] user_path_at_empty+0x25/0x30 [ 61.306415] [ 61.306415] [<c11298c6>] SyS_faccessat+0x86/0x1e0 [ 61.306415] [ 61.306415] [<c1129a30>] SyS_access+0x10/0x20 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] [ 61.306415] to a SOFTIRQ-irq-unsafe lock: [ 61.306415] (&dev->lock){+.+...} [ 61.306415] ... which became SOFTIRQ-irq-unsafe at: [ 61.306415] ...[ 61.306415] [ 61.306415] [<c1075c0c>] __lock_acquire+0x59c/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14b7add>] mutex_lock_nested+0x2d/0x4a0 [ 61.306415] [ 61.306415] [<c133747d>] phy_probe+0x4d/0xc0 [ 61.306415] [ 61.306415] [<c1338afe>] phy_attach_direct+0xbe/0x190 [ 61.306415] [ 61.306415] [<c1338ca7>] phy_connect_direct+0x17/0x60 [ 61.306415] [ 61.306415] [<c1338d23>] phy_connect+0x33/0x70 [ 61.306415] [ 61.306415] [<d09357a0>] r6040_init_one+0x3a0/0x500 [r6040] [ 61.306415] [ 61.306415] [<c12a78c7>] pci_device_probe+0x77/0xd0 [ 61.306415] [ 61.306415] [<c12f5e15>] driver_probe_device+0x145/0x280 [ 61.306415] [ 61.306415] [<c12f5fd9>] __driver_attach+0x89/0x90 [ 61.306415] [ 61.306415] [<c12f43ef>] bus_for_each_dev+0x4f/0x80 [ 61.306415] [ 61.306415] [<c12f5954>] driver_attach+0x14/0x20 [ 61.306415] [ 61.306415] [<c12f55b7>] bus_add_driver+0x197/0x210 [ 61.306415] [ 61.306415] [<c12f6a21>] driver_register+0x51/0xd0 [ 61.306415] [ 61.306415] [<c12a6955>] __pci_register_driver+0x45/0x50 [ 61.306415] [ 61.306415] [<d0938017>] 0xd0938017 [ 61.306415] [ 61.306415] [<c100043f>] do_one_initcall+0x2f/0x140 [ 61.306415] [ 61.306415] [<c10e48c0>] do_init_module+0x4a/0x19b [ 61.306415] [ 61.306415] [<c10a680e>] load_module+0x1b2e/0x2070 [ 61.306415] [ 61.306415] [<c10a6eb9>] SyS_finit_module+0x69/0x80 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] [ 61.306415] other info that might help us debug this: [ 61.306415] [ 61.306415] Possible interrupt unsafe locking scenario: [ 61.306415] [ 61.306415] CPU0 CPU1 [ 61.306415] ---- ---- [ 61.306415] lock(&dev->lock); [ 61.306415] local_irq_disable(); [ 61.306415] lock(&(&lp->lock)->rlock); [ 61.306415] lock(&dev->lock); [ 61.306415] <Interrupt> [ 61.306415] lock(&(&lp->lock)->rlock); [ 61.306415] [ 61.306415] *** DEADLOCK *** [ 61.306415] [ 61.306415] 2 locks held by ifconfig/449: [ 61.306415] #0: (rtnl_mutex){+.+.+.}, at: [<c13b68ef>] rtnl_lock+0xf/0x20 [ 61.306415] #1: (&(&lp->lock)->rlock){+.-...}, at: [<d0934c84>] r6040_close+0x24/0x230 [r6040] [ 61.306415] [ 61.306415] the dependencies between SOFTIRQ-irq-safe lock and the holding lock: [ 61.306415] -> (&(&lp->lock)->rlock){+.-...} ops: 3049 { [ 61.306415] HARDIRQ-ON-W at: [ 61.306415] [ 61.306415] [<c1075be7>] __lock_acquire+0x577/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14bb21b>] _raw_spin_lock+0x1b/0x30 [ 61.306415] [ 61.306415] [<d09343cc>] r6040_poll+0x2c/0x330 [r6040] [ 61.306415] [ 61.306415] [<c13a5577>] net_rx_action+0x197/0x340 [ 61.306415] [ 61.306415] [<c1043d04>] __do_softirq+0xb4/0x3d0 [ 61.306415] [ 61.306415] [<c1044037>] run_ksoftirqd+0x17/0x40 [ 61.306415] [ 61.306415] [<c105fe91>] smpboot_thread_fn+0x141/0x180 [ 61.306415] [ 61.306415] [<c105c84e>] kthread+0xde/0x110 [ 61.306415] [ 61.306415] [<c14bb949>] ret_from_fork+0x19/0x30 [ 61.306415] IN-SOFTIRQ-W at: [ 61.306415] [ 61.306415] [<c1075bc5>] __lock_acquire+0x555/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14bb334>] _raw_spin_lock_irqsave+0x24/0x40 [ 61.306415] [ 61.306415] [<d0934ac0>] r6040_start_xmit+0x30/0x1d0 [r6040] [ 61.306415] [ 61.306415] [<c13a7d4d>] dev_hard_start_xmit+0x9d/0x2d0 [ 61.306415] [ 61.306415] [<c13c8a38>] sch_direct_xmit+0xa8/0x140 [ 61.306415] [ 61.306415] [<c13a8436>] __dev_queue_xmit+0x416/0x780 [ 61.306415] [ 61.306415] [<c13a87aa>] dev_queue_xmit+0xa/0x10 [ 61.306415] [ 61.306415] [<c13b4837>] neigh_resolve_output+0x147/0x220 [ 61.306415] [ 61.306415] [<c144541b>] ip6_finish_output2+0x2fb/0x910 [ 61.306415] [ 61.306415] [<c14494e6>] ip6_finish_output+0xa6/0x1a0 [ 61.306415] [ 61.306415] [<c1449635>] ip6_output+0x55/0x320 [ 61.306415] [ 61.306415] [<c146f4d2>] mld_sendpack+0x352/0x560 [ 61.306415] [ 61.306415] [<c146fe55>] mld_ifc_timer_expire+0x155/0x280 [ 61.306415] [ 61.306415] [<c108b081>] call_timer_fn+0x81/0x270 [ 61.306415] [ 61.306415] [<c108b331>] expire_timers+0xc1/0x180 [ 61.306415] [ 61.306415] [<c108b4f7>] run_timer_softirq+0x77/0x150 [ 61.306415] [ 61.306415] [<c1043d04>] __do_softirq+0xb4/0x3d0 [ 61.306415] [ 61.306415] [<c101a15c>] do_softirq_own_stack+0x1c/0x30 [ 61.306415] [ 61.306415] [<c104416e>] irq_exit+0x8e/0xa0 [ 61.306415] [ 61.306415] [<c1019d31>] do_IRQ+0x51/0x100 [ 61.306415] [ 61.306415] [<c14bc176>] common_interrupt+0x36/0x40 [ 61.306415] [ 61.306415] [<c1134928>] set_root+0x68/0xf0 [ 61.306415] [ 61.306415] [<c1136120>] path_init+0x400/0x640 [ 61.306415] [ 61.306415] [<c11386bf>] path_lookupat+0xf/0xe0 [ 61.306415] [ 61.306415] [<c1139ebc>] filename_lookup+0x6c/0x100 [ 61.306415] [ 61.306415] [<c1139fd5>] user_path_at_empty+0x25/0x30 [ 61.306415] [ 61.306415] [<c11298c6>] SyS_faccessat+0x86/0x1e0 [ 61.306415] [ 61.306415] [<c1129a30>] SyS_access+0x10/0x20 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] INITIAL USE at: [ 61.306415] [ 61.306415] [<c107586e>] __lock_acquire+0x1fe/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14bb334>] _raw_spin_lock_irqsave+0x24/0x40 [ 61.306415] [ 61.306415] [<d093474e>] r6040_get_stats+0x1e/0x60 [r6040] [ 61.306415] [ 61.306415] [<c139fb16>] dev_get_stats+0x96/0xc0 [ 61.306415] [ 61.306415] [<c14b416e>] rtnl_fill_stats+0x36/0xfd [ 61.306415] [ 61.306415] [<c13b7b3c>] rtnl_fill_ifinfo+0x47c/0xce0 [ 61.306415] [ 61.306415] [<c13bc08e>] rtmsg_ifinfo_build_skb+0x4e/0xd0 [ 61.306415] [ 61.306415] [<c13bc120>] rtmsg_ifinfo.part.20+0x10/0x40 [ 61.306415] [ 61.306415] [<c13bc16b>] rtmsg_ifinfo+0x1b/0x20 [ 61.306415] [ 61.306415] [<c13a9d19>] register_netdevice+0x409/0x550 [ 61.306415] [ 61.306415] [<c13a9e72>] register_netdev+0x12/0x20 [ 61.306415] [ 61.306415] [<d09357e8>] r6040_init_one+0x3e8/0x500 [r6040] [ 61.306415] [ 61.306415] [<c12a78c7>] pci_device_probe+0x77/0xd0 [ 61.306415] [ 61.306415] [<c12f5e15>] driver_probe_device+0x145/0x280 [ 61.306415] [ 61.306415] [<c12f5fd9>] __driver_attach+0x89/0x90 [ 61.306415] [ 61.306415] [<c12f43ef>] bus_for_each_dev+0x4f/0x80 [ 61.306415] [ 61.306415] [<c12f5954>] driver_attach+0x14/0x20 [ 61.306415] [ 61.306415] [<c12f55b7>] bus_add_driver+0x197/0x210 [ 61.306415] [ 61.306415] [<c12f6a21>] driver_register+0x51/0xd0 [ 61.306415] [ 61.306415] [<c12a6955>] __pci_register_driver+0x45/0x50 [ 61.306415] [ 61.306415] [<d0938017>] 0xd0938017 [ 61.306415] [ 61.306415] [<c100043f>] do_one_initcall+0x2f/0x140 [ 61.306415] [ 61.306415] [<c10e48c0>] do_init_module+0x4a/0x19b [ 61.306415] [ 61.306415] [<c10a680e>] load_module+0x1b2e/0x2070 [ 61.306415] [ 61.306415] [<c10a6eb9>] SyS_finit_module+0x69/0x80 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] } [ 61.306415] ... key at: [<d0936280>] __key.45893+0x0/0xfffff739 [r6040] [ 61.306415] ... acquired at: [ 61.306415] [ 61.306415] [<c1074a32>] check_irq_usage+0x42/0xb0 [ 61.306415] [ 61.306415] [<c107677c>] __lock_acquire+0x110c/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14b7add>] mutex_lock_nested+0x2d/0x4a0 [ 61.306415] [ 61.306415] [<c1336276>] phy_stop+0x16/0x80 [ 61.306415] [ 61.306415] [<d0934ce9>] r6040_close+0x89/0x230 [r6040] [ 61.306415] [ 61.306415] [<c13a0a91>] __dev_close_many+0x61/0xa0 [ 61.306415] [ 61.306415] [<c13a0bbf>] __dev_close+0x1f/0x30 [ 61.306415] [ 61.306415] [<c13a9127>] __dev_change_flags+0x87/0x150 [ 61.306415] [ 61.306415] [<c13a9213>] dev_change_flags+0x23/0x60 [ 61.306415] [ 61.306415] [<c1416238>] devinet_ioctl+0x5f8/0x6f0 [ 61.306415] [ 61.306415] [<c1417f75>] inet_ioctl+0x65/0x90 [ 61.306415] [ 61.306415] [<c1389b54>] sock_ioctl+0x124/0x2b0 [ 61.306415] [ 61.306415] [<c113cf7c>] do_vfs_ioctl+0x7c/0x790 [ 61.306415] [ 61.306415] [<c113d6b8>] SyS_ioctl+0x28/0x50 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] [ 61.306415] the dependencies between the lock to be acquired[ 61.306415] and SOFTIRQ-irq-unsafe lock: [ 61.306415] -> (&dev->lock){+.+...} ops: 56 { [ 61.306415] HARDIRQ-ON-W at: [ 61.306415] [ 61.306415] [<c1075be7>] __lock_acquire+0x577/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14b7add>] mutex_lock_nested+0x2d/0x4a0 [ 61.306415] [ 61.306415] [<c133747d>] phy_probe+0x4d/0xc0 [ 61.306415] [ 61.306415] [<c1338afe>] phy_attach_direct+0xbe/0x190 [ 61.306415] [ 61.306415] [<c1338ca7>] phy_connect_direct+0x17/0x60 [ 61.306415] [ 61.306415] [<c1338d23>] phy_connect+0x33/0x70 [ 61.306415] [ 61.306415] [<d09357a0>] r6040_init_one+0x3a0/0x500 [r6040] [ 61.306415] [ 61.306415] [<c12a78c7>] pci_device_probe+0x77/0xd0 [ 61.306415] [ 61.306415] [<c12f5e15>] driver_probe_device+0x145/0x280 [ 61.306415] [ 61.306415] [<c12f5fd9>] __driver_attach+0x89/0x90 [ 61.306415] [ 61.306415] [<c12f43ef>] bus_for_each_dev+0x4f/0x80 [ 61.306415] [ 61.306415] [<c12f5954>] driver_attach+0x14/0x20 [ 61.306415] [ 61.306415] [<c12f55b7>] bus_add_driver+0x197/0x210 [ 61.306415] [ 61.306415] [<c12f6a21>] driver_register+0x51/0xd0 [ 61.306415] [ 61.306415] [<c12a6955>] __pci_register_driver+0x45/0x50 [ 61.306415] [ 61.306415] [<d0938017>] 0xd0938017 [ 61.306415] [ 61.306415] [<c100043f>] do_one_initcall+0x2f/0x140 [ 61.306415] [ 61.306415] [<c10e48c0>] do_init_module+0x4a/0x19b [ 61.306415] [ 61.306415] [<c10a680e>] load_module+0x1b2e/0x2070 [ 61.306415] [ 61.306415] [<c10a6eb9>] SyS_finit_module+0x69/0x80 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] SOFTIRQ-ON-W at: [ 61.306415] [ 61.306415] [<c1075c0c>] __lock_acquire+0x59c/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14b7add>] mutex_lock_nested+0x2d/0x4a0 [ 61.306415] [ 61.306415] [<c133747d>] phy_probe+0x4d/0xc0 [ 61.306415] [ 61.306415] [<c1338afe>] phy_attach_direct+0xbe/0x190 [ 61.306415] [ 61.306415] [<c1338ca7>] phy_connect_direct+0x17/0x60 [ 61.306415] [ 61.306415] [<c1338d23>] phy_connect+0x33/0x70 [ 61.306415] [ 61.306415] [<d09357a0>] r6040_init_one+0x3a0/0x500 [r6040] [ 61.306415] [ 61.306415] [<c12a78c7>] pci_device_probe+0x77/0xd0 [ 61.306415] [ 61.306415] [<c12f5e15>] driver_probe_device+0x145/0x280 [ 61.306415] [ 61.306415] [<c12f5fd9>] __driver_attach+0x89/0x90 [ 61.306415] [ 61.306415] [<c12f43ef>] bus_for_each_dev+0x4f/0x80 [ 61.306415] [ 61.306415] [<c12f5954>] driver_attach+0x14/0x20 [ 61.306415] [ 61.306415] [<c12f55b7>] bus_add_driver+0x197/0x210 [ 61.306415] [ 61.306415] [<c12f6a21>] driver_register+0x51/0xd0 [ 61.306415] [ 61.306415] [<c12a6955>] __pci_register_driver+0x45/0x50 [ 61.306415] [ 61.306415] [<d0938017>] 0xd0938017 [ 61.306415] [ 61.306415] [<c100043f>] do_one_initcall+0x2f/0x140 [ 61.306415] [ 61.306415] [<c10e48c0>] do_init_module+0x4a/0x19b [ 61.306415] [ 61.306415] [<c10a680e>] load_module+0x1b2e/0x2070 [ 61.306415] [ 61.306415] [<c10a6eb9>] SyS_finit_module+0x69/0x80 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] INITIAL USE at: [ 61.306415] [ 61.306415] [<c107586e>] __lock_acquire+0x1fe/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14b7add>] mutex_lock_nested+0x2d/0x4a0 [ 61.306415] [ 61.306415] [<c133747d>] phy_probe+0x4d/0xc0 [ 61.306415] [ 61.306415] [<c1338afe>] phy_attach_direct+0xbe/0x190 [ 61.306415] [ 61.306415] [<c1338ca7>] phy_connect_direct+0x17/0x60 [ 61.306415] [ 61.306415] [<c1338d23>] phy_connect+0x33/0x70 [ 61.306415] [ 61.306415] [<d09357a0>] r6040_init_one+0x3a0/0x500 [r6040] [ 61.306415] [ 61.306415] [<c12a78c7>] pci_device_probe+0x77/0xd0 [ 61.306415] [ 61.306415] [<c12f5e15>] driver_probe_device+0x145/0x280 [ 61.306415] [ 61.306415] [<c12f5fd9>] __driver_attach+0x89/0x90 [ 61.306415] [ 61.306415] [<c12f43ef>] bus_for_each_dev+0x4f/0x80 [ 61.306415] [ 61.306415] [<c12f5954>] driver_attach+0x14/0x20 [ 61.306415] [ 61.306415] [<c12f55b7>] bus_add_driver+0x197/0x210 [ 61.306415] [ 61.306415] [<c12f6a21>] driver_register+0x51/0xd0 [ 61.306415] [ 61.306415] [<c12a6955>] __pci_register_driver+0x45/0x50 [ 61.306415] [ 61.306415] [<d0938017>] 0xd0938017 [ 61.306415] [ 61.306415] [<c100043f>] do_one_initcall+0x2f/0x140 [ 61.306415] [ 61.306415] [<c10e48c0>] do_init_module+0x4a/0x19b [ 61.306415] [ 61.306415] [<c10a680e>] load_module+0x1b2e/0x2070 [ 61.306415] [ 61.306415] [<c10a6eb9>] SyS_finit_module+0x69/0x80 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] } [ 61.306415] ... key at: [<c1f28f39>] __key.43998+0x0/0x8 [ 61.306415] ... acquired at: [ 61.306415] [ 61.306415] [<c1074a32>] check_irq_usage+0x42/0xb0 [ 61.306415] [ 61.306415] [<c107677c>] __lock_acquire+0x110c/0x1770 [ 61.306415] [ 61.306415] [<c107717c>] lock_acquire+0x7c/0x150 [ 61.306415] [ 61.306415] [<c14b7add>] mutex_lock_nested+0x2d/0x4a0 [ 61.306415] [ 61.306415] [<c1336276>] phy_stop+0x16/0x80 [ 61.306415] [ 61.306415] [<d0934ce9>] r6040_close+0x89/0x230 [r6040] [ 61.306415] [ 61.306415] [<c13a0a91>] __dev_close_many+0x61/0xa0 [ 61.306415] [ 61.306415] [<c13a0bbf>] __dev_close+0x1f/0x30 [ 61.306415] [ 61.306415] [<c13a9127>] __dev_change_flags+0x87/0x150 [ 61.306415] [ 61.306415] [<c13a9213>] dev_change_flags+0x23/0x60 [ 61.306415] [ 61.306415] [<c1416238>] devinet_ioctl+0x5f8/0x6f0 [ 61.306415] [ 61.306415] [<c1417f75>] inet_ioctl+0x65/0x90 [ 61.306415] [ 61.306415] [<c1389b54>] sock_ioctl+0x124/0x2b0 [ 61.306415] [ 61.306415] [<c113cf7c>] do_vfs_ioctl+0x7c/0x790 [ 61.306415] [ 61.306415] [<c113d6b8>] SyS_ioctl+0x28/0x50 [ 61.306415] [ 61.306415] [<c100179f>] do_int80_syscall_32+0x3f/0x110 [ 61.306415] [ 61.306415] [<c14bba3f>] restore_all+0x0/0x61 [ 61.306415] [ 61.306415] [ 61.306415] stack backtrace: [ 61.306415] CPU: 0 PID: 449 Comm: ifconfig Not tainted 4.9.0-gb898d2d-manuel #1 [ 61.306415] Call Trace: [ 61.306415] dump_stack+0x16/0x19 [ 61.306415] check_usage+0x3f6/0x550 [ 61.306415] ? check_usage+0x4d/0x550 [ 61.306415] check_irq_usage+0x42/0xb0 [ 61.306415] __lock_acquire+0x110c/0x1770 [ 61.306415] lock_acquire+0x7c/0x150 [ 61.306415] ? phy_stop+0x16/0x80 [ 61.306415] mutex_lock_nested+0x2d/0x4a0 [ 61.306415] ? phy_stop+0x16/0x80 [ 61.306415] ? r6040_close+0x24/0x230 [r6040] [ 61.306415] ? __delay+0x9/0x10 [ 61.306415] phy_stop+0x16/0x80 [ 61.306415] r6040_close+0x89/0x230 [r6040] [ 61.306415] __dev_close_many+0x61/0xa0 [ 61.306415] __dev_close+0x1f/0x30 [ 61.306415] __dev_change_flags+0x87/0x150 [ 61.306415] dev_change_flags+0x23/0x60 [ 61.306415] devinet_ioctl+0x5f8/0x6f0 [ 61.306415] inet_ioctl+0x65/0x90 [ 61.306415] sock_ioctl+0x124/0x2b0 [ 61.306415] ? dlci_ioctl_set+0x30/0x30 [ 61.306415] do_vfs_ioctl+0x7c/0x790 [ 61.306415] ? trace_hardirqs_on+0xb/0x10 [ 61.306415] ? call_rcu_sched+0xd/0x10 [ 61.306415] ? __put_cred+0x32/0x50 [ 61.306415] ? SyS_faccessat+0x178/0x1e0 [ 61.306415] SyS_ioctl+0x28/0x50 [ 61.306415] do_int80_syscall_32+0x3f/0x110 [ 61.306415] entry_INT80_32+0x2f/0x2f [ 61.306415] EIP: 0xb764d364 [ 61.306415] EFLAGS: 00000286 CPU: 0 [ 61.306415] EAX: ffffffda EBX: 00000004 ECX: 00008914 EDX: bfa99d7c [ 61.306415] ESI: bfa99e4c EDI: fffffffe EBP: 00000004 ESP: bfa99d58 [ 61.306415] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b [ 63.836607] r6040 0000:00:08.0 eth0: Link is Down Signed-off-by: Manuel Bessler <manuel.bessler@sensus.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: sfc: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Tested-by: Bert Kenward <bkenward@solarflare.com> Acked-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: davicom: dm9000: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: cirrus: ep93xx: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: chelsio: cxgb3: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: chelsio: cxgb2: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17bna: use designated initializersKees Cook
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17dpaa_eth: remove redundant dependency on FSL_SOCMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17dpaa_eth: use big endian accessorsClaudiu Manoil
Ensure correct access to the big endian QMan HW through proper accessors. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: macb: Added PCI wrapper for Platform Driver.Bartosz Folta
There are hardware PCI implementations of Cadence GEM network controller. This patch will allow to use such hardware with reuse of existing Platform Driver. Signed-off-by: Bartosz Folta <bfolta@cadence.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17ibmveth: calculate gso_segs for large packetsThomas Falcon
Include calculations to compute the number of segments that comprise an aggregated large packet. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Reviewed-by: Jonathan Maxwell <jmaxwell37@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-17net: qcom/emac: don't try to claim clocks on ACPI systemsTimur Tabi
On ACPI systems, clocks are not available to drivers directly. They are handled exclusively by ACPI and/or firmware, so there is no clock driver. Calls to clk_get() always fail, so we should not even attempt to claim any clocks on ACPI systems. Signed-off-by: Timur Tabi <timur@codeaurora.org> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-16encx24j600: Fix some checkstyle warningsJeroen De Wachter
Signed-off-by: Jeroen De Wachter <jeroen.de_wachter.ext@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-16encx24j600: bugfix - always move ERXTAIL to next packet in encx24j600_rx_packetsJeroen De Wachter
Before, encx24j600_rx_packets did not update encx24j600_priv's next_packet member when an error occurred during packet handling (either because the packet's RSV header indicates an error or because the encx24j600_receive_packet method can't allocate an sk_buff). If the next_packet member is not updated, the ERXTAIL register will be set to the same value it had before, which means the bad packet remains in the component's memory and its RSV header will be read again when a new packet arrives. If the RSV header indicates a bad packet or if sk_buff allocation continues to fail, new packets will be stored in the component's memory until that memory is full, after which packets will be dropped. The SETPKTDEC command is always executed though, so the encx24j600 hardware has an incorrect count of the packets in its memory. To prevent this, the next_packet member should always be updated, allowing the packet to be skipped (either because it's bad, as indicated in its RSV header, or because allocating an sk_buff failed). In the allocation failure case, this does mean dropping a valid packet, but dropping the oldest packet to keep as much memory as possible available for new packets seems preferable to keeping old (but valid) packets around while dropping new ones. Signed-off-by: Jeroen De Wachter <jeroen.de_wachter.ext@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-16net: ethernet: hip04: Call SET_NETDEV_DEV()Dongpo Li
The hip04 driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function. Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner") Signed-off-by: Dongpo Li <lidongpo@hisilicon.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-16net: ethernet: hisi_femac: Call SET_NETDEV_DEV()Dongpo Li
The hisi_femac driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function. Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner") Signed-off-by: Dongpo Li <lidongpo@hisilicon.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-16net/3com/3c515: Fix timer handling, prevent leaks and crashesThomas Gleixner
The timer handling in this driver is broken in several ways: - corkscrew_open() initializes and arms a timer before requesting the device interrupt. If the request fails the timer stays armed. A second call to corkscrew_open will unconditionally reinitialize the quued timer and arm it again. Also a immediate device removal will leave the timer queued because close() is not called (open() failed) and therefore nothing issues del_timer(). The reinitialization corrupts the link chain in the timer wheel hash bucket and causes a NULL pointer dereference when the timer wheel tries to operate on that hash bucket. Immediate device removal lets the link chain poke into freed and possibly reused memory. Solution: Arm the timer after the successful irq request. - corkscrew_close() uses del_timer() On close the timer is disarmed with del_timer() which lets the following code race against a concurrent timer expiry function. Solution: Use del_timer_sync() instead - corkscrew_close() calls del_timer() unconditionally del_timer() is invoked even if the timer was never initialized. This works by chance because the struct containing the timer is zeroed at allocation time. Solution: Move the setup of the timer into corkscrew_setup(). Reported-by: Matthew Whitehead <tedheadster@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Andy Lutomirski <luto@kernel.org> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-15Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds
Pull virtio updates from Michael Tsirkin: "virtio, vhost: new device, fixes, speedups This includes the new virtio crypto device, and fixes all over the place. In particular enabling endian-ness checks for sparse builds found some bugs which this fixes. And it appears that everyone is in agreement that disabling endian-ness sparse checks shouldn't be necessary any longer. So this enables them for everyone, and drops the __CHECK_ENDIAN__ and __bitwise__ APIs. IRQ handling in virtio has been refactored somewhat, the larger switch to IRQ_SHARED will have to wait as it proved too aggressive" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (34 commits) Makefile: drop -D__CHECK_ENDIAN__ from cflags fs/logfs: drop __CHECK_ENDIAN__ Documentation/sparse: drop __CHECK_ENDIAN__ linux: drop __bitwise__ everywhere checkpatch: replace __bitwise__ with __bitwise Documentation/sparse: drop __bitwise__ tools: enable endian checks for all sparse builds linux/types.h: enable endian checks for all sparse builds virtio_mmio: Set dev.release() to avoid warning vhost: remove unused feature bit virtio_ring: fix description of virtqueue_get_buf vhost/scsi: Remove unused but set variable tools/virtio: use {READ,WRITE}_ONCE() in uaccess.h vringh: kill off ACCESS_ONCE() tools/virtio: fix READ_ONCE() crypto: add virtio-crypto driver vhost: cache used event for better performance vsock: lookup and setup guest_cid inside vhost_vsock_lock virtio_pci: split vp_try_to_find_vqs into INTx and MSI-X variants virtio_pci: merge vp_free_vectors into vp_del_vqs ...
2016-12-16Makefile: drop -D__CHECK_ENDIAN__ from cflagsMichael S. Tsirkin
That's the default now, no need for makefiles to set it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Kalle Valo <kvalo@codeaurora.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
2016-12-16linux: drop __bitwise__ everywhereMichael S. Tsirkin
__bitwise__ used to mean "yes, please enable sparse checks unconditionally", but now that we dropped __CHECK_ENDIAN__ __bitwise is exactly the same. There aren't many users, replace it by __bitwise everywhere. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Stefan Schmidt <stefan@osg.samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Akced-by: Lee Duncan <lduncan@suse.com>
2016-12-15Merge tag 'pci-v4.10-changes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "PCI changes: - add support for PCI on ARM64 boxes with ACPI. We already had this for theoretical spec-compliant hardware; now we're adding quirks for the actual hardware (Cavium, HiSilicon, Qualcomm, X-Gene) - add runtime PM support for hotplug ports - enable runtime suspend for Intel UHCI that uses platform-specific wakeup signaling - add yet another host bridge registration interface. We hope this is extensible enough to subsume the others - expose device revision in sysfs for DRM - to avoid device conflicts, make sure any VF BAR updates are done before enabling the VF - avoid unnecessary link retrains for ASPM - allow INTx masking on Mellanox devices that support it - allow access to non-standard VPD for Chelsio devices - update Broadcom iProc support for PAXB v2, PAXC v2, inbound DMA, etc - update Rockchip support for max-link-speed - add NVIDIA Tegra210 support - add Layerscape LS1046a support - update R-Car compatibility strings - add Qualcomm MSM8996 support - remove some uninformative bootup messages" * tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (115 commits) PCI: Enable access to non-standard VPD for Chelsio devices (cxgb3) PCI: Expand "VPD access disabled" quirk message PCI: pciehp: Remove loading message PCI: hotplug: Remove hotplug core message PCI: Remove service driver load/unload messages PCI/AER: Log AER IRQ when claiming Root Port PCI/AER: Log errors with PCI device, not PCIe service device PCI/AER: Remove unused version macros PCI/PME: Log PME IRQ when claiming Root Port PCI/PME: Drop unused support for PMEs from Root Complex Event Collectors PCI: Move config space size macros to pci_regs.h x86/platform/intel-mid: Constify mid_pci_platform_pm PCI/ASPM: Don't retrain link if ASPM not possible PCI: iproc: Skip check for legacy IRQ on PAXC buses PCI: pciehp: Leave power indicator on when enabling already-enabled slot PCI: pciehp: Prioritize data-link event over presence detect PCI: rcar: Add gen3 fallback compatibility string for pcie-rcar PCI: rcar: Use gen2 fallback compatibility last PCI: rcar-gen2: Use gen2 fallback compatibility last PCI: rockchip: Move the deassert of pm/aclk/pclk after phy_init() ..
2016-12-15Merge tag 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "This is the complete update for the rdma stack for this release cycle. Most of it is typical driver and core updates, but there is the entirely new VMWare pvrdma driver. You may have noticed that there were changes in DaveM's pull request to the bnxt Ethernet driver to support a RoCE RDMA driver. The bnxt_re driver was tentatively set to be pulled in this release cycle, but it simply wasn't ready in time and was dropped (a few review comments still to address, and some multi-arch build issues like prefetch() not working across all arches). Summary: - shared mlx5 updates with net stack (will drop out on merge if Dave's tree has already been merged) - driver updates: cxgb4, hfi1, hns-roce, i40iw, mlx4, mlx5, qedr, rxe - debug cleanups - new connection rejection helpers - SRP updates - various misc fixes - new paravirt driver from vmware" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (210 commits) IB: Add vmw_pvrdma driver IB/mlx4: fix improper return value IB/ocrdma: fix bad initialization infiniband: nes: return value of skb_linearize should be handled MAINTAINERS: Update Intel RDMA RNIC driver maintainers MAINTAINERS: Remove Mitesh Ahuja from emulex maintainers IB/core: fix unmap_sg argument qede: fix general protection fault may occur on probe IB/mthca: Replace pci_pool_alloc by pci_pool_zalloc mlx5, calc_sq_size(): Make a debug message more informative mlx5: Remove a set-but-not-used variable mlx5: Use { } instead of { 0 } to init struct IB/srp: Make writing the add_target sysfs attr interruptible IB/srp: Make mapping failures easier to debug IB/srp: Make login failures easier to debug IB/srp: Introduce a local variable in srp_add_one() IB/srp: Fix CONFIG_DYNAMIC_DEBUG=n build IB/multicast: Check ib_find_pkey() return value IPoIB: Avoid reading an uninitialized member variable IB/mad: Fix an array index check ...
2016-12-14Merge branch 'akpm' (patches from Andrew)Linus Torvalds
Merge more updates from Andrew Morton: - a few misc things - kexec updates - DMA-mapping updates to better support networking DMA operations - IPC updates - various MM changes to improve DAX fault handling - lots of radix-tree changes, mainly to the test suite. All leading up to reimplementing the IDA/IDR code to be a wrapper layer over the radix-tree. However the final trigger-pulling patch is held off for 4.11. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (114 commits) radix tree test suite: delete unused rcupdate.c radix tree test suite: add new tag check radix-tree: ensure counts are initialised radix tree test suite: cache recently freed objects radix tree test suite: add some more functionality idr: reduce the number of bits per level from 8 to 6 rxrpc: abstract away knowledge of IDR internals tpm: use idr_find(), not idr_find_slowpath() idr: add ida_is_empty radix tree test suite: check multiorder iteration radix-tree: fix replacement for multiorder entries radix-tree: add radix_tree_split_preload() radix-tree: add radix_tree_split radix-tree: add radix_tree_join radix-tree: delete radix_tree_range_tag_if_tagged() radix-tree: delete radix_tree_locate_item() radix-tree: improve multiorder iterators btrfs: fix race in btrfs_free_dummy_fs_info() radix-tree: improve dump output radix-tree: make radix_tree_find_next_bit more useful ...
2016-12-14igb: update code to better handle incrementing page countAlexander Duyck
Update the driver code so that we do bulk updates of the page reference count instead of just incrementing it by one reference at a time. The advantage to doing this is that we cut down on atomic operations and this in turn should give us a slight improvement in cycles per packet. In addition if we eventually move this over to using build_skb the gains will be more noticeable. Link: http://lkml.kernel.org/r/20161110113616.76501.17072.stgit@ahduyck-blue-test.jf.intel.com Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> Cc: Helge Deller <deller@gmx.de> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: Keguang Zhang <keguang.zhang@gmail.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rich Felker <dalias@libc.org> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Russell King <linux@armlinux.org.uk> Cc: Steven Miao <realmz6@gmail.com> Cc: Tobias Klauser <tklauser@distanz.ch> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-14igb: update driver to make use of DMA_ATTR_SKIP_CPU_SYNCAlexander Duyck
The ARM architecture provides a mechanism for deferring cache line invalidation in the case of map/unmap. This patch makes use of this mechanism to avoid unnecessary synchronization. A secondary effect of this change is that the portion of the page that has been synchronized for use by the CPU should be writable and could be passed up the stack (at least on ARM). The last bit that occurred to me is that on architectures where the sync_for_cpu call invalidates cache lines we were prefetching and then invalidating the first 128 bytes of the packet. To avoid that I have moved the sync up to before we perform the prefetch and allocate the skbuff so that we can actually make use of it. Link: http://lkml.kernel.org/r/20161110113611.76501.98897.stgit@ahduyck-blue-test.jf.intel.com Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> Cc: Helge Deller <deller@gmx.de> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: Keguang Zhang <keguang.zhang@gmail.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rich Felker <dalias@libc.org> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Russell King <linux@armlinux.org.uk> Cc: Steven Miao <realmz6@gmail.com> Cc: Tobias Klauser <tklauser@distanz.ch> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>