Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!purdue!ames!amdcad!light!bvs From: bvs@light.uucp (Bakul Shah) Newsgroups: comp.unix.questions Subject: Re: Code 0x01 in Tatu Ylonen SCSI driver Keywords: synchronous transfer Message-ID: <1989Aug5.144627.11225@light.uucp> Date: 5 Aug 89 21:46:24 GMT References: <1670@apt.UUCP> Reply-To: bvs@light.UUCP (Bakul Shah) Distribution: na Organization: Bit Blocks, Inc. Lines: 44 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>