1 enum { 2 MaxScsi = 4, 3 NTarget = 16, 4 Maxnets = 8, 5 }; 6 7 /* 8 * SCSI support code. 9 */ 10 enum { 11 STblank =-6, /* blank block */ 12 STnomem =-5, /* buffer allocation failed */ 13 STtimeout =-4, /* bus timeout */ 14 STownid =-3, /* playing with myself */ 15 STharderr =-2, /* controller error of some kind */ 16 STinit =-1, /* */ 17 STok = 0, /* good */ 18 STcheck = 0x02, /* check condition */ 19 STcondmet = 0x04, /* condition met/good */ 20 STbusy = 0x08, /* busy */ 21 STintok = 0x10, /* intermediate/good */ 22 STintcondmet = 0x14, /* intermediate/condition met/good */ 23 STresconf = 0x18, /* reservation conflict */ 24 STterminated = 0x22, /* command terminated */ 25 STqfull = 0x28, /* queue full */ 26 }; 27 28 typedef struct Target { 29 Scsi *sc; /* from openscsi */ 30 int ctlrno; 31 int targetno; 32 uchar* inquiry; 33 uchar* sense; 34 35 QLock; 36 char id[NAMELEN]; 37 int ok; 38 } Target; 39