Subject: Re: pciide/atabus changes
To: Martin Husemann <martin@duskware.de>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-sparc64
Date: 10/09/2003 20:29:09
On Thu, Oct 09, 2003 at 12:28:46AM +0200, Martin Husemann wrote:
> > but as we now have atabus between the
> > controller driver and wd, maybe we could use that instead to avoid
> > growing bus_class_tab[] too much.
> 
> >From a very quick glance it's unclear to me why the dev_compatible checks
> on PCI subclasses don't fire:
> 
>                 case PCI_CLASS_MASS_STORAGE:
>                         if (PCI_SUBCLASS(pa->pa_class) ==
>                                 PCI_SUBCLASS_MASS_STORAGE_IDE) {
> 
> If this could be made to catch this case, we wouldn't need the table for it;
> or are vendors just lacking to fill in proper info here?

In fast this does work. The problem is that device_register() calls
dev_compatible() (which is OK) and then calls bus_class().
If the device name isn't in bus_class_tab[], we loose.
I'm not sure what is best here: change bus_class() to match on pa->pa_class
too for PCI devices, or just add the names to bus_class_tab[].

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--