Re: [PATCH v2 6/6] staging/fwserial: Drop suggestion for helper fnintegration

From: Stefan Richter
Date: Sat Dec 15 2012 - 07:38:29 EST


On Dec 15 Peter Hurley wrote:
> The firewire core does not require or want the suggested helper fns;
> drop suggestion from TODO file.

It's not about the core, but about what the highlevel drivers need.
(I.e. protocol drivers and some higherlevel parts of the core, e.g.
the userspace driver interface.)

If it is something which two or more drivers use, it goes into the core.
(Or into a library, as Clemens did with snd-firewire-lib.) If it is
something which needs assistance by the lowlevel driver, it goes into the
core or passes through the core, regardless whether one or more protocol
drivers need it. (Example: Physical DMA filtering for the SBP-2
initiator driver.) If it is something very complicated and 1394
architecture specific, but still only needed by one highlevel driver, I
for one am more comfortable with leaving this in the respective driver
rather than moving this into the core.

The packet payload calculation is a 1394 architecture arcanum and is needed
in on form or another in more than one driver (firewire-net, -sbp2, and
now fwserial). But as discussed, what they precisely need in the end
differs to a degree that leaves nothing substantial to share.

[That's too many words about a two- or three-line piece of code; but on the
on the other hand it is a generally relevant consideration whenever new
functionality is to be added somewhere in the driver stack.]
--
Stefan Richter
-=====-===-- ==-- -====
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/