linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Longfang Liu <liulongfang@huawei.com>
Cc: gregkh@linuxfoundation.org, mathias.nyman@intel.com,
	liudongdong3@huawei.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, kong.kongxinwei@hisilicon.com,
	yisen.zhuang@huawei.com
Subject: Re: [PATCH v4] USB:ehci:fix Kunpeng920 ehci hardware problem
Date: Fri, 9 Apr 2021 10:59:41 -0400	[thread overview]
Message-ID: <20210409145941.GA1333284@rowland.harvard.edu> (raw)
In-Reply-To: <1617958081-17999-1-git-send-email-liulongfang@huawei.com>

On Fri, Apr 09, 2021 at 04:48:01PM +0800, Longfang Liu wrote:
> Kunpeng920's EHCI controller does not have SBRN register.
> Reading the SBRN register when the controller driver is
> initialized will get 0.
> 
> When rebooting the EHCI driver, ehci_shutdown() will be called.
> if the sbrn flag is 0, ehci_shutdown() will return directly.
> The sbrn flag being 0 will cause the EHCI interrupt signal to
> not be turned off after reboot. this interrupt that is not closed
> will cause an exception to the device sharing the interrupt.
> 
> Therefore, the EHCI controller of Kunpeng920 needs to skip
> the read operation of the SBRN register.
> 
> Signed-off-by: Longfang Liu <liulongfang@huawei.com>
> ---

Acked-by: Alan Stern <stern@rowland.harvard.edu>

> Changes in v4:
> 	- Modify the code implementation.
> 
> Changes in v3:
> 	- Fix some code style issues.
> 	- Update struct name.
> 
> Changes in v2:
> 	- Fix some code style issues.
> 	- Update function name.
> 
>  drivers/usb/host/ehci-pci.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
> index 3c3820a..237a346 100644
> --- a/drivers/usb/host/ehci-pci.c
> +++ b/drivers/usb/host/ehci-pci.c
> @@ -291,6 +291,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
>  	if (pdev->vendor == PCI_VENDOR_ID_STMICRO
>  	    && pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST)
>  		;	/* ConneXT has no sbrn register */
> +	else if (pdev->vendor == PCI_VENDOR_ID_HUAWEI
> +			 && pdev->device == 0xa239)
> +		;	/* HUAWEI Kunpeng920 USB EHCI has no sbrn register */
>  	else
>  		pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
>  
> -- 
> 2.8.1
> 

  reply	other threads:[~2021-04-09 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  8:48 [PATCH v4] USB:ehci:fix Kunpeng920 ehci hardware problem Longfang Liu
2021-04-09 14:59 ` Alan Stern [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-09  8:31 Longfang Liu
2021-04-09  8:37 ` liulongfang

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=20210409145941.GA1333284@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=liudongdong3@huawei.com \
    --cc=liulongfang@huawei.com \
    --cc=mathias.nyman@intel.com \
    --cc=yisen.zhuang@huawei.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 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).