Commit graph

53298 commits

Author SHA1 Message Date
David Ahern 5684044f80 e1000e: Add pm_qos header
Commit e2c6544829 moved pm_qos_req to e1000_adapter. Add the header file
that defines the struct.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-12 23:22:03 -04:00
Niklas Cassel bced870152 net: phy: micrel: Fix regression in kszphy_probe
Don't do clock-mode-select if clk == NULL,
since when building without CONFIG_HAVE_CLK,
clk_get returns NULL and clk_get_rate returns 0.

Doing clock-mode-select in this cause causes kszphy_probe to
return -EINVAL and thus prevents the device from being probed.

The original code (before regression) would return 0
when building without CONFIG_HAVE_CLK.

Cc: stable <stable@vger.kernel.org> # 3.18+
Fixes: 1fadee0c36 ("net/phy: micrel: Add clock support for
KSZ8021/KSZ8031")
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Niklas Cassel <niklass@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-12 23:18:40 -04:00
Michal Simek 44d4f8d74e net: ll_temac: Fix DMA map size bug
DMA allocates skb->len instead of headlen
which is used for DMA.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-12 23:17:42 -04:00
Felix Fietkau 665a6cd809 pppoe: drop pppoe device in pppoe_unbind_sock_work
After receiving a PADT and the socket is closed, user space will no
longer drop the reference to the pppoe device.
This leads to errors like this:

[  488.570000] unregister_netdevice: waiting for eth0.2 to become free. Usage count = 2

Fixes: 287f3a943f ("pppoe: Use workqueue to die properly when a PADT is received")
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-11 12:58:22 -04:00
Stefan Wahren 268be0f7a7 net: qca_spi: Fix possible race during probe
Registering the netdev before setting the priv data is unsafe.
So fix this possible race by setting the priv data first.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Cc: <stable@vger.kernel.org> # v3.18+
Fixes: 291ab06e (net: qualcomm: new Ethernet over SPI driver for QCA7000)
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-11 11:01:20 -04:00
Bert Vermeulen 7c0c826828 net: mdio-gpio: Allow for unspecified bus id
When the bus id was supplied via a struct platform_device, the driver wasn't
handling -1 to mean an unspecified id of the only instance of this driver,
as the platform spec requires.

Signed-off-by: Bert Vermeulen <bert@biot.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-10 19:42:11 -04:00
Michal Schmidt cd9c399777 bnx2x: limit fw delay in kdump to 5s after boot
Commit 12a8541d5c "bnx2x: Delay during kdump load" added a 5 seconds
delay to bnx2x's probe function in the kdump case to let the firmware
realize the old driver is gone.

The problem with the delay is that it is per-device, so if you have
several bnx2x NICs in NPAR mode, the delays can accumulate to minutes.

Fix it by adjusting the delay so that we do not wait more than
necessary, i.e. no more delaying after 5 seconds of kernel boot time.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-10 19:23:22 -04:00
David S. Miller 7c0004d396 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue
Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-05-07

This series contains updates to igb only.

Toshiaki provides two fixes for igb, first fixes an issue when changing
the number of rings by ethtool which causes oops because of uninitialized
pointers.  The second fix resolves a typo where tx_ring was used instead
of the desired rx_ring.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 22:23:59 -04:00
Jason A. Donenfeld 3e4336a65a usbnet: avoid integer overflow in start_xmit
transfer_buffer_length is of type u32. It's therefore wrong to assign it
to a signed integer. This patch avoids the overflow.

It's worth noting that entry->length here is a long; perhaps it would be
beneficial at somepoint to change this to be unsigned as well, if
nothing else relies on its signedness for error conditions or the like.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:46:18 -04:00
Tony Camuso 240b23c426 netxen_nic: use spin_[un]lock_bh around tx_clean_lock (2)
This patch should have been part of the previous patch having the
same summary. See  http://marc.info/?l=linux-kernel&m=143039470103795&w=2
Unfortunately, I didn't check to see where else this lock was used before
submitting that patch. This should take care of it for netxen_nic, as I
did a thorough search this time.

To recap from the original patch; although testing this driver with
DEBUG_LOCKDEP and DEBUG_SPINLOCK enabled did not produce any traces,
it would be more prudent in the case of tx_clean_lock to use _bh
versions of spin_[un]lock, since this lock is manipulated in both
the process and softirq contexts.

This patch was tested for functionality and regressions with netperf
and DEBUG_LOCKDEP and DEBUG_SPINLOCK enabled.

Signed-off-by: Tony Camuso <tcamuso@redhat.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Acked-By: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:44:46 -04:00
Jean Delvare ccad725ccb net: xgene_enet: Set hardware dependency
The xgene_enet driver is only useful on X-Gene SoC.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Iyappan Subramanian <isubramanian@apm.com>
Cc: Keyur Chudgar <kchudgar@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:24:15 -04:00
Jean Delvare 74a78b15e6 net: amd-xgbe: Add hardware dependency
The amd-xgbe driver currently only works with the Seattle SoC, which
is ARM64 architecture, so there is no point in building this driver on
other architectures except for build testing purpose. The dependency
list can be updated later if the driver ever supports other
architectures.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:24:15 -04:00
Vasily Titskiy 1006da19ea drivers/net/usb: Add support for 'Lenovo OneLink Pro Dock'
This device is sold as 'Lenovo OneLink Pro Dock'.
Chipset is RTL8153 and works with r8152.

Signed-off-by: Vasily Titskiy <qehgt0@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:10:08 -04:00
Nathan Sullivan bfbb92c446 net: macb: Handle the RXUBR interrupt on all devices
The same hardware issue the at91 must work around applies to at least the
Zynq ethernet, and possibly more devices.  The driver also needs to handle
the RXUBR interrupt since it turns it on with MACB_RX_INT_FLAGS anyway.

Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:04:43 -04:00
Toshiaki Makita 2439fc4d71 igb: Fix NULL assignment to incorrect variable in igb_reset_q_vector
adapter->tx_ring is set to NULL where rx_ring should be.

Fixes: 5536d2102a ("igb: Combine q_vector and ring allocation into a single function")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-07 05:11:29 -07:00
Toshiaki Makita c0a06ee185 igb: Fix oops on changing number of rings
When changing the number of rings by ethtool -L, q_vectors are reused,
which causes oops because of uninitialized pointers.

- When an rx is reused as a tx, q_vector->rx.ring is not set to NULL, which
  misleads igb_poll() to determine that it has an rx ring although it
  actually points to the tx ring.
- When a tx is reused as an rx, q_vector->rx.ring->skb
  (q_vector->ring[0].skb) has a value that was used as tx_stats before.

Fix these problems by zeroing it out on reuseing it.

Fixes: 02ef6e1d0b ("igb: Fix queue allocation method to accommodate changing during runtime")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-05-07 05:08:32 -07:00
David S. Miller 53ee1033ac iwlwifi:
* fix firmware API for -13.ucode
 * fix RSSI handling that avoid bad roaming decision
 * fix firmware debug
 * fix MFUART operation
 * fix ASSERT while restart the hardware (because of another ASSERT e.g)
 
 ath9k:
 
 * fix per-packet tx power configuration
 
 rtlwifi:
 
 * rtl8192cu: Fix kernel deadlock
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJVSPPDAAoJEG4XJFUm622bt7YIAI3OJuvLd/5uY0MddqKKJg8f
 G4LiNVFv6giD5KmH7vi0U3mic4iHGyUGOnC/7rmE31ZXxVWfFKRvALU8pR1wm8H3
 yMaEr1DabGIiGtJvHr9GDBCO4ALN3pAigzwCfV4L/NHKq0zui8Liz5fY33KhO7+p
 qnALX1stCXpy7aPSelysJqBWwc+JgipnKkkZbR3efrpWTNLMR69vsXXX/Kyj903x
 otYRbL9dRuOWrTvauyyTEbZ//Os1c78YG/nq7cT5COI/OP0Ao3W6p3QiHCz0Y3RE
 o4ACEHqxxziAY13bokyYEdlPjdl/xXORc5hi7qPAEsZbMW+7rtmZk6YIwUMFrxI=
 =H7p4
 -----END PGP SIGNATURE-----

Merge tag 'wireless-drivers-for-davem-2015-05-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers

Kalle Valo says:

====================
iwlwifi:

* fix firmware API for -13.ucode
* fix RSSI handling that avoid bad roaming decision
* fix firmware debug
* fix MFUART operation
* fix ASSERT while restart the hardware (because of another ASSERT e.g)

ath9k:

* fix per-packet tx power configuration

rtlwifi:

* rtl8192cu: Fix kernel deadlock
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-05 19:41:33 -04:00
Yishai Hadas 2d3c739739 net/mlx4_core: Work properly with EQ numbers > 256 in SRIOV
The Firmware uses dynamic EQs allocation based on number of VFs and
max EQs that can be allocated. As a result, VF can have EQ numbers
that are larger than 256.

According to the firmware spec, the max value is limited to be 1024
(10 bits), adapt the relevant code accordingly. This bug was impossible
to hit prior to commit 7ae0e400cd ("net/mlx4_core: Flexible (asymmetric)
allocation of EQs and MSI-X vectors for PF/VFs") which actually enables
large number of EQs for VFs.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-05 19:39:12 -04:00
Eran Ben Elisha cae0633872 net/mlx4_en: Fix off-by-one in counters manipulation
This caused the en_stats_adder helper to accumulate a field which is
not related to the counter, fix that.

Fixes: a3333b35da ('net/mlx4_en: Moderate ethtool callback to show [..]')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-05 19:39:12 -04:00
Jerry Snitselaar 7aab5159fa hv_netvsc: remove unused variable in netvsc_send()
With commit b56fc3c536 ("hv_netvsc: Fix a bug in netvsc_start_xmit()"),
skb variable is no longer used in netvsc_send. Remove variable and dead
code that depended on it.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-05 17:31:09 -04:00
Yuval Mintz 0650c0b8d9 bnx2x: Fix to prevent inner-reload
Submit 909d9faae2 ("bnx2x: Prevent inner-reload while VFs exist")
contained a bug - MTU change was not prevented by it; Instead, it
`randomally' prevented bnx2x_resume() from running [harmless yet wrong].

This moves the check to its correct spot.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 15:54:46 -04:00
David S. Miller 73e84313ee Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says:

====================
pull request: bluetooth-next 2015-05-04

Here's the first bluetooth-next pull request for 4.2:

 - Various fixes for at86rf230 driver
 - ieee802154: trace events support for rdev->ops
 - HCI UART driver refactoring
 - New Realtek IDs added to btusb driver
 - Off-by-one fix for rtl8723b in btusb driver
 - Refactoring of btbcm driver for both UART & USB use

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 15:36:07 -04:00
David S. Miller a2d4fcb804 Revert "Revert "smc91x: retrieve IRQ and trigger flags in a modern way""
This reverts commit 8d7d9cca43.

Now that the necessary infrastructure is really all there
in the tree, we can put this change back in.

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 15:12:33 -04:00
Kamlakant Patel 965b2aa78f net/smsc911x: fix irq resource allocation failure
When smsc911x uses GPIO as the interrupt controller, and if both are
loaded as modules, we get following error:

"smsc911x: Could not allocate irq resource"

This issue is because of smsc911x using platform_get_resource to get
device tree based irq resource.

commit "9ec36ca (of/irq: do irq resolution in platform_get_irq)" and
commit "7085a7 (drivers: platform: parse IRQ flags from resources)" add
support in platform_get_irq to resolve irq and irq_flags respectively
for both modern device tree and legacy static platform data platforms.

Modify smsc911x driver to use platform_get_irq to pick up irq resource
correctly and use irq_get_trigger_type to get the IRQ trigger flags.

Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 15:10:41 -04:00
Vlad Yasevich efdbd2b30c macvlan: Propagate promiscuity setting to lower devices.
When a macvlan device is placed in promiscuous mode, it currently
just sets it's multicast mask to permissive, but doesn't change
the state of the lower device.  As a result, not all multicast
traffic can be received on such device.  Additionally, none of
a vlan traffic can be received on such device as well.
This patch propagates the promiscuous mode setting to lower device
so that lower device may receive all packets that macvlan may
be interested in.

Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 00:14:13 -04:00
Alexander Duyck e7fcd5439f ixgbevf: Use dev_kfree_skb_any in xmit path, not dev_kfree_skb
With netpoll making use of the transmit function it is possible for the
ndo_start_xmit function to be called with irqs disabled.  As such we need
to use dev_kfree_skb_any in the Tx cleanup path for frames that are
dropped.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 00:06:55 -04:00
Alexander Duyck eb78139790 r8169: Do not use dev_kfree_skb in xmit path
The function r8169_csum_workaround is called in the ndo_start_xmit path of
the r8169 driver.  As such it should not be using dev_kfree_skb as it is
not irq safe, so instead we should be using dev_kfree_skb_any for freeing
in the dropped path, and dev_consume_skb_any for any frames that were
transmitted.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 00:06:55 -04:00
Alexander Duyck 59486329b4 fm10k: Do not assume budget will never be 0 for NAPI
The netpoll path will call napi->poll with a budget of 0 in order to clean
the Tx rings only.  This change updates the fm10k driver so that it will
correctly support that instead of cleaning 1 Rx frame if a budget of 0 is
received.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 00:06:55 -04:00
Vivien Didelot 4212b54331 net: dsa: mv88e6xxx: unregister mv88e6352 driver
Add the missing unregister for the mv88e6352_switch_driver.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-04 00:04:43 -04:00
David S. Miller 4f6d25deed linux-can-fixes-for-4.1-20150501
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJVQzgtAAoJECte4hHFiupUBqUP/2BjhI5u3phIprv4+TZhejUe
 oLJbHj94pRjopN+8Zdd9mRoS5dy+NE2tev97AnHGEbUPX+1NTa2T+zjRgRMd8gc2
 OKYZjMiLBxQFkBsak7Nb+bw5u75U1hxrB5pJjVFMIcDcoE/649IA0w5ntkUyJuAG
 jwuY5SIPw8OziP5+cYJTpSlgWUWJeYk1tgXRw/B+AT6342gH1K3qh6HCeBNoRusG
 WQcCZo1jPhJ5G2ecU00Lzq6xG+7ui/bqV4Rs+K853zp1FVh7n4b5ZB5MDWf7+yAZ
 BKJWSBWC91zQdHSacVZvoUWGt650neXi3VH0kiCv5xdouBoKuTvhKfbYzhJmnGv3
 BxMIMpYMY+gXkXZKd4tZoC17yd+NNHddxU67wAm7Hi+sW2HgKvV0qrnMqbw8tQux
 2+4xNfB3Ef7YcHrjoksG6HIh91xbQgCOCM8SCWTlLpDktKj0Qr+N8CF7GIspjmZu
 J1yaeAMrDEbywagFva6/OuGvFKgZCNZsmS4fBSUC7nLTsschr2SUgqaZPYw4Hvcm
 CPxPg0139bjb0L+G+3zk7pbbd5FQKKUCMVJCVn2C0bMkiWCfLvbTmZ/m6XIvqr1R
 BJRgm4jYcpv+OSwzB4K4VKdMHCA6ohhd1EYHgGYGt45sGsSxVKKn1QltlCDbZ3CS
 eTIuyGmzRz7M+o+PRCWM
 =EtJM
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-fixes-for-4.1-20150501' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
this is a pull request of a single patch for net/master.

The patch is contributed by Jeppe Ledet-Pedersen, it fixes the
extended frame handling in the xilinx driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-03 23:45:09 -04:00
Paul Gortmaker f0e9fc503a drivers/net: include <module.h> for modular stmmac_platform code
This file is built off of a tristate Kconfig option and also contains
modular function calls so it should explicitly include module.h to
avoid compile breakage during header shuffles done in the future.

Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-03 23:40:09 -04:00
Lorenzo Bianconi f673821864 ath9k: fix per-packet tx power configuration
Do not use ieee80211_vif pointer in ath_get_rate_txpower() since it has been
overwritten by setup_frame_info() and it will result in a corrupted tx power
configuration. Set per-packet tx power in setup_frame_info() according to
current vif tx power.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-05-03 23:54:38 +03:00
Kalle Valo 0581276deb * fix firmware API for -13.ucode
* fix RSSI handling that avoid bad roaming decision
 * fix firmware debug
 * fix MFUART operation
 * fix ASSERT while restart the hardware (because of another ASSERT e.g)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVP3o8AAoJEC0Llv5uNjIBU3UP/1/0ER5a4CIZ8K6MlrRrTl96
 fyXy8KsYVs7qkk7pq30DS9w5ot/hdisNgpAtjig2pVRxQYelo2BL4jO0zOhAMBAO
 Aa8Yq26TsZlUKKluQd9eXQdmxOQ/fqWITHM+8ce9zwD+zum6GMr8cyeyVwEGD/Kx
 9a9DvnGY2JJqSS999gqmlcCnciX1WwmBm9A0mlWphf/U8SJYp79tbVWxNMs8rDp7
 xcjUzHi1b9Rc+nA1QmwZL1MDtNHFA+LN6f+5R4/CIWw8f6/aktgzFtAmqVfelxtl
 /yM4yAyo5cnDEmfd0ae/9VMsB4ZUdzHrePvtlSZ7hC1etTr1QIAFr5FSB6BMhK+a
 4GK04wiGa+hcWhrN6D8wtgS3xxNw1RTW+bUxrYFoticdSG5sdglCt7Lo691N+68e
 rsTbJGxzIhqpJV/NoKc7MPxhv3ToQgdSXTCXJ2fkMMqlHHlnz7d2BF8SvJyGMWoD
 Y91qKR9ZZg5XBcUOBzfANjqcQMXOeofl0Spf+rkI3Yw39E0XaKl4xHIqS2AkjmfZ
 UnPtklxyRFVkc5m6Wqn6Er6iZONHgfJB0tWQMEEaH0FTZgoVU8C6T56SaVLPdRQZ
 eIf+i63YJ896D5988zHJJSx+jZnrq+Ki2HbMIDB3eh059OthfPzBnG0nuRWcHM/9
 8dR9gSvkDC5txABONFC/
 =0tG5
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-for-kalle-2015-04-28' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

* fix firmware API for -13.ucode
* fix RSSI handling that avoid bad roaming decision
* fix firmware debug
* fix MFUART operation
* fix ASSERT while restart the hardware (because of another ASSERT e.g)
2015-05-03 23:53:02 +03:00
Jeppe Ledet-Pedersen 5793affe8c net: can: xilinx_can: fix extended frame handling
Using IDR_SRR in RXFIFO_ID to test for the presence of data is only
valid for standard frames. For extended frames the bit is always 1 and
IDR_RTR should be used instead. This patch switches the check to use
CAN_RTR_FLAG which is correctly set when reading the ID.

The patch also changes the DW1/DW2 to be read unconditionally, since
this is necessary to remove the frame from the RXFIFO.

Signed-off-by: Jeppe Ledet-Pedersen <jlp@gomspace.com>
Acked-by: Kedareswara rao Appana <appanad@xilinx.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-01 10:11:46 +02:00
Markus Pargmann e813bb2b95 net: fec: Fix RGMII-ID mode
RGMII-ID uses an internal delay within the transmitter or receiver. This
feature is phy specific. The rest of the communication is normal RGMII.

So the fec driver has to check for all RGMII modes, not only
'PHY_INTERFACE_MODE_RGMII'.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-30 16:48:53 -04:00
Ido Shamay 07841f9d94 net/mlx4_en: Schedule napi when RX buffers allocation fails
When system is out of memory, refilling of RX buffers fails while
the driver continue to pass the received packets to the kernel stack.
At some point, when all RX buffers deplete, driver may fall into a
sleep, and not recover when memory for new RX buffers is once again
availible. This is because hardware does not have valid descriptors,
so no interrupt will be generated for the driver to return to work
in napi context. Fix it by schedule the napi poll function from
stats_task delayed workqueue, as long as the allocations fail.

Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-30 16:47:50 -04:00
Tony Camuso c232d8a8bb netxen_nic: use spin_[un]lock_bh around tx_clean_lock
While testing this driver with DEBUG_LOCKDEP and DEBUG_SPINLOCK
enabled did not produce any traces, it would be more prudent in the
case of tx_clean_lock to use spin_[un]lock_bh, since this lock is
manipulated in both the process and softirq contexts.

This patch was tested for functionality and regressions with netperf
and DEBUG_LOCKDEP and DEBUG_SPINLOCK enabled.

Signed-off-by: Tony Camuso <tcamuso@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-30 16:37:29 -04:00
David Ahern 17d5ceb6e4 net/mlx4_core: Fix unaligned accesses
Addresses the following kernel logs seen during boot:

Kernel unaligned access at TPC[100ee150] mlx4_QUERY_HCA+0x80/0x248 [mlx4_core]
Kernel unaligned access at TPC[100f071c] mlx4_QUERY_ADAPTER+0x100/0x12c [mlx4_core]
Kernel unaligned access at TPC[100f071c] mlx4_QUERY_ADAPTER+0x100/0x12c [mlx4_core]
Kernel unaligned access at TPC[100f071c] mlx4_QUERY_ADAPTER+0x100/0x12c [mlx4_core]
Kernel unaligned access at TPC[100f071c] mlx4_QUERY_ADAPTER+0x100/0x12c [mlx4_core]

Signed-off-by: David Ahern <david.ahern@oracle.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-30 16:26:30 -04:00
Benjamin Poirier f94813f3c1 mlx4_en: Use correct loop cursor in error path.
Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Fixes: 9e311e7 ("net/mlx4_en: Use affinity hint")
Acked-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-30 16:25:14 -04:00
Alexander Aring d2c8bf51d0 at86rf230: add slp_tr support to start tx
This patch adds support for one of the slp_tr gpio use cases which
indicates the TX_START command without doing some spi bus traffic.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-04-30 18:48:11 +02:00
Alexander Aring 8500920317 at86rf230: change state change if from trx_off
If a transmit ends in a calibration which means the transceiver do a
TRX_OFF state change, we can directly change into TX_ARET state instead
doing a TX_ON to TX_ARET statechange.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-04-30 18:48:11 +02:00
Alexander Aring 2f8cdd9509 at86rf230: remove unnecessary tx state change
All supported transceivers can do a valid state change from TRX_OFF to
AACK_ON. This patch removes the state change chain from TRX_OFF ->
TX_ON -> AACK_ON instead we doing a directly state change from TRX_OFF
to AACK_ON.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-04-30 18:48:10 +02:00
Alexander Aring 3b951ca7d2 at86rf230: add TX_ARET_ON for calibration timeout
This patch adds a calibration timeout reset when change from TRX_OFF to
TX_ARET_ON which also occurs a calibration.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-04-30 18:48:10 +02:00
Alexander Aring 2ad33244db at86rf230: move cal_timeout to state change
This patch moves the calculation timeout of TRX_OFF to RX_AACK_ON
handling to the async state change functionality. With this patch we can
do a reset of calculation timeout when others TRX_OFF to RX_AACK_ON
happens instead of doing this on interface up only.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-04-30 18:48:10 +02:00
Alexander Aring 5e8e01e262 at86rf230: remove tabs after define
This patch cleanups the at86rf230 driver to use a space instead a tab
after define.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-04-30 18:48:10 +02:00
Christoffer Holmstedt 4748e86ecf at86rf230: Add macro for TRX STATE MASK
Instead of using the 'magic' number of 0x1f the TRX_STATE_MASK macro is
introduced.

Signed-off-by: Christoffer Holmstedt <christoffer.holmstedt@gmail.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-04-30 18:48:09 +02:00
Hariprasad Shenai 7f0b8a56c9 cxgb4: Fix MC1 memory offset calculation
Commit 6559a7e829 ("cxgb4: Cleanup macros so they follow the same
style and look consistent") introduced a regression where reading MC1
memory in adapters where MC0 isn't present or MC0 size is not equal to MC1
size caused the adapter to crash due to incorrect computation of memoffset.
Fix is to read the size of MC0 instead of MC1 for offset calculation

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-29 15:50:16 -04:00
Yuval Mintz 12a8541d5c bnx2x: Delay during kdump load
In a kdump environment interfaces might be re-loaded without a proper
unload sequence in the previous running kernel.
bnx2x management FW and driver maintains a `pulse' that notifies the FW
that the driver is still up and running.

Driver load on the kdump kernel should be performed only after the pulse
has been out-of-sync long enough for the management FW to identify that
the driver has crashed, on which point it will perform some necessary
cleanup of the HW.

In today's distros kdump loading is quite fast, sometimes too fast for our
FW to get out-of-sync. This patch delays the bnx2x's probe during kdump
to allow a proper re-load on the kdump kernel.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-29 15:49:21 -04:00
Pai e913fb279c net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table
This patch fixes a Kernel Panic in bonding driver debugfs file: rlb_hash_table.

$> modprobe bonding mode=6
$> cat /sys/kernel/debug/bonding/bond0/rlb_hash_table

This will crash the kernel. The struct alb_bond_info is initialized only when
the bonding interface is initialized (ip link set bond0 up) and not at the time
it is allocated. If we try to read the table before that, it'll result in a
kernel panic.

The patch applies against both net and net-next

Signed-off-by: Vishwanath Pai <vpai@akamai.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-29 15:37:19 -04:00
Punnaiah Choudary Kalluri d4c216c541 net: macb: Fix race condition in driver when Rx frame is dropped
Under heavy Rx load, observed that the Hw is updating the USED bit
and it is not updating the received frame status to the BD control
field. This could be lack of resources for processing the BDs at high
data rates. Driver drops the frame associated with this BD but not
clearing the USED bit. So, this is causing hang condition as Hw
expects USED bit to be cleared for this BD.

Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-04-29 15:24:46 -04:00