Exactly that commit (was Re: Latest -current 100% hang at the late boot stage)

Andrey Chernov ache at FreeBSD.ORG
Fri Jun 24 13:08:31 UTC 2011


On Thu, Jun 23, 2011 at 11:01:17PM -0400, Justin T. Gibbs wrote:
> To test this theory, apply the following patch.  I do not know if this
> is safe for changer devices, but I will review the changer code if this
> patch fixes ache's problem.

I don't have changers. One of the plain ATA DVDs is read-only (cd0, which 
is not detected now) and another one is read-write (cd1, detected). I try 
the patch but nothing is changed in the picture. cd0 still not detected, 
xpt_thrd sleep in ccb_scan and g_event sleep in caplck. Here is probe from 
the old kernel which works, just in case, nothing unusual with it: 
cd0 at ata2 bus 0 scbus2 target 0 lun 0 
cd0: <ASUS DVD-E616A 1.08> Removable CD-ROM SCSI-0 device 
cd0: 100.000MB/s transfers (UDMA5, ATAPI 12bytes, PIO 65534bytes) 
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed Unplugging power from it allows to boot 
normally. 
Inserting media does not help too.

> --- //depot/vendor/FreeBSD/head/sys/cam/scsi/scsi_cd.c	2011-05-07 10:06:43.000000000 -0600
> +++ /home/justing/perforce/vendor/FreeBSD/head/sys/cam/scsi/scsi_cd.c	2011-05-07 10:06:43.000000000 -0600
> @@ -687,6 +687,10 @@
>  	else
>  		softc->minimum_command_size = 6;
>  
> +	/*
> +	 * Refcount and block open attempts until we are setup
> +	 * Can't block
> +	 */
>  	(void)cam_periph_hold(periph, PRIBIO);
>  	cam_periph_unlock(periph);
>  	/*
> @@ -747,7 +751,6 @@
>  	softc->disk->d_hba_subdevice = cpi.hba_subdevice;
>  	disk_create(softc->disk, DISK_VERSION);
>  	cam_periph_lock(periph);
> -	cam_periph_unhold(periph);
>  
>  	/*
>  	 * Add an async callback so that we get
> @@ -972,12 +975,6 @@
>  
>  cdregisterexit:
>  
> -	/*
> -	 * Refcount and block open attempts until we are setup
> -	 * Can't block
> -	 */
> -	(void)cam_periph_hold(periph, PRIBIO);
> -
>  	if ((softc->flags & CD_FLAG_CHANGER) == 0)
>  		xpt_schedule(periph, CAM_PRIORITY_DEV);
>  	else

> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"



-- 
http://ache.vniz.net/


More information about the freebsd-current mailing list