Thread (3 messages) 3 messages, 2 authors, 2015-09-09

Re: [PATCH net] r8169: Fix sleeping function called during get_stats64

flat view

From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2015-09-09 20:25:22
Also in: lkml

Corinna Vinschen [off-list ref] :
[...]
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 24dcbe6..630811a 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
[...]
+	if (!paddr)
+		return false;
I guess this is the secret recipe.

What about replacing this part with an adequate barrier in rtl_init_one ?

[...]
quoted hunk ↗ jump to hunk
@@ -8447,9 +8411,14 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	tp->rtl_fw = RTL_FIRMWARE_UNKNOWN;
 
+	tp->CntArray = dma_alloc_coherent (&pdev->dev, sizeof(*tp->CntArray),
+					   &tp->CntPhysAddr, GFP_KERNEL);
+	if (!tp->CntArray)
+		goto err_out_cnt_4;
+
rc is still zero here so rtl_init_one will return success.
quoted hunk ↗ jump to hunk
 	rc = register_netdev(dev);
 	if (rc < 0)
-		goto err_out_msi_4;
+		goto err_out_msi_5;
 
 	pci_set_drvdata(pdev, dev);
-- 
Ueimor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help