public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mptsas: Fixup device hotplug for VMWare ESXi
@ 2017-08-24 12:52 Hannes Reinecke
  2017-08-25 21:33 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2017-08-24 12:52 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke,
	Hannes Reinecke

VMWare ESXi emulates an mptsas HBA, but exposes all drives as
direct-attached SAS drives.
This it not how the driver originally envisioned things; SAS drives
were supposed to be connected via an expander, and only SATA drives
would be direct attached.
As such any hotplug event for direct-attach SAS drives was silently
ignored, and the guest failed to detect new drives from within a
VMWare ESXi environment.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1030850
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/message/fusion/mptsas.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index f6308ad..b9bd6aa 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -4352,11 +4352,10 @@ static void mptsas_expander_delete(MPT_ADAPTER *ioc,
 			return;
 
 		phy_info = mptsas_refreshing_device_handles(ioc, &sas_device);
-		/* Only For SATA Device ADD */
-		if (!phy_info && (sas_device.device_info &
-				MPI_SAS_DEVICE_INFO_SATA_DEVICE)) {
+		/* Device hostplug */
+		if (!phy_info) {
 			devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-				"%s %d SATA HOT PLUG: "
+				"%s %d HOT PLUG: "
 				"parent handle of device %x\n", ioc->name,
 				__func__, __LINE__, sas_device.handle_parent));
 			port_info = mptsas_find_portinfo_by_handle(ioc,
-- 
1.8.5.6

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

* Re: [PATCH] mptsas: Fixup device hotplug for VMWare ESXi
  2017-08-24 12:52 [PATCH] mptsas: Fixup device hotplug for VMWare ESXi Hannes Reinecke
@ 2017-08-25 21:33 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2017-08-25 21:33 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Martin K. Petersen, Christoph Hellwig, James Bottomley,
	linux-scsi, Hannes Reinecke


Hannes,

> VMWare ESXi emulates an mptsas HBA, but exposes all drives as
> direct-attached SAS drives.  This it not how the driver originally
> envisioned things; SAS drives were supposed to be connected via an
> expander, and only SATA drives would be direct attached.  As such any
> hotplug event for direct-attach SAS drives was silently ignored, and
> the guest failed to detect new drives from within a VMWare ESXi
> environment.

Applied to 4.14/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2017-08-25 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 12:52 [PATCH] mptsas: Fixup device hotplug for VMWare ESXi Hannes Reinecke
2017-08-25 21:33 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox