public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout
@ 2022-11-29 19:12 Rebecca Cran
  2022-11-29 19:43 ` [edk2-devel] " Andrew Fish
  0 siblings, 1 reply; 6+ messages in thread
From: Rebecca Cran @ 2022-11-29 19:12 UTC (permalink / raw)
  To: Jian J Wang, Liming Gao, Hao A Wu, Ray Ni,
	Richard Ho (何明忠), edk2-devel-groups-io

I've been working on the UsbNetworkPkg drivers that Richard Ho 
submitted. One problem I've run into is that since we poll for bulk 
requests, most of the time they will timeout - and currently both EHCI 
and XHCI drivers log errors when that happens, which results in log spam 
and makes interacting with the system very difficult (e.g. using UiApp).

I was wondering if we might consider adding some mechanism to omit those 
messages if the user desires, perhaps on a per-build basis?

-- 
Rebecca Cran

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

* Re: [edk2-devel] USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout
  2022-11-29 19:12 USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout Rebecca Cran
@ 2022-11-29 19:43 ` Andrew Fish
  2022-11-29 19:47   ` Rebecca Cran
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Fish @ 2022-11-29 19:43 UTC (permalink / raw)
  To: edk2-devel-groups-io, Rebecca Cran



> On Nov 29, 2022, at 11:12 AM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
> 
> I've been working on the UsbNetworkPkg drivers that Richard Ho submitted. One problem I've run into is that since we poll for bulk requests, most of the time they will timeout - and currently both EHCI and XHCI drivers log errors when that happens, which results in log spam and makes interacting with the system very difficult (e.g. using UiApp).
> 
> I was wondering if we might consider adding some mechanism to omit those messages if the user desires, perhaps on a per-build basis?
> 

Are those DEBUG prints or report status code?

Thanks,

Andrew Fish

> -- 
> Rebecca Cran
> 
> 
> 
> 
> 


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

* Re: [edk2-devel] USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout
  2022-11-29 19:43 ` [edk2-devel] " Andrew Fish
@ 2022-11-29 19:47   ` Rebecca Cran
  2022-11-29 20:51     ` Andrew Fish
  0 siblings, 1 reply; 6+ messages in thread
From: Rebecca Cran @ 2022-11-29 19:47 UTC (permalink / raw)
  To: devel, afish, Rebecca Cran

On 11/29/22 12:43, Andrew Fish via groups.io wrote:
> 
> 
>> On Nov 29, 2022, at 11:12 AM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>>
>> I've been working on the UsbNetworkPkg drivers that Richard Ho submitted. One problem I've run into is that since we poll for bulk requests, most of the time they will timeout - and currently both EHCI and XHCI drivers log errors when that happens, which results in log spam and makes interacting with the system very difficult (e.g. using UiApp).
>>
>> I was wondering if we might consider adding some mechanism to omit those messages if the user desires, perhaps on a per-build basis?
>>
> 
> Are those DEBUG prints or report status code?

They're DEBUG prints.

-- 
Rebecca Cran

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

* Re: [edk2-devel] USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout
  2022-11-29 19:47   ` Rebecca Cran
@ 2022-11-29 20:51     ` Andrew Fish
  2022-11-29 23:05       ` Rebecca Cran
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Fish @ 2022-11-29 20:51 UTC (permalink / raw)
  To: Rebecca Cran; +Cc: devel



> On Nov 29, 2022, at 11:47 AM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
> 
> On 11/29/22 12:43, Andrew Fish via groups.io wrote:
>>> On Nov 29, 2022, at 11:12 AM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>>> 
>>> I've been working on the UsbNetworkPkg drivers that Richard Ho submitted. One problem I've run into is that since we poll for bulk requests, most of the time they will timeout - and currently both EHCI and XHCI drivers log errors when that happens, which results in log spam and makes interacting with the system very difficult (e.g. using UiApp).
>>> 
>>> I was wondering if we might consider adding some mechanism to omit those messages if the user desires, perhaps on a per-build basis?
>>> 
>> Are those DEBUG prints or report status code?
> 
> They're DEBUG prints.
> 

If they happen a lot maybe they should be DEBUG_VERBOSE?

Thanks,

Andrew Fish

> -- 
> Rebecca Cran


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

* Re: [edk2-devel] USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout
  2022-11-29 20:51     ` Andrew Fish
@ 2022-11-29 23:05       ` Rebecca Cran
  2022-11-30  7:48         ` Chang, Abner
  0 siblings, 1 reply; 6+ messages in thread
From: Rebecca Cran @ 2022-11-29 23:05 UTC (permalink / raw)
  To: devel, afish, Rebecca Cran

