I've updated the webrev at http://cr.opensolaris.org/~gdamore/fdc/

Additional changes I made:

1) Now we only refuse to suspend if it looks like media has a *mounted* 
filesystem (block device is open)
2) Better coordination on suspend between fd and fdc -- fixes the panic
3) Removed some unused members in the fcobjops ops vector -- this is a 
private structure anyway
4) Cleaned up some bogus ARGSUSED declarations in fdc, and added _NOTE 
to the remaining few to provide more accurate lint checking

New binaries are posted as fdc-2008-11-04.tar.gz.  The installit script 
has been revised to not clobber the .orig that was originally saved, in 
case you need to go back.  (It saves backups to .orig, .orig.1, 
.orig.2... etc. instead.)

The earlier 11-01 release has been removed from the website.

    -- Garrett

Juergen Keil wrote:
>> 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;
>
> ...
>
>   

_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to