Re: PCI device driver writing newbie trouble

From: Greg KH
Date: Sun Apr 23 2006 - 12:03:59 EST


On Sun, Apr 23, 2006 at 10:50:38AM +0300, Pekka Enberg wrote:
> On Thu, Apr 20, 2006 at 04:04:07PM +0100, Bert Thomas wrote:
> > > static const struct pci_device_id cif50_ids[] = {
> > > {
> > > .vendor = 0x10B5,
> > > .device = 0x9050,
> > > .subvendor = PCI_ANY_ID, //0x10B5,
> > > .subdevice = PCI_ANY_ID, //0x1080,
> > > .class = PCI_ANY_ID,
> > > .class_mask = PCI_ANY_ID
> > > },
>
> On 4/22/06, Greg KH <greg@xxxxxxxxx> wrote:
> > Try the PCI_DEVICE() macro here instead.
> >
> > But that should not matter, this should work, I don't know why it
> > doesn't sorry.
>
> No device class will ever match the above class and class_mask.
> Changing them to zero makes it work according to Bert.

Ah, yeah, that would work, good catch. If you used the PCI_DEVICE()
macro, it would have also worked :)

thanks,

greg k-h
-
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/