Thanks James, I have already tried this. Both the drivers have valid _fini. And the driver is getting detached perfectly every time I remove the driver (using rem_drv). I don't see any driver entry in driver_aliases after removing the driver. but then also add_drv for the other driver fails (driver added successfully but failed to attach). I can see the new entries in the driver_aliases but driver_attach is not called for each device present on the system. _info and _init of the new driver are called. Do you see anything wrong in this?
Thanks, Manish. -----Original Message----- From: James Carlson [mailto:[email protected]] Sent: Friday, May 06, 2011 10:38 PM To: Kumar, Manish Cc: [email protected] Subject: Re: [install-discuss] Can we have two drivers for the same device? [email protected] wrote: > Hi all, > > > > I have two test drivers for the same device. If I install one driver > using add_drv, it installs fine and adds the binding info to > /etc/driver_aliases. Then I remove the driver using rem_drv, the driver > and the binding info in the driver_aliases is removed. Now if I try to > install the second driver for the same device, the system throws an > error "failed to attach". > > > > 1. Does OS maintain driver-device binding info at few more places? > > 2. How can I remove this info from all the places, so that I can > add the second driver without rebooting. As long as the driver has a working _fini(9E) (that is, it doesn't just always return EBUSY), you should be able to load up a new driver if you do "modunload -i 0" after removing the old one but before installing the new one. -- James Carlson 42.703N 71.076W <[email protected]> _______________________________________________ install-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/install-discuss
