From patchwork Mon Sep 3 10:33:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avri Altman X-Patchwork-Id: 10585743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B09C6139B for ; Mon, 3 Sep 2018 10:34:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FA9928417 for ; Mon, 3 Sep 2018 10:34:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93D6929580; Mon, 3 Sep 2018 10:34:17 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 4C52428417 for ; Mon, 3 Sep 2018 10:34:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbeICOxt (ORCPT ); Mon, 3 Sep 2018 10:53:49 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:40626 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbeICOxt (ORCPT ); Mon, 3 Sep 2018 10:53:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1535970857; x=1567506857; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=fiKQneGop4YgoHbnq+WNmnWKS1FvBww1rf/oFE/F/E8=; b=K6nmjx+5LTSxueyA2aBKtAqCy+HEX5+nZHIpTHLNmuqUhJ1JWiXNOceK YiiefXlreFkkDKM++6jC0ZRz4z1U4ol2t/beO70t6AIl7Z8dgT7AqeDPr 6LMliJuH7ilvfpUk4HoWVjUmjDfgcVLFNHHyxwCEtkBzRuYHcCTSmN9hR aZxBbJACL1bWJLJNVkXoTfgJHV8COD79mXXGZXBUn2MkIhu6zVucZEjc7 pdQmcUJ9VP0Y5g9LLl4OjPpsEthBougO2DDZIym+wGqsRZYQcPRjgR00A 2ysiblKZHeXhRVVPgzWh93sq16sLDzG02CBgO7ymEYRxHbraT4EcOB/vJ g==; X-IronPort-AV: E=Sophos;i="5.53,324,1531756800"; d="scan'208";a="90486136" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 03 Sep 2018 18:34:17 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 03 Sep 2018 03:21:06 -0700 Received: from kfae422988.sdcorp.global.sandisk.com ([10.0.231.37]) by uls-op-cesaip02.wdc.com with ESMTP; 03 Sep 2018 03:34:12 -0700 From: Avri Altman To: Christoph Hellwig , Johannes Thumshirn , Hannes Reinecke , Bart Van Assche , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org Cc: Stanislav Nijnikov , Avi Shchislowski , Alex Lemberg , Subhash Jadavani , Vinayak Holikatti , Avri Altman Subject: [PATCH v3 2/7] scsi: ufs: Instantiate a ufs bsg if its available Date: Mon, 3 Sep 2018 13:33:11 +0300 Message-Id: <1535970796-25582-3-git-send-email-avri.altman@wdc.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535970796-25582-1-git-send-email-avri.altman@wdc.com> References: <1535970796-25582-1-git-send-email-avri.altman@wdc.com> 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 Call the probe/remove APIs. Signed-off-by: Avri Altman --- drivers/scsi/ufs/ufshcd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 9d5d2ca..ed37914 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -46,6 +46,7 @@ #include "ufs_quirks.h" #include "unipro.h" #include "ufs-sysfs.h" +#include "ufs_bsg.h" #define CREATE_TRACE_POINTS #include @@ -6652,6 +6653,8 @@ static int ufshcd_probe_hba(struct ufs_hba *hba) hba->clk_scaling.is_allowed = true; } + ufs_bsg_probe(hba); + scsi_scan_host(hba->host); pm_runtime_put_sync(hba->dev); } @@ -7875,6 +7878,7 @@ int ufshcd_shutdown(struct ufs_hba *hba) */ void ufshcd_remove(struct ufs_hba *hba) { + ufs_bsg_remove(); ufs_sysfs_remove_nodes(hba->dev); scsi_remove_host(hba->host); /* disable interrupts */