linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: Give an unique ID to each ufs-bsg
@ 2019-12-03  6:58 Can Guo
  0 siblings, 0 replies; 7+ messages in thread
From: Can Guo @ 2019-12-03  6:58 UTC (permalink / raw)
  To: asutoshd, nguyenb, rnayak, linux-scsi, kernel-team, saravanak,
	salyzyn, cang
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, James E.J. Bottomley,
	Martin K. Petersen, Bean Huo, Evan Green, open list

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 <cang@codeaurora.org>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>

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)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 7+ messages in thread
[parent not found: <0101016ec4a25faa-77e03f78-006b-4b7c-bf8a-d56378f4b1be-000000@us-west-2.amazonses.com>]
* [PATCH] scsi: ufs: Give an unique ID to each ufs-bsg
@ 2019-12-02  3:23 Can Guo
  2019-12-02 17:53 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Can Guo @ 2019-12-02  3:23 UTC (permalink / raw)
  To: asutoshd, nguyenb, rnayak, linux-scsi, kernel-team, saravanak,
	salyzyn, cang
  Cc: Alim Akhtar, Avri Altman, Pedro Sousa, James E.J. Bottomley,
	Martin K. Petersen, Bean Huo, Evan Green, open list

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.

Signed-off-by: Can Guo <cang@codeaurora.org>

diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c
index dc2f6d2..3ef5b78 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%d", shost->host_no);
 
 	ret = device_add(bsg_dev);
 	if (ret)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-09 23:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0101016eca8dc8ee-d58c2ce0-2c25-40ee-8ae0-237fce4fa82d-000000@us-west-2.amazonses.com>
2019-12-09 23:53 ` [PATCH] scsi: ufs: Give an unique ID to each ufs-bsg Martin K. Petersen
2019-12-03  6:58 Can Guo
     [not found] <0101016ec4a25faa-77e03f78-006b-4b7c-bf8a-d56378f4b1be-000000@us-west-2.amazonses.com>
2019-12-02  7:23 ` Avri Altman
2019-12-02  7:29   ` cang
2019-12-02  7:34 ` Avri Altman
  -- strict thread matches above, loose matches on Subject: below --
2019-12-02  3:23 Can Guo
2019-12-02 17:53 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).