Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: ufs: Give an unique ID to each ufs-bsg

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.

Link: https://lore.kernel.org/r/0101016eca8dc9d7-d24468d3-04d2-4ef3-a906-abe8b8cbcd3d-000000@us-west-2.amazonses.com
Fixes: df032bf27a41 ("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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Can Guo and committed by
Martin K. Petersen
8c850a02 9545767d

+1 -1
+1 -1
drivers/scsi/ufs/ufs_bsg.c
··· 203 203 bsg_dev->parent = get_device(parent); 204 204 bsg_dev->release = ufs_bsg_node_release; 205 205 206 - dev_set_name(bsg_dev, "ufs-bsg"); 206 + dev_set_name(bsg_dev, "ufs-bsg%u", shost->host_no); 207 207 208 208 ret = device_add(bsg_dev); 209 209 if (ret)