All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hpsa: expose enclosures
@ 2016-12-02 10:36 Hannes Reinecke
  2016-12-02 11:39 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Hannes Reinecke @ 2016-12-02 10:36 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, Don Brace, linux-scsi,
	Hannes Reinecke, Hannes Reinecke

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@suse.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hpsa: expose enclosures
  2016-12-02 10:36 [PATCH] hpsa: expose enclosures Hannes Reinecke
@ 2016-12-02 11:39 ` Christoph Hellwig
  2016-12-02 11:41   ` Hannes Reinecke
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2016-12-02 11:39 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Martin K. Petersen, Christoph Hellwig, James Bottomley, Don Brace,
	linux-scsi, Hannes Reinecke

On Fri, Dec 02, 2016 at 11:36:33AM +0100, Hannes Reinecke wrote:
> 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.

Any reason for not doing this unconditionally?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hpsa: expose enclosures
  2016-12-02 11:39 ` Christoph Hellwig
@ 2016-12-02 11:41   ` Hannes Reinecke
  0 siblings, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2016-12-02 11:41 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Martin K. Petersen, James Bottomley, Don Brace, linux-scsi,
	Hannes Reinecke

On 12/02/2016 12:39 PM, Christoph Hellwig wrote:
> On Fri, Dec 02, 2016 at 11:36:33AM +0100, Hannes Reinecke wrote:
>> 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.
>
> Any reason for not doing this unconditionally?
>
Backwards compability.
hpsa never did, so it _might_ be by design.
You never know :-)

I surely can make this the default if Don agrees.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-02 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-02 10:36 [PATCH] hpsa: expose enclosures Hannes Reinecke
2016-12-02 11:39 ` Christoph Hellwig
2016-12-02 11:41   ` Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.