Re: [PATCH net-next] net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback()

2017-11-20 Thread 'Mika Westerberg'
On Mon, Nov 20, 2017 at 02:46:53PM +, David Laight wrote: > > There does not seem to be a way to mark DMA address invalid in a driver > > so we probably need to add a flag to struct tbnet_frame instead. > > Can you use the length? Unfortunately no because size is 12-bit field in struct ring_f

RE: [PATCH net-next] net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback()

2017-11-20 Thread David Laight
From: Mika Westerberg > Sent: 13 November 2017 10:22 > To: David Miller > Cc: michael.ja...@intel.com; yehezkel.ber...@intel.com; netdev@vger.kernel.org > Subject: Re: [PATCH net-next] net: thunderbolt: Clear finished Tx frame bus > address in > tbnet_tx_callback() > > On

Re: [PATCH net-next] net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback()

2017-11-13 Thread Mika Westerberg
On Sat, Nov 11, 2017 at 07:21:24PM +0900, David Miller wrote: > From: Mika Westerberg > Date: Thu, 9 Nov 2017 13:46:28 +0300 > > > When Thunderbolt network interface is disabled or when the cable is > > unplugged the driver releases all allocated buffers by calling > > tbnet_free_buffers() for e

Re: [PATCH net-next] net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback()

2017-11-11 Thread David Miller
From: Mika Westerberg Date: Thu, 9 Nov 2017 13:46:28 +0300 > When Thunderbolt network interface is disabled or when the cable is > unplugged the driver releases all allocated buffers by calling > tbnet_free_buffers() for each ring. This function then calls > dma_unmap_page() for each buffer it f

[PATCH net-next] net: thunderbolt: Clear finished Tx frame bus address in tbnet_tx_callback()

2017-11-09 Thread Mika Westerberg
When Thunderbolt network interface is disabled or when the cable is unplugged the driver releases all allocated buffers by calling tbnet_free_buffers() for each ring. This function then calls dma_unmap_page() for each buffer it finds where bus address is non-zero. Now, we only clear this bus addres