Re: [PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic

2018-01-03 Thread Neil Horman
On Wed, Jan 03, 2018 at 10:28:31AM -0500, David Miller wrote: > From: David Miller > Date: Wed, 03 Jan 2018 10:26:06 -0500 (EST) > > > From: Neil Horman > > Date: Wed, 3 Jan 2018 10:13:33 -0500 > > > >> Thats exactly what this patch does, instead of creating a second loop to > >> traverse all t

Re: [PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic

2018-01-03 Thread David Miller
From: David Miller Date: Wed, 03 Jan 2018 10:26:06 -0500 (EST) > From: Neil Horman > Date: Wed, 3 Jan 2018 10:13:33 -0500 > >> Thats exactly what this patch does, instead of creating a second loop to >> traverse all the emptied ring buffers, now I: >> >> 1) Pre-allocate a new skb when I know I

Re: [PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic

2018-01-03 Thread David Miller
From: Neil Horman Date: Wed, 3 Jan 2018 10:13:33 -0500 > Thats exactly what this patch does, instead of creating a second loop to > traverse all the emptied ring buffers, now I: > > 1) Pre-allocate a new skb when I know I'm going to receive the in-place skb > 2) Map the skb into the appropriate

Re: [PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic

2018-01-03 Thread Neil Horman
On Wed, Jan 03, 2018 at 09:58:49AM -0500, David Miller wrote: > From: Neil Horman > Date: Wed, 3 Jan 2018 09:44:15 -0500 > > > A few spots in 3c59x missed calls to dma_mapping_error checks, casuing > > WARN_ONS to trigger. Clean those up. While we're at it, refactor the > > refill code a bit s

Re: [PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic

2018-01-03 Thread David Miller
From: Neil Horman Date: Wed, 3 Jan 2018 09:44:15 -0500 > A few spots in 3c59x missed calls to dma_mapping_error checks, casuing > WARN_ONS to trigger. Clean those up. While we're at it, refactor the > refill code a bit so that if skb allocation or dma mapping fails, we > recycle the existing b

[PATCHv2] 3c59x: fix missing dma_mapping_error check and bad ring refill logic

2018-01-03 Thread Neil Horman
A few spots in 3c59x missed calls to dma_mapping_error checks, casuing WARN_ONS to trigger. Clean those up. While we're at it, refactor the refill code a bit so that if skb allocation or dma mapping fails, we recycle the existing buffer. This prevents holes in the rx ring, and makes for much sim