[SRU][X/Z/A][PATCH] Fix for LP:#1730852

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][X/Z/A][PATCH] Fix for LP:#1730852

Gavin Guo
BugLink: http://bugs.launchpad.net/bugs/1730852

[Impact]
The hoplugging disk cannot be detected with the simulated MPT SAS
device on VMWare ESXi.

[Fix]
Author: Hannes Reinecke <[hidden email]>
Date:   Thu Aug 24 14:52:43 2017 +0200

scsi: mptsas: Fixup device hotplug for VMWare ESXi
   
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.

[Test]
The patch has been verified based on the Ubuntu kernel v4.4.0-97.120.

Hannes Reinecke (1):
  scsi: mptsas: Fixup device hotplug for VMWare ESXi

 drivers/message/fusion/mptsas.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][X/Z/A][PATCH] scsi: mptsas: Fixup device hotplug for VMWare ESXi

Gavin Guo
From: Hannes Reinecke <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1730852

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.

[mkp: typos]

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1030850
Signed-off-by: Hannes Reinecke <[hidden email]>
Signed-off-by: Martin K. Petersen <[hidden email]>
(cherry picked from commit ee3e2d8392f695343d2fdfd43e881d14fb406d24)
Signed-off-by: Gavin Guo <[hidden email]>
---
 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 7ebccfa8072a..43415fecc0b0 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -4351,11 +4351,10 @@ mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
  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 hot plug */
+ 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,
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][X/Z/A][PATCH] scsi: mptsas: Fixup device hotplug for VMWare ESXi

Kleber Souza
On 11/08/17 05:10, Gavin Guo wrote:

> From: Hannes Reinecke <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1730852
>
> 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.
>
> [mkp: typos]
>
> Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1030850
> Signed-off-by: Hannes Reinecke <[hidden email]>
> Signed-off-by: Martin K. Petersen <[hidden email]>
> (cherry picked from commit ee3e2d8392f695343d2fdfd43e881d14fb406d24)
> Signed-off-by: Gavin Guo <[hidden email]>

Clean cherry-pick, limited to a single driver and good test results.

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  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 7ebccfa8072a..43415fecc0b0 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -4351,11 +4351,10 @@ mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
>   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 hot plug */
> + 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,
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][X/Z/A][PATCH] scsi: mptsas: Fixup device hotplug for VMWare ESXi

Stefan Bader-2
In reply to this post by Gavin Guo
On 08.11.2017 05:10, Gavin Guo wrote:

> From: Hannes Reinecke <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1730852
>
> 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.
>
> [mkp: typos]
>
> Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1030850
> Signed-off-by: Hannes Reinecke <[hidden email]>
> Signed-off-by: Martin K. Petersen <[hidden email]>
> (cherry picked from commit ee3e2d8392f695343d2fdfd43e881d14fb406d24)
> Signed-off-by: Gavin Guo <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  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 7ebccfa8072a..43415fecc0b0 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -4351,11 +4351,10 @@ mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event,
>   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 hot plug */
> + 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,
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED: [SRU][X/Z/A][PATCH] Fix for LP:#1730852

Stefan Bader-2
In reply to this post by Gavin Guo
On 08.11.2017 05:10, Gavin Guo wrote:

> BugLink: http://bugs.launchpad.net/bugs/1730852
>
> [Impact]
> The hoplugging disk cannot be detected with the simulated MPT SAS
> device on VMWare ESXi.
>
> [Fix]
> Author: Hannes Reinecke <[hidden email]>
> Date:   Thu Aug 24 14:52:43 2017 +0200
>
> scsi: mptsas: Fixup device hotplug for VMWare ESXi
>    
> 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.
>
> [Test]
> The patch has been verified based on the Ubuntu kernel v4.4.0-97.120.
>
> Hannes Reinecke (1):
>   scsi: mptsas: Fixup device hotplug for VMWare ESXi
>
>  drivers/message/fusion/mptsas.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
Applied to Artful/Zesty/Xenial master-next. Thanks.


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment