aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/cnic.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2011-12-08vlan: add 802.1q netpoll supportBenjamin LaHaise2-0/+64
Add netpoll support to 802.1q vlan devices. Based on the netpoll support in the bridging code. Tested on a forced_eth device with netconsole. Signed-off-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08sch_red: Adaptative RED AQMEric Dumazet4-19/+111
Adaptative RED AQM for linux, based on paper from Sally FLoyd, Ramakrishna Gummadi, and Scott Shenker, August 2001 : http://icir.org/floyd/papers/adaptiveRed.pdf Goal of Adaptative RED is to make max_p a dynamic value between 1% and 50% to reach the target average queue : (max_th - min_th) / 2 Every 500 ms: if (avg > target and max_p <= 0.5) increase max_p : max_p += alpha; else if (avg < target and max_p >= 0.01) decrease max_p : max_p *= beta; target :[min_th + 0.4*(min_th - max_th), min_th + 0.6*(min_th - max_th)]. alpha : min(0.01, max_p / 4) beta : 0.9 max_P is a Q0.32 fixed point number (unsigned, with 32 bits mantissa) Changes against our RED implementation are : max_p is no longer a negative power of two (1/(2^Plog)), but a Q0.32 fixed point number, to allow full range described in Adatative paper. To deliver a random number, we now use a reciprocal divide (thats really a multiply), but this operation is done once per marked/droped packet when in RED_BETWEEN_TRESH window, so added cost (compared to previous AND operation) is near zero. dump operation gives current max_p value in a new TCA_RED_MAX_P attribute. Example on a 10Mbit link : tc qdisc add dev $DEV parent 1:1 handle 10: est 1sec 8sec red \ limit 400000 min 30000 max 90000 avpkt 1000 \ burst 55 ecn adaptative bandwidth 10Mbit # tc -s -d qdisc show dev eth3 ... qdisc red 10: parent 1:1 limit 400000b min 30000b max 90000b ecn adaptative ewma 5 max_p=0.113335 Scell_log 15 Sent 50414282 bytes 34504 pkt (dropped 35, overlimits 1392 requeues 0) rate 9749Kbit 831pps backlog 72056b 16p requeues 0 marked 1357 early 35 pdrop 0 other 0 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08team: use vlan_vids_[addr/del]_by_devJiri Pirko1-0/+11
So far when vlan id was added to team device befor port was added, this vid was not added to port's vlan filter. Also after removal, vid stayed in port device's vlan filter. Benefit of new vlan functions to handle this work. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08vlan: introduce functions to do mass addition/deletion of vids by another deviceJiri Pirko2-0/+59
Introduce functions handy to copy vlan ids from one driver's list to another. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08vlan: introduce vid list with reference countingJiri Pirko5-89/+219
This allows to keep track of vids needed to be in rx vlan filters of devices even if they are used in bond/team etc. vlan_info as well as vlan_group previously was, is allocated when first vid is added and dealocated whan last vid is deleted. vlan_group definition is moved to private header. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net: introduce vlan_vid_[add/del] and use them instead of direct [add/kill]_vid ndo callsJiri Pirko6-59/+87
This patch adds wrapper for ndo_vlan_rx_add_vid/ndo_vlan_rx_kill_vid functions. Check for NETIF_F_HW_VLAN_FILTER feature is done in this wrapper. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net: make vlan ndo_vlan_rx_[add/kill]_vid return error valueJiri Pirko28-107/+210
Let caller know the result of adding/removing vlan id to/from vlan filter. In some drivers I make those functions to just return 0. But in those where there is able to see if hw setup went correctly, return value is set appropriately. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08vlan: rename vlan_dev_info to vlan_dev_privJiri Pirko8-85/+85
As this structure is priv, name it approprietely. Also for pointer to it use name "vlan". Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08be2net: netpoll supportIvan Vecera1-1/+17
Add missing netpoll support. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: make FEC driver buildable as moduleLothar Waßmann1-1/+1
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: fix the .remove codeLothar Waßmann1-9/+22
The .remove code is broken in several ways. - mdiobus_unregister() is called twice for the same object in case of dual FEC - phy_disconnect() is being called when the PHY is already disconnected - the requested IRQ(s) are not freed - fec_stop() is being called with the inteface already stopped All of those lead to kernel crashes if the remove function is actually used. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: preserve MII/RMII setting in fec_stop()Lothar Waßmann1-1/+4
Additionally to setting the ETHER_EN bit in FEC_ECNTRL the MII/RMII setting in FEC_R_CNTRL needs to be preserved to keep the MII interface functional. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: don't munge MAC address from platform dataLothar Waßmann1-1/+1
When the MAC address is supplied via platform_data it should be OK as it is and should not be modified in case of a dual FEC setup. Also copying the MAC from platform_data to the single 'macaddr' variable will overwrite the MAC for the first interface in case of a dual FEC setup. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: don't request invalid IRQLothar Waßmann1-2/+6
prevent calling request_irq() with a known invalid IRQ number and preserve the return value of the platform_get_irq() function Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: prevent dobule restart of interface on FDX/HDX changeLothar Waßmann1-0/+2
Upon detection of a FDX/HDX change the interface is restarted twice. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: set con_id in clk_get() call to NULLLothar Waßmann1-1/+1
The con_id is actually not needed for clk_get(). Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net/fec: misc cleanupsLothar Waßmann1-6/+8
- remove some bogus whitespace - remove line wraps from printk messages Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Update version to 3.122Matt Carlson1-2/+2
This patch updates the tg3 version to 3.122. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Return flowctrl config through ethtoolMatt Carlson1-2/+2
This patch changes the driver to return the flow control configuration rather than the flow control status through the ETHTOOL_GPAUSEPARAM ioctl. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Track LP advertisingMatt Carlson2-3/+38
This patch adds code to track the autonegotiation advertisements of the link partner and report them through ethtool. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Integrate flowctrl check into AN adv checkMatt Carlson1-56/+25
This patch integrates tg3_adv_1000T_flowctrl_ok() into tg3_copper_is_advertising_all() and renames the function tg3_phy_copper_an_config_ok(). Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Save stats across chip resetsMatt Carlson1-9/+17
Tg3 has a place to store stats, but doesn't really use it. This patch modifies the driver so that stats are saved across chip resets and gets cleared across close / open calls. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08tg3: Remove ethtool stats member from dev structMatt Carlson2-8/+7
This patch removes the ethtool stats member from the tg3 device structure. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08bridge: add local MAC address to forwarding table (v2)stephen hemminger4-5/+25
If user has configured a MAC address that is not one of the existing ports of the bridge, then we need to add a special entry in the forwarding table. This forwarding table entry has no outgoing port so it has to be treated a little differently. The special entry is reported by the netlink interface with ifindex of bridge, but ignored by the old interface since there is no usable way to put it in the ABI. Reported-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08bridge: rearrange fdb notifications (v2)stephen hemminger1-19/+20
Pass bridge to fdb_notify so it can determine correct namespace based on namespace of bridge rather than namespace of destination port. Also makes next patch easier. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08bridge: refactor fdb_notifystephen hemminger1-4/+7
Move fdb_notify outside of fdb_create. This fixes the problem that notification of local entries are not flagged correctly. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-07bnx2x: fix typo in fcoe stats collectionBarak Witkowski1-1/+1
Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06caif: Replace BUG_ON with WARN_ON.Roar Førde4-10/+12
BUG_ON is too strict in a number of circumstances, use WARN_ON instead. Protocol errors should not halt the system. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06caif-shm: Bugfixes for caif_shmcore.csjur.brandeland@stericsson.com1-10/+11
Various bugfixes for caif_shmcore.c: - fix deadlocks due to improper usage of spin-lock - add missing spin-lock init - don't call dev_kfree_skb() with irqs disabled, use dev_kfree_skb_irq() instead. - fix potential skb null pointer de-reference. Squashed original patches from: Rabin Vincent <rabin.vincent@stericsson.com> Durga Prasada Rao BATHINA <durgaprasadarao.b@stericcson.com> Arun Murthy <arun.murthy@stericsson.com> Bibek Basu <bibek.basu@stericsson.com> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06caif: Bad assert triggering false positive.sjur.brandeland@stericsson.com1-1/+1
Fix bad assert on fragment size triggering false positive. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06caif-hsi: Remove wake line modification when flushing FIFOChristian Auby1-11/+0
Raising wake before flushing FIFO and lowering it after caused a spike on AC wake that were sometimes detected and acted upon by the modem. Fixed this by remove wake line modification when flushing FIFO. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06ipv6: Move xfrm_lookup() call down into icmp6_dst_alloc().David S. Miller4-29/+12
And return error pointers. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06ipv6: Make third arg to anycast_dst_alloc() bool.David S. Miller4-4/+4
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06bnx2x: Fix compile errors if CONFIG_CNIC is not setMichael Chan1-2/+2
Don't provide FCoE and iSCSI statistics to management firmware if CONFIG_CNIC is not set. Some needed structure fields are not defined without CONFIG_CNIC. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06net: Silence seq_scale() unused warningStephen Boyd1-0/+2
On a CONFIG_NET=y build net/core/secure_seq.c:22: warning: 'seq_scale' defined but not used Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06sock_diag: Move the sock_ code to net/core/Pavel Emelyanov3-100/+158
This patch moves the sock_ code from inet_diag.c to generic sock_diag.c file and provides necessary request_module-s calls and a pointer on inet_diag_compat dumping routine. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Cleanup type2proto last userPavel Emelyanov1-23/+24
Now all the code works with sock_diag_req-compatible structs, so it's possible to stop using the inet_diag_type2proto in inet_csk_diag_fill. Pass the inet_diag_req into it and use the sdiag_protocol field. At the same time remove the explicit ext argument, since it's also on the req. However, this conversion is still required in _compat code, so just move this routine, not remove. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Introduce socket family checksPavel Emelyanov1-1/+11
The new API will specify family to work with. Teach the existing socket walking code to bypass not interesting ones. To preserve compatibility with existing behavior the _compat code sets interesting family to AF_UNSPEC to dump them all. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Switch the _dump to work with new headerPavel Emelyanov1-18/+53
Make inet_diag_dumo work with given header instead of calculating one from the nl message. The SOCK_DIAG_BY_FAMILY just passes skb's one through, the compat code converts the old header to new one. Also fix the bytecode calculation to find one at proper offset. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Switch the _get_exact to work with new headerPavel Emelyanov1-7/+22
Make inet_diag_get_exact work with given header instead of calculating one from the nl message. The SOCK_DIAG_BY_FAMILY just passes skb's one through, the compat code converts the old header to new one. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Introduce new inet_diag_req headerPavel Emelyanov2-8/+17
This one coinsides with the sock_diag_req in the beginning and contains only used fields from its previous analogue. The existing code is patched to use the _compat version of it for now. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06sock_diag: Initial skeletonPavel Emelyanov2-2/+123
When receiving the SOCK_DIAG_BY_FAMILY message we have to find the handler for provided family and pass the nl message to it. This patch describes an infrastructure to work with such nandlers and implements stubs for AF_INET(6) ones. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Switch from _GETSOCK to IPPROTO_ numbersPavel Emelyanov3-15/+27
Sorry, but the vger didn't let this message go to the list. Re-sending it with less spam-filter-prone subject. When dumping the AF_INET/AF_INET6 sockets user will also specify the protocol, so prepare the protocol diag handlers to work with IPPROTO_ constants. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Move byte-code finding up the call-stackPavel Emelyanov1-19/+17
Current code calculates it at fixed offset. This offset will change, so move the BC calculation upper to make the further patching simpler. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06sock_diag: Introduce new message typePavel Emelyanov2-2/+16
This type will run the family+protocol based socket dumping. Also prepare the stub function for it. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06inet_diag: Partly rename inet_ to sock_Pavel Emelyanov5-18/+25
The ultimate goal is to get the sock_diag module, that works in family+protocol terms. Currently this is suitable to do on the inet_diag basis, so rename parts of the code. It will be moved to sock_diag.c later. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06caif-spi: Bugfix for dump upon device removalErwan Bracq2-88/+92
Fix dump upon device removal, by moving deinitialization from platform-device-remove to network-interface-uninit. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06bnx2x: fix crash while ethtool -tDmitry Kravkov1-0/+3
commit 2df1a70aaf70e8dff11b89b938a5f317556ee640 "bnx2x: Support for byte queue limits" has introduced an asymmetry in usage of netdev_tx_completed_queue and netdev_tx_sent_queue. Missing call to netdev_tx_sent_queue causes the crash during ethtool -t. The patch adds the missing call. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06netback: fix typo in commentWei Liu1-1/+1
"variables a used" should be "variables are used". Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-06netback: remove redundant assignmentWei Liu1-4/+0
New value for netbk->mmap_pages[pending_idx] is assigned in xen_netbk_alloc_page(), no need for a second assignment which exposes internal to the outside world. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>