lkml.org 
[lkml]   [2020]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] mmc: core: Export device/vendor ids from Common CIS for SDIO cards
On Wed, 27 May 2020 at 10:00, Pali Rohár <pali@kernel.org> wrote:
>
> On Wednesday 27 May 2020 09:39:50 Ulf Hansson wrote:
> > On Tue, 26 May 2020 at 17:43, Pali Rohár <pali@kernel.org> wrote:
> > >
> > > Device/vendor ids from Common CIS (Card Information Structure) may be
> > > different as device/vendor ids from CIS on particular SDIO function.
> > >
> > > Export these "main" device/vendor ids for SDIO and SD combo cards at top
> > > level mmc device in sysfs so userspace can do better identification of
> > > connected SDIO and SD combo cards.
> >
> > What would userspace do with this information, more exactly?
>
> Userspace can e.g. write udev rules based on Common CIS vendor/device
> id. Or can exactly identify SDIO card by CIS vendor/device id. Also it
> can be suitable for "lssdio" tool to print all information about SDIO
> card.
>
> Currently I do not know any way how userspace can retrieve these ids for
> particular SDIO card. And correct identification is important.
>
> Other important thing is that kernel on some places (e.g. mmc quirks)
> uses Common CIS vendor/device id and on other places (e.g. binding
> drivers) it uses SDIO function device/vendor ids.
>
> So for debugging and developing kernel drivers it is needed to know
> correct Common CIS vendor/device id and SDIO functions vendor/device
> ids.
>
> > Isn't it just sufficient to give events per SDIO func, as we already
> > do in sdio_bus_uevent()?
>
> No because some SDIO cards have different Common CIS vendor/device id
> and different vendor/device ids for particular SDIO functions.
>
> Common CIS vendor/device id is the "main" identification of SDIO card,
> functions vendor/device ids just identify one of those functions.
>
> For example look at my patch "mmc: sdio: Fix macro name for Marvell
> device with ID 0x9134" [1]. Without knowing correct CIS vendor/device id
> I was not able to fully understand problem and mess with names and ids.
> Because mmc quirks list uses CIS vendor/device ids (I guess for obvious
> reason as SDIO functions are not enumerated yet).

Good points, much appreciated to understand the use cases better!

May I suggest that you put some of this information into the commit message?

>
> [1] - https://lore.kernel.org/linux-mmc/20200522144412.19712-2-pali@kernel.org/
>

[...]

Kind regards
Uffe

\
 
 \ /
  Last update: 2020-05-27 10:16    [W:0.068 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site