Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2001 16:32:11 -0600
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc:        =?iso-8859-1?Q?G=E9rard_Roudier?= <groudier@free.fr>, stable@FreeBSD.ORG, scsi@FreeBSD.ORG
Subject:   Re: Failure to attach SCSI CD burner
Message-ID:  <20010828163211.A32009@panzer.kdm.org>
In-Reply-To: <20010829000834.A22196@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Wed, Aug 29, 2001 at 12:08:34AM %2B0200
References:  <20010827135440.A21092@panzer.kdm.org> <20010828212323.J1476-100000@gerard> <20010829000834.A22196@melusine.cuivre.fr.eu.org>

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

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

On Wed, Aug 29, 2001 at 00:08:34 +0200, Thomas Quinot wrote:
> Le 2001-08-28, Gérard Roudier écrivait :
> 
> >>>>> (cd0:sym0:0:2:0): autosense is NOT valid
> >>>>> (cd0:sym0:0:2:0): flags = 0x40 status = 0x4c
> >>>>> (cd0:sym0:0:2:0): got CAM status 0x4c
> >>>>> (cd0:sym0:0:2:0): fatal error, failed to attach to device
> >>>>> (cd0:sym0:0:2:0): lost device
> >>>>> (cd0:sym0:0:2:0): removing device entry
> 
> > It would have been fine to also display out the actual value of the scsi
> > status returned by the device. Being 100% sure is far better than only
> > 99%. :)
> > Let me suggest Thomas to add such a trace to scsi_cd.c and to give another
> > try with his CD burner.
> 
> Hum... You are crediting me with more knowledge of the SCSI subsystem's
> internals than I deserve ;) Do you mean that I should trace the status
> in sym_sir_bad_scsi_status? As far as scsi_cd is concerned, Kenneth's
> patch did already trace status = done_ccb->ccb_h.status (2nd line of
> output above.)

Apply the attached patch in place of the one I gave you before and send the
output when you boot.  This will print out the SCSI status byte.

This problem is happening with a bad CD-R, right?

Ken
-- 
Kenneth Merry
ken@kdm.org

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="scsi_cd.c.autosense_test.20010828"

==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c#4 - /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c ====
*** /tmp/tmp.2660.0	Tue Aug 28 16:30:27 2001
--- /usr/home/ken/perforce/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c	Tue Aug 28 16:29:45 2001
***************
*** 1699,1707 ****
  
  				if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0)
  				 || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0)
! 				 || ((status & CAM_AUTOSNS_VALID) == 0))
  					have_sense = FALSE;
! 				else
  					have_sense = TRUE;
  
  				if (have_sense) {
--- 1699,1722 ----
  
  				if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0)
  				 || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0)
! 				 || ((status & CAM_AUTOSNS_VALID) == 0)) {
! 					if (status & CAM_AUTOSNS_VALID) {
! 						xpt_print_path(periph->path);
! 						printf("autosense is valid\n");
! 					} else {
! 						xpt_print_path(periph->path);
! 						printf("autosense is NOT "
! 						       "valid\n");
! 					}
! 					xpt_print_path(periph->path);
! 					printf("flags = %#x status = %#x\n",
! 					       csio->ccb_h.flags, status);
! 					xpt_print_path(periph->path);
! 					printf("SCSI status = %#x\n",
! 					       csio->scsi_status);
! 
  					have_sense = FALSE;
! 				} else
  					have_sense = TRUE;
  
  				if (have_sense) {

--+QahgC5+KEYLbs62--

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?20010828163211.A32009>