RE: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-02-01 Thread Hayes Wang
> David Miller [mailto:da...@davemloft.net] > > Sent: Sunday, January 25, 2015 2:44 PM > > What keeps rtl_start_rx() from running in parallel with > > r8152_submit_rx(), or any other accessor of the RX agg->list? > > Forgive my poor English. I would try to describe them clearly. > The steps abou

Re: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-26 Thread Scott Feldman
On Mon, Jan 19, 2015 at 6:48 PM, Hayes Wang wrote: > David Miller [mailto:da...@davemloft.net] >> Sent: Tuesday, January 20, 2015 5:14 AM > [...] >> >> - r8152_submit_rx(tp, agg, GFP_ATOMIC); >> >> + if (!ret) { >> >> + ret = r8152_submit_rx(tp, a

RE: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-25 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Sunday, January 25, 2015 2:44 PM [...] > What keeps rtl_start_rx() from running in parallel with > r8152_submit_rx(), or any other accessor of the RX agg->list? Forgive my poor English. I would try to describe them clearly. The steps about the rx

Re: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-24 Thread David Miller
From: Hayes Wang Date: Tue, 20 Jan 2015 03:24:52 + > David Miller [mailto:da...@davemloft.net] >> Sent: Tuesday, January 20, 2015 10:52 AM > [...] >> agg->list is not local, you have to use a spinlock to protect >> modifications to it, some other sites which modify agg->list do take >> the

RE: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-19 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, January 20, 2015 10:52 AM [...] > agg->list is not local, you have to use a spinlock to protect > modifications to it, some other sites which modify agg->list do take > the lock properly. > > You cannot modify a list like agg->list witho

Re: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-19 Thread David Miller
From: Hayes Wang Date: Tue, 20 Jan 2015 02:48:50 + >> >> + urb->actual_length = 0; >> >> + list_add_tail(&agg->list, next); >> > >> > Do you need a spin_lock_irqsave(&tp->rx_lock, flags) around this? >> >> Indeed, and rtl_start_rx() seems to also

RE: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-19 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, January 20, 2015 5:14 AM [...] > >> - r8152_submit_rx(tp, agg, GFP_ATOMIC); > >> + if (!ret) { > >> + ret = r8152_submit_rx(tp, agg, GFP_ATOMIC); > >> + } else { > >> +

Re: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-19 Thread David Miller
From: Scott Feldman Date: Mon, 19 Jan 2015 00:03:42 -0800 > On Sun, Jan 18, 2015 at 11:13 PM, Hayes Wang wrote: >> @@ -1746,7 +1746,18 @@ find_next_rx: >> } >> >> submit: >> - r8152_submit_rx(tp, agg, GFP_ATOMIC); >> + if (!ret) { >> +

Re: [PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-19 Thread Scott Feldman
On Sun, Jan 18, 2015 at 11:13 PM, Hayes Wang wrote: > If a error occurs when submitting rx, skip the remaining submissions > and try to submit them again next time. > > Signed-off-by: Hayes Wang > --- > drivers/net/usb/r8152.c | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions

[PATCH net-next 1/7] r8152: adjust rx_bottom

2015-01-18 Thread Hayes Wang
If a error occurs when submitting rx, skip the remaining submissions and try to submit them again next time. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.