* [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled
@ 2021-01-22 8:19 ricky_wu
2021-01-22 8:28 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: ricky_wu @ 2021-01-22 8:19 UTC (permalink / raw)
To: arnd, gregkh, bhelgaas, ricky_wu, vaibhavgupta40, linux-kernel; +Cc: stable
From: Ricky Wu <ricky_wu@realtek.com>
make sure ASPM state sync with pcr->aspm_enabled
init value pcr->aspm_enabled
Cc: stable@vger.kernel.org
Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
---
v2: fixed conditions in v1 if-statement
v3: give description for v1 and v2
v4: move version change below ---
---
drivers/misc/cardreader/rtsx_pcr.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index 2aa6648fa41f..5a491d2cd1ae 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -1512,6 +1512,7 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
struct pcr_handle *handle;
u32 base, len;
int ret, i, bar = 0;
+ u8 val;
dev_dbg(&(pcidev->dev),
": Realtek PCI-E Card Reader found at %s [%04x:%04x] (rev %x)\n",
@@ -1577,7 +1578,11 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
pcr->host_cmds_addr = pcr->rtsx_resv_buf_addr;
pcr->host_sg_tbl_ptr = pcr->rtsx_resv_buf + HOST_CMDS_BUF_LEN;
pcr->host_sg_tbl_addr = pcr->rtsx_resv_buf_addr + HOST_CMDS_BUF_LEN;
-
+ rtsx_pci_read_register(pcr, ASPM_FORCE_CTL, &val);
+ if (val & FORCE_ASPM_CTL0 && val & FORCE_ASPM_CTL1)
+ pcr->aspm_enabled = false;
+ else
+ pcr->aspm_enabled = true;
pcr->card_inserted = 0;
pcr->card_removed = 0;
INIT_DELAYED_WORK(&pcr->carddet_work, rtsx_pci_card_detect);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled
2021-01-22 8:19 [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled ricky_wu
@ 2021-01-22 8:28 ` Greg KH
2021-01-22 9:55 ` 吳昊澄 Ricky
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-01-22 8:28 UTC (permalink / raw)
To: ricky_wu; +Cc: arnd, bhelgaas, vaibhavgupta40, linux-kernel, stable
On Fri, Jan 22, 2021 at 04:19:06PM +0800, ricky_wu@realtek.com wrote:
> From: Ricky Wu <ricky_wu@realtek.com>
>
> make sure ASPM state sync with pcr->aspm_enabled
> init value pcr->aspm_enabled
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
> ---
>
> v2: fixed conditions in v1 if-statement
> v3: give description for v1 and v2
> v4: move version change below ---
What commit id does this fix? How far back should the stable
backporting go? That's what we use the Fixes: line for.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled
2021-01-22 8:28 ` Greg KH
@ 2021-01-22 9:55 ` 吳昊澄 Ricky
2021-01-22 10:03 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: 吳昊澄 Ricky @ 2021-01-22 9:55 UTC (permalink / raw)
To: Greg KH; +Cc: arnd, bhelgaas, vaibhavgupta40, linux-kernel, stable
> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Friday, January 22, 2021 4:28 PM
> To: 吳昊澄 Ricky <ricky_wu@realtek.com>
> Cc: arnd@arndb.de; bhelgaas@google.com; vaibhavgupta40@gmail.com;
> linux-kernel@vger.kernel.org; stable@vger.kernel.org
> Subject: Re: [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled
>
> On Fri, Jan 22, 2021 at 04:19:06PM +0800, ricky_wu@realtek.com wrote:
> > From: Ricky Wu <ricky_wu@realtek.com>
> >
> > make sure ASPM state sync with pcr->aspm_enabled init value
> > pcr->aspm_enabled
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
> > ---
> >
> > v2: fixed conditions in v1 if-statement
> > v3: give description for v1 and v2
> > v4: move version change below ---
>
> What commit id does this fix? How far back should the stable backporting go?
> That's what we use the Fixes: line for.
>
I think I misunderstanding you
Fix commit id: d928061c3143de36c17650ce7b60760fefb8336c
So I need to have v5 and add "Fixes:" tag like below in the signed off by area?
"Fixes: d928061c3143de36c17650ce7b60760fefb8336c"
thanks
Ricky
>
> ------Please consider the environment before printing this e-mail.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled
2021-01-22 9:55 ` 吳昊澄 Ricky
@ 2021-01-22 10:03 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-01-22 10:03 UTC (permalink / raw)
To: 吳昊澄 Ricky
Cc: arnd, bhelgaas, vaibhavgupta40, linux-kernel, stable
On Fri, Jan 22, 2021 at 09:55:44AM +0000, 吳昊澄 Ricky wrote:
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Friday, January 22, 2021 4:28 PM
> > To: 吳昊澄 Ricky <ricky_wu@realtek.com>
> > Cc: arnd@arndb.de; bhelgaas@google.com; vaibhavgupta40@gmail.com;
> > linux-kernel@vger.kernel.org; stable@vger.kernel.org
> > Subject: Re: [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled
> >
> > On Fri, Jan 22, 2021 at 04:19:06PM +0800, ricky_wu@realtek.com wrote:
> > > From: Ricky Wu <ricky_wu@realtek.com>
> > >
> > > make sure ASPM state sync with pcr->aspm_enabled init value
> > > pcr->aspm_enabled
> > >
> > > Cc: stable@vger.kernel.org
> > > Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
> > > ---
> > >
> > > v2: fixed conditions in v1 if-statement
> > > v3: give description for v1 and v2
> > > v4: move version change below ---
> >
> > What commit id does this fix? How far back should the stable backporting go?
> > That's what we use the Fixes: line for.
> >
> I think I misunderstanding you
> Fix commit id: d928061c3143de36c17650ce7b60760fefb8336c
> So I need to have v5 and add "Fixes:" tag like below in the signed off by area?
Yes. See the many hundreds of examples of this on the mailing lists and
in the git log :)
> "Fixes: d928061c3143de36c17650ce7b60760fefb8336c"
It should be:
Fixes: d928061c3143 ("misc: rtsx: modify en/disable aspm function")
The submitting patches document should explain how to do that.
I can go and add it by hand for this, but next time, try to remember to
do it yourself.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-22 10:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 8:19 [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled ricky_wu
2021-01-22 8:28 ` Greg KH
2021-01-22 9:55 ` 吳昊澄 Ricky
2021-01-22 10:03 ` Greg KH
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).