From: asutoshd@codeaurora.org
To: Steffen Maier <maier@linux.ibm.com>
Cc: linux-scsi@vger.kernel.org, linux-scsi-owner@vger.kernel.org
Subject: Re: Query: SCSI Device node creation when UFS is loaded as a module
Date: Thu, 24 Oct 2019 10:05:57 -0700 [thread overview]
Message-ID: <e1d00a73efd3b73adae441ff5e00c4b4@codeaurora.org> (raw)
In-Reply-To: <d2804026-7908-4601-3216-e60d51131984@linux.ibm.com>
On 2019-10-24 02:50, Steffen Maier wrote:
> On 10/24/19 1:51 AM, asutoshd@codeaurora.org wrote:
>> Hi
>> I'm loading the ufs-qcom driver as a module but am not seeing the
>> /dev/sda* device nodes.
>> Looks like it's not being created.
>>
>> I find the sda nodes in other paths being enumerated though:
>>
>> / # find /sys -name sda
>> /sys/kernel/debug/block/sda
>> /sys/class/block/sda
>> /sys/devices/platform/<...>/<xxx>.ufshc/host0/target0:0:0/0:0:0:0/block/sda
>> /sys/block/sda
>>
>> All Luns are detected and I see sda is detected and prints for all the
>> Luns as below -:
>> sd 0:0:0:0: [sda] .... ....-byte logical blocks:
>>
>> ... so on ...
>>
>> But if I link it statically instead of a module, it works fine. All
>> device nodes are created.
>>
>> I'm trying to figure out where/how in SCSI does it create these device
>> nodes - /dev/sd<a/b/c/d> ?
>
> That's from (systemd-)udevd user space based on uevents from the
> kernel.
>
>> I've looked into sd.c but I couldn't figure out the exact place yet.
>
> Yeah, based on the SCSI device probe and add lun, the high level
> driver sd would emit udev events for block devices.
Thanks Steffen and Avri.
I understood that sd.c creates the devices based on scsi_device and
establishes a relation between scsi_device (sdp) and scsi_disk (sdkp).
But I couldn't figure out why it creates the device fine when the
ufs-qcom is linked statically, but is unable to create the devices when
inserted as a module.
Does it follow a different method to create the device nodes when
statically linked and needs (systemd-)udevd to handle the events during
dynamic insertion?
Thanks
asd
prev parent reply other threads:[~2019-10-24 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 23:51 Query: SCSI Device node creation when UFS is loaded as a module asutoshd
2019-10-24 6:14 ` Avri Altman
2019-10-24 9:50 ` Steffen Maier
2019-10-24 17:05 ` asutoshd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1d00a73efd3b73adae441ff5e00c4b4@codeaurora.org \
--to=asutoshd@codeaurora.org \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=maier@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox