From patchwork Wed Nov 8 04:10:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Guo X-Patchwork-Id: 835584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3yWtBN5kpYz9s74; Wed, 8 Nov 2017 15:10:36 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eCHh7-0001rY-B0; Wed, 08 Nov 2017 04:10:29 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1eCHh5-0001rE-M9 for kernel-team@lists.ubuntu.com; Wed, 08 Nov 2017 04:10:27 +0000 Received: from mail-pl0-f72.google.com ([209.85.160.72]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1eCHh5-0002UX-As for kernel-team@lists.ubuntu.com; Wed, 08 Nov 2017 04:10:27 +0000 Received: by mail-pl0-f72.google.com with SMTP id 63so624412pld.13 for ; Tue, 07 Nov 2017 20:10:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=nUGLgVFLC/qExNFDLto5q0dNMsFm3GXwQSClREKP+Gs=; b=Nt6ZPpC2rKIg0vYC0CEb7qz5EbQKfXuqIx+CBQy3acAjT1on65aA0FB+riJ+IKElpF +C3c5woGpACP26WWDtuUiLjhEIkhwuXsJnLfAh0wiMW5aIK3Do9btMIO/DEwpZw6wyAt LNRkhOQnDHbkySos6Y1j5WpyAR1FCRuK/QB7SkE+t+CE7Ds/CEERUPunPpp6/DxptBnn iBHZ3l7vwf8XPAF8nOmm36WijEAyEkcvWrQGQEgB6Pc30N2SorXt/Qfwarioehweq8Bq hLyCLmhVqPiQeJVJdT0kx4rNhVbm3yJUeX/jJk0USmp7xSsUzM08o216UuL3HWeneHLu /VwQ== X-Gm-Message-State: AJaThX6zViKsZ3U+sDGf2gmUfwRUAd9pM1tAttOUTH69cvpZz/eaDB6B VzI9bhKkGZUO3a/SLT62Msctem05s9Fch8lJzUebs4oGiJ1J+RTF3FAVOmFCXNbxMJ8cZHBMq4n 3wb4HRFiE0ZNvvssRk96PMQh6fmuR/zCiVml6p6n6cg== X-Received: by 10.98.186.11 with SMTP id k11mr1036581pff.141.1510114225733; Tue, 07 Nov 2017 20:10:25 -0800 (PST) X-Google-Smtp-Source: ABhQp+RDhwzkRkrGRQV65qPrnW+Y+GBemvQGRB7LxK7uRmJGwox6a9Qy2OlAWJEPpWkILP2YOW//Ew== X-Received: by 10.98.186.11 with SMTP id k11mr1036570pff.141.1510114225461; Tue, 07 Nov 2017 20:10:25 -0800 (PST) Received: from gavin-P70.buildd (114-35-245-81.HINET-IP.hinet.net. [114.35.245.81]) by smtp.gmail.com with ESMTPSA id s9sm4563200pgc.18.2017.11.07.20.10.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Nov 2017 20:10:24 -0800 (PST) From: Gavin Guo To: kernel-team@lists.ubuntu.com Subject: [SRU][X/Z/A][PATCH] scsi: mptsas: Fixup device hotplug for VMWare ESXi Date: Wed, 8 Nov 2017 12:10:15 +0800 Message-Id: <1510114215-11365-2-git-send-email-gavin.guo@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510114215-11365-1-git-send-email-gavin.guo@canonical.com> References: <1510114215-11365-1-git-send-email-gavin.guo@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Hannes Reinecke 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 Signed-off-by: Martin K. Petersen (cherry picked from commit ee3e2d8392f695343d2fdfd43e881d14fb406d24) Signed-off-by: Gavin Guo Acked-by: Kleber Sacilotto de Souza Acked-by: Stefan Bader --- 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,