Linux SCSI subsystem development
 help / color / mirror / Atom feed
* Some constants I don't understand in sym2
@ 2004-09-20 20:25 Matthew Wilcox
  2004-09-20 21:12 ` Tony Battersby
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2004-09-20 20:25 UTC (permalink / raw)
  To: linux-scsi


I'd like to convert sym2 over to using the same constants as the
rest of Linux SCSI.  I think this process has uncovered a bug, but
it may simply be history that I'm missing.  Here's one bit:

-#define        S_GOOD          (0x00)
-#define        S_CHECK_COND    (0x02)
[...]
+#define        S_GOOD          SAM_STAT_GOOD
+#define        S_CHECK_COND    SAM_STAT_CHECK_CONDITION
[...]
 #define        S_TERMINATED    (0x20)
-#define        S_QUEUE_FULL    (0x28)
+#define        S_QUEUE_FULL    SAM_STAT_TASK_SET_FULL
 #define        S_ILLEGAL       (0xff)

I don't know what S_TERMINATED should be.  There's
SAM_STAT_COMMAND_TERMINATED 0x22, marked as obsolete in SAM-3.  Was there
ever a TERMINATED that was 0x20, or is this simply a mistake?  This same
definition can also be found in drivers/scsi/sym53c8xx_defs.h (from
the same author).  aiclib.h thinks SCSI_STATUS_CMD_TERMINATED (0x22)
is obsolete in SAM-2 instead of SAM-3.

Other symbolic tags I haven't found Linux names for yet include:

 #define        M_ABORT_TAG     (0x0d)
 #define        M_CLEAR_QUEUE   (0x0e)
-#define        M_INIT_REC      (0x0f)
-#define        M_REL_REC       (0x10)
+#define        M_INIT_REC      INITIATE_RECOVERY
+#define        M_REL_REC       RELEASE_RECOVERY
 #define        M_TERMINATE     (0x11)
 #define        M_IGN_RESIDUE   (0x23)
 #define        M_IDENTIFY      (0x80)

Again, history lesson / pointers to specs appreciated (I have sam3r09,
spc3r15 and spi5r06 handy).

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-20 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 20:25 Some constants I don't understand in sym2 Matthew Wilcox
2004-09-20 21:12 ` Tony Battersby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox