io.h 866 B

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