Re: [PATCH] PM-Timer: doesn't use workaround if chipset is not buggy

From: OGAWA Hirofumi
Date: Thu Mar 23 2006 - 02:28:45 EST


Andrew Morton <akpm@xxxxxxxx> writes:

> OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> + dev = pci_get_device(PCI_VENDOR_ID_INTEL,
>> + PCI_DEVICE_ID_INTEL_82371AB_3, NULL);
>>
>> ...
>>
>> +device_initcall(pmtmr_bug_check);
>
> Can this code use the PCI quirk infrastructure?

Yes. However, since we need to check there is _not_ those chipsets,
it's tricky. Probably it's a following or similar code, um.. IMHO it
seems not simple enough. Idea?


static void __devinit blacklist_check()
{
has_bug = 1;
}
DECLARE_PCI_FIXUP_EARLY(blacklist);

static void __devinit graylist_check()
{
has_bug = 2;
}
DECLARE_PCI_FIXUP_EARLY(graylist);

static int __init pmtmr_bug_check()
{
if (!has_bug)
pmtmr_need_workaround = 0;
else
...
}
late_initcall(pmtmr_bug_check);
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/