All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Clayton <chris2553@googlemail.com>
To: "吳昊澄 Ricky" <ricky_wu@realtek.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	"philquadra@gmail.com" <philquadra@gmail.com>,
	"Arnd Bergmann" <arnd@arndb.de>
Subject: Re: PATCH: rtsx_pci driver - don't disable the rts5229 card reader on Intel NUC boxes
Date: Mon, 3 Aug 2020 06:27:29 +0100	[thread overview]
Message-ID: <96b1fe92-4199-1c9a-523e-58bdd2d3a9db@googlemail.com> (raw)
In-Reply-To: <7c3f6a03f8cc4cb1ac69ec7322fba3d3@realtek.com>

Hi, Ricky

On 03/08/2020 04:01, 吳昊澄 Ricky wrote:
> Hi Chris,
> 
> We don’t think this is our bug...
> This register(FPDCTL) write to OC_POWER_DOWN is for our power saving feature, not to disable the reader
> In your case, we cannot reproduce this on our side that we mention before, we don’t have the platform(Intel NUC Tall Arches Canyon NUC6CAYH Celeron J345) to see this issue
> But we think this issue maybe only on this platform, our RTS5229 works well on the new kernel all platform that we have  
> 
> Ricky    

Perhaps I should have used the word regression rather than bug. I didn't buy the machine until earlier this year, but
other people who have reported this problem have indicated that until bede03a579b3 was applied (during the 5.1 merge
window), the driver supported the card reader on this on the Intel NUC boxes. I know that is true because I built and
tested a 5.0 kernel and the card reader worked fine. I've also built and tested an 5.1-rc1 kernel and the card reader no
longer works. Whether by design or by accident, the card reader worked and now it doesn't. That's a regression in my book!

Since you signed off the patch that caused the regression, I believe it is your bug.

Thanks.

Chris
> 
>> -----Original Message-----
>> From: Chris Clayton [mailto:chris2553@googlemail.com]
>> Sent: Monday, August 03, 2020 3:59 AM
>> To: LKML; 吳昊澄 Ricky; gregkh@linuxfoundation.org; rdunlap@infradead.org;
>> philquadra@gmail.com; Arnd Bergmann
>> Subject: Re: PATCH: rtsx_pci driver - don't disable the rts5229 card reader on
>> Intel NUC boxes
>>
>> Sorry, I should have said that the patch is against 5.7.12. It applies to upstream,
>> but with offsets.
>>
>> On 02/08/2020 20:48, Chris Clayton wrote:
>>> bede03a579b3 introduced a bug which leaves the rts5229 PCI Express card
>> reader on my Intel NUC6CAYH box.
>>>
>>> The bug is in drivers/misc/cardreader/rtsx_pcr.c. A call to rtsx_pci_init_ocp()
>> was added to rtsx_pci_init_hw().
>>> At the call point, pcr->ops->init_ocp is NULL and pcr->option.ocp_en is 0, so in
>> rtsx_pci_init_ocp() the cardreader
>>> gets disabled.
>>>
>>> I've avoided this by making excution code that results in the reader being
>> disabled conditional on the device
>>> not being an RTS5229. Of course, other rtsxxx card readers may also be
>> disabled by this bug. I don't have the
>>> knowledge to address that, so I'll leave to the driver maintainers.
>>>
>>> The patch to avoid the bug is attached.
>>>
>>> Fixes: bede03a579b3 ("misc: rtsx: Enable OCP for rts522a rts524a rts525a
>> rts5260")
>>> Link: https://marc.info/?l=linux-kernel&m=159105912832257
>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=204003
>>> Signed-off-by: Chris Clayton <chris2553@googlemail.com>
>>>
>>> bede03a579b3 introduced a bug which leaves the rts5229 PCI Express card
>> reader on my Intel NUC6CAYH box.
>>>
>>> The bug is in drivers/misc/cardreader/rtsx_pcr.c. A call to rtsx_pci_init_ocp()
>> was added to rtsx_pci_init_hw().
>>> At the call point, pcr->ops->init_ocp is NULL and pcr->option.ocp_en is 0, so in
>> rtsx_pci_init_ocp() the cardreader
>>> gets disabled.
>>>
>>> I've avoided this by making excution code that results in the reader being
>> disabled conditional on the device
>>> not being an RTS5229. Of course, other rtsxxx card readers may also be
>> disabled by this bug. I don't have the
>>> knowledge to address that, so I'll leave to the driver maintainers.
>>>
>>> The patch to avoid the bug is attached.
>>>
>>> Chris
>>>
>>
>> ------Please consider the environment before printing this e-mail.

  reply	other threads:[~2020-08-03  5:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-02 19:48 PATCH: rtsx_pci driver - don't disable the rts5229 card reader on Intel NUC boxes Chris Clayton
2020-08-02 19:58 ` Chris Clayton
2020-08-03  3:01   ` 吳昊澄 Ricky
2020-08-03  5:27     ` Chris Clayton [this message]
2020-08-04  2:44   ` 吳昊澄 Ricky
2020-08-04  7:48     ` gregkh
2020-08-04  8:08       ` 吳昊澄 Ricky
2020-08-04  8:13         ` gregkh
2020-08-04  8:50         ` Chris Clayton
2020-08-04 10:46           ` 吳昊澄 Ricky
2020-08-04 11:51             ` Chris Clayton
2020-08-05  2:35               ` 吳昊澄 Ricky
2020-08-05  5:51                 ` Chris Clayton
2020-08-05 12:48                   ` Chris Clayton
2020-08-22  7:24                     ` Chris Clayton

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=96b1fe92-4199-1c9a-523e-58bdd2d3a9db@googlemail.com \
    --to=chris2553@googlemail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philquadra@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=ricky_wu@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.