aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-08-13myri10ge: check for DMA mapping errorsStanislaw Gruszka1-30/+58
On IOMMU systems DMA mapping can fail, we need to check for that possibility. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds47-372/+2880
Pull networking fixes from David Miller: "Several networking final fixes and tidies for the merge window: 1) Changes during the merge window unintentionally took away the ability to build bluetooth modular, fix from Geert Uytterhoeven. 2) Several phy_node reference count bug fixes from Uwe Kleine-König. 3) Fix ucc_geth build failures, also from Uwe Kleine-König. 4) Fix klog false positivies when netlink messages go to network taps, by properly resetting the network header. Fix from Daniel Borkmann. 5) Sizing estimate of VF netlink messages is too small, from Jiri Benc. 6) New APM X-Gene SoC ethernet driver, from Iyappan Subramanian. 7) VLAN untagging is erroneously dependent upon whether the VLAN module is loaded or not, but there are generic dependencies that matter wrt what can be expected as the SKB enters the stack. Make the basic untagging generic code, and do it unconditionally. From Vlad Yasevich. 8) xen-netfront only has so many slots in it's transmit queue so linearize packets that have too many frags. From Zoltan Kiss. 9) Fix suspend/resume PHY handling in bcmgenet driver, from Florian Fainelli" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (55 commits) net: bcmgenet: correctly resume adapter from Wake-on-LAN net: bcmgenet: update UMAC_CMD only when link is detected net: bcmgenet: correctly suspend and resume PHY device net: bcmgenet: request and enable main clock earlier net: ethernet: myricom: myri10ge: myri10ge.c: Cleaning up missing null-terminate after strncpy call xen-netfront: Fix handling packets on compound pages with skb_linearize net: fec: Support phys probed from devicetree and fixed-link smsc: replace WARN_ON() with WARN_ON_SMP() xen-netback: Don't deschedule NAPI when carrier off net: ethernet: qlogic: qlcnic: Remove duplicate object file from Makefile wan: wanxl: Remove typedefs from struct names m68k/atari: EtherNEC - ethernet support (ne) net: ethernet: ti: cpmac.c: Cleaning up missing null-terminate after strncpy call hdlc: Remove typedefs from struct names airo_cs: Remove typedef local_info_t atmel: Remove typedef atmel_priv_ioctl com20020_cs: Remove typedef com20020_dev_t ethernet: amd: Remove typedef local_info_t net: Always untag vlan-tagged traffic on input. drivers: net: Add APM X-Gene SoC ethernet driver support. ...
2014-08-11net: bcmgenet: correctly resume adapter from Wake-on-LANFlorian Fainelli1-4/+6
In case we configured the adapter to be a wake up source from Wake-on-LAN, but we never actually woke up using Wake-on-LAN, we will leave the adapter in MagicPacket matching mode, which prevents any other type of packets from reaching the RX engine. Fix this by calling bcmgenet_power_up() with GENET_POWER_WOL_MAGIC to restore the adapter configuration in bcmgenet_resume(). The second problem we had was an imbalanced clock disabling in bcmgenet_wol_resume(), the Wake-on-LAN slow clock is only enabled in bcmgenet_suspend() if we configured Wake-on-LAN, yet we unconditionally disabled the clock in bcmgenet_wol_resume(). Fixes: 8c90db72f926 ("net: bcmgenet: suspend and resume from Wake-on-LAN") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11net: bcmgenet: update UMAC_CMD only when link is detectedFlorian Fainelli1-2/+6
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 GENET hardware block, and this will cause bus errors to happen in bcmgenet_mii_setup(): 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 Fixes: 240524089d7a ("net: bcmgenet: only update UMAC_CMD if something changed") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11net: bcmgenet: correctly suspend and resume PHY deviceFlorian Fainelli1-2/+11
Make sure that we properly suspend and resume the PHY device when we enter low power modes. We had two calls to bcmgenet_mii_reset() which will issue a software-reset to the PHY without using the PHY library, get rid of them since they are completely bogus and mess up with the PHY library state. Make sure that we reset the PHY library cached values (link, pause and duplex) to allow the link adjustment callback to be invoked when needed. Fixes: b6e978e50444 ("net: bcmgenet: add suspend/resume callbacks") Fixes: 1c1008c793fa4 ("net: bcmgenet: add main driver file") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11net: bcmgenet: request and enable main clock earlierFlorian Fainelli1-7/+7
bcmgenet_set_hw_params() will read the hardware version and compare it with the one we are getting from Device Tree. Due to the clock being enabled too late, bcmgenet_set_hw_params() will cause bus errors since the GENET hardware block is still gated off by the time bcmgenet_set_hw_params() is called, this will also make us fail the version check since we will read the value 0 from the hardware. Fix this by requesting the clock before the first piece of code that needs to access hardware register. Fixes: 1c1008c793fa4 ("net: bcmgenet: add main driver file") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11net: ethernet: myricom: myri10ge: myri10ge.c: Cleaning up missing null-terminate after strncpy callRickard Strandqvist1-0/+1
Added a guaranteed null-terminate after call to strncpy. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11xen-netfront: Fix handling packets on compound pages with skb_linearizeZoltan Kiss1-3/+4
There is a long known problem with the netfront/netback interface: if the guest tries to send a packet which constitues more than MAX_SKB_FRAGS + 1 ring slots, it gets dropped. The reason is that netback maps these slots to a frag in the frags array, which is limited by size. Having so many slots can occur since compound pages were introduced, as the ring protocol slice them up into individual (non-compound) page aligned slots. The theoretical worst case scenario looks like this (note, skbs are limited to 64 Kb here): linear buffer: at most PAGE_SIZE - 17 * 2 bytes, overlapping page boundary, using 2 slots first 15 frags: 1 + PAGE_SIZE + 1 bytes long, first and last bytes are at the end and the beginning of a page, therefore they use 3 * 15 = 45 slots last 2 frags: 1 + 1 bytes, overlapping page boundary, 2 * 2 = 4 slots Although I don't think this 51 slots skb can really happen, we need a solution which can deal with every scenario. In real life there is only a few slots overdue, but usually it causes the TCP stream to be blocked, as the retry will most likely have the same buffer layout. This patch solves this problem by linearizing the packet. This is not the fastest way, and it can fail much easier as it tries to allocate a big linear area for the whole packet, but probably easier by an order of magnitude than anything else. Probably this code path is not touched very frequently anyway. Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Cc: Paul Durrant <paul.durrant@citrix.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xenproject.org Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11net: fec: Support phys probed from devicetree and fixed-linkUwe Kleine-König2-21/+56
This adds support for specifying the phy to be used with the fec in the devicetree using the standard phy-handle property and also supports fixed-link. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11smsc: replace WARN_ON() with WARN_ON_SMP()Sanjeev Sharma1-1/+1
spin_is_locked() always return false in uniprocessor configuration and therefore it would be advise to repalce with WARN_ON_SMP(). Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11xen-netback: Don't deschedule NAPI when carrier offZoltan Kiss1-5/+1
In the patch called "xen-netback: Turn off the carrier if the guest is not able to receive" NAPI was descheduled when the carrier was set off. That's not what most of the drivers do, and we don't have any specific reason to do so as well, so revert that change. Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xenproject.org Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11net: ethernet: qlogic: qlcnic: Remove duplicate object file from MakefileAndreas Ruprecht1-1/+1
In the Makefile, qlcnic_minidump.o is included twice in the list of object files linked into qlcnic.o. This change removes the superfluous include. Signed-off-by: Andreas Ruprecht <rupran@einserver.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11wan: wanxl: Remove typedefs from struct namesHimangi Saraogi1-31/+32
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedefs for port_t, card_status_t and card_t. Also, the names of the structs are changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects two cases and a similar one detects the case for card_t. @tn1@ type td; @@ typedef struct { ... } td; @script:python tf@ td << tn1.td; tdres; @@ coccinelle.tdres = td; @@ type tn1.td; identifier tf.tdres; @@ -typedef struct + tdres { ... } -td ; @@ type tn1.td; identifier tf.tdres; @@ -td + struct tdres Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11m68k/atari: EtherNEC - ethernet support (ne)Michael Schmitz2-1/+4
Support for Atari EtherNEC ROM port adapters in ne.c Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11net: ethernet: ti: cpmac.c: Cleaning up missing null-terminate after strncpy callRickard Strandqvist1-0/+1
Added a guaranteed null-terminate after call to strncpy. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11hdlc: Remove typedefs from struct namesHimangi Saraogi1-31/+32
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedefs for fr_hdr and pvc_device. Also, the names of the structs are changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case fr_hdr and a similar one detects the case for pvc_device. @tn1@ type td; @@ typedef struct { ... } td; @script:python tf@ td << tn1.td; tdres; @@ coccinelle.tdres = td; @@ type tn1.td; identifier tf.tdres; @@ -typedef struct + tdres { ... } -td ; @@ type tn1.td; identifier tf.tdres; @@ -td + struct tdres Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11airo_cs: Remove typedef local_info_tHimangi Saraogi1-12/+13
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for local_info_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11atmel: Remove typedef atmel_priv_ioctlHimangi Saraogi1-4/+4
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for atmel_priv_ioctl. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11com20020_cs: Remove typedef com20020_dev_tHimangi Saraogi1-8/+8
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for com20020_dev_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11ethernet: amd: Remove typedef local_info_tHimangi Saraogi1-20/+20
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for local_info_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-11drivers: net: Add APM X-Gene SoC ethernet driver support.Iyappan Subramanian11-0/+2299
This patch adds network driver for APM X-Gene SoC ethernet. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: Ravi Patel <rapatel@apm.com> Signed-off-by: Keyur Chudgar <kchudgar@apm.com> Signed-off-by: Dean Nelson <dnelson@redhat.com> Reviewed-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-10net: ucc_geth: fix build failureUwe Kleine-König1-2/+2
My series to fix the reference counting of dt nodes introduced a build failure. Fix it. Fixes: fa310789a488 ("net: ucc_geth: drop acquired references in probe error path and remove") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-08drivers/net/ethernet/amd/pcnet32.c: neaten and remove unnecessary OOM messagesJoe Perches1-25/+18
Make the code flow a little better for 80 columns. Use a consistent style for the RX and TX rings allocation. Use BIT macro. Use a temporary unsiged int entries for (1<<size). Remove the OOM messages as they duplicate the generic OOM and dump_stack() provided by the memory subsystem. Reflow allocs to 80 columns. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Don Fry <pcnet32@frontier.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08rtlwifi: use pci_zalloc_consistentJoe Perches1-12/+5
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08rtl818x: use pci_zalloc_consistentJoe Perches1-7/+4
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08mwl8k: use pci_zalloc_consistentJoe Perches1-4/+2
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08ipw2100: use pci_zalloc_consistentJoe Perches1-11/+5
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08irda: use pci_zalloc_consistentJoe Perches1-2/+2
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Samuel Ortiz <samuel@sortiz.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08qlogic: use pci_zalloc_consistentJoe Perches2-9/+6
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Manish Chopra <manish.chopra@qlogic.com> Cc: Sony Chacko <sony.chacko@qlogic.com> Cc: Rajesh Borundia <rajesh.borundia@qlogic.com> Cc: Shahed Shaikh <shahed.shaikh@qlogic.com> Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Cc: Ron Mercer <ron.mercer@qlogic.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08micrel: use pci_zalloc_consistentJoe Perches1-4/+3
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08sky2: use pci_zalloc_consistentJoe Perches1-3/+2
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Mirko Lindner <mlindner@marvell.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08enic: use pci_zalloc_consistentJoe Perches1-5/+3
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Govindarajulu Varadarajan <_govind@gmx.com> Cc: Neel Patel <neepatel@cisco.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08atl1e: use pci_zalloc_consistentJoe Perches1-5/+2
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08amd: use pci_zalloc_consistentJoe Perches1-10/+8
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Don Fry <pcnet32@frontier.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08dm9000: Remove typedef board_info_tHimangi Saraogi1-46/+46
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for board_info_t. Also, the name of the structs is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the cases: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-08fec_mpc52xx: delete unneeded test before of_node_putJulia Lawall1-2/+1
Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-08ll_temac: delete unneeded test before of_node_putJulia Lawall1-2/+1
Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-08net: axienet: delete unneeded test before of_node_putJulia Lawall1-2/+1
Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07cxgb4: IEEE fixes for DCBx state machineAnish Bhatt5-71/+216
* Changes required due to 16eecd9be4b05 ("dcbnl : Fix misleading dcb_app->priority explanation") * Driver was previously not aware of what DCBx version was negotiated by firmware, this could lead to DCB app table in kernel or in firmware being populated wrong since IEEE/CEE used different formats made clear by above mentioned commit * Driver was missing a couple of state transitions that could be caused by other drivers that use chelsio hardware, resulting in incorrect behaviour (the change that addresses this also flips the state machine to switch on state instead of transition, hope this is okay in current window) * Prio queue info & tsa is no longer thrown away v2: Print DCBx state transition messages only when debug is enabled Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: ucc_geth: Don't use the MAC as PHY without a fixed linkUwe Kleine-König1-7/+6
This matches what the other drivers using fixed-link support do and restores the behaviour before commit 87009814cdbb ("ucc_geth: use the new fixed PHY helpers") for the affected device trees (i.e. no phy-handle and no fixed-link). Fixes: 87009814cdbb ("ucc_geth: use the new fixed PHY helpers") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: ucc_geth: make probe consistently acquire a reference to the phy nodeUwe Kleine-König1-1/+1
When the driver attaches to a device that has a phy handle the probe routine returns with a reference to that node. This reference is correctly dropped in the error path and the remove function. In the fixed phy case however no reference is acquired and so the error path might drop a reference the driver isn't holding. Fix that by getting a reference to the MAC. Fixes: 87009814cdbb ("ucc_geth: use the new fixed PHY helpers") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: ucc_geth: drop acquired references in probe error path and removeUwe Kleine-König1-1/+8
The ucc_geth_probe function assigns to ug_info->tbi_node and ug_info->phy_node a value returned by of_parse_phandle which returns a new reference. Put this reference again in the error path of ucc_geth_probe and when removing the device. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: fs_enet: fix reference counting for phy_nodeUwe Kleine-König1-1/+1
Make sure that fs_enet_probe is left with a reference to the phy node. In the presence of a phy handle this is already the case as of_parse_phandle returns a reference. In the fixed phy case a call to of_node_get is necessary. Otherwise the error path and remove function drop a reference the driver isn't holding. Fixes: bb74d9a4a87b ("fs_enet: use the new fixed PHY helpers") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: bcmgenet: fix reference counting for phy nodeUwe Kleine-König1-2/+4
For the fixed phy setup make sure to not overwrite a valid value of phy_dn (that is holding a reference to a phy-handle) and also acquire a reference to the MAC node to consistently return with the phy_dn pointer holding a reference. Also add the corresponding of_node_put in the error path and the remove function. Fixes: 9abf0c2b717a ("net: bcmgenet: use the new fixed PHY helpers") Fixes: aa09677cba42 ("net: bcmgenet: add MDIO routines") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07drivers/net: Remove typedef axnet_dev_tHimangi Saraogi1-13/+13
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for axnet_dev_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07drivers/net: Remove typedefs pcnet_dev_t and hw_info_tHimangi Saraogi1-34/+34
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedefs for pcnet_dev_t and hw_info_t. Also, the name of the structs is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the cases: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07drivers/net: ethernet: Remove typedef for struct and enumHimangi Saraogi1-17/+17
The Linux kernel coding style guidelines suggest not using typedefs for structure and enum types. This patch gets rid of the typedef for cardtype_t and local_info_t. Also, the names of the struct and enum are changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case for struct type: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: gianfar: fix reference counting for phy_nodeUwe Kleine-König1-2/+2
The line before the changed if condition is: priv->phy_node = of_parse_phandle(np, "phy-handle", 0); . If this call succeeds priv->phy_node must not be overwritten in the if block; otherwise the reference to the node returned by of_parse_phandle is lost. So add a check that the if block isn't executed in this case. Furthermore in the fixed phy case no reference is aquired for phy_node resulting in an of_node_put without holding a reference. To fix that, get a reference on the MAC dt node. Fixes: be40364544bd ("gianfar: use the new fixed PHY helpers") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: mvneta: Fix reference counting for phy_nodeUwe Kleine-König1-3/+6
If there is a "phy" handle the probe function returns with holding a reference to that node. Make sure that in the fixed phy case there is also held a reference to yield a consistant state. Also add the corresponding of_node_put in the error path and the remove function. Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links") Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-08-07net: gianfar: no need to check parameter being != NULL for of_node_putUwe Kleine-König1-8/+4
of_node_put is a noop when being called with NULL. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>