lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 May 2008 14:21:02 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Dave Jones <davej@...hat.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] 8139too: Make the OQO2 automatically use PIO mode.

Dave Jones wrote:
> The OQO model 2 has an RTL8139 from Atheros that doesn't like MMIO.
> Force it to always use polled IO.
> 
> Signed-off-by: Dave Jones <davej@...hat.com>
> 
> --- linux-2.6.25.noarch/drivers/net/8139too.c~	2008-05-28 21:07:36.000000000 -0400
> +++ linux-2.6.25.noarch/drivers/net/8139too.c	2008-05-28 21:19:57.000000000 -0400
> @@ -951,6 +951,14 @@ static int __devinit rtl8139_init_one (s
>  			   "Use the \"8139cp\" driver for improved performance and stability.\n");
>  	}
>  
> +	if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
> +	    pdev->device == PCI_DEVICE_ID_REALTEK_8139 &&
> +	    pdev->subsystem_vendor == PCI_VENDOR_ID_ATHEROS &&
> +	    pdev->subsystem_device == PCI_DEVICE_ID_REALTEK_8139) {
> +		printk(KERN_INFO "8139too: OQO Model 2 detected. Forcing PIO\n");
> +		use_pio = 1;
> +	}
> +

these days we almost never hand-craft PCI ID checks like this...  Add 
this to the pci_device_id table, and create a new RTL8139_PIO entry for 
driver_data that has your desired end result

That way, it is trivial to expand the list simply by updating the PCI ID 
table

Table-driven approaches are really superior for things like this




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