Re: drivers/net/usb/r8152.c USB net driver outdated

2017-11-29 Thread Petko Manolov
On 17-11-29 10:23:31, Cameron Seader wrote: > On 11/29/2017 09:55 AM, Petko Manolov wrote: > > On 17-11-29 09:35:04, Cameron Seader wrote: > > > On 11/29/2017 03:37 AM, Petko Manolov wrote: > > > > On 17-11-29 06:11:22, Greg KH wrote: > > > > > On T

Re: drivers/net/usb/r8152.c USB net driver outdated

2017-11-29 Thread Petko Manolov
On 17-11-29 09:35:04, Cameron Seader wrote: > On 11/29/2017 03:37 AM, Petko Manolov wrote: > > On 17-11-29 06:11:22, Greg KH wrote: > > > On Tue, Nov 28, 2017 at 07:51:06PM -0700, Cameron Seader wrote: > > > > Greetings, The upstream kernel seems to b

Re: drivers/net/usb/r8152.c USB net driver outdated

2017-11-29 Thread Petko Manolov
On 17-11-29 06:11:22, Greg KH wrote: > On Tue, Nov 28, 2017 at 07:51:06PM -0700, Cameron Seader wrote: > > Greetings, The upstream kernel seems to be outdated with version 1.09.9 of > > the drivers/net/usb/r8152.c driver. There is newer hardware now which > > requires the newer version where

Re: [PATCH net-next 14/14] usbnet: pegasus: Use net_device_stats from struct net_device

2017-04-11 Thread Petko Manolov
On 17-04-07 10:17:39, Tobias Klauser wrote: > Instead of using a private copy of struct net_device_stats in struct pegasus, > use stats from struct net_device. Also remove the now unnecessary > .ndo_get_stats function. Looks OK to me. Petko > Cc: Petko

Re: [PATCH] net: usb: pegasus: use new api ethtool_{get|set}_link_ksettings

2017-03-18 Thread Petko Manolov
ng fine on real hardware. Acked-by: Petko Manolov <pet...@nucleusys.com> cheers, Petko > Signed-off-by: Philippe Reynes <trem...@gmail.com> > --- > drivers/net/usb/pegasus.c | 14 -- > 1 files changed, 8 insertions(+), 6 deletions(-) > > diff --git

Re: [PATCH] net: usb: rtl8150: use new api ethtool_{get|set}_link_ksettings

2017-03-14 Thread Petko Manolov
On 17-03-13 17:00:20, Petko Manolov wrote: > On 17-03-12 23:16:25, Philippe Reynes wrote: > > The ethtool api {get|set}_settings is deprecated. We move this driver to > > new > > api {get|set}_link_ksettings. > > > > As I don't have the hardware, I'd be

Re: [PATCH] net: usb: rtl8150: use new api ethtool_{get|set}_link_ksettings

2017-03-13 Thread Petko Manolov
On 17-03-12 23:16:25, Philippe Reynes wrote: > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if someone may test this > patch. I've got some old adapters around and will drop you

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 10:32:16, Steve Calfee wrote: > On Mon, Feb 6, 2017 at 4:51 AM, Petko Manolov <pet...@nucleusys.com> wrote: > > On 17-02-06 09:28:22, Greg KH wrote: > >> On Mon, Feb 06, 2017 at 10:14:44AM +0200, Petko Manolov wrote: > >> > On 17-02-05 01:30:39, Gr

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 14:14:30, David Laight wrote: > From: Petko Manolov > > Sent: 07 February 2017 13:21 > ... > > > > Would you consider what David proposed (usb_control_msg_with_malloc()) > > > > for 4.11, > > > > for example? I for one will use somethi

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 14:01:02, Greg KH wrote: > On Tue, Feb 07, 2017 at 02:53:24PM +0200, Petko Manolov wrote: > > On 17-02-07 11:51:31, Greg KH wrote: > > > On Tue, Feb 07, 2017 at 12:34:52PM +0200, Petko Manolov wrote: > > > > On 17-02-06 16:25:20, Ben Hutchings wrote:

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 11:51:31, Greg KH wrote: > On Tue, Feb 07, 2017 at 12:34:52PM +0200, Petko Manolov wrote: > > On 17-02-06 16:25:20, Ben Hutchings wrote: > > > On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > > > > From: Ben Hutchings > > > [...] &g

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-07 11:45:06, Greg KH wrote: > On Tue, Feb 07, 2017 at 12:24:12PM +0200, Petko Manolov wrote: > > On 17-02-06 14:46:21, Johan Hovold wrote: > > > On Mon, Feb 06, 2017 at 02:32:23PM +0100, Johan Hovold wrote: > > > > On Mon, Feb 06, 2017 at 02:21:

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-06 16:25:20, Ben Hutchings wrote: > On Mon, Feb 06, 2017 at 04:09:18PM +, David Laight wrote: > > From: Ben Hutchings > [...] > > > + ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), > > > + RTL8150_REQ_GET_REGS, RTL8150_REQT_READ, > > > +

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-07 Thread Petko Manolov
On 17-02-06 14:46:21, Johan Hovold wrote: > On Mon, Feb 06, 2017 at 02:32:23PM +0100, Johan Hovold wrote: > > On Mon, Feb 06, 2017 at 02:21:24PM +0100, Johan Hovold wrote: > > > On Mon, Feb 06, 2017 at 02:51:09PM +0200, Petko Manolov wrote: > > > > On 17

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-06 Thread Petko Manolov
On 17-02-06 09:28:22, Greg KH wrote: > On Mon, Feb 06, 2017 at 10:14:44AM +0200, Petko Manolov wrote: > > On 17-02-05 01:30:39, Greg KH wrote: > > > On Sat, Feb 04, 2017 at 04:56:03PM +, Ben Hutchings wrote: > > > > Allocating USB buffers on the stack

Re: [PATCH net 1/4] pegasus: Use heap buffers for all register access

2017-02-06 Thread Petko Manolov
On 17-02-05 01:30:39, Greg KH wrote: > On Sat, Feb 04, 2017 at 04:56:03PM +, Ben Hutchings wrote: > > Allocating USB buffers on the stack is not portable, and no longer > > works on x86_64 (with VMAP_STACK enabled as per default). > > It's never worked on other platforms, so these should go

Re: [PATCH net 2/4] rtl8150: Use heap buffers for all register access

2017-02-06 Thread Petko Manolov
On 17-02-04 16:56:32, Ben Hutchings wrote: > Allocating USB buffers on the stack is not portable, and no longer > works on x86_64 (with VMAP_STACK enabled as per default). > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Ben Hutchings > --- >

Re: [PATCH] net: pegasus: Remove deprecated create_singlethread_workqueue

2016-08-31 Thread Petko Manolov
t; Since there are fixed number of work items, explicit concurrency >> limit is unnecessary here. >> >> Signed-off-by: Bhaktipriya Shridhar <bhaktipriy...@gmail.com> > >Acked-by: Tejun Heo <t...@kernel.org> > >Thanks. Acked-by: Petko Manolov <

Re: [PATCH] net: pegasus: Remove deprecated create_singlethread_workqueue

2016-08-30 Thread Petko Manolov
On 16-08-30 22:02:47, Bhaktipriya Shridhar wrote: > The workqueue "pegasus_workqueue" queues a single work item per pegasus > instance and hence it doesn't require execution ordering. Hence, > alloc_workqueue has been used to replace the deprecated > create_singlethread_workqueue instance. > >

Re: [PATCH] net: pegasus: remove unused variables and labels

2016-05-20 Thread Petko Manolov
Guys, come on. This code is not dead. This code is executed every time an ethernet packet is received. It takes care of various error statistics. More importantly, it sends the actual (reported by the adapter) packet length to the network layer along with the packet. This patch removes

Re: [PATCH 1/1] net: pegasus: remove dead coding

2016-05-20 Thread Petko Manolov
On 16-05-19 11:35:42, David Miller wrote: > From: Heinrich Schuchardt > Date: Wed, 18 May 2016 02:13:30 +0200 > > > (!count || count < 4) is always true. > > So let's remove the coding which is dead at least since 2005. > > > > Signed-off-by: Heinrich Schuchardt

Re: [PATCH 1/1] net: pegasus: simplify logical constraint

2016-05-18 Thread Petko Manolov
On 16-05-18 20:40:51, Heinrich Schuchardt wrote: > If !count is true, count < 4 is also true. Yep, you're right. However, gcc optimizes away the first condition. What you really got me to think about is whether 4 is the right number. I guess i shall refer to the HW documentation.

Re: [1/1] net: pegasus: remove dead coding

2016-05-18 Thread Petko Manolov
On 16-05-18 09:15:40, Oliver Neukum wrote: > On Tue, 2016-05-17 at 23:30 -0700, Guenter Roeck wrote: > > On Wed, May 18, 2016 at 02:13:30AM +0200, Heinrich Schuchardt wrote: > > > (!count || count < 4) is always true. > > > > Even if count >= 4 ? > > The check for !count is redundant, though.

Re: [PATCH 1/1] net: pegasus: remove dead coding

2016-05-18 Thread Petko Manolov
On 16-05-18 02:13:30, Heinrich Schuchardt wrote: > (!count || count < 4) is always true. > So let's remove the coding which is dead at least since 2005. You may want to reconsider the above statement. Just assume that 'count' is typically between 56 and 1514 bytes. Petko >

Re: ADMtek ADM8511 "Pegasus II" USB Ethernet causes oops

