mbox series

[v4,0/5] add xhci-exynos driver

Message ID 1650964728-175347-1-git-send-email-dh10.jung@samsung.com (mailing list archive)
Headers show
Series add xhci-exynos driver | expand

Message

Jung Daehwan April 26, 2022, 9:18 a.m. UTC
This patchset is for Samsung Exynos xhci host conroller. It uses xhci-plat
driver mainly and extends some functions by xhci hooks and overrides.

This driver supports USB offload which makes Co-processor to use
some memories of xhci. Especially it's useful for USB Audio scenario.
Audio stream would get shortcut because Co-processor directly write/read
data in xhci memories. It could get speed-up using faster memory like SRAM.
That's why this gives vendors flexibilty of memory management. This feature
is done with xhci hooks and overrides.

Changes in v2 :
- Fix commit message by adding Signed-off-by in each patch.
- Fix conflict on latest.

Changes in v3 :
- Remove export symbols and xhci hooks which xhci-exynos don't need.
- Modify commit message to clarify why it needs to export symbols.
- Check compiling of xhci-exynos.

Changes in v4 :
- Modify commit message to clarify why it needs to export symbols.
- Add a function for override of hc driver in xhci-plat.
- Make xhci-exynos extending xhci-plat by xhci hooks and overrides.
  (vendor_init / vendor_cleanup hooks are useful from here v4)
- Change the term (USB offload -> xhci-exynos) on subject of patches.

Daehwan Jung (5):
  usb: host: export symbols for xhci-exynos to use xhci hooks
  usb: host: add xhci hooks for xhci-exynos
  usb: host: xhci-plat: support override of hc driver
  usb: host: add some to xhci overrides for xhci-exynos
  usb: host: add xhci-exynos driver

 drivers/usb/host/Kconfig       |   8 +
 drivers/usb/host/Makefile      |   1 +
 drivers/usb/host/xhci-exynos.c | 567 +++++++++++++++++++++++++++++++++
 drivers/usb/host/xhci-exynos.h |  50 +++
 drivers/usb/host/xhci-hub.c    |   7 +
 drivers/usb/host/xhci-mem.c    | 150 +++++++--
 drivers/usb/host/xhci-plat.c   |  50 ++-
 drivers/usb/host/xhci-plat.h   |   9 +
 drivers/usb/host/xhci-ring.c   |   1 +
 drivers/usb/host/xhci.c        |  90 +++++-
 drivers/usb/host/xhci.h        |  50 +++
 11 files changed, 958 insertions(+), 25 deletions(-)
 create mode 100644 drivers/usb/host/xhci-exynos.c
 create mode 100644 drivers/usb/host/xhci-exynos.h

Comments

Greg Kroah-Hartman April 26, 2022, 10:19 a.m. UTC | #1
On Tue, Apr 26, 2022 at 06:18:43PM +0900, Daehwan Jung wrote:
> This patchset is for Samsung Exynos xhci host conroller. It uses xhci-plat
> driver mainly and extends some functions by xhci hooks and overrides.
> 
> This driver supports USB offload which makes Co-processor to use
> some memories of xhci. Especially it's useful for USB Audio scenario.
> Audio stream would get shortcut because Co-processor directly write/read
> data in xhci memories. It could get speed-up using faster memory like SRAM.
> That's why this gives vendors flexibilty of memory management. This feature
> is done with xhci hooks and overrides.
> 
> Changes in v2 :
> - Fix commit message by adding Signed-off-by in each patch.
> - Fix conflict on latest.

Thanks for reworking these and submitting them.  I have some comments on
the individual commits from a non-xhci-knowledge point of view.

greg k-h
Krzysztof Kozlowski April 26, 2022, 12:46 p.m. UTC | #2
On 26/04/2022 11:18, Daehwan Jung wrote:
> This patchset is for Samsung Exynos xhci host conroller. It uses xhci-plat
> driver mainly and extends some functions by xhci hooks and overrides.
> 
> This driver supports USB offload which makes Co-processor to use
> some memories of xhci. Especially it's useful for USB Audio scenario.
> Audio stream would get shortcut because Co-processor directly write/read
> data in xhci memories. It could get speed-up using faster memory like SRAM.
> That's why this gives vendors flexibilty of memory management. This feature
> is done with xhci hooks and overrides.
> 
> Changes in v2 :
> - Fix commit message by adding Signed-off-by in each patch.
> - Fix conflict on latest.
> 
> Changes in v3 :
> - Remove export symbols and xhci hooks which xhci-exynos don't need.
> - Modify commit message to clarify why it needs to export symbols.
> - Check compiling of xhci-exynos.
> 
> Changes in v4 :
> - Modify commit message to clarify why it needs to export symbols.
> - Add a function for override of hc driver in xhci-plat.
> - Make xhci-exynos extending xhci-plat by xhci hooks and overrides.
>   (vendor_init / vendor_cleanup hooks are useful from here v4)
> - Change the term (USB offload -> xhci-exynos) on subject of patches.
> 

