[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Attaching to a MI driver



Hi,

Can a MD driver implemented as a pseudo driver make a call to the 
corresponding attach_mi() rotuine of its MI driver? More specifically, I 
have implemented a pseudo audio device and am trying to register it by 
calling the audio_attach_mi() routine in side its own attach() routine.

As of now my kernel is crashing inside config_search() which is called by 
audio_attach_mi() to allocate memory for the pesudo device's softc 
structure.

I suspect that the input parameters to the pseudo device driver's attach 
structure are being incorrectly fed in at boot time. These are in turn 
passed on to audio_attach_mi() and finally config_search().

Can anyone throw some light on what exactly goes on in an attach_mi() 
routine? Also, I would appreciate if you can point me to some sample code 
that shows how a pseudo MD driver attaches to a MI driver (i tried looking 
at the various network pseudo drivers e.g. /sys/net/if_loop.c, but they seem 
to be quite different from trying to virtualize an audio device).

Thanks,
Ishan.





_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus