mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Wayne Sherman <wsherman@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: PCI device problem - MMCONFIG, cannot allocate resource region, resource collisions
Date: Thu, 24 May 2007 14:09:41 +0400	[thread overview]
Message-ID: <20070524140941.A21491@jurassic.park.msu.ru> (raw)
In-Reply-To: <200705232010.54184.jbarnes@virtuousgeek.org>; from jbarnes@virtuousgeek.org on Wed, May 23, 2007 at 08:10:54PM -0700

On Wed, May 23, 2007 at 08:10:54PM -0700, Jesse Barnes wrote:
> > +/* Give unknown D-Link network adapters a proper class */
> > +static void __devinit quirk_dlink_unknown(struct pci_dev *dev)
> > +{
> > +	if (dev->class = PCI_CLASS_UNKNOWN)
> 
> Err, == of course.  Obviously I didn't test this. :)

Actually, it should be something like this (also untested).

Ivan.

--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1690,6 +1690,14 @@ static void __devinit quirk_p64h2_1k_io(struct pci_dev 
*dev)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	0x1460,		quirk_p64h2_1k_io);
 
+/* Give unknown D-Link network adapters a proper class */
+static void __devinit quirk_dlink_unknown(struct pci_dev *dev)
+{
+	if ((dev->class >> 8) == PCI_CLASS_NOT_DEFINED)
+		dev->class = PCI_CLASS_NETWORK_ETHERNET << 8;
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_DLINK, 0x4901, quirk_dlink_unknown);
+
 /* Fix the IOBL_ADR for 1k I/O space granularity on the Intel P64H2
  * The IOBL_ADR gets re-written to 4k boundaries in pci_setup_bridge()
  * in drivers/pci/setup-bus.c

  reply	other threads:[~2007-05-24 10:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22  1:42 System Design Works
2007-05-22  2:03 ` Jesse Barnes
2007-05-22  2:36   ` Wayne Sherman
2007-05-22 15:58     ` Jesse Barnes
2007-05-22 23:21       ` Wayne Sherman
2007-05-22 23:31         ` Jesse Barnes
2007-05-23  9:26           ` Ivan Kokshaysky
2007-05-24  0:20             ` Wayne Sherman
2007-05-24  3:08               ` Jesse Barnes
2007-05-24  3:10                 ` Jesse Barnes
2007-05-24 10:09                   ` Ivan Kokshaysky [this message]
2007-05-25  0:27                     ` Wayne Sherman

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=20070524140941.A21491@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsherman@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®