aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/via (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-15net,via-rhine: Fix tx_timeout handlingRichard Weinberger1-0/+1
rhine_reset_task() misses to disable the tx scheduler upon reset, this can lead to a crash if work is still scheduled while we're resetting the tx queue. Fixes: [ 93.591707] BUG: unable to handle kernel NULL pointer dereference at 0000004c [ 93.595514] IP: [<c119d10d>] rhine_napipoll+0x491/0x6 Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-11-28via-velocity: fix netif_receive_skb use in irq disabled section.françois romieu1-5/+6
2fdac010bdcf10a30711b6924612dfc40daf19b8 ("via-velocity.c: update napi implementation") overlooked an irq disabling spinlock when the Rx part of the NAPI poll handler was converted from netif_rx to netif_receive_skb. NAPI Rx processing can be taken out of the locked section with a pair of napi_{disable / enable} since it only races with the MTU change function. An heavier rework of the NAPI locking would be able to perform NAPI Tx before Rx where I simply removed one of velocity_tx_srv calls. References: https://bugzilla.redhat.com/show_bug.cgi?id=1022733 Fixes: 2fdac010bdcf (via-velocity.c: update napi implementation) Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Tested-by: Alex A. Schmidt <aaschmidt1@gmail.com> Cc: Jamie Heilman <jamie@audible.transient.net> Cc: Michele Baldessari <michele@acksyn.org> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-11-14Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds1-0/+3
Pull core locking changes from Ingo Molnar: "The biggest changes: - add lockdep support for seqcount/seqlocks structures, this unearthed both bugs and required extra annotation. - move the various kernel locking primitives to the new kernel/locking/ directory" * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) block: Use u64_stats_init() to initialize seqcounts locking/lockdep: Mark __lockdep_count_forward_deps() as static lockdep/proc: Fix lock-time avg computation locking/doc: Update references to kernel/mutex.c ipv6: Fix possible ipv6 seqlock deadlock cpuset: Fix potential deadlock w/ set_mems_allowed seqcount: Add lockdep functionality to seqcount/seqlock structures net: Explicitly initialize u64_stats_sync structures for lockdep locking: Move the percpu-rwsem code to kernel/locking/ locking: Move the lglocks code to kernel/locking/ locking: Move the rwsem code to kernel/locking/ locking: Move the rtmutex code to kernel/locking/ locking: Move the semaphore core to kernel/locking/ locking: Move the spinlock code to kernel/locking/ locking: Move the lockdep code to kernel/locking/ locking: Move the mutex code to kernel/locking/ hung_task debugging: Add tracepoint to report the hang x86/locking/kconfig: Update paravirt spinlock Kconfig description lockstat: Report avg wait and hold times lockdep, x86/alternatives: Drop ancient lockdep fixup message ...
2013-11-06net: Explicitly initialize u64_stats_sync structures for lockdepJohn Stultz1-0/+3
In order to enable lockdep on seqcount/seqlock structures, we must explicitly initialize any locks. The u64_stats_sync structure, uses a seqcount, and thus we need to introduce a u64_stats_init() function and use it to initialize the structure. This unfortunately adds a lot of fairly trivial initialization code to a number of drivers. But the benefit of ensuring correctness makes this worth while. Because these changes are required for lockdep to be enabled, and the changes are quite trivial, I've not yet split this patch out into 30-some separate patches, as I figured it would be better to get the various maintainers thoughts on how to best merge this change along with the seqcount lockdep enablement. Feedback would be appreciated! Signed-off-by: John Stultz <john.stultz@linaro.org> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: "David S. Miller" <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: James Morris <jmorris@namei.org> Cc: Jesse Gross <jesse@nicira.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Mirko Lindner <mlindner@marvell.com> Cc: Patrick McHardy <kaber@trash.net> Cc: Roger Luethi <rl@hellgate.ch> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Simon Horman <horms@verge.net.au> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Wensong Zhang <wensong@linux-vs.org> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/1381186321-4906-2-git-send-email-john.stultz@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-10-23net: via-rhine: remove unnecessary pci_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-26via-rhine: fix VLAN priority field (PCP, IEEE 802.1p)Roger Luethi1-2/+7
Outgoing packets sent by via-rhine have their VLAN PCP field off by one (when hardware acceleration is enabled). The TX descriptor expects only VID and PCP (without a CFI/DEI bit). Peter Boström noticed and reported the bug. Signed-off-by: Roger Luethi <rl@hellgate.ch> Cc: Peter Boström <peter.bostrom@netrounds.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+3
2013-08-15drivers/net/ethernet/via/via-velocity.c: update napi implementationJulia Lawall1-1/+3
Drivers supporting NAPI should use a NAPI-specific function for receiving packets. Hence netif_rx is changed to netif_receive_skb. Furthermore netif_napi_del should be used in the probe and remove function to clean up the NAPI resource information. Thanks to Francois Romieu, David Shwatrz and Rami Rosen for their help on this patch. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-09net: via-rhine: Fix incorrect placement of __initdataSachin Kamat1-1/+1
__initdata should be placed between the variable name and equal sign for the variable to be placed in the intended section. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-19net/velocity: add poll controller function for velocity nicAmit Uttamchandani1-0/+20
Add poll controller function for velocity nic. Signed-off-by: Amit Uttamchandani <auttamchandani@logicube.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-12via-rhine: fix dma mapping errorsNeil Horman1-1/+16
this bug: https://bugzilla.redhat.com/show_bug.cgi?id=951695 Reported a dma debug backtrace: WARNING: at lib/dma-debug.c:937 check_unmap+0x47d/0x930() Hardware name: To Be Filled By O.E.M. via-rhine 0000:00:12.0: DMA-API: device driver failed to check map error[device address=0x0000000075a837b2] [size=90 bytes] [mapped as single] Modules linked in: ip6_tables gspca_spca561 gspca_main videodev media snd_hda_codec_realtek snd_hda_intel i2c_viapro snd_hda_codec snd_hwdep snd_seq ppdev mperf via_rhine coretemp snd_pcm mii microcode snd_page_alloc snd_timer snd_mpu401 snd_mpu401_uart snd_rawmidi snd_seq_device snd soundcore parport_pc parport shpchp ata_generic pata_acpi radeon i2c_algo_bit drm_kms_helper ttm drm pata_via sata_via i2c_core uinput Pid: 295, comm: systemd-journal Not tainted 3.9.0-0.rc6.git2.1.fc20.x86_64 #1 Call Trace: <IRQ> [<ffffffff81068dd0>] warn_slowpath_common+0x70/0xa0 [<ffffffff81068e4c>] warn_slowpath_fmt+0x4c/0x50 [<ffffffff8137ec6d>] check_unmap+0x47d/0x930 [<ffffffff810ace9f>] ? local_clock+0x5f/0x70 [<ffffffff8137f17f>] debug_dma_unmap_page+0x5f/0x70 [<ffffffffa0225edc>] ? rhine_ack_events.isra.14+0x3c/0x50 [via_rhine] [<ffffffffa02275f8>] rhine_napipoll+0x1d8/0xd80 [via_rhine] [<ffffffff815d3d51>] ? net_rx_action+0xa1/0x380 [<ffffffff815d3e22>] net_rx_action+0x172/0x380 [<ffffffff8107345f>] __do_softirq+0xff/0x400 [<ffffffff81073925>] irq_exit+0xb5/0xc0 [<ffffffff81724cd6>] do_IRQ+0x56/0xc0 [<ffffffff81719ff2>] common_interrupt+0x72/0x72 <EOI> [<ffffffff8170ff57>] ? __slab_alloc+0x4c2/0x526 [<ffffffff811992e0>] ? mmap_region+0x2b0/0x5a0 [<ffffffff810d5807>] ? __lock_is_held+0x57/0x80 [<ffffffff811992e0>] ? mmap_region+0x2b0/0x5a0 [<ffffffff811bf1bf>] kmem_cache_alloc+0x2df/0x360 [<ffffffff811992e0>] mmap_region+0x2b0/0x5a0 [<ffffffff811998e6>] do_mmap_pgoff+0x316/0x3d0 [<ffffffff81183ca0>] vm_mmap_pgoff+0x90/0xc0 [<ffffffff81197d6c>] sys_mmap_pgoff+0x4c/0x190 [<ffffffff81367d7e>] ? trace_hardirqs_on_thunk+0x3a/0x3f [<ffffffff8101eb42>] sys_mmap+0x22/0x30 [<ffffffff81722fd9>] system_call_fastpath+0x16/0x1b Usual problem with the usual fix, add the appropriate calls to dma_mapping_error where appropriate Untested, as I don't have hardware, but its pretty straightforward Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: David S. Miller <davem@davemloft.net> CC: Roger Luethi <rl@hellgate.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-28net/trivial: replace numeric with standard PM state macrosYijing Wang1-1/+1
Use standard PM state macros PCI_Dx instead of numeric 0/1/2.. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-19net: Move MII out from under NET_CORE and hide itBen Hutchings1-2/+0
All drivers that select MII also need to select NET_CORE because MII depends on it. This is a bit ridiculous because NET_CORE is just a menu option that doesn't enable any code by itself. There is also no need for it to be a visible option, since its users all select it. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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>