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

From: Andrey Chernov <ache_at_FreeBSD.ORG>
Date: Fri, 24 Jun 2011 17:08:27 +0400
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
> _at__at_ -687,6 +687,10 _at__at_
>  	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);
>  	/*
> _at__at_ -747,7 +751,6 _at__at_
>  	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
> _at__at_ -972,12 +975,6 _at__at_
>  
>  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/
Received on Fri Jun 24 2011 - 11:08:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:15 UTC