Management devices should be ignored when
detecting ALUA capabilites.
Signed-off-by: Hannes Reinecke <[email protected]>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c
b/drivers/scsi/device_handler/scsi_dh_alua.c
index e297851..51f4a31 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -315,6 +315,23 @@ static int alua_check_tpgs(struct scsi_device *sdev,
struct alua_dh_data *h)
{
int err = SCSI_DH_OK;
+ if (scsi_is_wlun(sdev->lun)) {
+ h->tpgs = TPGS_MODE_NONE;
+ sdev_printk(KERN_INFO, sdev,
+ "%s: disable for WLUN\n",
+ ALUA_DH_NAME);
+ return SCSI_DH_DEV_UNSUPP;
+ }
+ if (sdev->type == TYPE_RAID ||
+ sdev->type == TYPE_ENCLOSURE ||
+ sdev->type == 0x1F) {
+ h->tpgs = TPGS_MODE_NONE;
+ sdev_printk(KERN_INFO, sdev,
+ "%s: disable for enclosure devices\n",
+ ALUA_DH_NAME);
+ return SCSI_DH_DEV_UNSUPP;
+ }
+
h->tpgs = scsi_device_tpgs(sdev);
switch (h->tpgs) {
case TPGS_MODE_EXPLICIT|TPGS_MODE_IMPLICIT:
--
1.7.12.4
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html