[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111208195833.GA13613@ntm.wq.cz>
Date: Thu, 8 Dec 2011 20:58:33 +0100
From: Milan Kocian <milon@...cz>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: netdev@...r.kernel.org
Subject: Re: [RFT] sky2: 32 bit DMA quirk
Hello Stephen,
On Wed, Dec 07, 2011 at 03:02:05PM -0800, Stephen Hemminger wrote:
> This a patch to force 32 bit DMA. Not sure if the DMI values
> are right for the Gigabyte motherboard with the problem.
>
> Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
>
Unfortunately it didn't help. I tried parameter
only_32bit_dma=1 alone and then with parameter disable_msi=1
with the same result.
> --- a/drivers/net/ethernet/marvell/sky2.c 2011-12-07 10:54:18.816279159 -0800
> +++ b/drivers/net/ethernet/marvell/sky2.c 2011-12-07 14:59:47.737381388 -0800
> @@ -41,6 +41,7 @@
> #include <linux/delay.h>
> #include <linux/workqueue.h>
> #include <linux/if_vlan.h>
> +#include <linux/dmi.h>
> #include <linux/prefetch.h>
> #include <linux/debugfs.h>
> #include <linux/mii.h>
> @@ -95,6 +96,10 @@ static int disable_msi = 0;
> module_param(disable_msi, int, 0);
> MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
>
> +static int only_32bit_dma;
> +module_param(only_32bit_dma, int, 0);
> +MODULE_PARM_DESC(only_32bit_dma, "Limit device to 32 bit DMA access");
> +
> static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = {
> { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
> { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
> @@ -4889,7 +4894,7 @@ static int __devinit sky2_probe(struct p
>
> pci_set_master(pdev);
>
> - if (sizeof(dma_addr_t) > sizeof(u32) &&
> + if (sizeof(dma_addr_t) > sizeof(u32) && !only_32bit_dma &&
> !(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))) {
> using_dac = 1;
> err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
> @@ -5163,10 +5168,24 @@ static struct pci_driver sky2_driver = {
> .driver.pm = SKY2_PM_OPS,
> };
>
> +static struct dmi_system_id sky2_32bit_dma_boards[] = {
> + {
> + .ident = "Gigabyte GA-965GM-S2 boards",
> + .matches = {
> + DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co"),
> + DMI_MATCH(DMI_BOARD_NAME, "GA-965GM-S2"),
> + },
> + },
> + {}
> +};
> +
> static int __init sky2_init_module(void)
> {
> pr_info("driver version " DRV_VERSION "\n");
>
> + if (dmi_check_system(sky2_32bit_dma_boards))
> + only_32bit_dma = 1;
> +
> sky2_debug_init();
> return pci_register_driver(&sky2_driver);
> }
>
>
--
Milan Kocian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists