Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 1999 16:00:39 -0700 (MST)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        mikko@dynas.se
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: ZIP drive probe problems
Message-ID:  <199903252300.QAA89185@panzer.plutotech.com>
In-Reply-To: <Pine.GSO.4.05.9903242040220.11055-100000@spirit.dynas.se> from =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= at "Mar 24, 1999  8:42:13 pm"

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

--ELM922402839-89075-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Mikko Työläjärvi wrote...
> 
> Hello,
> 
> My SCSI ZIP drive does not always get probed correctly at initial
> boot, and *never* if there is no ZIP inserted.
> 
> This is on 3.1-STABLE as of March 22nd.
> 
> I have an ncr810 is the first scsi-bus, with two disks and a CD,
> and an aha1542B is the second bus, with an external ZIP and
> sometimes a scanner.  Cables are almost new, hopefully not of too
> crappy quality.  And the same hardware worked with 2.2.8 (w/o CAM).
> 
> Dmesg output for the Adaptec controller looks like:
> 
> aha0 at 0x330-0x333 irq 9 drq 6 on isa
> aha0: AHA-1540/1542 64 head BIOS FW Rev. 1.2 (ID=41) SCSI Host Adapter, SCSI ID 7, 16 CCBs
> [...]
> (da2:aha0:0:5:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 
> (da2:aha0:0:5:0): error code 0
> (da2:aha0:0:5:0): fatal error, failed to attach to device
> (da2:aha0:0:5:0): lost device
> (da2:aha0:0:5:0): removing device entry
> 
> 
> So, I think I can locate the place in scsi_da.c where this comes from,
> but then what... :(

Can you try the attached patch for scsi_da.c?  I want to see why the drive
isn't attaching.  That error message doesn't tell me.  It may be that I
need to tweak the error printing code a bit.

> A "camcontrol rescan 1" will locate the drive, as will rebooting with
> a ZIP inside.
> 
> Anybody else seeing this?  Hints, suggestions or patches are welcome.
> 
> BTW: Is there any way to get CAM to attach a device, other than
> pass<N>, to a device after boot?

Not currently, unless you take it off the bus, rescan, and then put it back
on the bus and rescan again.  When a device is seen by the transport layer,
it is broadcasted once to all of the peripheral drivers.  It is up to the
peripheral driver to 1. decide whether it is interested in that type of
device and 2., do whatever it wants to decide whether to attach.

In the case of the da and cd drivers, they send a read capacity to the
device before attaching.  The read capacity is allowed to fail with certain
understandable error codes and the attach will still succeed.  In your
case, the controller tells us that we have valid sense data, but it appars
that there actually is no sense data returned.  The patch will help me
figure out what is going on.

Ken
-- 
Kenneth Merry
ken@plutotech.com

--ELM922402839-89075-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: attachment; filename=scsi_da.c.status_patch.032599
Content-Description: scsi_da.c.status_patch.032599
Content-Transfer-Encoding: 7bit

==== //depot/cam/sys/cam/scsi/scsi_da.c#97 - /usr/home/ken/perforce/cam/sys/cam/scsi/scsi_da.c ====
*** /tmp/tmp.97479.0	Thu Mar 25 15:44:44 1999
--- /usr/home/ken/perforce/cam/sys/cam/scsi/scsi_da.c	Thu Mar 25 15:44:31 1999
***************
*** 1400,1405 ****
--- 1400,1411 ----
  					if (have_sense)
  						scsi_sense_print(
  							&done_ccb->csio);
+ 						xpt_print_path(periph->path);
+ 						printf("got CAM status %#x\n",
+ 						       done_ccb->ccb_h.status);
+ 						xpt_print_path(periph->path);
+ 						printf("SCSI status %#x\n",
+ 						    done_ccb->csio.scsi_status);
  					else {
  						xpt_print_path(periph->path);
  						printf("got CAM status %#x\n",

--ELM922402839-89075-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?199903252300.QAA89185>