2016-04-05 Thread Petko Manolov
Hi, I've no idea how this PEGASUS_MTU + 8 got in. Maybe somebody played games with the skb alignment over the years. I'm traveling right now so i'll look at the patch more closely when I get back. At first glance it does look OK. cheers, Petko On April 5, 2016 1:31:33 PM GMT+03:00,

Re: [PATCH] usbnet: rtl8150: remove unused variable

2014-11-18 Thread Petko Manolov
On 14-11-18 18:29:59, Sudip Mukherjee wrote: we were just returning the initial value of res, instead now we are returning the value directly. Looks OK, but could you please fix the wording of the commit message to something like: Remove unused variable. This is a tiny patch and the

Re: [PATCH] rtl8150: Prefix macros with RTL8150 to avoid collides

2014-08-07 Thread Petko Manolov
insertions(+), 50 deletions(-) diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 6e87e57..1e1c408 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c @@ -21,27 +21,27 @@ #define DRIVER_AUTHOR Petko Manolov pet...@users.sourceforge.net #define

Re: Fw: [Bug 75001] New: belkin USB Ethernet adapter intermittent network issue

2014-04-29 Thread Petko Manolov
On 14-04-28 20:16:12, Greg KH wrote: On Mon, Apr 28, 2014 at 05:28:38PM -0700, Stephen Hemminger wrote: Kernel Version: 3.0.94 That is a many year old obsolete kernel, there's nothing we can do about that release, sorry. Please try 3.14 I've fixed a few important bugs in 3.10 so you

Re: [PATCH] net/usb: rtl8150: allocate URB transfer_buffer and setup_packet separately

2013-08-09 Thread Petko Manolov
On Thu, 8 Aug 2013, Jussi Kivilinna wrote: On 08.08.2013 18:14, Petko Manolov wrote: On Wed, 7 Aug 2013, Jussi Kivilinna wrote: rtl8150 allocates URB transfer_buffer and setup_packet as part of same structure 'struct async_req'. This can cause same cacheline to be DMA-mapped twice

Re: [PATCH] net/usb: rtl8150: allocate URB transfer_buffer and setup_packet separately

2013-08-08 Thread Petko Manolov
On Wed, 7 Aug 2013, Jussi Kivilinna wrote: rtl8150 allocates URB transfer_buffer and setup_packet as part of same structure 'struct async_req'. This can cause same cacheline to be DMA-mapped twice with same URB. This can lead to memory corruption on some systems. I can see performance

Re: Active URB submitted twice in pegasus driver

2013-04-05 Thread Petko Manolov
On Wed, 27 Mar 2013, Petko Manolov wrote: On Tue, 26 Mar 2013, Sarah Sharp wrote: ctrl_callback is still reading the URB status, and using it in the switch statement. It's also using the urb-context as well, to dig out a pointer (pegasus_t) that the pegasus_set_multicast already has access

Re: Active URB submitted twice in pegasus driver

2013-03-26 Thread Petko Manolov
On Mon, 25 Mar 2013, Sarah Sharp wrote: Hi Petko, I'm testing a USB to ethernet adapter with Greg's usb-linus branch (based on 3.9-rc4). I'm seeing an odd behavior, and I'm suspicious that a second behavior found by Stephen Hemminger may also be related:

Re: Active URB submitted twice in pegasus driver

2013-03-26 Thread Petko Manolov
On Tue, 26 Mar 2013, Sarah Sharp wrote: On Tue, Mar 26, 2013 at 05:22:07PM +0200, Petko Manolov wrote: On Mon, 25 Mar 2013, Sarah Sharp wrote: Hi Petko, I'm testing a USB to ethernet adapter with Greg's usb-linus branch (based on 3.9-rc4). I'm seeing an odd behavior, and I'm suspicious

Re: Active URB submitted twice in pegasus driver

2013-03-26 Thread Petko Manolov
On Tue, 26 Mar 2013, Sarah Sharp wrote: But considering the multicast code is pretty old, I bet I'm running into a different bug... The fix is rather small. Approximately one gigabyte was transferred while alternating in and out of promiscuous mode. No issues. I guess this should move

Re: Active URB submitted twice in pegasus driver

2013-03-26 Thread Petko Manolov
On Tue, 26 Mar 2013, Sarah Sharp wrote: On Tue, Mar 26, 2013 at 10:54:25PM +0200, Petko Manolov wrote: On Tue, 26 Mar 2013, Sarah Sharp wrote: But considering the multicast code is pretty old, I bet I'm running into a different bug... The fix is rather small. Approximately one gigabyte

Re: Wake on LAN for USB ethernet?

2013-01-18 Thread Petko Manolov
The code in the driver is based on the specs from ADMTek (later, Infineon). Since i never suspend my machines this feature has not been tested by me. However, if the proposed patch is the right thing to do i'd be happy to see it applied. cheers, Petko On Fri, 18 Jan 2013, Ming Lei