Skip to contentSkip to conversation

Fixes: misc: rtsx: init value of aspm_enabled

PATCH In review [email protected] 2 participants 4 messages Jan 22, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Fixes: misc: rtsx: init value of aspm_enabled

From: Ricky Wu <[email protected]>

make sure ASPM state sync with pcr->aspm_enabled
init value pcr->aspm_enabled

---

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(-)
drivers/misc/cardreader/rtsx_pcr.c +6 -1
index 2aa6648fa41f..5a491d2cd1ae 100644
@@ -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);
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 5 lines · On Fri, Jan 22, 2021 at 04:19:06PM +0800, [email protected] wrote:

From: Ricky Wu <[email protected]>

make sure ASPM state sync with pcr->aspm_enabled
init value pcr->aspm_enabled

Quoted 7 lines

---

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

#2 lore raw
Quoted 18 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, January 22, 2021 4:28 PM
To: 吳昊澄 Ricky <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled

Quoted 9 lines · On Fri, Jan 22, 2021 at 04:19:06PM +0800, [email protected] wrote:

From: Ricky Wu <[email protected]>

make sure ASPM state sync with pcr->aspm_enabled init value pcr->aspm_enabled

---

Quoted 7 lines
Quoted 3 lines

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

Quoted 2 lines

------Please consider the environment before printing this e-mail.

maintainer
#3 lore raw
Quoted 22 lines · 吳昊澄 Ricky
Quoted 22 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, January 22, 2021 4:28 PM
To: 吳昊澄 Ricky <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v4] Fixes: misc: rtsx: init value of aspm_enabled

Quoted 12 lines · On Fri, Jan 22, 2021 at 04:19:06PM +0800, [email protected] wrote:

From: Ricky Wu <[email protected]>

make sure ASPM state sync with pcr->aspm_enabled init value pcr->aspm_enabled

---

v2: fixed conditions in v1 if-statement
v3: give description for v1 and v2
v4: move version change below ---

Quoted 6 lines
Quoted 3 lines

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 :)

Quoted 1 line

"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