lkml.org 
[lkml]   [1999]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pci_find_class question
Hi Tim,

> Here's a patch that doesn't work as intended. The idea is to find all
> 'parallel communication' PCI cards, but that doesn't happen. The card I
> have in this machine seems to have class
> ((PCI_CLASS_COMMUNICATION_PARALLEL << 8) | 2), and pci_find_class just
> does a straight compare with no masking.
>
> So I guess what I'm really asking is: what does the LSB byte in the class
> mean?

The LSB contains a programming interface code.

The pci_find_class function is a mistake of history. Either walk the
list of pci_dev structures or use pci_find_device(PCI_ANY_ID, PCI_ANY_ID, ...)
and check the class codes yourself.

Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.042 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site