Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Mar 1999 01:28:20 -0700 (MST)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: SONY SMO-C501-09 not recognized under CAM
Message-ID:  <199903140828.BAA11613@panzer.plutotech.com>
In-Reply-To: <19990314084849.47902@uriah.heep.sax.de> from J Wunsch at "Mar 14, 1999  8:48:49 am"

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

--ELM921400100-11414-0_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

J Wunsch wrote...
> Well, as i wrote in the other message, i'm now (finally) also with CAM
> at home.  Basically, everything's working fine so far.  (Unlike what
> Ken wrote, i can't confirm the problems with the IBM DCAS with tagged
> queuing, but i'll try to collect bonnie and iozone data first.)

Yeah, I'm interested to see your results.  If you want, I can send you
camcontrol diffs that will allow you to set the number of tags for a device
on the fly.

It's likely that you wouldn't notice a problem under light load.  Take a
look at the PR (10398) for a more complete description of what happens.

> Well, the subject says what's not working yet: my old SONY MO drive.
> Upon booting, i get (after a rather long timeout, i. e. while the
> system is already proceeding with the boot):
> 
> (da2:ncr1:0:3:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 
> (da2:ncr1:0:3:0): NOT READY asc:4,0
> (da2:ncr1:0:3:0): Logical unit not ready, cause not reportable
> (da2:ncr1:0:3:0): fatal error, failed to attach to device
> (da2:ncr1:0:3:0): lost device
> (da2:ncr1:0:3:0): removing device entry
> 
> Hmm, yes, the drive ain't spinning by that time (i keep it down when
> not used), but i was under the impression the probe routine would spin
> it up anyway?  At least the old od(4) driver did so (and in my hacked
> version, automatically brought the drive down when not openened by
> anyone.)
> 
> I can then spin it up manually using the associated pass device, but a
> `camcontrol rescan' doesn't get it back as a `da2' as i would have
> expected.  Here's all i could get so far:
> 
> uriah # camcontrol inquiry -n pass -u 4
> <SONY SMO-C501-09   KG 2.13> Removable Direct Access SCSI-CCS device 
> Serial Number 0.0MB/s transfers 
> uriah # camcontrol start -n pass -u 4
> Unit started successfully
> uriah # camcontrol tur -n pass -u 4
> Unit is ready
> uriah # camcontrol rescan 1
> Re-scan of bus 1 was successful
> uriah # camcontrol rescan 0
> Re-scan of bus 0 was successful
> uriah # camcontrol devlist
> <  >                               at scbus-1 target -1 lun -1 (xpt0)
> <SEAGATE ST32430N 0510>            at scbus0 target 0 lun 0 (pass0,da0)
> <TOSHIBA CD-ROM XM-3401TA 3353>    at scbus0 target 2 lun 0 (pass1,cd0)
> <TANDBERG TDC 4222 =07:>           at scbus0 target 4 lun 0 (pass2,sa0)
> <  >                               at scbus0 target -1 lun -1 ()
> <IBM DCAS-34330 S65A>              at scbus1 target 1 lun 0 (pass3,da1)
> <SONY SMO-C501-09   KG 2.13>       at scbus1 target 3 lun 0 (pass4)
> <  >                               at scbus1 target -1 lun -1 ()
> 
> Does anybody have a hint, maybe an idea for the quirk entry that's
> required in order to get the drive working?  (Yes, it's SCSI-CCS only,
> and it actually ain't even a SCSI drive, but rather an ESDI-to-SCSI
> bridge. :)

The problem is that your drive returns a non-standard response when it
isn't spun up.  The only response that can really conclusively be read as 
"I need to be spun up" is 0x04, 0x02, or "Logical unit not ready,
initializing cmd. required".

When the error recovery code sees 0x04,0x00 or 0x04,0x01, it assumes that
the drive is just taking a while to become ready.  So it sends a test unit
ready every .5 seconds for a minute to see if the drive is ready.  If the
drive isn't ready after that, it just assumes that it won't be ready.

That's why it takes so long for the error message to show up on your
console.  It has to go through the error recovery proces at least once, and
probably twice.  So that's 1 or 2 minutes.

If you want your drive to be spun up when it returns 0x04,0x00, you need to
add a quirk entry to the sense code table that will tell the error recovery
code to do what you want it to do.  I've attached a quirk entry that may
do the trick.  Let me know if it works.

I'm not sure why the da driver didn't attach when you rescanned the drive.
I'd have to think on that to figure it out, and it's too late for thinking
too much. :)

Ken
-- 
Kenneth Merry
ken@plutotech.com

--ELM921400100-11414-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: attachment; filename=scsi_all.c.diffs.031499
Content-Description: scsi_all.c.diffs.031499
Content-Transfer-Encoding: 7bit

==== //depot/cam/sys/cam/scsi/scsi_all.c#59 - /usr/home/ken/perforce/cam/sys/cam/scsi/scsi_all.c ====
*** /tmp/tmp.11596.0	Sun Mar 14 01:23:00 1999
--- /usr/home/ken/perforce/cam/sys/cam/scsi/scsi_all.c	Sun Mar 14 01:22:24 1999
***************
*** 725,730 ****
--- 725,739 ----
   * 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 ****
--- 750,765 ----
  		{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
  	}
  };
  

--ELM921400100-11414-0_--


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?199903140828.BAA11613>