brian@apt.UUCP (Brian Litzinger) (08/05/89)
I've ported Tatu Ylonen's SCSI driver to my Unix system. And
it has been working flawlessly for some time.
However, I recently connected a Fujitsu M2249/SA drive and
I've come across a message from the drive that Mr. Ylonen's
driver doesn't handle.
I regularly get the message:
scsi: unknown message received from drive 2: 0x1
and the drive operates very poorly. Through some research of
my own, I've found that this is a MSG_EXTENDED code that is
not recognized. The following code excerpt is the generator
of the error message:
default:
if (a & 0x80)
break; /* assume it is an identify message */
printf("scsi: unknown message received from drive %d: %x\n",
unit,a);
break;
}
So, can anyone help me develop the code to handle this case? Any
help would be appreciated. Such as a fix for the code, information
on the 0x1 code, or references for general information on the
SCSI protocol.
Thanks in advanced.
-brian
<> Brian Litzinger @ APT Technology Inc., San Jose, CA
<> UUCP: {apple,sun,pyramid}!daver!apt!brian brian@apt.UUCP
<> VOICE: 408 370 9077 FAX: 408 370 9291
bvs@light.uucp (Bakul Shah) (08/06/89)
In article <1670@apt.UUCP> brian@apt.UUCP (Brian Litzinger) writes: > ... >However, I recently connected a Fujitsu M2249/SA drive and >I've come across a message from the drive that Mr. Ylonen's >driver doesn't handle. > >I regularly get the message: > >scsi: unknown message received from drive 2: 0x1 Most likely this is a synchronous transfer message. The way to handle this is to get rest of the message, make sure it is a sync. xfer msg and send an sync. xfer msg back in response. If your hardware can't handle sync. xfer, send a MESSAGE REJECT (0x7), if it can, send a sync. msg. Format of a sync.msg: { 0x1, /* extended message */ 0x3, /* size of the message */ 0x1, /* sync xfer */ PERIOD, /* in multiples of 4 ns -- REQ/ACK period */ OFFSET, /* number of times REQ can be ahead of ACK */ } Set PERIOD to max(how fast you can xfer bytes, period in target's msg). Set OFFSET to 0 for async transfer or to min(your max offset, offset in target's msg). You will have to tell your hardware you are doing sync. xfer. It would be easy to whip up the right code but I don't have this driver. Either side can send this message so if your h/w can handle sync. xfer, you too can send this message to find out if a drive handles sync. xfer. I suspect your driver does not handle unexpected messages very well. If it receives a message it doesn't understand, it should send back a MESSAGE REJECT and continue. For more details read the SCSI standard (ANSI X3.131-1986). (Computer Literacy in Santa Clara had a few copies a while back). It is quite readable (unusual for a standard :-) -- Bakul Shah <..!{ames,sun,ucbvax,uunet}!amdcad!light!bvs>