Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17683921rwd; Tue, 27 Jun 2023 06:27:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4y+xDKxoqGuiW2wrS+6F52ch+ey2tpst6sdkOjsXtn26NZCbmOe+Aom0F6kaFnDVhs/Cl/ X-Received: by 2002:a05:6870:3814:b0:1ac:fbec:1318 with SMTP id y20-20020a056870381400b001acfbec1318mr20573646oal.52.1687872432570; Tue, 27 Jun 2023 06:27:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687872432; cv=none; d=google.com; s=arc-20160816; b=agItCgrVEQvJpceJ8fkvaCEk0oYY3mmlr53pj+CjQMLTmj7IefTXezAU89SeeB/fct 4sbn/HqMJXGYXhx8eVkgExnxAPnHbLcGNEU/sJcBaLb9x0eQne1enGU0FwgV/XAYxMoa wlz66CpGsATfxgamRypWSMltOlzelHC5TRqtmSLwG+PiAcxE1fhFiUc6PlP8RKiwuOrF cN86QrCtA0sqAqGAOANB74qWr+yzmfyECIG98o2Eor2tMj2uZAPr3PA24EE+2mwah9xS /Or7Bic5BYTkNh52b3FE5Pr57cLE6FE6Bu1VBozVVCsdxnbCFQ09XcjzEjOIcX+vKzHh dm1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kGUYnE5kbOca9vEprcX/3t5yld25R/LWby9O3ADDzRg=; fh=ZPHh8ZIBUplVhpOLrwmlvfd9/sCav1FT7/2TdHLMYF0=; b=FTB2Fcs3e/PRyFuDdUO0ltBoc3oax91R+on6KkQKb+dZr3nuabGF0HwM7g8IvwHY/E L7S3YhFEso4Je0puup9spUhHgf4LSURXACw+cx0bMOA6QrBYOJAc+ofOne806QMo9EPy VNWSVICXofXR+7qrV/ijr702x6YzPTBFe19qs5HNgKnYVdo+oqo/QmA0Ilvp9WInJoiB CEY6Mpgyp/4A/c4cnAoLw9PX+nqsdAwDNu2flWm038o/2NWpezb+93isgVAH0U/ohKg5 DECgu41EarCb8BWdIGD4WD88ZpBmp8DaFBz6UYBxOiKPuZmw53S8fpay538tV05d8GfJ zrPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=fJsIw+pK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 1-20020a17090a198100b0025c1f1b7527si7329469pji.11.2023.06.27.06.27.00; Tue, 27 Jun 2023 06:27:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=fJsIw+pK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbjF0NXf (ORCPT + 99 others); Tue, 27 Jun 2023 09:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbjF0NXd (ORCPT ); Tue, 27 Jun 2023 09:23:33 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F091E10FC for ; Tue, 27 Jun 2023 06:23:26 -0700 (PDT) Received: from mail-oa1-f72.google.com (mail-oa1-f72.google.com [209.85.160.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id CC4E6423E7 for ; Tue, 27 Jun 2023 13:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1687872204; bh=kGUYnE5kbOca9vEprcX/3t5yld25R/LWby9O3ADDzRg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fJsIw+pK0wORKXNUix03NShtOtbN+d0+9VZZmTcqavmn1JaUyV2iIX4udBFo2ZjDk UnL18UQaHgaWUAsFhY9MxSdCqDvoFDX+LX5hLEL23nC8wuvxMn2tldqmIFO+y61XyG GOoaIOprRkO6GXS2caRu3v952VJZH07LebvGQ08CjV2XR2eHAH3WdmkRVtL14JrPOw 363MFuBmUtaJFP2NwoR+cX6O04MekoEnJPpRmBkyZuRiHsY8T62Jl+uycgaHPkvelw ISlMb1GxU4Td3/PBYyyF7z6tQX9j9GXM87Gw7zSzbRTr58GJQm2yLUdM6xAsZL6B9+ pLWqqRPp9/zIA== Received: by mail-oa1-f72.google.com with SMTP id 586e51a60fabf-1b01364f044so3199427fac.3 for ; Tue, 27 Jun 2023 06:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687872201; x=1690464201; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kGUYnE5kbOca9vEprcX/3t5yld25R/LWby9O3ADDzRg=; b=HWPDJqHHnken/DLj/WgDmiHYhco8XthYOdymVm45WcsmmCSIDUAmMHjMB3yJIFlbAv RaRk2LR1/9Y41y0HU5FjN9vaCABdEPPV6GbD8K5Ump1fJ0XLuTBca7iIlHRlPufwm+EK n6QzK7BtVgvm9zfEpJrXMGZKXCvfNOe+ATYNbHno59SWsuvvOelMbUi7jIlKKzlAgSuT oUemUrjKuuExPnZsCI8VWInz/coI4C4haQlCzc8rByGuR5ChDfc3v/lD96Dq2vHPEoAi eGJQKB7tDkIa9feWtJlhSIlRXycwlGNf4MlukpvF/+pYJ7Idy6c8vMMDMutWbYzwjSQj ZqjA== X-Gm-Message-State: AC+VfDxoNBHlsut8ZocOT4mk0BSUQL026Z0Q2zSTThmkskC2wUlr/Ld6 d5jV4hw/Dgn+Ic3K6TmmjscubjGacXudRT0BNOTdHakyvbWcTz3hdcsUCauGMB9q2wQSiKUnJgK 8NnqaGQqZwyfyr4C94DC5QbSWbafUMjQ6TinLJkT3IqS7koCV8jWqkDQWrA== X-Received: by 2002:a05:6870:c78a:b0:1b0:2506:8d21 with SMTP id dy10-20020a056870c78a00b001b025068d21mr7964593oab.24.1687872201574; Tue, 27 Jun 2023 06:23:21 -0700 (PDT) X-Received: by 2002:a05:6870:c78a:b0:1b0:2506:8d21 with SMTP id dy10-20020a056870c78a00b001b025068d21mr7964581oab.24.1687872201309; Tue, 27 Jun 2023 06:23:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kai-Heng Feng Date: Tue, 27 Jun 2023 21:23:10 +0800 Message-ID: Subject: Re: rtsx_usb_sdmmc not detecting card insertion anymore To: Ulf Hansson Cc: Pascal Terjan , linux-kernel , linux-mmc@vger.kernel.org, Ricky WU , Oleksandr Natalenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 27, 2023 at 7:01=E2=80=AFPM Ulf Hansson wrote: > > + Ricky WU, Kai Heng Feng, Oleksandr Natalenko > > On Sat, 24 Jun 2023 at 22:39, Pascal Terjan 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=3D993068 but nothing > > to see there. > > > > Trying to understand things I found > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/comm= it/?id=3D4dad599b8b5d1ffc5ef12a2edb13d15d537202ba > > 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