stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation" has been added to the 3.14-stable tree
@ 2016-01-19  5:20 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-01-19  5:20 UTC (permalink / raw)
  To: pavel, davem, gregkh, mhocko; +Cc: stable, stable-commits


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 3.14-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-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Mon Jan 18 21:17:42 PST 2016
From: Pavel Machek <pavel@ucw.cz>
Date: Fri, 4 Dec 2015 09:50:00 +0100
Subject: atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation
Status: RO
Content-Length: 1553
Lines: 40

From: Pavel Machek <pavel@ucw.cz>

[ 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.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1018,13 +1018,12 @@ static int atl1c_setup_ring_resources(st
 		sizeof(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 pavel@ucw.cz are

queue-3.14/atl1c-improve-driver-not-to-do-order-4-gfp_atomic-allocation.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-19  7:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-19  5:20 Patch "atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation" has been added to the 3.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).