aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-12-02bnx2x: Ext. config accessed only on non-E1x.Yuval Mintz1-1/+2
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-02bnx2x: nvram enables dropless flow controlYuval Mintz3-4/+31
It is now possible to enable dropless flow control via nvram. 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-02bnx2x: Correct advertised speed/duplexYuval Mintz1-8/+4
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-02bnx2x: Filter packets on FCoE ringsDmitry Kravkov4-4/+17
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-02bnx2x: Management can control PFC/ETSBarak Witkowski3-6/+24
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-02bnx2x: parity recovery flow enhancementBarak Witkowski1-13/+20
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-02bnx2x: revised and corrected SPIO accessYuval Mintz2-23/+30
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-02net/mlx4_en: Set number of rx/tx channels using ethtoolAmir Vadai5-14/+93
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-02net/mlx4_en: Fix TX moderation info loss after set_ringparam is calledAmir Vadai1-29/+30
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-02MAINTAINERS: Add Mellanox ethernet driver - mlx4_enAmir Vadai1-0/+8
Set mlx4_en maintainer to Amir Vadai instead of Yevgeny Petrilin. Signed-off-by: Amir Vadai <amirv@mellanox.com> Cc: Yevgeny Petrilin <yevgenyp@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-01Merge git://git.infradead.org/users/dwmw2/atmDavid S. Miller5-62/+158
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 Woodhouse1-41/+0
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 Woodhouse1-3/+3
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-12-02solos-pci: clean up pclose() functionDavid Woodhouse1-4/+14
- 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-02pppoatm: optimise PPP channel wakeups after sock_owned_by_user()David Woodhouse1-2/+19
We don't need to schedule the wakeup tasklet on *every* unlock; only if we actually blocked the channel in the first place. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Krzysztof Mazur <krzysiek@podlesie.net>
2012-12-02br2684: allow assign only on a connected socketKrzysztof Mazur1-2/+5
The br2684 does not check if used vcc is in connected state, causing potential Oops in pppoatm_send() when vcc->send() is called on not fully connected socket. Now br2684 can be assigned only on connected sockets; otherwise -EINVAL error is returned. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-12-02solos-pci: Fix leak of skb received for unknown vccNathan Williams1-1/+2
... 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-02br2684: fix module_put() raceDavid Woodhouse1-1/+4
The br2684 code used module_put() during unassignment from vcc with hope that we have BKL. This assumption is no longer true. Now owner field in atmvcc is used to move this module_put() to vcc_destroy_socket(). Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Krzysztof Mazur <krzysiek@podlesie.net>
2012-12-02pppoatm: fix missing wakeup in pppoatm_send()David Woodhouse1-0/+12
Now that we can return zero from pppoatm_send() for reasons *other* than the queue being full, that means we can't depend on a subsequent call to pppoatm_pop() waking the queue, and we might leave it stalled indefinitely. Use the ->release_cb() callback to wake the queue after the sock is unlocked. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Krzysztof Mazur <krzysiek@podlesie.net>
2012-12-02br2684: don't send frames on not-ready vccDavid Woodhouse1-3/+40
Avoid submitting packets to a vcc which is being closed. Things go badly wrong when the ->pop method gets later called after everything's been torn down. Use the ATM socket lock for synchronisation with vcc_destroy_socket(), which clears the ATM_VF_READY bit under the same lock. Otherwise, we could end up submitting a packet to the device driver even after its ->ops->close method has been called. And it could call the vcc's ->pop method after the protocol has been shut down. Which leads to a panic. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Krzysztof Mazur <krzysiek@podlesie.net>
2012-12-02atm: add release_cb() callback to vccDavid Woodhouse2-0/+11
The immediate use case for this is that it will allow us to ensure that a pppoatm queue is woken after it has to drop a packet due to the sock being locked. Note that 'release_cb' is called when the socket is *unlocked*. This is not to be confused with vcc_release() — which probably ought to be called vcc_close(). Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Krzysztof Mazur <krzysiek@podlesie.net>
2012-12-02solos-pci: wait for pending TX to complete when releasing vccDavid Woodhouse1-3/+14
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 Yongjun1-2/+0
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 Gallatin1-1/+1
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-01ipv6: unify logic evaluating inet6_dev's accept_ra propertyShmulik Ladkani3-16/+12
As of 026359b [ipv6: Send ICMPv6 RSes only when RAs are accepted], the logic determining whether to send Router Solicitations is identical to the logic determining whether kernel accepts Router Advertisements. However the condition itself is repeated in several code locations. Unify it by introducing 'ipv6_accept_ra()' accessor. Also, simplify the condition expression, making it more readable. No semantic change. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-01tcp: change default tcp hash sizeEric Dumazet1-4/+2
As time passed, available memory increased faster than number of concurrent tcp sockets. As a result, a machine with 4GB of ram gets a hash table with 524288 slots, using 8388608 bytes of memory. Lets change that by a 16x factor (one slot for 128 KB of ram) Even if a small machine needs a _lot_ of sockets, tcp lookups are now very efficient, using one cache line per socket. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-01Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-nextDavid S. Miller13-83/+156
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 git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller23-984/+823
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 Duyck1-5/+8
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 Allan13-790/+416
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 Wyborny3-8/+166
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 Wyborny2-0/+16
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 Wyborny1-0/+6
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 Wyborny1-124/+119
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. Abodunrin1-16/+12
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 Wyborny2-4/+34
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.com1-37/+46
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 Hutchings1-4/+4
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 Hutchings1-6/+6
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 Pieczko3-3/+16
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 Pieczko2-4/+53
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 Hutchings1-1/+8
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 Hutchings1-3/+0
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 Hutchings1-1/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Remove confusing MMIO functionsBen Hutchings3-36/+28
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 Hutchings1-1/+1
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 Hutchings1-5/+1
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-12-01sfc: Really disable flow control while flushingBen Hutchings6-7/+23
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 Hutchings1-1/+1
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 Hutchings1-11/+14
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>