linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Pascal Terjan <pterjan@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mmc@vger.kernel.org, Ricky WU <ricky_wu@realtek.com>,
	Oleksandr Natalenko <oleksandr@natalenko.name>
Subject: Re: rtsx_usb_sdmmc not detecting card insertion anymore
Date: Tue, 27 Jun 2023 21:23:10 +0800	[thread overview]
Message-ID: <CAAd53p4NPr7t2ykOVLfjRRSiO5oatMu-Kx6p=O=cTn239XY+Vw@mail.gmail.com> (raw)
In-Reply-To: <CAPDyKFoTH0j1uVSKvY_d7boMdG0kt_WvmLEKenYG22ZJR=UmvA@mail.gmail.com>

On Tue, Jun 27, 2023 at 7:01 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> + Ricky WU, Kai Heng Feng, Oleksandr Natalenko
>
> On Sat, 24 Jun 2023 at 22:39, Pascal Terjan <pterjan@gmail.com> wrote:
> >
> > Hi,
> > I have an ASUS PN50 machine with a 0bda:0129 card reader. The card is
> > not seen unless I reload the rtsx_usb_sdmmc module.
>
> Thanks for reporting, let's see how we can move this forward.
>
> I have looped in some of the people that has been involved in the
> relevant changes for rtsx_usb. Let's see if they can help too.
>
> >
> > I found a Debian bug report for the same regression
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993068 but nothing
> > to see there.
> >
> > Trying to understand things I found
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4dad599b8b5d1ffc5ef12a2edb13d15d537202ba
> > which seemed related, so I first tried to revert it and that worked.
>
> Okay! That's certainly good information. Are you willing to help
> running further debug testings?
>
> Unless I mistaken, I think we should avoid doing a plain revert
> (assuming we can find another option) as it will cause us to waste a
> lot of energy instead.
>
> >
> > Assuming the description is correct and the rtsx USB driver runtime
> > resumes the rtsx_usb_sdmmc device when it detects that a new card has
> > been inserted, I assume this means it doesn't detect that a card was
> > inserted and the problem would be in rtsx_usb rather than
> > rtsx_usb_sdmmc.
>
> There is also another interesting commit, which was also part of the
> re-work of the rtsx_usb_sdmmc driver that you pointed to above.
>
> commit 883a87ddf2f1 (misc: rtsx_usb: Use USB remote wakeup signaling
> for card insertion detection")
>
> >
> > I am not sure how to debug this further, usbmon doesn't see anything
> > when I insert the card.
>
> If you are willing to run some tests, I suggest to add some debug prints in:
> drivers/mmc/host/rtsx_usb_sdmmc.c
>   sdmmc_get_cd()
>   rtsx_usb_sdmmc_runtime_resume()
>   rtsx_usb_sdmmc_runtime_suspend()
>
> sdmmc_get_cd() should be returning 1 when it finds that there is card
> inserted, but of course the error path would be interesting too.
>
> rtsx_usb_sdmmc_runtime_resume() may be called during probing of the
> rtsx_usb_sdmmc driver. Beyond that point, it should also be called
> when you insert an SD card. Just having a debug print in there should
> help answer if that actually happens.

Adding kernel parameter "usbcore.dyndbg" can also help, it will print
out what's going on at USB side.

Kai-Heng

>
> Kind regards
> Uffe

  reply	other threads:[~2023-06-27 13:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-24 20:39 rtsx_usb_sdmmc not detecting card insertion anymore Pascal Terjan
2023-06-27 11:01 ` Ulf Hansson
2023-06-27 13:23   ` Kai-Heng Feng [this message]
2023-06-27 20:28     ` Pascal Terjan
2023-06-28  1:20       ` Kai-Heng Feng
2023-07-02 11:49         ` Pascal Terjan
2023-06-27 20:22   ` Pascal Terjan

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='CAAd53p4NPr7t2ykOVLfjRRSiO5oatMu-Kx6p=O=cTn239XY+Vw@mail.gmail.com' \
    --to=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=oleksandr@natalenko.name \
    --cc=pterjan@gmail.com \
    --cc=ricky_wu@realtek.com \
    --cc=ulf.hansson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).