summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_glue.c
diff options
context:
space:
mode:
authorMatthew Wilcox2005-11-30 05:08:46 +0100
committerJames Bottomley2005-12-14 02:11:47 +0100
commit66e8d1cc64e95be78e6138cc88635f7e3108ef58 (patch)
treea95be81fadaa90f90a7425f3f83ca7588598290a /drivers/scsi/sym53c8xx_2/sym_glue.c
parent[SCSI] sym2: Allow NVRAM settings to limit speed and width (diff)
downloadkernel-qcow2-linux-66e8d1cc64e95be78e6138cc88635f7e3108ef58.tar.gz
kernel-qcow2-linux-66e8d1cc64e95be78e6138cc88635f7e3108ef58.tar.xz
kernel-qcow2-linux-66e8d1cc64e95be78e6138cc88635f7e3108ef58.zip
[SCSI] sym2: Report disabled devices and LUNs more attractively
Rather than print a list of targets at driver init time, print each disabled target as we attempt to scan it. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_glue.c')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index cb3d195bdb94..1fffd2b3c654 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1018,6 +1018,7 @@ static int sym53c8xx_slave_alloc(struct scsi_device *sdev)
if (sdev->id >= SYM_CONF_MAX_TARGET || sdev->lun >= SYM_CONF_MAX_LUN)
return -ENXIO;
+ tp->starget = sdev->sdev_target;
/*
* Fail the device init if the device is flagged NOSCAN at BOOT in
* the NVRAM. This may speed up boot and maintain coherency with
@@ -1027,17 +1028,24 @@ static int sym53c8xx_slave_alloc(struct scsi_device *sdev)
* lun devices behave badly when asked for a non zero LUN.
*/
- if ((tp->usrflags & SYM_SCAN_BOOT_DISABLED) ||
- ((tp->usrflags & SYM_SCAN_LUNS_DISABLED) && sdev->lun != 0)) {
+ if (tp->usrflags & SYM_SCAN_BOOT_DISABLED) {
tp->usrflags &= ~SYM_SCAN_BOOT_DISABLED;
+ starget_printk(KERN_INFO, tp->starget,
+ "Scan at boot disabled in NVRAM\n");
return -ENXIO;
}
+ if (tp->usrflags & SYM_SCAN_LUNS_DISABLED) {
+ if (sdev->lun != 0)
+ return -ENXIO;
+ starget_printk(KERN_INFO, tp->starget,
+ "Multiple LUNs disabled in NVRAM\n");
+ }
+
lp = sym_alloc_lcb(np, sdev->id, sdev->lun);
if (!lp)
return -ENOMEM;
- tp->starget = sdev->sdev_target;
spi_min_period(tp->starget) = tp->usr_period;
spi_max_width(tp->starget) = tp->usr_width;