diff mbox

[RFC] p54pci: skb_over_panic, soft lockup, stall under flood

Message ID 200910121057.10381.chunkeey@googlemail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Christian Lamparter Oct. 12, 2009, 8:57 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index d348c26..c1b1bee 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -473,6 +473,7 @@  static int __devinit p54p_probe(struct pci_dev *pdev,
 	struct ieee80211_hw *dev;
 	unsigned long mem_addr, mem_len;
 	int err;
+	u8 latency;
 
 	err = pci_enable_device(pdev);
 	if (err) {
@@ -493,6 +494,12 @@  static int __devinit p54p_probe(struct pci_dev *pdev,
 		goto err_disable_dev;
 	}
 
+	pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &latency);
+	if (latency < 64) {
+		dev_info(&pdev->dev, "set latency timer\n");
+		pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 80);
+	}
+
 	if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
 	    pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
 		dev_err(&pdev->dev, "No suitable DMA available\n");