aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/via (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-05-20net: velocity: Add platform device support to VIA velocity driverTony Prisk3-129/+285
Add support for the VIA Velocity network driver to be bound to a OF created platform device. Signed-off-by: Tony Prisk <linux@prisktech.co.nz> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20net: velocity: Convert to generic dma functionsTony Prisk2-26/+26
Remove the pci_* dma functions and replace with the more generic versions. In preparation of adding platform support, a new struct device *dev is added to struct velocity_info which can be used by both the pci and platform code. Signed-off-by: Tony Prisk <linux@prisktech.co.nz> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-20net: velocity: Rename vptr->dev to vptr->netdevTony Prisk2-35/+35
Improve the clarity of the code in preparation for converting the dma functions to generic versions, which require a struct device *. This makes it possible to store a 'struct device *dev' in the velocity_info structure. Signed-off-by: Tony Prisk <linux@prisktech.co.nz> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: add protocol argument to packet tagging functionsPatrick McHardy2-2/+2
Add a protocol argument to the VLAN packet tagging functions. In case of HW tagging, we need that protocol available in the ndo_start_xmit functions, so it is stored in a new field in the skb. The new field fits into a hole (on 64 bit) and doesn't increase the sks's size. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: prepare for 802.1ad VLAN filtering offloadPatrick McHardy2-6/+10
Change the rx_{add,kill}_vid callbacks to take a protocol argument in preparation of 802.1ad support. The protocol argument used so far is always htons(ETH_P_8021Q). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-19net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*Patrick McHardy2-5/+7
Rename the hardware VLAN acceleration features to include "CTAG" to indicate that they only support CTAGs. Follow up patches will introduce 802.1ad server provider tagging (STAGs) and require the distinction for hardware not supporting acclerating both. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-6/+2
Conflicts: drivers/net/ethernet/intel/e1000e/ethtool.c drivers/net/vmxnet3/vmxnet3_drv.c drivers/net/wireless/iwlwifi/dvm/tx.c net/ipv6/route.c The ipv6 route.c conflict is simple, just ignore the 'net' side change as we fixed the same problem in 'net-next' by eliminating cached neighbours from ipv6 routes. The e1000e conflict is an addition of a new statistic in the ethtool code, trivial. The vmxnet3 conflict is about one change in 'net' removing a guarding conditional, whilst in 'net-next' we had a netdev_info() conversion. The iwlwifi conflict is dealing with a WARN_ON() conversion in 'net-next' vs. a revert happening in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-02via-rhine: Fix bugs in NAPI support.David S. Miller1-6/+2
1) rhine_tx() should use dev_kfree_skb() not dev_kfree_skb_irq() 2) rhine_slow_event_task's NAPI triggering logic is racey, it should just hit the interrupt mask register. This is the same as commit 7dbb491878a2c51d372a8890fa45a8ff80358af1 ("r8169: avoid NAPI scheduling delay.") made to fix the same problem in the r8169 driver. From Francois Romieu. Reported-by: Jamie Gloudon <jamie.gloudon@gmail.com> Tested-by: Jamie Gloudon <jamie.gloudon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-28via-rhine: add 64bit statistics.Jamie Gloudon1-8/+39
Switch to use ndo_get_stats64 to get 64bit statistics. Signed-off-by: Jamie Gloudon <jamie.gloudon@gmail.com> Tested-by: Jamie Gloudon <jamie.gloudon@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-08remove init of dev->perm_addr in driversJiri Pirko1-1/+0
perm_addr is initialized correctly in register_netdevice() so to init it in drivers is no longer needed. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-07drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman2-5/+3
The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-03via-velocity: remove __dev* attributesBill Pemberton1-10/+15
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-03via-rhine: remove __dev* attributesBill Pemberton1-6/+6
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Roger Luethi <rl@hellgate.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-06ethernet: Remove casts to same typeJoe Perches1-1/+1
Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p A function in atl1e_main.c was passed a const pointer when it actually modified elements of the structure. Change the argument to a non-const pointer. A function in stmmac needed a __force to avoid a sparse warning. Added it. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-5/+7
2012-04-07via-velocity: stop using net_device.{base_addr, irq}.Francois Romieu1-7/+2
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: David Lv <DavidLv@viatech.com.cn>
2012-04-07via-rhine: stop using net_device.{base_addr, irq}.Francois Romieu1-6/+6
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: David Lv <DavidLv@viatech.com.cn>
2012-04-01via-rhine: fix wait-bit inversion.Andreas Mohr1-5/+7
Bug appeared in a384a33bb1c9ec2d99db2046b41f57023fa7d77b ("via-rhine: RHINE_WAIT_FOR macro removal). It can be noticed during suspend/resume. Signed-off-by: Andreas Mohr <andi@lisas.de> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Cc: David Lv <DavidLv@viatech.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15net: replace random_ether_addr() with eth_hw_addr_random()Danny Kukawka1-1/+1
Replace usage of random_ether_addr() with eth_hw_addr_random() to set addr_assign_type correctly to NET_ADDR_RANDOM. Change the trivial cases. v2: adapt to renamed eth_hw_addr_random() Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-10Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-3/+0
Conflicts: drivers/infiniband/hw/nes/nes_cm.c Simple whitespace conflict. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-08netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A. Dalvi2-3/+1
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-05via-velocity: S3 resume fix.David Lv1-3/+0
Initially diagnosed on Ubuntu 11.04 with kernel 2.6.38. velocity_close is not called during a suspend / resume cycle in this driver and it has no business playing directly with power states. Signed-off-by: David Lv <DavidLv@viatech.com.cn> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-31drivers/net: Remove alloc_etherdev error messagesJoe Perches2-4/+1
alloc_etherdev has a generic OOM/unable to alloc message. Remove the duplicative messages after alloc_etherdev calls. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-07via-rhine: rework suspend and resume.Francois Romieu1-21/+20
Cover of 861ab44059350e5cab350238606cf8814abab93b. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-01-07via-rhine: per device debug level.Francois Romieu1-90/+79
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-01-07via-rhine: RHINE_WAIT_FOR macro removal.Francois Romieu1-24/+50
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-01-07via-rhine: move work from irq handler to softirq and beyond.Francois Romieu1-177/+225
- Tx processing is moved from the irq handler to NAPI poll - link events and obscure event processing is moved to its proper work queue Locking rules undergo some changes through the driver. - the driver offers the usual lock-free Tx path - besides the IRQ handler, the link event task schedules the napi handler. The driver thus adds some internal locking to prevent a loop when both must be disabled. - the reset task keeps being scheduled from the Tx watchdog handler, thus with implicit Tx queue disabling. It does not need to care about irq, only napi softirq and competing task. - it is not worth to add a dedicated lock between {g, s}et_wol and rhine_shutdown. It should not hurt no narrow it down a bit though. - rhine_reset_task must keep its huge spin_lock_bh protected section due to : - races for the CAM registers (see rhine_vlan_rx_{add, kill}_vid) - implicit use of napi_enable (see init_registers) - use of the same lock for stats read / update exclusion between napi rx processing and rhine_get_stats - rhine_resume requires a softirq disabled section for the same reason as rhine_reset_task - {free, request}_irq have been replaced with IntrEnable actions in rhine_{suspend, resume}. It is hidden behind init_registers for the latter. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-01-07via-rhine: remove useless forward declarations.Francois Romieu1-7/+0
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-01-07via-rhine: balance interrupt acknowledge and events retrieval.Francois Romieu1-8/+14
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-01-07via-rhine: factor out tx_thresh handlingFrancois Romieu1-5/+12
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2011-12-19module_param: make bool parameters really bool (net & drivers/net)Rusty Russell1-2/+3
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. (Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false). Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net: make vlan ndo_vlan_rx_[add/kill]_vid return error valueJiri Pirko2-6/+10
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-11-14Sweep additional floors of strcpy in .get_drvinfo routinesRick Jones2-6/+6
Perform another round of floor sweeping, converting the .get_drvinfo routines of additional drivers from strcpy to strlcpy along with some conversion of sprintf to snprintf. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19net: add skb frag size accessorsEric Dumazet1-3/+3
To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-06net: use DMA_x_DEVICE and dma_mapping_error with skb_frag_dma_mapIan Campbell1-1/+1
When I converted some drivers from pci_map_page to skb_frag_dma_map I neglected to convert PCI_DMA_xDEVICE into DMA_x_DEVICE and pci_dma_mapping_error into dma_mapping_error. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-22via-velocity: convert to SKB paged frag API.Ian Campbell1-3/+4
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-15MII: fix Kconfig dependencies for MIIJeff Kirsher1-0/+2
MII Kconfig option is apart of the core networking drivers and by default NET_CORE is enabled so drivers selecting MII will have MII enabled as well. It was found using the randconfig option during testing, MII would be selected but NET_CORE could be disabled. This caused a dependency error. Resolved the dependency by selecting NET_CORE when MII is selected. Reported-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-27drivers/net/ethernet/*: Enabled vendor Kconfig optionsJeff Kirsher1-0/+1
Based on finds for Stephen Rothwell, where current defconfig's enable a ethernet driver and it is not compiled due to the newly added NET_VENDOR_* component of Kconfig. This patch enables all the "new" Kconfig options so that current defconfig's will continue to compile the expected drivers. In addition, by enabling all the new Kconfig options does not add any un-expected options. CC: Stephen Rothwll <sfc@canb.auug.org.au> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-08-20Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-4/+0
2011-08-17net: remove use of ndo_set_multicast_list in driversJiri Pirko2-2/+2
replace it by ndo_set_rx_mode Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-12via-*: Move the VIA driversJeff Kirsher5-0/+7573
Move the VIA drivers into drivers/net/ethernet/via/ and make the necessary Kconfig and Makefile changes. CC: Roger Luethi <rl@hellgate.ch> CC: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>