On 4/17/26 3:57 PM, Mike Christie wrote:
+#define SCSI_UNLIMITED_CMD_PER_LUN     -1
        /*
         * True if this host adapter can make good use of linked commands.
         * This will allow more than one command to be queued to a given
@@ -451,6 +452,9 @@ struct scsi_host_template {
         * command block per lun, 2 for two, etc.  Do not set this to 0.
         * You should make sure that the host adapter will do the right thing
         * before you try setting this above 1.
+        *
+        * Adapters that do not have a device limit can set this to
+        * SCSI_UNLIMITED_CMD_PER_LUN.
         */
        short cmd_per_lun;

Please make sure that SCSI_UNLIMITED_CMD_PER_LUN has type "short" instead of "int". Otherwise comparisons like "shost->cmd_per_lun !=
SCSI_UNLIMITED_CMD_PER_LUN" will trigger a conversion from "short" to
"int" for "shost->cmd_per_lun" before the actual conversion happens. I
don't think that's what we want ...

Thanks,

Bart.

Reply via email to