[PATCH] hpsa: expose enclosures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some servers have a built-in enclosure which will show up on the
same bus as the internal physical devices. As the driver doesn't
differentiate here they'll be hidden from the OS.
This patch add a module parameter 'hpsa_expose_enclosure' which
will expose these enclosures.

Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
---
 drivers/scsi/hpsa.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 3783ef6..b9e05b3 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -90,6 +90,10 @@
 module_param(hpsa_simple_mode, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(hpsa_simple_mode,
 	"Use 'simple mode' rather than 'performant mode'");
+static int hpsa_expose_enclosure;
+module_param(hpsa_expose_enclosure, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(hpsa_expose_enclosure,
+	     "Expose enclosure devices to the OS");
 
 /* define the PCI info for the cards we can control */
 static const struct pci_device_id hpsa_pci_device_id[] = {
@@ -4417,7 +4421,11 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
 		 * Expose all devices except for physical devices that
 		 * are masked.
 		 */
-		if (MASKED_DEVICE(lunaddrbytes) && this_device->physical_device)
+		if (hpsa_expose_enclosure &&
+		    this_device->devtype == TYPE_ENCLOSURE)
+			this_device->expose_device = 1;
+		else if (MASKED_DEVICE(lunaddrbytes) &&
+			 this_device->physical_device)
 			this_device->expose_device = 0;
 		else
 			this_device->expose_device = 1;
-- 
1.8.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux