> Garrett D'Amore wrote: > > > Today I posted some updates for iprb and fdc. These drivers, available from > > > > http://www.opensolaris.org/os/community/device_drivers/files/ > > > > have made it possible for me to use suspend/resume nicely on my Dell > > Precision M390 workstation. I'm using build 100 of Solaris. These > > drivers also support quiesce, and I'm able to use reboot -f on this > > platform now, as well. > > > > Look for files named "iprb-2008-11-01.tar.gz" and > > "fdc-2008-11-01.tar.gz". The fdc tarball actually includes a nice > > installation script. I wrote that after I'd already posted iprb, so the > > iprb tarball lacks it. > > There is a problem with the fdc webrev. I added the fdc.patch to my > set of opensolaris sources, compiled and installed. > > Test-suspend (uadmin 3 22) on an ASUS M2NPV-VM with a PS/2 floppy drive > paniced the system on suspend. System was booted without floppy media > in the PS/2 floppy drive, nor was a floppy media inserted into the drive > before trying the uadmin 3 22. > > > Apparently it is crashing in fdc.c fdc_select_impl() because fjp->fj_drive > is a NULL pointer: > > /* make sure drive is not selected in case we change speed */ > fcp->c_digout = (fcp->c_digout & ~FD_DRSEL) | > (~unit & FD_DRSEL); > outb(fcp->c_regbase + FCR_DOR, fcp->c_digout); > > (void) fdc_motorsm(fjp, FMI_STARTCMD, > fjp->fj_drive->fdd_motoron); <<<<<<<<<<<<<<<<<<<<<<<
Hmm, in fd.c fd_attach(), fj_drive is set to a non NULL pointer and the flag FUNIT_DRVATCH is added to fj_flags. But in fd_detach(), fj_drive is set to NULL, but the FUNIT_DRVATCH remains set in fj_flags. Shouldn't fd_detach() clear the FUNIT_DRVATCH flag in fj_flags? --- a/usr/src/uts/common/io/fd.c +++ b/usr/src/uts/common/io/fd.c ... @@ -586,24 +569,12 @@ fd_detach(dev_info_t *dip, ddi_detach_cm fjp->fj_drive = NULL; fjp->fj_chars = NULL; fjp->fj_attr = NULL; + fjp->fj_flags &= ~FUNIT_DRVATCH; ddi_prop_remove_all(dip); mutex_destroy(&fjp->fj_lock); sema_destroy(&fdp->d_ocsem); ddi_soft_state_free(fd_state_head, drive_num); break; ...