•  Back 
  •  Functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : A system-global SCSI-driver SCSI-Driver
Author      : Steffen Engel
Version     : Text-Release 1.10e
Subject     : Documentation/Utilities
Nodes       : 31
Index Size  : 708
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : en
@default    : Title
@help       : 
@options    : -i +zz -t2
@width      : 70
View Ref-File3.3  InquireSCSI                                           SCSI-Driver

  LONG  cdecl (*InquireSCSI)  (WORD       what,
                               tBusInfo  *Info);
    #define cInqFirst  0
    #define cInqNext   1

  typedef struct
  {
    tPrivate Private;
     /* for the driver */
    char  BusName[20];
     /* e.g. 'SCSI', 'ACSI', 'PAK-SCSI' */
    UWORD BusNo;
     /* Number with which the bus is to be addressed */
    UWORD Features;
      #define cArbit     0x01     /* Arbitration will take place on
                                   * the bus */
      #define cAllCmds   0x02     /* All SCSI-Cmds can be transmitted
                                   */
      #define cTargCtrl  0x04     /* The target controls the procedure
                                   * (so it should!) */
      #define cTarget    0x08     /* One can install oneself as a
                                   * target on this bus */
      #define cCanDisconnect 0x10 /* Disconnect is possible */
      #define cScatterGather 0x20 /* Scatter gather possible with
                                   * virtual RAM */
    /* Up to 16 features that the bus is capable of, e.g. Arbit,
     * Full-SCSI (all SCSI-Cmds, in contrast to ACSI where the upper
     * 3 bits of the first command are reserved for the target
     * address, so only <$1F) Target or Initiator controlled
     * Can service all addresses (say: ACSI-port in a TT!)
     * A SCSI-handle is also a pointer to a copy of this information!
     */
    ULONG MaxLen;
    /* Maximum transfer length on this bus (in bytes)
     * corresponds e.g. with ACSI to the size of the FRB
     * minimum 64kB (one FRB-size)
     */
  }tBusInfo;

Search for busses that are present.

One calls, similar to Fsfirst/Fsnext, originally with InqFirst in 
what, then with InqNext repeatedly until a negative value is returned.
The message order (first bus 0, then 1, then 2) is _not_ guaranteed - 
it may happen that bus 3, then bus 2. then 0, then 1 is returned.

A maximum of 32 busses are possible.

One obtains information about the bus in the Info structure.

Returns:

  = 0 : OK
  < 0 : No further devices

ATTENTION: Naturally one must always use the same record for Info, as 
the driver logs in this the devices that have already been reported.

Task: Search configuration dialogues or self-generated configuration 
for busses that are present.

The following bus-numbers are reserved for this: 0 (ACSI), 1 (standard
SCSI: Falcon, TT, Medusa, MagicMac...) and 2 (IDE in Atari- 
compatibles).

However, no assumptions may be made about the number of devices or the
highest device-ID. The devices present must be interrogated with 
InquireBus.

Example: see SRCHDRV.C