summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-12-03bnx2x: Correct advertised speed/duplexYuval Mintz
If link is down due to management (and not due to actual phy link being lost), driver should still behave as if the link is down; Querying via ethtool about speed/duplex state should result in 'UNKNOWN' (same behaviour as when link is actually down). Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03bnx2x: Filter packets on FCoE ringsDmitry Kravkov
Whenever bnx2x fails to transmit a packet due to a full Tx ring, if the ring size is zero (indicating an FCoE ring) driver filters the packet out and gracefully continues. Driver also gathers statistics on such filtered packets. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03bnx2x: Management can control PFC/ETSBarak Witkowski
If configured for PFC/ETS by management, configure chip regardless of the presence of a remote peer which supports DCBX. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03bnx2x: parity recovery flow enhancementBarak Witkowski
Parity recovery was enhanced in order to handle a few more corner cases. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03bnx2x: revised and corrected SPIO accessYuval Mintz
Changed naming convention of SPIO macros, and prevented access to invalid SPIOs. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03net/mlx4_en: Set number of rx/tx channels using ethtoolAmir Vadai
Add support to changing number of rx/tx channels using ethtool ('ethtool -[lL]'). Where the number of tx channels specified in ethtool is the number of rings per user priority - not total number of tx rings. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03net/mlx4_en: Fix TX moderation info loss after set_ringparam is calledAmir Vadai
We need to re-set tx moderation information after calling set_ringparam else default tx moderation will be used. Also avoid related code duplication, by putting it in a utility function. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02Merge git://git.infradead.org/users/dwmw2/atmDavid S. Miller
David Woodhouse says: ==================== This is the result of pulling on the thread started by Krzysztof Mazur's original patch 'pppoatm: don't send frames to destroyed vcc'. Various problems in the pppoatm and br2684 code are solved, some of which were easily triggered and would panic the kernel. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-02solos-pci: remove list_vccs() debugging functionDavid Woodhouse
No idea why we've gone so long dumping a list of VCCs with vci==0 on every ->open() call... Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-12-02solos-pci: use GFP_KERNEL where possible, not GFP_ATOMICDavid Woodhouse
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-12-02solos-pci: clean up pclose() functionDavid Woodhouse
- Flush pending TX skbs from the queue rather than waiting for them all to complete (suggested by Krzysztof Mazur <krzysiek@podlesie.net>). - Clear ATM_VF_ADDR only when the PKT_PCLOSE packet has been submitted. - Don't clear ATM_VF_READY at all — vcc_destroy_socket() does that for us. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-12-02solos-pci: Fix leak of skb received for unknown vccNathan Williams
... and ensure that the next skb is set up for RX in the DMA case. Signed-off-by: Nathan Williams <nathan@traverse.com.au> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-12-02solos-pci: wait for pending TX to complete when releasing vccDavid Woodhouse
We should no longer be calling the old pop routine for the vcc, after vcc_release() has completed. Make sure we wait for any pending TX skbs to complete, by waiting for our own PKT_PCLOSE control skb to be sent. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-12-01qlcnic: remove duplicated include from qlcnic_sysfs.cWei Yongjun
Remove duplicated include. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-01myri10ge: fix incorrect use of ntohs()Andrew Gallatin
1b4c44e6369dbbafd113f1e00b406f1eda5ab5b2 incorrectly used ntohs() rather than htons() in myri10ge_vlan_rx(). Thanks to Fengguang Wu, Yuanhan Liu's kernel-build tester for pointing out this bug. Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-01Merge branch 'for-davem' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next Ben Hutchings says: ==================== 1. More workarounds for TX queue flush failures that can occur during interface reconfiguration. 2. Fix spurious failure of a firmware request running during a system clock change, e.g. ntpd started at the same time as driver load. 3. Fix inconsistent statistics after a firmware upgrade. 4. Fix a variable (non-)initialisation in offline self-test that can make it more disruptive than intended. 5. Fix a race that can (at least) cause an assertion failure. 6. Miscellaneous cleanup. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-01Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== This series contains updates to ixgbe, igb and e1000e. Majority of the changes are against igb. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-01ixgbe: Do not parse past IP header on fragments beyond the firstAlexander Duyck
This change makes it so that only the first fragment in a series of fragments will have the L4 header pulled. Previously we were always pulling the L4 header as well and in the case of UDP this can harm performance since only the first fragment will have the header, the rest just contain data which should be left in the paged portion of the packet. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01e1000e: cosmetic cleanup of commentsBruce Allan
Update comments to conform to the preferred style for networking code as described in ./Documentation/CodingStyle and checked for in the recently added checkpatch NETWORKING_BLOCK_COMMENT_STYLE test. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01igb: Fix SerDes autoneg flow control.Carolyn Wyborny
This patch enables flow control to be set in SerDes autoneg mode. This is done the way it is done for copper, but relies on a different set of register/bit checks since this is all done within the MAC registers. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01igb: Unset sigdetect for SERDES loopback on 82580 and i350Carolyn Wyborny
This patch unsets the sigdetect bit for SERDES loopback tests on 82580 and i350 parts. The loopback test can fail on these parts without this setting. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01igb: Workaround for global device reset problem on 82580.Carolyn Wyborny
Due to a hw errata, the global device reset doesn't always work on 82580 devices. This patch works around the problem not trying to do a global device reset on these devices. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01igb: Refactoring of i210 file.Carolyn Wyborny
This patch refactors the functions in e1000_i210.c in order to remove need for prototypes. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01igb: Acquire, release semaphore for writing each EEPROM pageAkeem G. Abodunrin
This patch allows software acquires and releases NVM resource for writing each EEPROM page, instead of holding semaphore for the whole data block which is too long and could trigger write fails on unpredictable addresses. Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01igb: Updates to read nvm function for i211 deviceCarolyn Wyborny
The i211 has an integrated secure space to store configuration information that is usually stored in an EEPROM or flash type device. This patch updates the read functions to return values or appropriate error codes to prevent unnecessary init failures on some configuration schemes. Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01ixgbe: eliminate Smatch warnings in ixgbe_debugfs.cjoshua.a.hay@intel.com
This patch replaces calls to copy_to_user, copy_from_user, and the associated logic, with calls to simple_read_from_buffer and simple_write_to_buffer respectively. This was done to eliminate warnings generated by the Smatch static analysis tool. v2- Fix return values based community feedback Reported-by: Dan Carpenter <dan.carpenter@oracle.com> CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Josh Hay <joshua.a.hay@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-12-01sfc: Make module parameters really booleanBen Hutchings
Most of the module parameters treated as boolean are currently exposed as type int or uint. Defining them with the proper type is useful documentation for both users and developers. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Fix timekeeping in efx_mcdi_poll()Ben Hutchings
efx_mcdi_poll() uses get_seconds() to read the current time and to implement a polling timeout. The use of this function was chosen partly because it could easily be replaced in a co-sim environment with a macro that read the simulated time. Unfortunately the real get_seconds() returns the system time (real time) which is subject to adjustment by e.g. ntpd. If the system time is adjusted forward during a polled MCDI operation, the effective timeout can be shorter than the intended 10 seconds, resulting in a spurious failure. It is also possible for a backward adjustment to delay detection of a areal failure. Use jiffies instead, and change MCDI_RPC_TIMEOUT to be denominated in jiffies. Also correct rounding of the timeout: check time > finish (or rather time_after(time, finish)) and not time >= finish. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: lock TX queues when calling netif_device_detach()Daniel Pieczko
The assertion of netif_device_present() at the top of efx_hard_start_xmit() may fail if we don't do this. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Work-around flush timeout when flushes have completedDaniel Pieczko
We sometimes hit a "failed to flush" timeout on some TX queues, but the flushes have completed and the flush completion events seem to go missing. In this case, we can check the TX_DESC_PTR_TBL register and drain the queues if the flushes had finished. [bwh: Minor fixes to coding style] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Reset driver's MAC stats after MC reboot seenBen Hutchings
If the MC reboots then the stats it reports to us will have been reset. We need to reset ours to get efx_update_diff_stat() working properly. (Ideally we would maintain stats across the reboot, but as this should only happen immediately after a firmware upgrade it's not really worth the trouble.) Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Do not initialise buffer in efx_alloc_special_buffer()Ben Hutchings
Currently we initialise the newly allocated buffer to all-1s, which is important for event queues but not for descriptor queues. And since we also do that in efx_nic_init_eventq(), it is completely pointless to do it here. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Correctly initialise reset_method in siena_test_chip()Ben Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Remove confusing MMIO functionsBen Hutchings
efx_writed_table() uses a step of 16 bytes but efx_readd_table() uses a step of 4 bytes. Why are they different? Firstly, register access is asymmetric: - The EVQ_RPTR table and RX_INDIRECTION_TBL can (or must?) be written as dwords even though they have a step size of 16 bytes, unlike most other CSRs. - In general, a read of any width is valid for registers, so long as it does not cross register boundaries. There is also no latching behaviour in the BIU, contrary to rumour. We write to the EVQ_RPTR table with efx_writed_table() but never read it back as it's write-only. We write to the RX_INDIRECTION_TBL with efx_writed_table(), but only read it back for the register dump, where we use efx_reado_table() as for any other table with step size of 16. We read MC_TREG_SMEM with efx_readd_table() for the register dump, but normally read and write it with efx_readd() and efx_writed() using offsets calculated in bytes. Since these functions are trivial and have few callers, it's clearer to open-code them at the call sites. While we're at it, update the comments on the BIU behaviour again. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Fix check for failure of MC_CMD_FLUSH_RX_QUEUESBen Hutchings
efx_mcdi_rpc_start() returns a negative value on error or zero on success. However one caller that can't properly handle failure then does WARN_ON(rc > 0). Change it to WARN_ON(rc < 0). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Delete redundant page_addr variable from efx_init_rx_buffers_page()Ben Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Really disable flow control while flushingBen Hutchings
Receiving pause frames can block TX queue flushes. Earlier changes work around this by reconfiguring the MAC during flushes for VFs, but during flushes for the PF we would only change the fc_disable counter. Unless the MAC is reconfigured for some other reason during the flush (which I would not expect to happen) this had no effect at all. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Fix byte order warning in self-testBen Hutchings
Add necessary cast when setting a bogus checksum. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Fix byte order warnings for ethtool RX filter interfaceBen Hutchings
sparse has got a bit more picky since I last ran it over this. Add forced casts for use of ~0 as a big-endian value. Undo the pointless optimisation of parameter validation with '|'; using '||' avoids these warnings. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-11-30hyperv: Add an error message to rndis_filter_set_device_mac()Haiyang Zhang
This message indicates an error returned from the host when changing MAC address. Reported-by: Michal Kubecek <mkubecek@suse.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30myri10ge: Add vlan rx for better GRO perf.Andrew Gallatin
Unlike LRO, GRO requires that vlan tags be removed before aggregation can occur. Since the myri10ge NIC does not support hardware vlan tag offload, we must remove the tag in the driver to achieve performance comparable to LRO for vlan tagged frames. Thanks to Eric Duzamet for his help simplifying the original patch. Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30myri10ge: Convert from LRO to GROAndrew Gallatin
Convert myri10ge from LRO to GRO, and simplify the driver by removing various LRO-related code which is no longer needed including ndo_fix_features op, custom skb building from frags, and LRO header parsing. Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30smsc95xx: expand check_ macrosSteve Glendinning
These macros, while reducing the amount of code, hide flow control and make the code more confusing to follow and review. This patch expands them. It should have no functional effect on the driver. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30smsc95xx: fix smsc_crc return typeSteve Glendinning
This patch fixes a bug introduced in bbd9f9e which could prevent some wakeups from working correctly if multiple wol options were selected. This helper function calculates a 16-bit crc and shifts it into either the high or low 16 bits of a u32 so the caller can or it directly into place. The function previously had a u16 return type so would always have returned zero when filter was odd. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Reported-by: Bjorn Mork <bjorn@mork.no> Cc: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30smsc95xx: don't enable remote wakeup directlySteve Glendinning
As pointed out by Bjorn Mork, the generic "usb" driver sets this for us so no need to directly set it in this driver. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Cc: Bjorn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30smsc95xx: fix error handling in suspend failure caseSteve Glendinning
This patch ensures that if we fail to suspend the LAN9500 device we call usbnet_resume before returning failure, instead of leaving the usbnet driver in an unusable state. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30smsc95xx: fix suspend buffer overflowSteve Glendinning
This patch fixes a buffer overflow introduced by bbd9f9e, where the filter_mask array is accessed beyond its bounds. Updated to also add a check for kzalloc failure, as reported by Bjorn Mork and Joe Perches. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Cc: Bjorn Mork <bjorn@mork.no> Cc: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30smsc75xx: expand check_ macrosSteve Glendinning
These macros, while reducing the amount of code, hide flow control and make the code more confusing to follow and review. This patch expands them. It should have no functional effect on the driver. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30smsc75xx: don't call usbnet_resume if usbnet_suspend failsSteve Glendinning
If usbnet_suspend returns an error we don't want to call usbnet_resume to clean up, but instead just return the error. If usbnet_suspend *does* succeed, and we have a problem further on, the desired behaviour is still to call usbnet_resume to clean up before returning. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-30rtnelink: remove unused parameter from rtnl_create_link().Rami Rosen
This patch removes an unused parameter (src_net) from rtnl_create_link() method and from the method single invocation, in veth. This parameter was used in the past when calling ops->get_tx_queues(src_net, tb) in rtnl_create_link(). The get_tx_queues() member of rtnl_link_ops was replaced by two methods, get_num_tx_queues() and get_num_rx_queues(), which do not get any parameter. This was done in commit d40156aa5ecbd51fed932ed4813df82b56e5ff4d by Jiri Pirko ("rtnl: allow to specify different num for rx and tx queue count"). Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>