diff options
author | Matthew Wilcox <matthew@wil.cx> | 2005-11-29 23:08:46 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 20:11:47 -0500 |
commit | 66e8d1cc64e95be78e6138cc88635f7e3108ef58 (patch) | |
tree | a95be81fadaa90f90a7425f3f83ca7588598290a /drivers/scsi/sym53c8xx_2/sym_glue.c | |
parent | b37df48923b76155de2a728e1155ed263dba5f53 (diff) |
[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.c | 14 |
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) | |||
1018 | if (sdev->id >= SYM_CONF_MAX_TARGET || sdev->lun >= SYM_CONF_MAX_LUN) | 1018 | if (sdev->id >= SYM_CONF_MAX_TARGET || sdev->lun >= SYM_CONF_MAX_LUN) |
1019 | return -ENXIO; | 1019 | return -ENXIO; |
1020 | 1020 | ||
1021 | tp->starget = sdev->sdev_target; | ||
1021 | /* | 1022 | /* |
1022 | * Fail the device init if the device is flagged NOSCAN at BOOT in | 1023 | * Fail the device init if the device is flagged NOSCAN at BOOT in |
1023 | * the NVRAM. This may speed up boot and maintain coherency with | 1024 | * the NVRAM. This may speed up boot and maintain coherency with |
@@ -1027,17 +1028,24 @@ static int sym53c8xx_slave_alloc(struct scsi_device *sdev) | |||
1027 | * lun devices behave badly when asked for a non zero LUN. | 1028 | * lun devices behave badly when asked for a non zero LUN. |
1028 | */ | 1029 | */ |
1029 | 1030 | ||
1030 | if ((tp->usrflags & SYM_SCAN_BOOT_DISABLED) || | 1031 | if (tp->usrflags & SYM_SCAN_BOOT_DISABLED) { |
1031 | ((tp->usrflags & SYM_SCAN_LUNS_DISABLED) && sdev->lun != 0)) { | ||
1032 | tp->usrflags &= ~SYM_SCAN_BOOT_DISABLED; | 1032 | tp->usrflags &= ~SYM_SCAN_BOOT_DISABLED; |
1033 | starget_printk(KERN_INFO, tp->starget, | ||
1034 | "Scan at boot disabled in NVRAM\n"); | ||
1033 | return -ENXIO; | 1035 | return -ENXIO; |
1034 | } | 1036 | } |
1035 | 1037 | ||
1038 | if (tp->usrflags & SYM_SCAN_LUNS_DISABLED) { | ||
1039 | if (sdev->lun != 0) | ||
1040 | return -ENXIO; | ||
1041 | starget_printk(KERN_INFO, tp->starget, | ||
1042 | "Multiple LUNs disabled in NVRAM\n"); | ||
1043 | } | ||
1044 | |||
1036 | lp = sym_alloc_lcb(np, sdev->id, sdev->lun); | 1045 | lp = sym_alloc_lcb(np, sdev->id, sdev->lun); |
1037 | if (!lp) | 1046 | if (!lp) |
1038 | return -ENOMEM; | 1047 | return -ENOMEM; |
1039 | 1048 | ||
1040 | tp->starget = sdev->sdev_target; | ||
1041 | spi_min_period(tp->starget) = tp->usr_period; | 1049 | spi_min_period(tp->starget) = tp->usr_period; |
1042 | spi_max_width(tp->starget) = tp->usr_width; | 1050 | spi_max_width(tp->starget) = tp->usr_width; |
1043 | 1051 | ||