Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Nov 2002 00:35:26 +0100 (CET)
From:      =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@free.fr>
To:        xxxlucasxxx@canoemail.com
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: Initializing SCSI drive ST15150W 
Message-ID:  <20021124000049.D6113-100000@localhost.my.domain>
In-Reply-To: <594B1F70C5F7D8947BB58F869F32E33A@xxxlucasxxx.canoemail.com>

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

Hello,

Here is the driver code that catches such errors:

=09/*
=09 *  We have been ODD at the end of a DATA IN
=09 *  transfer and the device didn't send a
=09 *  IGNORE WIDE RESIDUE message.
=09 *  It is a data overrun condition.
=09 */
=09case SIR_SWIDE_OVERRUN:
=09=09if (cp) {
=09=09=09OUTONB (HF_PRT, HF_EXT_ERR);
=09=09=09cp->xerr_status |=3D XE_SWIDE_OVRUN;
=09=09}
=09=09goto out;

The situation corresponds to the following conditions:

- Device in WIDE 16 mode
- Driver asked for a SCSI IO with an odd buffer size

- The device can only send even sizes of bytes and sends 1 byte more than
  the buffer size which is odd.
- The device doesn't tell that the additionnal byte was not valid data.
  (It can do so by sending a SCSI IGNORE WIDE RESIDUE message).

You can make the sym driver ignore this error by just not compiling the 2
lines of code that sets the error condition, as follows:

(/usr/src/sys/dev/sym/)

--- sym_hipd.c.orig=09Thu Dec 27 22:25:25 2001
+++ sym_hipd.c=09Sat Nov 23 23:54:18 2002
@@ -6382,10 +6382,12 @@
 =09 *  It is a data overrun condition.
 =09 */
 =09case SIR_SWIDE_OVERRUN:
+#if 0
 =09=09if (cp) {
 =09=09=09OUTONB (HF_PRT, HF_EXT_ERR);
 =09=09=09cp->xerr_status |=3D XE_SWIDE_OVRUN;
 =09=09}
+#endif
 =09=09goto out;
 =09/*
 =09 *  We have been ODD at the end of a DATA OUT
------------------ CUT HERE -------------------------

Btw, with this patch the additional byte will not be reported in the data
residual, but if the device attempts to send more data, the driver will
report a data overrun condition, but the ignored byte will still not be
counted in the negative residual.

Yes, this patch is not perfect, but your device firmware doesn't seem
better to me. :-) But it can solve your problem.

Doing odd sized IO with SCSI devices is probably a good way to trigger
problems and CAM should avoid this. In fact, it only may do so when
reading the full INQUIRY data. The size used by CAM is based on the
additionnal length field returned by the device. Then CAM tries to read
(additionnal length + 4) bytes in order to get the full INQUIRY data.

As a result, if your device returns a odd value as 'additionnal length'
on the short INQUIRY (36 bytes), then the problem can occur when CAM
attemps to read the full INQUIRY data.

I don't know if such an additionnal byte is to be silently ignored, but I
never read that it must be so in SCSI specifications. If I missed
something, may-be SCSI experts could point what I missed. (?)

  G=E9rard.


On Mon, 18 Nov 2002 xxxlucasxxx@canoemail.com wrote:

> Hi,
>
> I am having a problem getting two seagate (compaq) ST15150W
> drives initialized at boot.
>
> dmesg gives me the bellow message for the SCSI card and drive (I am
> trying one at a time not to confuse matters). In this case I have set
> the drive as bootable in the SCSI BIOS. I have also tried it as not
> bootable. I have tried another drive that has the device ID 0, in this
> case it is device 2. All attemps have lead to nothing more then the
> below. With the device set as not bootable the "SCAN AT BOOT" message
> includes the target 2. The drive and card do work, I have tested them
> on a W2K system without any problems other then being on a W2K system.
> Any clues, a good schooling and taunts are welcome.
> --------------------
> .
> .
> .
> sym0: <875> port 0xe000-0xe0ff mem
> 0xe5001000-0xe5001fff,0xe5000000-0xe50000ff irq 11 at device 13.0 on
> pci0
> sym0: Symbios NVRAM, ID 7, Fast-20, SE, parity checking
> sym0: open drain IRQ line driver, using on-chip SRAM
> sym0: using LOAD/STORE-based firmware.
> sym0: SCAN AT BOOT disabled for targets 0 1 3 4 5 6 8 9 10 11 12 13 14
> 15.
> .
> .
> .
> Waiting 15 seconds for SCSI devices to settle
> (noperiph:sym0:0:-1:-1): SCSI BUS reset delivered.
> (probe2:sym0:0:2:0): extraneous data discarded.
> (probe2:sym0:0:2:0): COMMAND FAILED (87 0 1).
> (probe2:sym0:0:2:0): ODD transfer in DATA IN phase.
> (probe2:sym0:0:2:0): COMMAND FAILED (87 0 10).
> (probe2:sym0:0:2:0): ODD transfer in DATA IN phase.
> (probe2:sym0:0:2:0): COMMAND FAILED (87 0 10).
> (probe2:sym0:0:2:0): ODD transfer in DATA IN phase.
> (probe2:sym0:0:2:0): COMMAND FAILED (87 0 10).
> (probe2:sym0:0:2:0): ODD transfer in DATA IN phase.
> (probe2:sym0:0:2:0): COMMAND FAILED (87 0 10).
> (probe2:sym0:0:2:0): ODD transfer in DATA IN phase.
> (probe2:sym0:0:2:0): COMMAND FAILED (87 0 10).
>
> --------------------
> Thanks in advance for any help.
>
> Lucas
>
>
>
>
> Sign up today for your Free E-mail at: http://www.canoe.ca/CanoeMail
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-scsi" in the body of the message
>
>


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?20021124000049.D6113-100000>