LDD 3rd ed. - It was: Re: read() via USB bus
gregkh at linuxfoundation.org
Thu Aug 12 06:18:55 EDT 2021
On Thu, Aug 12, 2021 at 11:45:45AM +0200, Fabio M. De Francesco wrote:
> Hi Greg,
> On Monday, August 9, 2021 10:44:23 AM CEST Greg KH wrote:
> > On Mon, Aug 09, 2021 at 10:15:29AM +0200, Oliver Neukum 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
> > >
> > > [...]
> > >
> > > 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.
> > Along these lines, take a look at the book, Linux Device Drivers, third
> > edition, which is free online, as it has a chapter about USB drivers and
> > how they work. That should help you out to understand the issues
> > involved with USB devices.
> I've heard that your book, LDD 3rd edition, has become obsolete a long time
> ago and most sample code cannot anymore build. Reading what you wrote above
> seems to contradict what I've been told by others... I must admit that I've
> just had a print copy of it that I have not yet opened for reading, therefore
> maybe that I'm totally wrong in assuming the above.
Look into it and see the differences, it's not hard to notice.
And the code samples are all up to date online on github somewhere,
there's people keeping them alive if you want to track them down, but
really, just look at the in-kernel drivers for better examples of real
> Do you mind to elaborate a bit more on this subject, please? I mean: can you
> point out which chapters, which content, should be skipped (if there's really
> something which is no more correct/relevant to today's practice of drivers
> development and kernel hacking?
I am not going to create a study guide like this, sorry, I've already
given away the book for free to you :)
> One more question, please... if after carefully studying its content, someone
> wanted to change and update part of the book content to reflect the changes in
> Linux API and in the current best practices, would it be (legally) allowed to
> publish a v4 on GitHub for the convenience of everyone interested in learning
> for free? However, I understand that it would be not so easy to come up with a
> good and error free text if not addressed as a public long term project and
> I'm also not sure of what tools are needed to edit PDF files. (At the moment
> my question is for a hypothetical scenario, just to know whether or not it
> would be technically and legally doable).
Please see the license of the book for what you are, and are not,
allowed to do with it to answer this question.
More information about the Kernelnewbies