lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHhAz+i5YeQdJnBH6BvMJ-B0DtoBu9ER4Z79CPOfX5NuFvO=bA@mail.gmail.com>
Date:   Tue, 10 Aug 2021 19:43:02 +0530
From:   Muni Sekhar <munisekharrms@...il.com>
To:     Oliver Neukum <oneukum@...e.com>
Cc:     kernelnewbies <kernelnewbies@...nelnewbies.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: read() via USB bus

On Mon, Aug 9, 2021 at 1:45 PM Oliver Neukum <oneukum@...e.com> wrote:
>
>
> On 09.08.21 09:58, Muni Sekhar wrote:
> > Hi all,
> >
> > PCIe memory mapped registers can be read via readb(), readw(), readl()
> > kernel API's. Similarly what are the kernel API to read the device
> > registers via USB bus
> >
>
> Hi,
>
> I am afraid this is based on a fundamental misunderstanding on how
> USB works. It is based on passing messages, not reading and writing
> registers.

I am referring to the code mentioned in
https://patchwork.kernel.org/project/linux-arm-msm/patch/1534464348-8227-3-git-send-email-pheragu@codeaurora.org/

As per this driver gets access to the Qcomm’s USB h/w device registers
via devm_extcon_dev_allocate(), devm_extcon_dev_register(),
platform_get_resource() and devm_ioremap_resource API’s.

What does the USB external connector EXTCON_USB \ EXTCON_USB_HOST
devices means? Are these different from normal USB devices?


>
> USB devices are primarily based on endpoints, not registers. A literal
> answer to your question would point you to the clear/set/get_feature
> standard requests of chapter 9 of the specification, but that really
> will not help you, as you are making assumption that fundamentally
> do not apply.
>
> I hope this list stays friendly to newcomers and we will answer
> specific questions, but at this point I must advise you to first
> read an introductory book.
>
>     HTH
>         Oliver
>
>


-- 
Thanks,
Sekhar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