Patch "atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation" has been added to the 4.3-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
atl1c-improve-driver-not-to-do-order-4-gfp_atomic-allocation.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Dec 30 19:48:47 PST 2015
From: Pavel Machek <[email protected]>
Date: Fri, 4 Dec 2015 09:50:00 +0100
Subject: atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation
From: Pavel Machek <[email protected]>
[ Upstream commit f2a3771ae8aca879c32336c76ad05a017629bae2 ]
atl1c driver is doing order-4 allocation with GFP_ATOMIC priority. That often breaks networking after resume. Switch to GFP_KERNEL. Still not ideal, but should be significantly better.
atl1c_setup_ring_resources() is called from .open() function, and already uses GFP_KERNEL, so this change is safe.
--- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/ethernet/atheros/atl1c/atl1c_main.c +3 -4
@@ -1016,13 +1016,12 @@ static int atl1c_setup_ring_resources(stsizeof (struct atl1c_recv_ret_status ) * rx_desc_count +8 *4 ; - ring_header->desc =pci_alloc_consistent (pdev, ring_header->size, - &ring_header->dma); + ring_header->desc =dma_zalloc_coherent (&pdev->dev, ring_header->size, + &ring_header->dma,GFP_KERNEL );if (unlikely (!ring_header->desc)) { -dev_err (&pdev->dev,"pci_alloc_consistend failed\n" ); +dev_err (&pdev->dev,"could not get memory for DMA buffer\n" ); goto err_nomem; } -memset (ring_header->desc,0 , ring_header->size);/* init TPD ring */ tpd_ring[0 ].dma =roundup (ring_header->dma,8 );
Patches currently in stable-queue which might be from [email protected] are
queue-4.3/atl1c-improve-driver-not-to-do-order-4-gfp_atomic-allocation.patch