lkml.org 
[lkml]   [1997]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to scan for PCI devices? (fwd)
Iñaky Pérez González wrote:
>
> Hi
>
> I'm having a so-stupid-problem (tm) that I'm ashamed of asking
> about it, but I can't find my way through so ... if you can help
> me, you'll win A BIG NICE smile from me :) (and will be able of
> counting with my eternal gratitude):
>
> So, it's quite silly, as I told. You got this damn USB controller
> on the motherboard, an UHCI one, no problem, PCI class id 0x0c03, bus
> 0, device 0, function 2, and another one, a CMD add-on board, an
> OHCI one, PCI class id 0x0c03, bus 0, device 8, function 0 (0x0c03 is
> the USB class and subclass codes for USB host controllers).
>
> Then I start to scan for pci classes 0x0c03, with the following
> code:
>
> #define USB_CLASS 0x0c03
>
> while ((bioscode = pcibios_find_class (USB_CLASS, index,
> &bus, &function))
> == PCIBIOS_SUCCESSFUL)
> {
> index++;
> usb_hosts++;
> }

The pcibios_find_class() function quite often does NOT WORK!

I tried to use it once within the IDE driver, but had trouble
with buggy BIOSs.

-ml

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