mirror of https://github.com/akuker/RASCSI.git
Updated with observations from Farallon EtherMac
parent
f37ae1f528
commit
4c8ab54629
|
@ -1,3 +1,4 @@
|
|||
│
|
||||
# DaynaPort SCSI/Link: SCSI Command Set
|
||||
[Original version](http://www.bitsavers.org/pdf/apple/scsi/dayna/daynaPORT/SLINKCMD.TXT) Copyright 2002-2005 by Roger Burrows.
|
||||
|
||||
|
@ -23,11 +24,21 @@ The following is a partial list of implemented SCSI commands:
|
|||
- 09 Retrieve Statistics
|
||||
- 0a Write
|
||||
- 0c Set Interface Mode / Set MAC Address
|
||||
- 0d **Unknown startup command**
|
||||
- 0e Enable/disable Interface
|
||||
- 12 Inquiry
|
||||
|
||||
A number of other SCSI commands are implemented, but their usage is not yet fully known.
|
||||
|
||||
## Unknown Startup Command (0d)
|
||||
Command: 0d 00 00 00 06 00
|
||||
|
||||
Function: ***Unknown at this time***
|
||||
|
||||
Type: Input (Transitions to DATAOUT)
|
||||
|
||||
Response: `09 07 37 FF FF FF 40` (Unsure about number of FF's. Might end with a lot of `00`s). *This looks like an IP message, similar to a write?*
|
||||
|
||||
## Enable/disable Interface (0e)
|
||||
Command: 0e 00 00 00 00 XX (XX = 80 or 00)
|
||||
|
||||
|
@ -40,14 +51,38 @@ Notes: After issuing an Enable, the initiator should avoid sending
|
|||
seconds
|
||||
|
||||
## Inquiry (12)
|
||||
Command: 12 00 00 00 LL 00 (LL is data length)
|
||||
Command: `12 00 00 00 LL 00` (LL is data length)
|
||||
|
||||
Function: Perform a standard SCSI Inquiry command: reference the
|
||||
SCSI spec for further information
|
||||
|
||||
Type: Input; reference the SCSI spec for the data returned
|
||||
|
||||
Notes: The length is user-selectable to a maximum of 25 (37 decimal)
|
||||
Example Response:
|
||||
``03 00 10 00 1E 00 44 65 61 79 6E 61 60 20 20 20``
|
||||
``53 43 53 49 2F 4C 69 6E 6B 20 20 20 20 31 2E 34 61``
|
||||
|Byte Num|Value|Decoded| \| |Byte Num|Value|Decoded| \| |Byte Num|Value|Decoded|
|
||||
|--------|-----|-------|---|--------|-----|-------|---|--------|-----|-------|
|
||||
|0 | 03| Peripheral Type = 3 (CPU)|\|| 16| 53| S |\|| 32| 31| 1 |
|
||||
|1 | 00| |\|| 17| 43| C |\|| 33| 2E| . |
|
||||
|2 | 01| SCSI Version 1 |\|| 18| 53| S |\|| 34| 34| 4 |
|
||||
|3 | 00| |\|| 19| 49| I |\|| 35| 61| a |
|
||||
|4 | 1E| Additional Length = 30 |\|| 20| 2F| / |
|
||||
|5 | 00| |\|| 21| 4C| L |
|
||||
|6 | 00| |\|| 22| 69| i |
|
||||
|7 | 00| |\|| 69| 6E| n |
|
||||
|8 | 44| D |\|| 24| 6B| k |
|
||||
|9 | 61| a |\|| 25| 20| (sp) |
|
||||
|10| 79| y |\|| 26| 20| (sp) |
|
||||
|11| 6E| n |\|| 27| 20| (sp) |
|
||||
|12| 61| a |\|| 28| 20| (sp) |
|
||||
|13| 20| (sp) |\|| 29| 20| (sp) |
|
||||
|14| 20| (sp) |\|| 30| 20| (sp) |
|
||||
|15| 20| (sp) |\|| 31| 20| (sp) |
|
||||
|
||||
Notes:
|
||||
- The length is user-selectable to a maximum of 25 (37 decimal)
|
||||
- Some tools send other SCSI lengths. Example: SCSIProbe on 68k Macs has a length of 05
|
||||
|
||||
## Read (08)
|
||||
Command: 08 00 00 LL LL XX (LLLL is data length, XX = c0 or 80)
|
||||
|
@ -75,12 +110,60 @@ where:
|
|||
|
||||
CCCCCCCC is the CRC
|
||||
|
||||
|
||||
Notes:
|
||||
- When there is no data to be received, the DaynaPort will respond by going to the DataIn phase snd sending ``00 00 00``
|
||||
- When all packets have been retrieved successfully, a length field of 0000 is returned; however, if a packet has been dropped, the SCSI/Link will instead return a non-zero length field with a flag of FFFFFFFF when there are no more packets available. This behaviour seems to continue until a disable/enable sequence has been issued.
|
||||
- The SCSI/Link apparently has about 6KB buffer space for packets.
|
||||
|
||||
Example:
|
||||
Sending an ARPING to the Mac host from an attached Linux device.
|
||||
- Raw ARPING Data:
|
||||
|
||||
``00 80 19 10 98 e3 dc a6 32 1c 4e 69 08 00 45 00``
|
||||
|
||||
``00 1c dc 51 00 00 40 01 76 a7 a9 fe 7d ea ff ff``
|
||||
|
||||
``ff ff 08 00 1b aa dc 51 00 04 00 00 00 00 00 00``
|
||||
|
||||
``00 00 00 00 00 00 00 00 00 00``
|
||||
|
||||
- Read request command: `08 00 00 05 F4 C0`
|
||||
|
||||
- Mac's response (DATAIN):
|
||||
|
||||
``00 40 00 00 00 00`` *Length & Flag fields*
|
||||
|
||||
``00 80 19 10 98 e3 dc a6 32 1c 4e 69 08 00 45 00``
|
||||
|
||||
``00 1c dc 51 00 00 40 01 76 a7 a9 fe 7d ea ff ff``
|
||||
|
||||
``ff ff 08 00 1b aa dc 51 00 04 00 00 00 00 00 00``
|
||||
|
||||
``00 00 00 00 00 00 00 00 00 00``
|
||||
|
||||
``a1 85 ed ff 5b`` *CRC*
|
||||
|
||||
|
||||
CRCs....
|
||||
#0 - 1375032 us
|
||||
00 11 2C 6A 46
|
||||
|
||||
#1 - 2411912 us
|
||||
08 85 2A AF AD
|
||||
|
||||
#2 - 3241516 us
|
||||
00? 3E F9 90 26
|
||||
|
||||
#3 - 4278456 us
|
||||
F0 52 E5 47 07
|
||||
|
||||
#4 - 5315324 us
|
||||
A1 85 ED FF 5B
|
||||
|
||||
|
||||
## Request Sense (03)
|
||||
Command: 03 00 00 00 00 00
|
||||
Command: `03 00 00 00 00 00`
|
||||
|
||||
Function: Perform a standard SCSI Request Sense command
|
||||
|
||||
|
@ -91,7 +174,9 @@ Notes:
|
|||
- If the sense key is 5, the driver should reinitialise the device via a disable/enable sequence; otherwise, it need do nothing.
|
||||
|
||||
## Retrieve Statistics (09)
|
||||
Command: 09 00 00 00 12 00
|
||||
Command: `09 00 00 00 12 00`
|
||||
|
||||
***(akuker note)***: `09 00 00 00 06 00` was observed during hardware diagnostics
|
||||
|
||||
Function: Retrieve MAC address and device statistics
|
||||
|
||||
|
@ -138,15 +223,47 @@ Function: Write a packet at a time to the device (standard SCSI Write)
|
|||
|
||||
Type: Output; the format of the data to be sent depends on the value
|
||||
of XX, as follows:
|
||||
. if XX = 00, LLLL is the packet length, and the data to be sent
|
||||
|
||||
if XX = 00, LLLL is the packet length, and the data to be sent
|
||||
must be an image of the data packet
|
||||
. if XX = 80, LLLL is the packet length + 8, and the data to be
|
||||
if XX = 80, LLLL is the packet length + 8, and the data to be
|
||||
sent is:
|
||||
PP PP 00 00 XX XX XX ... 00 00 00 00
|
||||
where:
|
||||
PPPP is the actual (2-byte big-endian) packet length
|
||||
XX XX ... is the actual packet
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Hardware Diagnostics
|
||||
When the DaynaPort Hardware Diagnostics tool is executed, the following behavior is observed:
|
||||
- The SCSI bus is scanned for all SCSI IDs, but doing a Selection and waiting for the device to respond. This will go from SCSI 6..0
|
||||
- When a device responds to the selection, a 0E (Enable/Disable Interface) command is sent to the SCSI device, with the last byte set to 00 (indicating that the device should be disabled).
|
||||
- The SCSI bus is scanned a second time, with an Inquiry command (12). This time, the scan will stop when the DaynaPort device is detected.
|
||||
- Next, the host will send a Retrieve Statistics (09) command to the DaynaPort. `09 00 00 00 06 00`
|
||||
- The DaynaPort will respond with the requested data - 18 bytes long `00 80 10 FB E3 00 00 00 ...` (Note: scsimon wasn't able to accuratly capture the REQ/ACK signals - so I'm only assuming the response was 18 bytes long)
|
||||
- The host will then send an INQUIRY command to the DaynaPort `09 00 00 00 12 00`
|
||||
- The DaynaPort will respond with `80 19 10 FB E3 00 00 00 00`
|
||||
- The host will send the Enable/Disable Interface command (0E) with the last byte set to 00 (indicating the device should be disabled)
|
||||
|
||||
After this, Hardware Diagnostics tool will wait for the user to reboot the Mac.
|
||||
|
||||
# Software Diagnostics
|
||||
When the Software Diagnostics application is launched, it appears to only send a Request Statistics (09) command to the DaynaPort. `09 00 00 00 12 00`
|
||||
|
||||
The DaynaPort appears to respond with the standard 18 byte response. For example: `80 19 10 98 E3 00 00 00 00 ...`
|
||||
|
||||
The statistics information doesn't appear to be reported anywhere (that I can find).
|
||||
|
||||
# Mac Startup Sequence
|
||||
At startup, the Mac will issue a Read command (08) (`08 00 00 00 01 00`). The target will then respond by going into the status state with data of `02`, followed by a MSGIN of 00
|
||||
|
||||
|
||||
|
||||
|
||||
========================= END OF DOCUMENT =========================
|
||||
|
||||
# Document History
|
||||
|
|
Loading…
Reference in New Issue