From patchwork Tue Feb 20 13:39:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10230097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 48FFC602A7 for ; Tue, 20 Feb 2018 13:40:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35F3C28687 for ; Tue, 20 Feb 2018 13:40:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28F0128689; Tue, 20 Feb 2018 13:40:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D02728687 for ; Tue, 20 Feb 2018 13:40:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751910AbeBTNkI (ORCPT ); Tue, 20 Feb 2018 08:40:08 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:44981 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbeBTNkH (ORCPT ); Tue, 20 Feb 2018 08:40:07 -0500 Received: by mail-qk0-f193.google.com with SMTP id v124so5010590qkh.11 for ; Tue, 20 Feb 2018 05:40:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=pq1K8jgkyXbjgTdan8l8iCw15CaLXh4s+FUiRY450YQ=; b=TNw+cNLgur/K24jFYEFzbXinOn4U5GpePpro/+OEqY1U9W7JF5pe0Yrewqa2+PyYBJ Xt0hJ06cxlOZkvGonjQQln9midAXU+sl0x8wfrEUbUlfMB4GMPQxkj7fVVR2z0xxG4v5 YUniRSyhQIa0VtvvpKR4UJll30X37i32wmB3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pq1K8jgkyXbjgTdan8l8iCw15CaLXh4s+FUiRY450YQ=; b=cd2ftUuhIUxcQmi1H3DCrYV222hoKFJtXAVi/sbB7eAGlelC0ZMVuIwjqaEVKFR/2G 311YYujGH3d2vVIUwA8Qrfx9v1BFhG6hsLrjYzW3erEjVqbsN+dTbUsWCoeORL9frNmF p8foRkGNJFXgLeHfjATo3leg+qMlRLKW1ultDwIBZeMgmO0ALIpUmd9EANgAYiFsY2nA LynigDOjcNHuv2XmN/h9JuCx+gwPSRGCtEMlqc1mchBfFbEWSafXvKnh3Db+GLHegotV 6r4e8M5bJjBORwZBvlbGlt4WHmxS/pnnv+o5xTpU4HWfjhk/PZLTehnToUbQ5NqQmHGo FZCQ== X-Gm-Message-State: APf1xPBvJfkcl+6PbxCnef00nI+uBSaP+EiJG8mObfIeSiZHIYsTPfZ/ fERFrISvq4NWwJOzGNvUIARCogTYQVk= X-Google-Smtp-Source: AH8x227jYXtg2SuT1BRxp+LG5+H2iU25vOntlZz6ObxL4nt3M4iVUI6YiyxULZgdP/d4x3qWNSiLRQ== X-Received: by 10.55.43.220 with SMTP id r89mr11312309qkr.152.1519134006698; Tue, 20 Feb 2018 05:40:06 -0800 (PST) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id b184sm322521qkg.90.2018.02.20.05.40.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 05:40:05 -0800 (PST) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH] megaraid_sas: Re-enable WRITE SAME Date: Tue, 20 Feb 2018 05:39:54 -0800 Message-Id: <1519133994-1393-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Below commit disable WRITE SAME behavior via host template no_write_same settings for megaraid_sas driver. commit 54b2b50c20a6 ("[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers") For MegaRAID controller we want to support WRITE SAME for non-raid volumes. Because of host wide "no_write_same = 1" settings, we are not able to use provision mode. Virtual Disk will not enable WRITE SAME feature providing correct VPD block limit page. Virtual Disk in MegaRAID provides below values in VPD page 0xb0 which will disable WRITE SAME commands. Maximum unmap LBA count: 0 Maximum unmap block descriptor count: 0 Optimal unmap granularity: 0 Unmap granularity alignment valid: 0 Unmap granularity alignment: 0 Maximum write same length: 0x0 blocks Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index a71ee67df084..dbb16718ce9e 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -3176,7 +3176,6 @@ static struct scsi_host_template megasas_template = { .bios_param = megasas_bios_param, .use_clustering = ENABLE_CLUSTERING, .change_queue_depth = scsi_change_queue_depth, - .no_write_same = 1, }; /**