Question about DMA mapping.

2018-08-30 Thread phind....@gmail.com

Hi everyone,

Thank for your time, I'm new to linux kernel. I am reading LDD3 chapter 
15, Dirrect Memory Access section. I see that when I call function 
/dma_map_single/ and /dma_unmap_single/, I need to pass a direction as a 
parameter. I wonder what is purpose of it? Does It relate to something 
like permission? Can I call /dma_map_single /with DMA_BIDIRECTIONAL and 
then call /dma_unmap_single /with DMA_TO_DEVICE? Will it cause any problem?


Thank you very much.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: suggestions for good in-kernel examples of simple ethernet/PHY drivers?

2018-08-30 Thread valdis . kletnieks
On Thu, 30 Aug 2018 13:27:13 -0400, "Robert P. J. Day" said:

>   i'm already looking at that, but what i wanted was an example of an
> existing, physical driver that shows how simple the design can be (if
> such a thing exists).

For some reason, engineers building network devices almost never manage to
create a device that has a clean design with few warts.  It's almost as if they
were following in the steps of Persian rug makers, where hand-woven rugs always
have at least one (intentional) error, because only Allah is perfection



pgpwVbSX6t4jN.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: suggestions for good in-kernel examples of simple ethernet/PHY drivers?

2018-08-30 Thread Robert P. J. Day
On Thu, 30 Aug 2018, Woody Wu wrote:

> Maybe the dummy NIC driver?
>
> On Thu, Aug 30, 2018 at 7:52 PM  wrote:
>      while i'm actually learning about the intricacies of the kernel 
> networking
>   stack, i was looking for what would be really good examples of existing
>   network drivers that could be used as examples for future tutorials, as
>   nothing is as informational as seeing something that actually works.
>
>      there are, of course, a ton of net drivers already in the kernel, but
>   many of them are fairly complex, and might define custom methods to 
> handle
>   individual quirks and so on, so what i'm interested in is pointers to
>   examples that are nice and simple and straightforward that could be used
>   for a walkthrough of net driver design. thoughts?
>
>   rday
>
>   p.s. i'm already aware of the mass of documentation under
>   Documentation/networking -- any pointers to online net driver
>   design and tutorials would be appreciated.
>
>   and, yes, i'm also digging through LDD3, https://lwn.net/Kernel/LDD3/.

  i'm already looking at that, but what i wanted was an example of an
existing, physical driver that shows how simple the design can be (if
such a thing exists).

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
  http://crashcourse.ca/dokuwiki

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: suggestions for good in-kernel examples of simple ethernet/PHY drivers?

2018-08-30 Thread Woody Wu
Maybe the dummy NIC driver?

On Thu, Aug 30, 2018 at 7:52 PM  wrote:

>while i'm actually learning about the intricacies of the kernel
> networking
> stack, i was looking for what would be really good examples of existing
> network drivers that could be used as examples for future tutorials, as
> nothing is as informational as seeing something that actually works.
>
>there are, of course, a ton of net drivers already in the kernel, but
> many of them are fairly complex, and might define custom methods to handle
> individual quirks and so on, so what i'm interested in is pointers to
> examples that are nice and simple and straightforward that could be used
> for a walkthrough of net driver design. thoughts?
>
> rday
>
> p.s. i'm already aware of the mass of documentation under
> Documentation/networking -- any pointers to online net driver
> design and tutorials would be appreciated.
>
> and, yes, i'm also digging through LDD3, https://lwn.net/Kernel/LDD3/.
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


-- 
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

woody
public key at http://subkeys.pgp.net:11371 (narkewo...@gmail.com)
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


suggestions for good in-kernel examples of simple ethernet/PHY drivers?

2018-08-30 Thread rpjday

  while i'm actually learning about the intricacies of the kernel networking
stack, i was looking for what would be really good examples of existing
network drivers that could be used as examples for future tutorials, as
nothing is as informational as seeing something that actually works.

  there are, of course, a ton of net drivers already in the kernel, but
many of them are fairly complex, and might define custom methods to handle
individual quirks and so on, so what i'm interested in is pointers to
examples that are nice and simple and straightforward that could be used
for a walkthrough of net driver design. thoughts?

rday

p.s. i'm already aware of the mass of documentation under
Documentation/networking -- any pointers to online net driver
design and tutorials would be appreciated.

and, yes, i'm also digging through LDD3, https://lwn.net/Kernel/LDD3/.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies