summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-09-05amd-xgbe-phy: Check device for current speed mode (KR/KX)Lendacky, Thomas
Since device resets can change the current mode it's possible to think the device is in a different mode than it actually is. Rather than trying to determine every place that is needed to set/save the current mode, be safe and check the devices actual mode when needed rather than trying to track it. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05r8152: use eth_hw_addr_randomhayeswang
If the hw doesn't have a valid MAC address, give a random one and set it to the hw. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05r8152: change the location of rtl8152_set_mac_addresshayeswang
Exchange the location of rtl8152_set_mac_address() and set_ethernet_addr(). Then, the set_ethernet_addr() could set the MAC address by calling rtl8152_set_mac_address() later. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05enic: Add tunable_ops support for rx_copybreakGovindarajulu Varadarajan
This patch adds support for setting/getting rx_copybreak using generic ethtool tunable. Defines enic_get_tunable() & enic_set_tunable() to get/set rx_copybreak. As of now, these two function supports only rx_copybreak. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05enic: implement rx_copybreakGovindarajulu Varadarajan
Calling dma_map_single()/dma_unmap_single() is quite expensive compared to copying a small packet. So let's copy short frames and keep the buffers mapped. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05net: systemport: update UMAC_CMD only when link is detectedFlorian Fainelli
When we bring the interface down, phy_stop() will schedule the PHY state machine to call our link adjustment callback. By the time we do so, we may have clock gated off the SYSTEMPORT hardware block, and this will cause bus errors to happen in bcm_sysport_adj_link(): Make sure that we only touch the UMAC_CMD register when there is an actual link. This is safe to do for two reasons: - updating the Ethernet MAC registers only make sense when a physical link is present - the PHY library state machine first set phydev->link = 0 before invoking phydev->adjust_link in the PHY_HALTED case This is a similar fix to the GENET one: c677ba8b3c47650358572091ed8a6af50bfca877 ("net: bcmgenet: update UMAC_CMD only when link is detected"). Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-04mlx4_en: Convert the normal skb free path to dev_consume_skb_any()Rick Jones
It would appear the mlx4_en driver was still making a call to dev_kfree_skb_any() where dev_consume_skb_any() would be more appropriate. This should make dropped packet profiling/tracking easier/better over a NIC driven by mlx4_en. Signed-off-by: Rick Jones <rick.jones2@hp.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02ethernet: arc: remove unused devJingoo Han
Remove unused 'dev' variable from arc_emac_remove(), since it's not being used any more. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02ethernet: nvidia: Remove extra parensDavid Wood
Remove unnecessary double parenthesis around if statement. Signed-off-by: David Wood <devel@dtwood.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: query max_tx_qs for BE3 super-nic profile from FWSuresh Reddy
In the BE3 super-nic profile, the max_tx_qs value can vary for each function. So the driver needs to query this value from FW instead of using the pre-defined constant BE3_MAX_TX_QS. Signed-off-by: Suresh Reddy <Suresh.Reddy@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: define macro for_all_tx_queues_on_eq()Sathya Perla
Replace the for() loop that traverses all the TX queues on an EQ with the macro for_all_tx_queues_on_eq(). With this expalnatory name, the one line comment is not required anymore. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: get rid of TX budgetSathya Perla
Enforcing a budget on the TX completion processing in NAPI doesn't benefit performance in anyway. Just get rid of it. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: make be_cmd_get_regs() return a statusVasundhara Volam
There are a few failure cases in be_cmd_get_regs() that ideally must return an error value. This style is used across all the routines in be_cmds.c with this routine being an exception. This patch fixes this. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: define BE_MAX_MTUKalesh AP
This patch defines a new macro BE_MAX_MTU to make the code in be_change_mtu() more readable. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: remove unncessary gotosKalesh AP
In cases where there is no extra code to handle an error, this patch replaces gotos with a direct return statement. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: fix log messages in lancer FW download pathKalesh AP
Log messages in the Lancer FW download path have issues such as: - a single message spanning multiple lines - the success message is logged even in failure cases - status codes are already logged in the FW cmd routines This patch fixes these issues. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: Add a dma_mapping_error counter in ethtoolVasundhara Volam
Add a dma_mapping_error counter to count the number of packets dropped due to DMA mapping errors. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: Add TX completion error statistics in ethtoolKalesh AP
HW reports TX completion errors in TX completion. This patch adds these counters to ethtool statistics. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: add a description for counter rx_input_fifo_overflow_dropSathya Perla
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: shorten AMAP_GET/SET_BITS() macro callsSathya Perla
The AMAP_GET/SET_BITS() macro calls take structure name as a parameter and hence are long and span more than one line. Replace these calls with a wrapper macros for RX/Tx compls and TX wrb. This results in fewer lines and more readable code in be_main.c Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02be2net: add a few log messagesSathya Perla
This patch adds the following log messages to help debugging failure cases: 1) log FW version number: this is useful when driver initialization fails and the FW version number cannot be queried via ethtool 2) per function resource limits for BEx chips: these values are currently being printed only for Skyhawk and Lancer 3) PCI BAR mapping failure 4) function_mode/caps queried from FW: this helps catch any FW bugs that could advertise wrong capabilities to the driver Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02vxlan: Enable checksum unnecessary conversions for vxlan/UDP socketsTom Herbert
Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02r8152: rename rx_buf_szhayeswang
The variable "rx_buf_sz" is used by both tx and rx buffers. Replace it with "agg_buf_sz". Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02net: phy: mdio-bcm-unimac: NULL-terminate unimac_mdio_idsFlorian Fainelli
drivers/net/phy/mdio-bcm-unimac.c:195:37-38: unimac_mdio_ids is not NULL terminated at line 195 Make sure of_device_id tables are NULL terminated Generated by: scripts/coccinelle/misc/of_table.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02bonding: add slave_changelink support and use it for queue_idNikolay Aleksandrov
This patch adds support for slave_changelink to the bonding and uses it to give the ability to change the queue_id of the enslaved devices via netlink. It sets slave_maxtype and uses bond_changelink as a prototype for bond_slave_changelink. Example/test command after the iproute2 patch: ip link set eth0 type bond_slave queue_id 10 CC: David S. Miller <davem@davemloft.net> CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Suggested-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02net: systemport: tell RXCHK if we are using Broadcom tagsFlorian Fainelli
When Broadcom tags are enabled, e.g: when interfaced to an Ethernet switch, make sure that we tell the RXCHK engine that it should be expecting a 4-bytes Broadcom tag after the Ethernet MAC Source Address. Use netdev_uses_dsa() to check for that condition since that will tell us if a switch is attached to our network interface. Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02bnx2x: fix tunneled GSO over IPv6Dmitry Kravkov
Set correct bit for packed description. Introduced in e42780b66aab88d3a82b6087bcd6095b90eecde7 bnx2x: Utilize FW 7.10.51 Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Kravkov <Dmitry.Kravkov@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02bnx2x: prevent incorrect byte-swap in BEDmitry Kravkov
Fixes incorrectly defined struct in FW HSI for BE platform. Affects tunneling, tx-switching and anti-spoofing. Introduced in e42780b66aab88d3a82b6087bcd6095b90eecde7 bnx2x: Utilize FW 7.10.51 Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Kravkov <Dmitry.Kravkov@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02r8152: reduce the number of Txhayeswang
Because the Tx has the features of stopping queue and aggregation, We don't need many tx buffers. Change the tx number from 10 to 4 to reduce the usage of the memory. This could save 16K * 6 bytes memory. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02net: Pass a "more" indication down into netdev_start_xmit() code paths.David S. Miller
For now it will always be false. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02net: Do txq_trans_update() in netdev_start_xmit()David S. Miller
That way we don't have to audit every call site to make sure it is doing this properly. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30net: stmmac: fix warning from Sparse for socfpgaLey Foon Tan
Warning: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:41: sparse: cast removes address space of expression drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:38: sparse: incorrect type in assignment (different address spaces) Signed-off-by: Ley Foon Tan <lftan@altera.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30qlcnic: Set skb->csum_level for encapsulated checksumTom Herbert
Set skb->csum_level instead of skb->encapsulation when indicating CHECKSUM_UNNECESSARY for an encapsulated checksum. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30mlx4: Set skb->csum_level for encapsulated checksumTom Herbert
Set skb->csum_level instead of skb->encapsulation when indicating CHECKSUM_UNNECESSARY for an encapsulated checksum. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30i40evf: Set skb->csum_level for encapsulated checksumTom Herbert
Set skb->csum_level instead of skb->encapsulation when indicating CHECKSUM_UNNECESSARY for an encapsulated checksum. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30i40e: Set skb->csum_level for encapsulated checksumTom Herbert
Set skb->csum_level instead of skb->encapsulation when indicating CHECKSUM_UNNECESSARY for an encapsulated checksum. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30benet: Set skb->csum_level for encapsulated checksumTom Herbert
Set skb->csum_level instead of skb->encapsulation when indicating CHECKSUM_UNNECESSARY for an encapsulated checksum. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30net: Clarification of CHECKSUM_UNNECESSARYTom Herbert
This patch: - Clarifies the specific requirements of devices returning CHECKSUM_UNNECESSARY (comments in skbuff.h). - Adds csum_level field to skbuff. This is used to express how many checksums are covered by CHECKSUM_UNNECESSARY (stores n - 1). This replaces the overloading of skb->encapsulation, that field is is now only used to indicate inner headers are valid. - Change __skb_checksum_validate_needed to "consume" each checksum as indicated by csum_level as layers of the the packet are parsed. - Remove skb_pop_rcv_encapsulation, no longer needed in the new csum_level model. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30be2net: Use dev_consume_skb_any() in the non-drop pathRick Jones
The be2net driver was still using dev_kfree_skb_any() in a "normal" skb freeing path. This rather clutters perf top -G -e skb_kfree_skb profiling. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30bnx2x: Fix sparse warningsYuval Mintz
This fixes a sprase warning introduced recently by commit eeed018cbfa30 ("bnx2x: Add timestamping and PTP hardware clock support"), as well as another unrelated sparse endian issue. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30net: phy: properly report internal PHYs through sysfsFlorian Fainelli
Internal PHYs may not have a valid PHY interface defined, which will show up in sysfs as "". Add an explicit check of internal PHYs to report their interface correctly. Fixes: 3d055d8d1c24 ("net: phy: expose PHY device interface mode") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30qlcnic: Update version to 5.3.62Shahed Shaikh
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30qlcnic: Add support to run firmware POSTShahed Shaikh
This patch adds support to run Power On Self Test (POST) for 83xx adapters. POST can be run in 3 different speed modes : i) Fast mode (takes about 690 ms) ii) Medium mode (takes about 2930 ms) iii) Slow mode (takes about 7500 ms) To run POST, firmware file with name "83xx_post_fw.bin" should be present under /lib/firmware directory. load_fw_file module parameter is used to specify POST operation and its speed mode. load_fw_file = 2 : Fast mode load_fw_file = 3 : Medium mode load_fw_file = 4 : Slow mode Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30qlcnic: Use usleep_range() instead of msleep() for sleep less than 20msJitendra Kalsaria
As per recommendation, msleep() may sleep longer than intended time for values less than 20ms. So, use usleep_range() instead of msleep() Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30qlcnic: Add support for 0x8830 device IDShahed Shaikh
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-30qlcnic: Update Link speed and port type info for 83xx adapterJitendra Kalsaria
o Update the port type information o Advertise correct link modes and autonegotiation o Add support to change link speed Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-28r8169: add missing MODULE_FIRMWARE.Francois Romieu
Leftover from 6e1d0b8988188956dac091441c1492a79a342666 ("r8169:add support for RTL8168H and RTL8107E"). Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Chun-Hao Lin <hau@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-28Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-08-27 This series contains updates to i40e and i40evf. Carolyn provides two patches, first changes the wording of the flow director add/remove and asynchronous failure messages to include the fd_id to try and add some way to track the operations on a given fd_id. Second adds a check during handle_link_event for unqualified modules when link is down and there is a module plugged in. Anjali provides four patches to i40e/i40evf. First update flow director messages so that a user can tell if a filter was added or deleted. Then updates the ATR policy to not auto-disable ATR when we have errors in programming. The disabling of ATR when we got programming errors was buggy and was still adding new rules and causing continuous errors. With this policy change, we flush instead when we see too many errors. In addition she adds a flow director flush counter to ethtool to help know how many times the interface had to flush and replay the flow director filter table. Updates the driver to ignores a driver perceived transmit hang if the number of descriptors pending is less than 4, and instead log a stat when this situation happens. This is because the queue progresses forward and the stack never experiences a real hang in these situations. Shannon provides three patches for i40e/i40evf, first enables the l2tsel bit on receive queue contexts that are assigned to VFs so that the VF can get the stripped VLAN tag. Then adds a max buffer size parameter to the print helper to be sure the code knows when to stop. Lastly, remove the complaint when removing the default MAC VLAN filter. This was because old firmware had an incorrect MAC VLAN filter that needed to be replaced at startup, and now newer firmware does not have this problem. So now we only add the new filter if the removal succeeded and no need to complain if the removal fails. Ashish provides a change to vsi->num_queue_pairs to equal the number that is configured by the VF. This limits the number of queues that are enabled/disabled and fixes the mismatch case for when a VF configures fewer queues than is allocated to it by the PF. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-28virtio_net: flush when in xmit_more mode and under descriptor pressureDavid S. Miller
Mirror the changes made to ixgbe in commit 2367a17390138f68b3aa28f2f220b8d7ff8d91f4 ("ixgbe: flush when in xmit_more mode and under descriptor pressure") Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-28igb: flush when in xmit_more mode and under descriptor pressureDavid S. Miller
Mirror the changes made to ixgbe in commit 2367a17390138f68b3aa28f2f220b8d7ff8d91f4 ("ixgbe: flush when in xmit_more mode and under descriptor pressure") Signed-off-by: David S. Miller <davem@davemloft.net>