Thread (14 messages) flat view 14 messages, 5 authors, 2016-02-18

RE: [PATCH] net: ti: netcp: restore get/set_pad_info() functionality

From: David Laight <hidden>
Date: 2016-02-09 16:40:28
Also in: lkml

From: Karicheri, Muralidharan
Sent: 09 February 2016 16:19
quoted
...
quoted
quoted
In reality the 'pad' fields ought to be renamed - since they aren't pads.
Perhaps they should be a union?
quoted
No. At the end of the descriptor, host software can add scratchpad
which is not modified by the hardware, but is used by the driver. So
please don't rename.
So comment in the definition that the hardware doesn't modify them.
The driver is defining these fields and they are definitely NOT padding.

It is scratch pad, not padding. Looks like pad is a confusing name. Can be
renamed to sw_data to be in sync with spec below.

The hardware spec from
http://www.ti.com/lit/ug/sprugr9h/sprugr9h.pdf

The other SW data portion of the descriptor exists after all of the defined
words and is reserved for use by the host software to store completely
private data. This region is not used in any way by the DMA or queue manager
modules in a Multicore Navigator system and these modules will not modify
any bytes within this region.
Right, so comment that the hardware doesn't look at the fields.
But name/type the structure fields to indicate what they contain.
Maybe sw_buf_len etc - but I suspect there are much more meaningful names.

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help