summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/esp_scsi.h
diff options
context:
space:
mode:
authorKars de Jong <jongk@linux-m68k.org>2019-11-19 21:20:20 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-12-20 04:08:51 +0100
commit2086faae3c55a652cfbd369e18ecdb703aacc493 (patch)
treebbc6ed5af03fd46aab247c36e3253ea143ad3121 /drivers/scsi/esp_scsi.h
parentLinux 5.5-rc2 (diff)
downloadlinux-2086faae3c55a652cfbd369e18ecdb703aacc493.tar.xz
linux-2086faae3c55a652cfbd369e18ecdb703aacc493.zip
scsi: esp_scsi: Correct ordering of PCSCSI definition in esp_rev enum
The order of the definitions in the esp_rev enum is important. The values are used in comparisons for chip features. Add a comment to the enum explaining this. Also, the actual values for the enum fields are irrelevant, so remove the explicit values (suggested by Geert Uytterhoeven). This makes adding a new field in the middle of the enum easier. Finally, move the PCSCSI definition to the right place in the enum. In its previous location, at the end of the enum, the wrong values are written to the CONFIG3 register when used with FAST-SCSI targets. Link: https://lore.kernel.org/r/20191119202021.28720-2-jongk@linux-m68k.org Signed-off-by: Kars de Jong <jongk@linux-m68k.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/esp_scsi.h')
-rw-r--r--drivers/scsi/esp_scsi.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/esp_scsi.h b/drivers/scsi/esp_scsi.h
index 91b32f2a1a1b..f764d64e1f25 100644
--- a/drivers/scsi/esp_scsi.h
+++ b/drivers/scsi/esp_scsi.h
@@ -257,15 +257,16 @@ struct esp_cmd_priv {
};
#define ESP_CMD_PRIV(CMD) ((struct esp_cmd_priv *)(&(CMD)->SCp))
+/* NOTE: this enum is ordered based on chip features! */
enum esp_rev {
- ESP100 = 0x00, /* NCR53C90 - very broken */
- ESP100A = 0x01, /* NCR53C90A */
- ESP236 = 0x02,
- FAS236 = 0x03,
- FAS100A = 0x04,
- FAST = 0x05,
- FASHME = 0x06,
- PCSCSI = 0x07, /* AM53c974 */
+ ESP100, /* NCR53C90 - very broken */
+ ESP100A, /* NCR53C90A */
+ ESP236,
+ FAS236,
+ PCSCSI, /* AM53c974 */
+ FAS100A,
+ FAST,
+ FASHME,
};
struct esp_cmd_entry {