You received comments already that you need to base your work on recent
Linux kernel and use scripts/get_maintainers.pl to notify necessary
parties. This is the fourth patchset and still you did not do it.

Maybe there is some misunderstanding or trouble using
scripts/get_maintainers.pl, so could you clarify:

1. What is this based on? Output of: git describe

2. What does the scripts/get_maintainers.pl print when you run on this
patchset?


Best regards,
Krzysztof
Jung Daehwan April 27, 2022, 9:49 a.m. UTC | #3
On Tue, Apr 26, 2022 at 02:46:14PM +0200, Krzysztof Kozlowski wrote:
> On 26/04/2022 11:18, Daehwan Jung wrote:
> > This patchset is for Samsung Exynos xhci host conroller. It uses xhci-plat
> > driver mainly and extends some functions by xhci hooks and overrides.
> > 
> > This driver supports USB offload which makes Co-processor to use
> > some memories of xhci. Especially it's useful for USB Audio scenario.
> > Audio stream would get shortcut because Co-processor directly write/read
> > data in xhci memories. It could get speed-up using faster memory like SRAM.
> > That's why this gives vendors flexibilty of memory management. This feature
> > is done with xhci hooks and overrides.
> > 
> > Changes in v2 :
> > - Fix commit message by adding Signed-off-by in each patch.
> > - Fix conflict on latest.
> > 
> > Changes in v3 :
> > - Remove export symbols and xhci hooks which xhci-exynos don't need.
> > - Modify commit message to clarify why it needs to export symbols.
> > - Check compiling of xhci-exynos.
> > 
> > Changes in v4 :
> > - Modify commit message to clarify why it needs to export symbols.
> > - Add a function for override of hc driver in xhci-plat.
> > - Make xhci-exynos extending xhci-plat by xhci hooks and overrides.
> >   (vendor_init / vendor_cleanup hooks are useful from here v4)
> > - Change the term (USB offload -> xhci-exynos) on subject of patches.
> > 
> 
> You received comments already that you need to base your work on recent
> Linux kernel and use scripts/get_maintainers.pl to notify necessary
> parties. This is the fourth patchset and still you did not do it.
> 
> Maybe there is some misunderstanding or trouble using
> scripts/get_maintainers.pl, so could you clarify:
> 
> 1. What is this based on? Output of: git describe

url = https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next
fetch = +refs/heads/*:refs/remotes/origin/*

or

url = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
fetch = +refs/heads/*:refs/remotes/origin/*

> 
> 2. What does the scripts/get_maintainers.pl print when you run on this
> patchset?

I don't see your name in xhci even for whole usb/host directory.
I see same result on above 2 gits.

jdh@PlatFormDev3:~/works/mainline/linux-next$ ./scripts/get_maintainer.pl drivers/usb/host/
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:USB SUBSYSTEM,commit_signer:170/184=92%)
Mathias Nyman <mathias.nyman@linux.intel.com> (commit_signer:52/184=28%,authored:25/184=14%)
Alan Stern <stern@rowland.harvard.edu> (commit_signer:30/184=16%)
Chunfeng Yun <chunfeng.yun@mediatek.com> (commit_signer:23/184=12%,authored:21/184=11%)
linux-usb@vger.kernel.org (open list:USB SUBSYSTEM)
linux-kernel@vger.kernel.org (open list)

> 

In fact, I manually tried adding you as you commendted previous patchset.
But, It seems you changed email id and domain..

Best Regards,
Jung Daehwan

> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski April 27, 2022, 6:24 p.m. UTC | #4
On 27/04/2022 11:49, Jung Daehwan wrote:
>> 1. What is this based on? Output of: git describe
> 
> url = https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next
> fetch = +refs/heads/*:refs/remotes/origin/*
> 
> or
> 
> url = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> fetch = +refs/heads/*:refs/remotes/origin/*

Thanks, although it is not what I asked for. It's not the output of `git
describe`. To get the output of git describe, execute commands in the
shell in the Git repository on your branch with these commits:
  $ git describe

>> 2. What does the scripts/get_maintainers.pl print when you run on this
>> patchset?
> 
> I don't see your name in xhci even for whole usb/host directory.
> I see same result on above 2 gits.
> 
> jdh@PlatFormDev3:~/works/mainline/linux-next$ ./scripts/get_maintainer.pl drivers/usb/host/

That's not the proper way to get list of people to Cc when submitting
patches because it does not include the contents of the directory and
contents of other parts of the kernel which you might change.

> Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:USB SUBSYSTEM,commit_signer:170/184=92%)
> Mathias Nyman <mathias.nyman@linux.intel.com> (commit_signer:52/184=28%,authored:25/184=14%)
> Alan Stern <stern@rowland.harvard.edu> (commit_signer:30/184=16%)
> Chunfeng Yun <chunfeng.yun@mediatek.com> (commit_signer:23/184=12%,authored:21/184=11%)
> linux-usb@vger.kernel.org (open list:USB SUBSYSTEM)
> linux-kernel@vger.kernel.org (open list)

So either you run it in wrong way (not on the patchset but on some parts
of tree) or you still have it based on some different tree.

I just applied your patchset on linux-next and as expected output is
entirely different:

$ git format-patch -5
$ scripts/get_maintainer.pl 0*
(... skipping entries which you pasted)
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
(maintainer:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM
ARCHITECTURES,authored:1/7=14%,added_lines:4/25=16%,removed_lines:2/13=15%)

linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG S3C,
S5P AND EXYNOS ARM ARCHITECTURES)

linux-samsung-soc@vger.kernel.org (open list:ARM/SAMSUNG S3C, S5P AND
EXYNOS ARM ARCHITECTURES)



> In fact, I manually tried adding you as you commendted previous patchset.
> But, It seems you changed email id and domain..

Up to date email is printed by scripts/get_maintainers.pl. If you don't
use that tool but add addresses manually - might work, might not.

Anyway, it's not only about my email - you did not Cc relevant mailing
lists, which I mentioned weeks ago as well.

Best regards,
Krzysztof
Jung Daehwan April 28, 2022, 3:19 a.m. UTC | #5
On Wed, Apr 27, 2022 at 08:24:04PM +0200, Krzysztof Kozlowski wrote:
> On 27/04/2022 11:49, Jung Daehwan wrote:
> >> 1. What is this based on? Output of: git describe
> > 
> > url = https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next
> > fetch = +refs/heads/*:refs/remotes/origin/*
> > 
> > or
> > 
> > url = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > fetch = +refs/heads/*:refs/remotes/origin/*
> 
> Thanks, although it is not what I asked for. It's not the output of `git
> describe`. To get the output of git describe, execute commands in the
> shell in the Git repository on your branch with these commits:
>   $ git describe
> 
> >> 2. What does the scripts/get_maintainers.pl print when you run on this
> >> patchset?
> > 
> > I don't see your name in xhci even for whole usb/host directory.
> > I see same result on above 2 gits.
> > 
> > jdh@PlatFormDev3:~/works/mainline/linux-next$ ./scripts/get_maintainer.pl drivers/usb/host/
> 
> That's not the proper way to get list of people to Cc when submitting
> patches because it does not include the contents of the directory and
> contents of other parts of the kernel which you might change.
> 
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:USB SUBSYSTEM,commit_signer:170/184=92%)
> > Mathias Nyman <mathias.nyman@linux.intel.com> (commit_signer:52/184=28%,authored:25/184=14%)
> > Alan Stern <stern@rowland.harvard.edu> (commit_signer:30/184=16%)
> > Chunfeng Yun <chunfeng.yun@mediatek.com> (commit_signer:23/184=12%,authored:21/184=11%)
> > linux-usb@vger.kernel.org (open list:USB SUBSYSTEM)
> > linux-kernel@vger.kernel.org (open list)
> 
> So either you run it in wrong way (not on the patchset but on some parts
> of tree) or you still have it based on some different tree.
> 
> I just applied your patchset on linux-next and as expected output is
> entirely different:
> 
> $ git format-patch -5
> $ scripts/get_maintainer.pl 0*
> (... skipping entries which you pasted)
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> (maintainer:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM
> ARCHITECTURES,authored:1/7=14%,added_lines:4/25=16%,removed_lines:2/13=15%)
> 
> linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG S3C,
> S5P AND EXYNOS ARM ARCHITECTURES)
> 
> linux-samsung-soc@vger.kernel.org (open list:ARM/SAMSUNG S3C, S5P AND
> EXYNOS ARM ARCHITECTURES)
> 
> 

I got it. I could find your name only on my last patch.
(v4-0005-usb-host-add-xhci-exynos-driver.patch)

When I submitted 1st(v1) patchset, there's no xhci-exynos driver patch.
That's why I couldn't find your name there. I've added it since v2 but I haven't 
got maintainer again but just use previous one. It's my fault.
Let me correct it on next submission. Thanks for the comment.

Best Regards,
Jung Daehwan

> 
> > In fact, I manually tried adding you as you commendted previous patchset.
> > But, It seems you changed email id and domain..
> 
> Up to date email is printed by scripts/get_maintainers.pl. If you don't
> use that tool but add addresses manually - might work, might not.
> 
> Anyway, it's not only about my email - you did not Cc relevant mailing
> lists, which I mentioned weeks ago as well.
> 
> Best regards,
> Krzysztof
>