From patchwork Tue Dec 3 06:58:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Can Guo X-Patchwork-Id: 11270595 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 203AF13A4 for ; Tue, 3 Dec 2019 06:58:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F27FD20726 for ; Tue, 3 Dec 2019 06:58:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="U9np6V2j"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="Vw2lnnHe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727340AbfLCG6l (ORCPT ); Tue, 3 Dec 2019 01:58:41 -0500 Received: from a27-185.smtp-out.us-west-2.amazonses.com ([54.240.27.185]:33938 "EHLO a27-185.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727337AbfLCG6l (ORCPT ); Tue, 3 Dec 2019 01:58:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1575356320; h=From:To:Cc:Subject:Date:Message-Id; bh=WY+EofIbsJ0ATyBUY39PBUF9SD8Hg6K0NfdwhCSeY68=; b=U9np6V2j3j2/rhzPirWafSVsRxLjxu4xlrUfB0RRV6Y3aUsTTgePVSCxd6XtG9Gm d0D4cY7kurDRvalGbjKBe9HPkrzQnS/4Gz4+I5R+1efN8do7Dx3scApodCVTPW7mJ6C Yx3yHRuZoKhTOtdWOaNp6h5qeZFHvw96Q4r/0Bqk= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1575356320; h=From:To:Cc:Subject:Date:Message-Id:Feedback-ID; bh=WY+EofIbsJ0ATyBUY39PBUF9SD8Hg6K0NfdwhCSeY68=; b=Vw2lnnHe/3cJm1euDEd9MqLD3tNCdpGXkU4bh+e1zN4k7gvgw+/hUViEbbvlG3qr zvw1VbNpfjTs25/7V65vAb0OXtDgbM2ob4lk7RADmHmd0UT31Lwnnf2Is7oAFQzyZV/ pXBeAKWYykD0XJJ8LbeTeySP5+3EhJq4T45xwJ20= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 428FCC43383 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=cang@codeaurora.org From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Cc: Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Bean Huo , Evan Green , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] scsi: ufs: Give an unique ID to each ufs-bsg Date: Tue, 3 Dec 2019 06:58:40 +0000 Message-ID: <0101016eca8dc9d7-d24468d3-04d2-4ef3-a906-abe8b8cbcd3d-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 1.9.1 X-SES-Outgoing: 2019.12.03-54.240.27.185 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Considering there can be multiple UFS hosts in SoC, give each ufs-bsg an unique ID by appending the scsi host number to its device name. Fixes: df032bf27 (scsi: ufs: Add a bsg endpoint that supports UPIUs) Signed-off-by: Can Guo Reviewed-by: Avri Altman Reviewed-by: Christoph Hellwig diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c index dc2f6d2..d2197a3 100644 --- a/drivers/scsi/ufs/ufs_bsg.c +++ b/drivers/scsi/ufs/ufs_bsg.c @@ -202,7 +202,7 @@ int ufs_bsg_probe(struct ufs_hba *hba) bsg_dev->parent = get_device(parent); bsg_dev->release = ufs_bsg_node_release; - dev_set_name(bsg_dev, "ufs-bsg"); + dev_set_name(bsg_dev, "ufs-bsg%u", shost->host_no); ret = device_add(bsg_dev); if (ret)