Commit 392bd0cb authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by David S. Miller

skge: add quirk to limit DMA

Skge devices installed on some Gigabyte motherboards are not able to
perform 64 dma correctly due to board PCI implementation, so limit
DMA to 32bit if such boards are detected.

Bug was reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=447489Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Tested-by: default avatarLuya Tshimbalanga <luya@fedoraproject.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d164401
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/mii.h> #include <linux/mii.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/dmi.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "skge.h" #include "skge.h"
...@@ -3868,6 +3869,8 @@ static void __devinit skge_show_addr(struct net_device *dev) ...@@ -3868,6 +3869,8 @@ static void __devinit skge_show_addr(struct net_device *dev)
netif_info(skge, probe, skge->netdev, "addr %pM\n", dev->dev_addr); netif_info(skge, probe, skge->netdev, "addr %pM\n", dev->dev_addr);
} }
static int only_32bit_dma;
static int __devinit skge_probe(struct pci_dev *pdev, static int __devinit skge_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
...@@ -3889,7 +3892,7 @@ static int __devinit skge_probe(struct pci_dev *pdev, ...@@ -3889,7 +3892,7 @@ static int __devinit skge_probe(struct pci_dev *pdev,
pci_set_master(pdev); pci_set_master(pdev);
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { if (!only_32bit_dma && !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
using_dac = 1; using_dac = 1;
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
} else if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) { } else if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
...@@ -4147,8 +4150,21 @@ static struct pci_driver skge_driver = { ...@@ -4147,8 +4150,21 @@ static struct pci_driver skge_driver = {
.shutdown = skge_shutdown, .shutdown = skge_shutdown,
}; };
static struct dmi_system_id skge_32bit_dma_boards[] = {
{
.ident = "Gigabyte nForce boards",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co"),
DMI_MATCH(DMI_BOARD_NAME, "nForce"),
},
},
{}
};
static int __init skge_init_module(void) static int __init skge_init_module(void)
{ {
if (dmi_check_system(skge_32bit_dma_boards))
only_32bit_dma = 1;
skge_debug_init(); skge_debug_init();
return pci_register_driver(&skge_driver); return pci_register_driver(&skge_driver);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment