From owner-freebsd-current@freebsd.org Fri May 14 16:10:18 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47E4E64CE5D for ; Fri, 14 May 2021 16:10:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FhYQd2S89z4WxX for ; Fri, 14 May 2021 16:10:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x733.google.com with SMTP id 76so29169450qkn.13 for ; Fri, 14 May 2021 09:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G6Emuii5mibdVIDahc4eJPkmF64QHclbamy0T/RQ6s8=; b=KnUG1ksS/faWDvtUKX2+5Npmh+oqk5Yex0ueDygl+CzElKQP+ro4PdLDHUnRvMnZzp 96T36M8UUIguRLK8xbSxcn9SA1XEGV+xvbam+ZTBQSeVOvUicgcXCpwbO5MDRiKjai2a VFnKXFFgK5lK376PB1iUuCD5zWV/3RtERsbLBBzcJHYcxwWzfpx+XrSVh+W7eU52MbIw MnyQn/Q41uYODku9G4l67uZkanQ+qQ/PtzDpSLyt93C+RSM4Vyc/kSeTSe+G22AwAyJz 4XdQnBzUFQC8Fs0HWm25tB7G7a65OarfVw7oNFXZl7KpiOMLN9zqrt/lqeBwQkkciyg/ Ahtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G6Emuii5mibdVIDahc4eJPkmF64QHclbamy0T/RQ6s8=; b=rqFvcWnGuxscZRleg2RR1fk0WRYytGQ8Gx03q6bTffYOF78miWOBtPGAzrKcebjuby 7PyknkXB8qMLOb+WToYFsoRMI7A2UKsHTyzVA1kU6d57c9FjbYcZF1JUfsJfdP0FxOHf 917cOGI34lefGEK035eZbjqwqoOaxhlCHxfdHncQE5C78I7+WdwfZ3NJNQh1JXmimKgW LfwzeGdD/7deGOxaZGhuDT2VYHlfps5vGkF+eFnPGwkdDyfTmnZmCQ/sZg1hHvDR7bKe two0o0x80EDiHHMaeCRGHhbpxizKE5fQrxLJjOS9QlQCyDBQInXevgdTDDJ5RNvs0eOp MijQ== X-Gm-Message-State: AOAM5310hwUVHr4ZvB/yDLaMl0mJ8YcOgCxp+yCvk76tKc1KgNcuG1vw WpRDVY2S5KedyFNDUOlt9+bRiYqX+6W+ohthO0I5yTx5cAI= X-Google-Smtp-Source: ABdhPJyPfQXa7Qt/MvCzDCD9rwQ9boEvEvM6DBq+lHC0TvTRoVScsjeBna2jhvGCOFO8xT8vmDcmGcK2fRcxLxMhU44= X-Received: by 2002:a05:620a:2081:: with SMTP id e1mr43501477qka.44.1621008615916; Fri, 14 May 2021 09:10:15 -0700 (PDT) MIME-Version: 1.0 References: <8d2be5f2-4144-082e-4237-0dac0c4b37e6@restart.be> <6798878a-c499-d78d-e96d-d744513cb80d@restart.be> <1de588e2-20cb-3206-3aea-f3f88f577675@restart.be> <67f0874a-6a05-67f1-3f2b-c4b3dc67fa11@FreeBSD.org> <83b823bf-c6c2-2f6a-b5dd-2e91b4d1931e@restart.be> <2c208bbc-5adc-2327-4717-a5e7c8d64b4b@FreeBSD.org> <9a15daa7-2b17-e257-d4d1-850c632a9db8@restart.be> <417a97b9-2c40-310c-c445-b193c493b880@FreeBSD.org> <7eb763ce-0bbf-9baf-2ede-968ee25cff2e@restart.be> <0CA59364-6802-4733-962A-3EEB00B43AFE@bumblingdork.com> <20210514144830.6b19de85@ernst.home> <51290711-0DC5-45DD-B2DB-4C2D98667DC7@bumblingdork.com> In-Reply-To: From: Warner Losh Date: Fri, 14 May 2021 11:10:03 -0500 Message-ID: Subject: Re: CURRENT crashes at early boot on Lenovo T540p: rtsx to blame - 13.0-RELEASE crashes same way! To: Marc Veldman Cc: Henri Hennebert , FreeBSD Current X-Rspamd-Queue-Id: 4FhYQd2S89z4WxX X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=KnUG1ksS; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::733) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.93 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.93)[-0.930]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::733:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::733:from]; SUBJECT_ENDS_EXCLAIM(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::733:from]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-current] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2021 16:10:18 -0000 On Fri, May 14, 2021, 11:03 AM Marc Veldman wrote: > > > > On 14 May 2021, at 17:29, Henri Hennebert wrote: > > > > On 5/14/21 5:05 PM, Marc Veldman wrote: > >>> On 14 May 2021, at 16:48, Gary Jennejohn wrote: > >>> > >>> On Fri, 14 May 2021 16:21:05 +0200 > >>> Marc Veldman wrote: > >>> > >>>>> On 14 May 2021, at 10:22, Henri Hennebert wrote: > >>>>> > >>>>> > >>>>> Please test the 2.0h version from GitHub. > >>>>> > >>>> > >>>> On my Lenovo P50s: > >>>> > >>>> Cold boot with card not inserted: OK > >>>> Insert card after boot, no crash, but the message > >>>> seems weird: > >>>> > >>>> May 14 16:01:27 supernovo kernel: rtsx0: Interrupt card > inserted/removed > >>>> May 14 16:01:27 supernovo kernel: rtsx0: Card absent > >>>> May 14 16:01:27 supernovo kernel: mmc0: detached > >>>> > >>>> Cold boot with card inserted: OK > >>>> Remove card after boot, no crash, but the message > >>>> seems weird: > >>>> > >>>> May 14 16:06:08 supernovo kernel: rtsx0: Interrupt card > inserted/removed > >>>> May 14 16:06:08 supernovo kernel: rtsx0: Card present > >>>> May 14 16:06:08 supernovo kernel: mmc0: on rtsx0 > >>>> > >>>> I have the inversion flag turned on /boot/loader.conf > >>>> > >>>> dev.rtsx.0.inversion=1 > >>>> dev.rtsx.0.debug=1 > >>>> > >>> > >>> This is weird because the man page states that the inversion flag is > >>> required with the P50. > >>> > >>> BTW Henri, if you're reading this, there's a bug in exactly this part > >>> of the man page: sovled rather than solved > > > > Thank you for the hint - will be corrected in the next push. > > > >>> > >>> But, the trace output indicates that you do not need the inversion > flag. > >>> > >>> Maybe your P50 (may be a later model than the P50s tested during driver > >>> development) does not have the problem. > >> I removed the flag, and it works now.Thanks! > >> What is it in the trace that indicated that the inversion flag is not > needed? > > > > In Bug 255130 they ask me to automate the inversion. I do it for the > P50s and T470p following informations from Bug 204521. > > > > But strangely it is not applicable to this particular P50s. So, as > indicated in my previous mail, it must be nullify with > dev.rtsx.0.inversion=0. > > > > To investigate this last problem can you send > > > > kenv | grep smbios.system > > > marc@supernovo:~ $ kenv | grep smbios.system > smbios.system.family="ThinkPad P50s" > smbios.system.maker="LENOVO" > smbios.system.product="20FLCTO1WW" > smbios.system.serial="R90N30VP" > smbios.system.sku="LENOVO_MT_20FL_BU_Think_FM_ThinkPad P50s" > smbios.system.uuid="cbc5ee4c-2b18-11b2-a85c-a62da394388c" > smbios.system.version="ThinkPad P50s" > marc@supernovo:~ $ > If there are only a few systems that need inversion, then using these things to do that by default is a nice to have item. Warner > > > and > > > > dmesg|grep rtsx > > > > > rtsx0: <2.0h Realtek RTS522A PCI MMC/SD Card Reader> mem > 0xf4100000-0xf4100fff at device 0.0 on pci1 > rtsx0: Inversion activated for LENOVO/ThinkPad P50s/20FLCTO1WW, see BUG in > rtsx(4) > rtsx0: If a card is detected without an SD card present, add > dev.rtsx.0.inversion=0 in loader.conf(5) > rtsx0: We are running with inversion: 0 > rtsx0: Interrupt card inserted/removed > rtsx0: Card present > rtsx0: A card is detected > mmc0: on rtsx0 > rtsx0: Interrupt card inserted/removed > rtsx0: Card absent > rtsx0: Interrupt card inserted/removed > rtsx0: Card present > mmc0: on rtsx0 > rtsx0: Interrupt card inserted/removed > rtsx0: Card absent > > Best regards, > > Marc Veldman > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >