All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misc: rtsx: init value of aspm_enabled
@ 2021-01-21 10:35 ricky_wu
  2021-01-21 10:45 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: ricky_wu @ 2021-01-21 10:35 UTC (permalink / raw)
  To: arnd, gregkh, bhelgaas, ricky_wu, vaibhavgupta40, linux-kernel

From: Ricky Wu <ricky_wu@realtek.com>

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

Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
---
 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] misc: rtsx: init value of aspm_enabled
  2021-01-21 10:35 [PATCH] misc: rtsx: init value of aspm_enabled ricky_wu
@ 2021-01-21 10:45 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-01-21 10:45 UTC (permalink / raw)
  To: ricky_wu; +Cc: arnd, bhelgaas, vaibhavgupta40, linux-kernel

On Thu, Jan 21, 2021 at 06:35:59PM +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
> 
> Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
> ---
>  drivers/misc/cardreader/rtsx_pcr.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for what needs to be done
  here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] misc: rtsx: init value of aspm_enabled
  2021-01-21 10:16 ricky_wu
@ 2021-01-21 10:19 ` 吳昊澄 Ricky
  0 siblings, 0 replies; 4+ messages in thread
From: 吳昊澄 Ricky @ 2021-01-21 10:19 UTC (permalink / raw)
  To: arnd, gregkh, bhelgaas, vaibhavgupta40, linux-kernel

Abandon this patch
Sorry~

> -----Original Message-----
> From: 吳昊澄 Ricky <ricky_wu@realtek.com>
> Sent: Thursday, January 21, 2021 6:16 PM
> To: arnd@arndb.de; gregkh@linuxfoundation.org; bhelgaas@google.com; 吳
> 昊澄 Ricky <ricky_wu@realtek.com>; vaibhavgupta40@gmail.com;
> linux-kernel@vger.kernel.org
> Subject: [PATCH] misc: rtsx: init value of aspm_enabled
> 
> From: Ricky Wu <ricky_wu@realtek.com>
> 
> make sure ASPM state sync with pcr->aspm_enabled init value
> pcr->aspm_enabled
> 
> Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
> ---
>  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..06df0687c0bb 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 = true;
> +	else
> +		pcr->aspm_enabled = false;
>  	pcr->card_inserted = 0;
>  	pcr->card_removed = 0;
>  	INIT_DELAYED_WORK(&pcr->carddet_work, rtsx_pci_card_detect);
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] misc: rtsx: init value of aspm_enabled
@ 2021-01-21 10:16 ricky_wu
  2021-01-21 10:19 ` 吳昊澄 Ricky
  0 siblings, 1 reply; 4+ messages in thread
From: ricky_wu @ 2021-01-21 10:16 UTC (permalink / raw)
  To: arnd, gregkh, bhelgaas, ricky_wu, vaibhavgupta40, linux-kernel

From: Ricky Wu <ricky_wu@realtek.com>

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

Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
---
 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..06df0687c0bb 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 = true;
+	else
+		pcr->aspm_enabled = false;
 	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

end of thread, other threads:[~2021-01-21 10:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 10:35 [PATCH] misc: rtsx: init value of aspm_enabled ricky_wu
2021-01-21 10:45 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2021-01-21 10:16 ricky_wu
2021-01-21 10:19 ` 吳昊澄 Ricky

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.