Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2000 00:38:28 -0700
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Mike Smith <msmith@FreeBSD.ORG>
Cc:        scsi@FreeBSD.ORG
Subject:   Re: chio trap with not-ready changer
Message-ID:  <20000301003828.A28889@panzer.kdm.org>
In-Reply-To: <200003010721.XAA04319@mass.cdrom.com>; from msmith@FreeBSD.ORG on Tue, Feb 29, 2000 at 11:21:33PM -0800
References:  <20000301000808.A28657@panzer.kdm.org> <200003010721.XAA04319@mass.cdrom.com>

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

--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii

On Tue, Feb 29, 2000 at 23:21:33 -0800, Mike Smith wrote:
> > > Unfortunately, it's still failing:
> > > 
> > > (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 0 1d 0 20 0
> > > (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> > > (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> > > (ch0:ahc0:0:4:0): fatal error, failed to attach to device
> > > (ch0:ahc0:0:4:0): lost device
> > > (ch0:ahc0:0:4:0): removing device entry
> > > 
> > > I don't know whether it's necessary to clear this condition somehow...
> > 
> > Well, normally, issuing any command other than an inquiry will clear a
> > unit attention condition.
> > 
> > What happens if you do something like:
> > 
> > camcontrol tur passN -v
> > 
> > Where passN is the passthrough device that attached to it?  If it returns
> > errors, try it a few times in a row.
> > 
> > Also, it might be interesting to see what CAM status is getting returned
> > each time.  The attached patch is the same as the previous patch, except
> > that it will print out the CAM status, SCSI status and retry count for
> > each failed command during the probe phase.
> 
> (ch0:ahc0:0:4:0): CAM status = 0x4c, retry count = 0
> (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 8 1d 0 20 0
> (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> (ch0:ahc0:0:4:0): CAM status = 0x4c, retry count = 0
> (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 0 1d 0 20 0
> (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> (ch0:ahc0:0:4:0): MODE SENSE(06). CDB: 1a 0 1d 0 20 0
> (ch0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (ch0:ahc0:0:4:0): Power on, reset, or bus device reset occurred
> (ch0:ahc0:0:4:0): fatal error, failed to attach to device
> (ch0:ahc0:0:4:0): lost device
> (ch0:ahc0:0:4:0): removing device entry
> ...
> fnord# camcontrol tur pass0 -v
> Unit is not ready
> (pass0:ahc0:0:4:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
> (pass0:ahc0:0:4:0): UNIT ATTENTION asc:29,0
> (pass0:ahc0:0:4:0): Power on, reset, or bus device reset occurred field replaceable unit: 4
> fnord# camcontrol tur pass0 -v
> Unit is ready
> 
> Looks like it might want a TEST UNIT READY to clear the condition?

Not necessarily a test unit ready, but perhaps something other than mode
sense or inquiry.

*sigh*

I still don't understand how the retry count is getting decremented.

Anyway, try the attached patch to scsi_all.c.  It should send one or two
test unit ready commands to the drive in response to a unit attention.

Hopefully that'll clear the condition, and the mode sense can then succeed.

Just for kicks, try it with the default retry count for the mode sense (in
chstart()) of 1.

[ FWIW, this also includes a patch for Joerg Wunsch that I forgot to commit
a long time ago. ]

I haven't tried compiling the patch, hopefully the syntax is correct.

Ken
-- 
Kenneth Merry
ken@kdm.org

--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="scsi_all.c.spectra.20000301"

==== //depot/FreeBSD-ken/src/sys/cam/scsi/scsi_all.c#4 - /a/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_all.c ====
*** /tmp/tmp.29026.0	Wed Mar  1 00:35:16 2000
--- /a/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_all.c	Wed Mar  1 00:33:35 2000
***************
*** 725,730 ****
--- 725,748 ----
   * WARNING:  You must update the num_ascs field below for this quirk table 
   * entry if you add more entries.
   */
+ static struct asc_table_entry spectra_8000_entries[] = {
+ 	{SST(0x29, 0x00, SS_TUR|SSQ_DECREMENT_COUNT|ENXIO,
+ 	     "Power on, reset, or bus device reset occurred")}
+ }
+ 
+ /*
+  * WARNING:  You must update the num_ascs field below for this quirk table 
+  * entry if you add more entries.
+  */
+ static struct asc_table_entry sony_mo_entries[] = {
+ 	{SST(0x04, 0x00, SS_START|SSQ_DECREMENT_COUNT|ENXIO,
+ 	     "Logical unit not ready, cause not reportable")}
+ };
+ 
+ /*
+  * WARNING:  You must update the num_ascs field below for this quirk table 
+  * entry if you add more entries.
+  */
  static struct asc_table_entry quantum_fireball_entries[] = {
  	{SST(0x04, 0x0b, SS_START|SSQ_DECREMENT_COUNT|ENXIO, 
  	     "Logical unit not ready, initializing cmd. required")}
***************
*** 741,746 ****
--- 759,786 ----
  		{T_DIRECT, SIP_MEDIA_FIXED, "QUANTUM", "FIREBALL S*", "*"},
  		1, /* number of vendor-specific sense codes for this entry */
  		quantum_fireball_entries
+ 	},
+ 	{
+ 		/*
+ 		 * This Sony MO drive likes to return 0x04, 0x00 when it
+ 		 * isn't spun up.
+ 		 * Reported by:  Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
+ 		 */
+ 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "SONY", "SMO-C501-09*", "*"},
+ 		1, /* number of vendor-specific sense codes for this entry */
+ 		sony_mo_entries
+ 	},
+ 	{
+ 		/*
+ 		 * The <SPECTRA STL-8000 1.94> apparantly doesn't clear
+ 		 * unit attention conditions when a mode sense is issued.
+ 		 * So we have to issue test unit readies until the unit
+ 		 * attention condition has been cleared.
+ 		 * Reported by:  Mike Smith <msmith@FreeBSD.ORG>
+ 		 */
+ 		{T_CHANGER, SIP_MEDIA_REMOVABLE, "SPECTRA", "STL-8000", "*"},
+ 		1, /* number of vendor-specific sense codes for this entry */
+ 		spectra_8000_entries
  	}
  };
  

--Dxnq1zWXvFF0Q93v--


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




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