ncr5380: Reduce max_lun limit
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 23 Mar 2016 10:10:23 +0000 (21:10 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 11 Apr 2016 20:57:09 +0000 (16:57 -0400)
The driver has a limit of eight LUs because of the byte-sized bitfield
that is used for busy flags. That means the maximum LUN is 7. The default
is 8.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/NCR5380.c

index 305330b2634924cb0266fd9a3e179eef46da2591..5187c31a48bec55850d6d8d88c687e0303e3cdd5 100644 (file)
@@ -488,6 +488,8 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
        int i;
        unsigned long deadline;
 
+       instance->max_lun = 7;
+
        hostdata->host = instance;
        hostdata->id_mask = 1 << instance->this_id;
        hostdata->id_higher_mask = 0;