Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2001 12:24:01 -0600
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc:        stable@FreeBSD.ORG, scsi@FreeBSD.ORG
Subject:   Re: Failure to attach SCSI CD burner
Message-ID:  <20010826122401.A13602@panzer.kdm.org>
In-Reply-To: <20010826105444.A65894@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Sun, Aug 26, 2001 at 10:54:44AM %2B0200
References:  <20010825185223.A24294@melusine.cuivre.fr.eu.org> <20010825141549.A8851@panzer.kdm.org> <20010826105444.A65894@melusine.cuivre.fr.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--huq684BweRXVnRxX
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

On Sun, Aug 26, 2001 at 10:54:44 +0200, Thomas Quinot wrote:
> Le 2001-08-25, Kenneth D. Merry écrivait :
> 
> > So this didn't happen before?  Have you done anything to the drive?
> > (like upgrade the firmware?)
> 
> No firmware upgrade... This happened after making world 'at some time
> in 4.3-STABLE'. I know that this was strictly after 4.3-REL, but
> unfortunately I did not notice the problem for some time, and then
> it got covered by another bug.

Hmm.  Well, there were two changes to the sym driver since 4.3, but neither
one of them look like they might cause problems.

> > Do you have any other controllers you could put the drive on to see if it
> > is a controller/driver issue?
> 
> Unfortunately not right now...
>  
> > camcontrol cmd cd0 -v -c "25 0 0 0 0 0 0 0 0 0" -i 8 "i4 i4"
> 
> (cd0 -> 0:2:0)
> 
> # camcontrol cmd 0:2:0 -v -c "25 0 0 0 0 0 0 0 0 0
> " -i 8 "i4 i4"
> camcontrol: error sending command
> (pass0:sym0:0:2:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
> (pass0:sym0:0:2:0): NOT READY asc:4,0
> (pass0:sym0:0:2:0): Logical unit not ready, cause not reportable

Okay, that looks normal.  camcontrol is not quite as strict as the cd
driver about making sure the right flags have been filled in in the CCB.

I've attached a patch, please apply it to camcontrol and try the same test
again.  This will tell me whether the autosense valid bit is being set.  It
looks like the sense information is there, but it may be that the autosense
valid bit isn't being set.  That is supposed to be set by the controller
driver.

> Right after inserting a CD-ROM, I get UNIT ATTENTION and
> (pass0:sym0:0:2:0): Not ready to ready change, medium may have changed.
> Subsequent tries yield no error and correctly return the CD size
> as '268207 2048'.

That is correct.  The Unit Attention condition is cleared once it is read.

Ken
-- 
Kenneth Merry
ken@kdm.org

--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="camcontrol.c.autosense_test.20010826"

==== //depot/FreeBSD-ken-RELENG_4/src/sbin/camcontrol/camcontrol.c#3 - /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sbin/camcontrol/camcontrol.c ====
*** /tmp/tmp.707.0	Sun Aug 26 12:19:36 2001
--- /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sbin/camcontrol/camcontrol.c	Sun Aug 26 12:19:17 2001
***************
*** 1828,1833 ****
--- 1828,1838 ----
  			warnx("error sending command");
  
  		if (arglist & CAM_ARG_VERBOSE) {
+ 			if (ccb->ccb_h.status & CAM_AUTOSNS_VALID)
+ 				fprintf(stderr, "Autosense is valid\n");
+ 			else
+ 				fprintf(stderr, "Autosense is NOT valid\n");
+ 
  		 	if ((ccb->ccb_h.status & CAM_STATUS_MASK) ==
  			    CAM_SCSI_STATUS_ERROR)
  				scsi_sense_print(device, &ccb->csio, stderr);

--huq684BweRXVnRxX--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010826122401.A13602>