aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/et131x (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-08-17staging: et131x: Fix errors caused by phydev->addr accesses before initialisationMark Einon1-41/+27
Fix two reported bugs, caused by et131x_adapter->phydev->addr being accessed before it is initialised, by: - letting et131x_mii_write() take a phydev address, instead of using the one stored in adapter by default. This is so et131x_mdio_write() can use it's own addr value. - removing implementation of et131x_mdio_reset(), as it's not needed. - moving a call to et131x_disable_phy_coma() in et131x_pci_setup(), which uses phydev->addr, until after the mdiobus has been registered. Link: https://bugzilla.kernel.org/show_bug.cgi?id=80751 Link: https://bugzilla.kernel.org/show_bug.cgi?id=77121 Cc: stable@vger.kernel.org Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24staging: et131x: Remove trailing semicolon from macros in et131x.hMasanari Iida1-20/+20
This patch removes trailing semicolon from macros within et131x.h Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24staging: et131x: Fix typo in et131xMasanari Iida2-7/+7
This patch fix spelling typos in comments and printk within et131x. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09staging: et131x: Use net_device_stats from struct net_deviceTobias Klauser1-10/+8
Instead of using an own copy of struct net_device_stats in struct et131x_adapter, use stats from struct net_device. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-1/+1
Pull networking updates from David Miller: 1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov. 2) Multiqueue support in xen-netback and xen-netfront, from Andrew J Benniston. 3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn Mork. 4) BPF now has a "random" opcode, from Chema Gonzalez. 5) Add more BPF documentation and improve test framework, from Daniel Borkmann. 6) Support TCP fastopen over ipv6, from Daniel Lee. 7) Add software TSO helper functions and use them to support software TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia. 8) Support software TSO in fec driver too, from Nimrod Andy. 9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli. 10) Handle broadcasts more gracefully over macvlan when there are large numbers of interfaces configured, from Herbert Xu. 11) Allow more control over fwmark used for non-socket based responses, from Lorenzo Colitti. 12) Do TCP congestion window limiting based upon measurements, from Neal Cardwell. 13) Support busy polling in SCTP, from Neal Horman. 14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru. 15) Bridge promisc mode handling improvements from Vlad Yasevich. 16) Don't use inetpeer entries to implement ID generation any more, it performs poorly, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits) rtnetlink: fix userspace API breakage for iproute2 < v3.9.0 tcp: fixing TLP's FIN recovery net: fec: Add software TSO support net: fec: Add Scatter/gather support net: fec: Increase buffer descriptor entry number net: fec: Factorize feature setting net: fec: Enable IP header hardware checksum net: fec: Factorize the .xmit transmit function bridge: fix compile error when compiling without IPv6 support bridge: fix smatch warning / potential null pointer dereference via-rhine: fix full-duplex with autoneg disable bnx2x: Enlarge the dorq threshold for VFs bnx2x: Check for UNDI in uncommon branch bnx2x: Fix 1G-baseT link bnx2x: Fix link for KR with swapped polarity lane sctp: Fix sk_ack_backlog wrap-around problem net/core: Add VF link state control policy net/fsl: xgmac_mdio is dependent on OF_MDIO net/fsl: Make xgmac_mdio read error message useful net_sched: drr: warn when qdisc is not work conserving ...
2014-05-23staging: et131x: Remove empty file Module.symversDaniele Forsi1-0/+0
It was added by commit e0349d5ba (staging: et131x: Remove unused rcv_pend_lock spinlock) Signed-off-by: Daniele Forsi <dforsi@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: et131x: add blank lines after declarationsMaarten de Jonge1-0/+2
Signed-off-by: Maarten de Jonge <mdejonge1990@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: et131x: Remove useless return variablesPeter Senna Tschudin1-2/+1
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret - return ret; + return C; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-13net: get rid of SET_ETHTOOL_OPSWilfried Klaebe1-1/+1
net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ - SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I'd seriously wonder if this broke anything. Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-08Staging: et131x: Fix warning of prefer ether_addr_copy() in et131x.cMonam Agarwal1-2/+2
This patch fixes the following checkpatch.pl warnings: WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)". I used pahole to see whether addresses are aligned. Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18staging: et131x: fix allocation failuresAlan1-2/+7
We should check the ring allocations don't fail. If we get a fail we need to clean up properly. The allocator assumes the deallocator will be used on failure, but it isn't. Make sure the right deallocator is always called and add a missing check against fbr allocation failure. [v2]: Correct check logic Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging: et131x: remove spinlock adapter->lockZhao, Gang1-8/+0
adapter->lock is only used in et131x_multicast(), which is eventually called by network stack function __dev_set_rx_mode(). __dev_set_rx_mode() is always called by (net_device *)dev->addr_list_lock hold, to protect from concurrent access. So adapter->lock is redundant. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging: et131x: stop read when hit max delay in et131x_phy_mii_readZhao, Gang1-0/+2
stop read and return error when hit max delay time. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: et131x: improve code consistency: access struct tx_ringZHAO Gang1-95/+95
Let all the code use a pointer called tx_ring to access struct tx_ring members. Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: et131x: improve code consistency: access struct rx_ringZHAO Gang1-28/+20
Let all the code use a pointer called rx_ring to access struct rx_ring members. Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: et131x: remove unnecessary pointer typecastZHAO Gang1-12/+10
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: et131x: remove item that have been done in TODO fileZHAO Gang1-4/+0
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: et131x: reduce split lines in nic_rx_pktsZHAO Gang1-6/+5
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: et131x: reduce split lines in nic_return_rfdZHAO Gang1-10/+10
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: et131x: reduce split lines in et131x_rx_dma_memory_freeZHAO Gang1-15/+17
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: et131x: reduce split lines in et131x_rx_dma_memory_allocZHAO Gang1-25/+23
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: et131x: reduce split lines in et131x_config_rx_dma_regsZHAO Gang1-14/+10
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-06staging: et131x: trivial whitespace and line / character reductionsMark Einon1-18/+14
Tweak some whitespace, also remove a few redundant lines and characters (mainly of type 'if (status != 0)' -> 'if (status)'). Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-06staging: et131x: remove unhelpful commentsMark Einon1-176/+28
Get rid of some of the more unhelpful comments. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-06staging: et131x: remove two useless debug statementsMark Einon1-3/+0
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-06staging: et131x: clear up use of TRUEPHY definesMark Einon2-74/+11
There are a large number of TRUEPHY defines in the driver, all of which are unused or unnecessary. Remove / replace these. As this results in et1310_phy_access_mii_bit() only being used for reading bits, also change it's name to et1310_phy_read_mii_bit(). Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-06staging: et131x: replace magic number bitmask with defined valuesMark Einon1-1/+1
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-06staging: et131x: Remove unnecessary phydev checksMark Einon1-8/+5
Several checks for a valid adapter->phydev pointer are made where the pointer has already been checked previously in the code path. Remove these redundant checks. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-06staging: et131x: improve indenting in et131x_adjust_link()Mark Einon1-79/+81
Negate some 'if' checks to return early, allowing a large block of code to be un-indented. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04staging: et131x: delete unnecessary variable in function et131x_initZHAO Gang1-3/+1
Variable u32 numrfd is not necessary in this function. Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04staging: et131x: change function nameZHAO Gang1-3/+3
Change function name from et1310_phy_power_down to et1310_phy_power_switch to better describe its functionality. Signed-off-by: ZHAO Gang <gamerh2o@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02staging: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han1-1/+1
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-14Merge tag 'pci-v3.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pciLinus Torvalds1-11/+3
Pull PCI changes from Bjorn Helgaas: "Resource management - Fix host bridge window coalescing (Alexey Neyman) - Pass type, width, and prefetchability for window alignment (Wei Yang) PCI device hotplug - Convert acpiphp, acpiphp_ibm to dynamic debug (Lan Tianyu) Power management - Remove pci_pm_complete() (Liu Chuansheng) MSI - Fail initialization if device is not in PCI_D0 (Yijing Wang) MPS (Max Payload Size) - Use pcie_get_mps() and pcie_set_mps() to simplify code (Yijing Wang) - Use pcie_set_readrq() to simplify code (Yijing Wang) - Use cached pci_dev->pcie_mpss to simplify code (Yijing Wang) SR-IOV - Enable upstream bridges even for VFs on virtual buses (Bjorn Helgaas) - Use pci_is_root_bus() to avoid catching virtual buses (Wei Yang) Virtualization - Add x86 MSI masking ops (Konrad Rzeszutek Wilk) Freescale i.MX6 - Support i.MX6 PCIe controller (Sean Cross) - Increase link startup timeout (Marek Vasut) - Probe PCIe in fs_initcall() (Marek Vasut) - Fix imprecise abort handler (Tim Harvey) - Remove redundant of_match_ptr (Sachin Kamat) Renesas R-Car - Support Gen2 internal PCIe controller (Valentine Barshak) Samsung Exynos - Add MSI support (Jingoo Han) - Turn off power when link fails (Jingoo Han) - Add Jingoo Han as maintainer (Jingoo Han) - Add clk_disable_unprepare() on error path (Wei Yongjun) - Remove redundant of_match_ptr (Sachin Kamat) Synopsys DesignWare - Add irq_create_mapping() (Pratyush Anand) - Add header guards (Seungwon Jeon) Miscellaneous - Enable native PCIe services by default on non-ACPI (Andrew Murray) - Cleanup _OSC usage and messages (Bjorn Helgaas) - Remove pcibios_last_bus boot option on non-x86 (Bjorn Helgaas) - Convert bus code to use bus_, drv_, and dev_groups (Greg Kroah-Hartman) - Remove unused pci_mem_start (Myron Stowe) - Make sysfs functions static (Sachin Kamat) - Warn on invalid return from driver probe (Stephen M. Cameron) - Remove Intel Haswell D3 delays (Todd E Brandt) - Call pci_set_master() in core if driver doesn't do it (Yinghai Lu) - Use pci_is_pcie() to simplify code (Yijing Wang) - Use PCIe capability accessors to simplify code (Yijing Wang) - Use cached pci_dev->pcie_cap to simplify code (Yijing Wang) - Removed unused "is_pcie" from struct pci_dev (Yijing Wang) - Simplify sysfs CPU affinity implementation (Yijing Wang)" * tag 'pci-v3.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (79 commits) PCI: Enable upstream bridges even for VFs on virtual buses PCI: Add pci_upstream_bridge() PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq() PCI: Warn on driver probe return value greater than zero PCI: Drop warning about drivers that don't use pci_set_master() PCI: Workaround missing pci_set_master in pci drivers powerpc/pci: Use pci_is_pcie() to simplify code [fix] PCI: Update pcie_ports 'auto' behavior for non-ACPI platforms PCI: imx6: Probe the PCIe in fs_initcall() PCI: Add R-Car Gen2 internal PCI support PCI: imx6: Remove redundant of_match_ptr PCI: Report pci_pme_active() kmalloc failure mn10300/PCI: Remove useless pcibios_last_bus frv/PCI: Remove pcibios_last_bus PCI: imx6: Increase link startup timeout PCI: exynos: Remove redundant of_match_ptr PCI: imx6: Fix imprecise abort handler PCI: Fail MSI/MSI-X initialization if device is not in PCI_D0 PCI: imx6: Remove redundant dev_err() in imx6_pcie_probe() x86/PCI: Coalesce multiple overlapping host bridge windows ...
2013-11-14Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds1-15/+2
Pull DMA mask updates from Russell King: "This series cleans up the handling of DMA masks in a lot of drivers, fixing some bugs as we go. Some of the more serious errors include: - drivers which only set their coherent DMA mask if the attempt to set the streaming mask fails. - drivers which test for a NULL dma mask pointer, and then set the dma mask pointer to a location in their module .data section - which will cause problems if the module is reloaded. To counter these, I have introduced two helper functions: - dma_set_mask_and_coherent() takes care of setting both the streaming and coherent masks at the same time, with the correct error handling as specified by the API. - dma_coerce_mask_and_coherent() which resolves the problem of drivers forcefully setting DMA masks. This is more a marker for future work to further clean these locations up - the code which creates the devices really should be initialising these, but to fix that in one go along with this change could potentially be very disruptive. The last thing this series does is prise away some of Linux's addition to "DMA addresses are physical addresses and RAM always starts at zero". We have ARM LPAE systems where all system memory is above 4GB physical, hence having DMA masks interpreted by (eg) the block layers as describing physical addresses in the range 0..DMAMASK fails on these platforms. Santosh Shilimkar addresses this in this series; the patches were copied to the appropriate people multiple times but were ignored. Fixing this also gets rid of some ARM weirdness in the setup of the max*pfn variables, and brings ARM into line with every other Linux architecture as far as those go" * 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits) ARM: 7805/1: mm: change max*pfn to include the physical offset of memory ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit() ARM: DMA-API: better handing of DMA masks for coherent allocations ARM: 7857/1: dma: imx-sdma: setup dma mask DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks DMA-API: dcdbas: update DMA mask handing DMA-API: dma: edma.c: no need to explicitly initialize DMA masks DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks DMA-API: crypto: remove last references to 'static struct device *dev' DMA-API: crypto: fix ixp4xx crypto platform device support DMA-API: others: use dma_set_coherent_mask() DMA-API: staging: use dma_set_coherent_mask() DMA-API: usb: use new dma_coerce_mask_and_coherent() DMA-API: usb: use dma_set_coherent_mask() DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent() DMA-API: net: octeon: use dma_coerce_mask_and_coherent() DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent() ...
2013-10-28Staging: et131x: Fix Smatch Warning of Buffer OverflowRashika Kheria1-2/+3
This patch fixes the following Sparse Warning in et131x.c- drivers/staging/et131x/et131x.c:2957 nic_send_packet() error: buffer overflow 'frags' 17 <= 21 drivers/staging/et131x/et131x.c:2959 nic_send_packet() warn: buffer overflow 'frags' 17 <= 21 drivers/staging/et131x/et131x.c:2961 nic_send_packet() error: buffer overflow 'frags' 17 <= 21 Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-04staging: et131x: Use pci_dev->pcie_mpss and pcie_set_readrq() to simplify codeYijing Wang1-11/+3
The PCI core caches the "PCIe Max Payload Size Supported" in pci_dev->pcie_mpss, so use that instead of pcie_capability_read_dword(). Also use pcie_set_readrq() instead of pcie_capability_clear_and_set_word() to simplify code. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Mark Einon <mark.einon@gmail.com>
2013-09-21DMA-API: staging: et131x: replace dma_set_mask()+dma_set_coherent_mask() with new helperRussell King1-15/+2
Replace the following sequence: dma_set_mask(dev, mask); dma_set_coherent_mask(dev, mask); with a call to the new helper dma_set_mask_and_coherent(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-09-17staging: et131x: Add some items to the TODO listMark Einon1-1/+6
Adding some trivial formatting suggestions made by Dan Carpenter to the TODO. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: et131x: Removing some unecessary bracesMark Einon1-7/+5
Remove braces from a few single line if statements. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: et131x: Remove unused rcv_pend_lock spinlockMark Einon2-2/+0
The rcv_pend_lock spinlock isn't used anymore. remove it. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: et131x: Remove unused spinlockMark Einon1-3/+0
phy_lock is no longer used in any useful code, it's all been moved into a phy_device. Remove the lock definition and init. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21staging: et131x: Remove frame error TODO itemMark Einon1-1/+0
After prolonged testing for a few days of normal use with new et131x hardware, I've concluded that this was a hardware issue with the older hardware I had. Removing this item from the TODO. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: et131x: cancel_work when module gets unloadedDevendra Naga1-0/+1
The work item has been added to the queue using INIT_WORK and scheduled in interrupt handler. when module unloads that work item has not been removed from the queue. remove and stop its further execution when the module unloaded Cc: Mark Einon <mark.einon@gmail.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-12staging: et131x: fix invalid fail after the call to eeprom_wait_readyDevendra Naga1-2/+2
should be err < 0 instead of if (err) which actually the read register value can be a positive number Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-21Merge tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds3-457/+434
Pull staging tree update from Greg Kroah-Hartman: "Here's the big staging tree merge for 3.9-rc1 Lots of cleanups and updates for drivers all through the staging tree. We are pretty much "code neutral" here, adding just about as many lines as we removed. All of these have been in linux-next for a while." * tag 'staging-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (804 commits) staging: comedi: vmk80xx: wait for URBs to complete staging: comedi: drivers: addi-data: hwdrv_apci3200.c: Add a missing semicolon staging: et131x: Update TODO list staging: et131x: Remove assignment of skb->dev staging: wlan-ng: hfa384x.h: fix for error reported by smatch staging/zache checkpatch ERROR: spaces prohibited around that staging/ozwpan: Mark read only parameters and structs as const staging/ozwpan: Remove empty and unused function oz_cdev_heartbeat staging/ozwpan: Mark local functions as static (fix sparse warnings) staging/ozwpan: Add missing header includes staging/usbip: Mark local functions as static (fix sparse warnings) staging/xgifb: Remove duplicated code in loops. staging/xgifb: Consolidate return paths staging/xgifb: Remove code without effect staging/xgifb: Remove unnecessary casts staging/xgifb: Consolidate if/else if with identical code branches staging: vt6656: replaced custom TRUE definition with true staging: vt6656: replaced custom FALSE definition with false staging: vt6656: replace custom BOOL definition with bool staging/rtl8187se: Mark functions as static to silence sparse ...
2013-02-18staging: et131x: Update TODO listMark Einon1-0/+4
David Miller <davem@davemloft.net> had provided some review comments for this driver. Update the TODO list with some action points from his review. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-18staging: et131x: Remove assignment of skb->devMark Einon1-1/+0
The call eth_type_trans() sets skb->dev to netdev, so there's no needto set it before the call. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-11staging: Remove unnecessary OOM messagesJoe Perches1-13/+7
alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22staging: et131x: Fix all sparse warningsMark Einon1-7/+7
Dan Carpenter has pointed out that there are several sparse warnings from et131x.c, listed below. This patch fixes all these errors. drivers/staging/et131x/et131x.c:1870:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1870:33:    expected unsigned int [usertype] *num_des drivers/staging/et131x/et131x.c:1870:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1871:37: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1871:37:    expected unsigned int [usertype] *full_offset drivers/staging/et131x/et131x.c:1871:37:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1872:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1872:33:    expected unsigned int [usertype] *min_des drivers/staging/et131x/et131x.c:1872:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1873:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1873:33:    expected unsigned int [usertype] *base_hi drivers/staging/et131x/et131x.c:1873:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1874:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1874:33:    expected unsigned int [usertype] *base_lo drivers/staging/et131x/et131x.c:1874:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1876:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1876:33:    expected unsigned int [usertype] *num_des drivers/staging/et131x/et131x.c:1876:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1877:37: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1877:37:    expected unsigned int [usertype] *full_offset drivers/staging/et131x/et131x.c:1877:37:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1878:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1878:33:    expected unsigned int [usertype] *min_des drivers/staging/et131x/et131x.c:1878:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1879:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1879:33:    expected unsigned int [usertype] *base_hi drivers/staging/et131x/et131x.c:1879:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1880:33: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:1880:33:    expected unsigned int [usertype] *base_lo drivers/staging/et131x/et131x.c:1880:33:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:1898:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1898:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1898:24:    got unsigned int [usertype] *base_hi drivers/staging/et131x/et131x.c:1900:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1900:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1900:24:    got unsigned int [usertype] *base_lo drivers/staging/et131x/et131x.c:1901:60: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1901:60:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1901:60:    got unsigned int [usertype] *num_des drivers/staging/et131x/et131x.c:1902:39: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1902:39:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1902:39:    got unsigned int [usertype] *full_offset drivers/staging/et131x/et131x.c:1910:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:1910:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:1910:24:    got unsigned int [usertype] *min_des drivers/staging/et131x/et131x.c:2583:32: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:2583:32:    expected unsigned int [usertype] *offset drivers/staging/et131x/et131x.c:2583:32:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:2585:32: warning: incorrect type in assignment (different address spaces) drivers/staging/et131x/et131x.c:2585:32:    expected unsigned int [usertype] *offset drivers/staging/et131x/et131x.c:2585:32:    got unsigned int [noderef] <asn:2>*<noident> drivers/staging/et131x/et131x.c:2602:24: warning: incorrect type in argument 2 (different address spaces) drivers/staging/et131x/et131x.c:2602:24:    expected void volatile [noderef] <asn:2>*addr drivers/staging/et131x/et131x.c:2602:24:    got unsigned int [usertype] *offset drivers/staging/et131x/et131x.c:4093:13: warning: symbol 'et131x_isr' was not declared. Should it be static? Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>