On 11/29/22 13:51, Andrew Fish via groups.io wrote:

>> On Nov 29, 2022, at 11:47 AM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>>
>> On 11/29/22 12:43, Andrew Fish via groups.io wrote:
>>>> On Nov 29, 2022, at 11:12 AM, Rebecca Cran <quic_rcran@quicinc.com> wrote:
>>>>
>>>> I've been working on the UsbNetworkPkg drivers that Richard Ho submitted. One problem I've run into is that since we poll for bulk requests, most of the time they will timeout - and currently both EHCI and XHCI drivers log errors when that happens, which results in log spam and makes interacting with the system very difficult (e.g. using UiApp).
>>>>
>>>> I was wondering if we might consider adding some mechanism to omit those messages if the user desires, perhaps on a per-build basis?
>>>>
>>> Are those DEBUG prints or report status code?
>> They're DEBUG prints.
> If they happen a lot maybe they should be DEBUG_VERBOSE?

I think the UsbNetworkPkg drivers are probably unique in that the network stack polls for packets every 10ms, which will cause them to issue a bulk transfer request with a timeout of 1ms.

So as long as there aren't packets being sent, the timeout messages will occur continuously. Putting them under DEBUG_VERBOSE would certainly work.

-- 

Rebecca Cran


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

* Re: [edk2-devel] USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout
  2022-11-29 23:05       ` Rebecca Cran
@ 2022-11-30  7:48         ` Chang, Abner
  0 siblings, 0 replies; 6+ messages in thread
From: Chang, Abner @ 2022-11-30  7:48 UTC (permalink / raw)
  To: devel@edk2.groups.io, rebecca@bsdio.com, afish@apple.com,
	Rebecca Cran

[-- Attachment #1: Type: text/plain, Size: 2362 bytes --]

[AMD Official Use Only - General]

I hit the same issue when verifying USB ECM driver and temporarily change the MNP_SYS_POLL_INTERVAL to 5 sec to make system boots to EFI shell. ECM has USB interrupt endpoint however not sure if it triggers when the packet sent from another end. If it does, then we can have the mechanism to check if the packet is ready in the USB NIC Receive function instead of changing the USB bulk transfer timeout.

Abner



> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca
> Cran via groups.io
> Sent: Wednesday, November 30, 2022 7:06 AM
> To: devel@edk2.groups.io; afish@apple.com; Rebecca Cran
> <quic_rcran@quicinc.com>
> Subject: Re: [edk2-devel] USB: reducing/removing EHCI and XHCI logging when
> bulk transfer requests timeout
> 
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
> 
> 
> On 11/29/22 13:51, Andrew Fish via groups.io wrote:
> 
> >> On Nov 29, 2022, at 11:47 AM, Rebecca Cran <quic_rcran@quicinc.com>
> wrote:
> >>
> >> On 11/29/22 12:43, Andrew Fish via groups.io wrote:
> >>>> On Nov 29, 2022, at 11:12 AM, Rebecca Cran <quic_rcran@quicinc.com>
> wrote:
> >>>>
> >>>> I've been working on the UsbNetworkPkg drivers that Richard Ho
> submitted. One problem I've run into is that since we poll for bulk requests, most
> of the time they will timeout - and currently both EHCI and XHCI drivers log
> errors when that happens, which results in log spam and makes interacting with
> the system very difficult (e.g. using UiApp).
> >>>>
> >>>> I was wondering if we might consider adding some mechanism to omit
> those messages if the user desires, perhaps on a per-build basis?
> >>>>
> >>> Are those DEBUG prints or report status code?
> >> They're DEBUG prints.
> > If they happen a lot maybe they should be DEBUG_VERBOSE?
> 
> I think the UsbNetworkPkg drivers are probably unique in that the network stack
> polls for packets every 10ms, which will cause them to issue a bulk transfer
> request with a timeout of 1ms.
> 
> So as long as there aren't packets being sent, the timeout messages will occur
> continuously. Putting them under DEBUG_VERBOSE would certainly work.
> 
> --
> 
> Rebecca Cran
> 
> 
> 
> 
> 

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 18198 bytes --]

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

end of thread, other threads:[~2022-11-30  7:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29 19:12 USB: reducing/removing EHCI and XHCI logging when bulk transfer requests timeout Rebecca Cran
2022-11-29 19:43 ` [edk2-devel] " Andrew Fish
2022-11-29 19:47   ` Rebecca Cran
2022-11-29 20:51     ` Andrew Fish
2022-11-29 23:05       ` Rebecca Cran
2022-11-30  7:48         ` Chang, Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox