]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: esp_scsi: Correct ordering of PCSCSI definition in esp_rev enum
authorKars de Jong <jongk@linux-m68k.org>
Tue, 19 Nov 2019 20:20:20 +0000 (21:20 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Dec 2019 03:08:51 +0000 (22:08 -0500)
commiteeaed7001e531e2c3393f3e8a3d78ab5c1b147b8
treebbc6ed5af03fd46aab247c36e3253ea143ad3121
parent498b47670c5ee1c0b4be596eefcfb035b76ac53e
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>
drivers/scsi/esp_scsi.c
drivers/scsi/esp_scsi.h