From: Jeff Garzik <jeff@garzik.org>
To: Dave Jones <davej@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] 8139too: Make the OQO2 automatically use PIO mode.
Date: Thu, 29 May 2008 14:21:02 -0400 [thread overview]
Message-ID: <483EF40E.7030802@garzik.org> (raw)
In-Reply-To: <20080529150849.GC8247@redhat.com>
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@redhat.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
prev parent reply other threads:[~2008-05-29 18:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 17:14 odd RTL8139 quirk Dave Jones
2008-04-29 19:37 ` Jeff Garzik
2008-04-29 19:47 ` Dave Jones
2008-04-29 21:56 ` Dave Jones
2008-04-29 22:04 ` Jeff Garzik
2008-04-29 22:10 ` Dave Jones
2008-04-29 22:19 ` Jeff Garzik
2008-04-29 22:28 ` Dave Jones
2008-04-29 22:33 ` Jeff Garzik
2008-04-29 22:32 ` Andrew Morton
2008-04-30 11:13 ` Jeff Garzik
2008-04-30 15:19 ` Stephen Hemminger
2008-05-29 15:06 ` Dave Jones
2008-05-29 15:07 ` [PATCH 1/2] 8139too: Make PIO/MMIO a modparam Dave Jones
2008-05-29 18:18 ` Jeff Garzik
2008-05-29 18:41 ` Dave Jones
2008-05-29 19:01 ` Jeff Garzik
2008-07-15 18:40 ` Dave Jones
2008-07-15 22:18 ` Jeff Garzik
2008-07-15 22:36 ` Dave Jones
2008-07-15 22:55 ` Jeff Garzik
2008-07-15 23:14 ` Dave Jones
2008-07-15 23:31 ` Jeff Garzik
2008-07-15 23:40 ` Dave Jones
2008-07-16 10:03 ` Peter Korsgaard
2008-07-15 22:54 ` Dave Jones
2008-07-15 23:03 ` Jeff Garzik
2008-07-15 23:15 ` Dave Jones
2008-05-29 15:08 ` [PATCH 2/2] 8139too: Make the OQO2 automatically use PIO mode Dave Jones
2008-05-29 18:21 ` Jeff Garzik [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483EF40E.7030802@garzik.org \
--to=jeff@garzik.org \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.