All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: "Zengtao \(B\)" <prime.zeng@hisilicon.com>
Cc: liangshengjun <liangshengjun@hisilicon.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thinh Nguyen <thinhn@synopsys.com>
Subject: usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency
Date: Fri, 14 Dec 2018 13:23:52 +0200	[thread overview]
Message-ID: <878t0sl5br.fsf@linux.intel.com> (raw)

Hi,

"Zengtao (B)" <prime.zeng@hisilicon.com> writes:
>>-----Original Message-----
>>From: Felipe Balbi [mailto:balbi@kernel.org]
>>Sent: Friday, December 14, 2018 4:52 PM
>>To: Zengtao (B) <prime.zeng@hisilicon.com>
>>Cc: liangshengjun <liangshengjun@hisilicon.com>; Zengtao (B)
>><prime.zeng@hisilicon.com>; Greg Kroah-Hartman
>><gregkh@linuxfoundation.org>; linux-usb@vger.kernel.org;
>>linux-kernel@vger.kernel.org
>>Subject: Re: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by
>>IRQ latency
>>
>>* PGP Signed by an unknown key
>>
>>Zeng Tao <prime.zeng@hisilicon.com> writes:
>>
>>> If it's a busy system, some times when we start an isoc transfer, the
>>> framenumber get from the event buffer may be already elasped, in this
>>> case, we will get all the packets dropped due to miss isoc. And we
>>> turn into transfer nothing, to fix this issue, we need to fix the
>>> framenumber to make sure that it's not out of date.
>>>
>>> Signed-off-by: Liang Shengjun <liangshengjun@hisilicon.com>
>>> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
>>
>>There's a patch going upstream already doing this:
>>
>>https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git/commit/?h
>>=next&id=d53701067f048b8b11635e964b6d3bd9a248c622
>>
>
> Sorry, I think I missed to update to the latest version. But I think my 
> patch is more efficient. Because I just sync the frame from the HW, it
>  won't fail and there is no need to extra tries.
>
> What do you think about it?

the 14 bits you use for your check is not representative of the actual
micro-frame you're currently in. Thinh explained that in the discussion
we had until we came to the patch I pointed you to above. Please look at
the mailing list archives for details.

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: "Zengtao \(B\)" <prime.zeng@hisilicon.com>
Cc: liangshengjun <liangshengjun@hisilicon.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thinh Nguyen <thinhn@synopsys.com>
Subject: RE: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency
Date: Fri, 14 Dec 2018 13:23:52 +0200	[thread overview]
Message-ID: <878t0sl5br.fsf@linux.intel.com> (raw)
In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED24E20BE5@dggemm526-mbx.china.huawei.com>

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


Hi,

"Zengtao (B)" <prime.zeng@hisilicon.com> writes:
>>-----Original Message-----
>>From: Felipe Balbi [mailto:balbi@kernel.org]
>>Sent: Friday, December 14, 2018 4:52 PM
>>To: Zengtao (B) <prime.zeng@hisilicon.com>
>>Cc: liangshengjun <liangshengjun@hisilicon.com>; Zengtao (B)
>><prime.zeng@hisilicon.com>; Greg Kroah-Hartman
>><gregkh@linuxfoundation.org>; linux-usb@vger.kernel.org;
>>linux-kernel@vger.kernel.org
>>Subject: Re: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by
>>IRQ latency
>>
>>* PGP Signed by an unknown key
>>
>>Zeng Tao <prime.zeng@hisilicon.com> writes:
>>
>>> If it's a busy system, some times when we start an isoc transfer, the
>>> framenumber get from the event buffer may be already elasped, in this
>>> case, we will get all the packets dropped due to miss isoc. And we
>>> turn into transfer nothing, to fix this issue, we need to fix the
>>> framenumber to make sure that it's not out of date.
>>>
>>> Signed-off-by: Liang Shengjun <liangshengjun@hisilicon.com>
>>> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
>>
>>There's a patch going upstream already doing this:
>>
>>https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git/commit/?h
>>=next&id=d53701067f048b8b11635e964b6d3bd9a248c622
>>
>
> Sorry, I think I missed to update to the latest version. But I think my 
> patch is more efficient. Because I just sync the frame from the HW, it
>  won't fail and there is no need to extra tries.
>
> What do you think about it?

the 14 bits you use for your check is not representative of the actual
micro-frame you're currently in. Thinh explained that in the discussion
we had until we came to the patch I pointed you to above. Please look at
the mailing list archives for details.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

             reply	other threads:[~2018-12-14 11:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 11:23 Felipe Balbi [this message]
2018-12-14 11:23 ` [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2018-12-17 20:12 Thinh Nguyen
2018-12-17 20:12 ` [PATCH] " Thinh Nguyen
2018-12-17  1:54 Zengtao (B)
2018-12-17  1:54 ` [PATCH] " Zengtao (B)
2018-12-17  1:45 Zengtao (B)
2018-12-17  1:45 ` [PATCH] " Zengtao (B)
2018-12-14 21:42 Thinh Nguyen
2018-12-14 21:42 ` [PATCH] " Thinh Nguyen
2018-12-14 16:32 Zengtao (B)
2018-12-14 16:32 ` [PATCH] " Zeng Tao
2018-12-14 11:17 Sergei Shtylyov
2018-12-14 11:17 ` [PATCH] " Sergei Shtylyov
2018-12-14  9:11 Zengtao (B)
2018-12-14  9:11 ` [PATCH] " Zengtao (B)
2018-12-14  8:51 Felipe Balbi
2018-12-14  8:51 ` [PATCH] " Felipe Balbi

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=878t0sl5br.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=liangshengjun@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=thinhn@synopsys.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 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.