[SCSI] scsi_netlink: Add transport and LLD recieve and event support
This patch adds scsi netlink recieve and event support for transport
and scsi LLDD's. It is a reimplementation of the patch posted last
week by David Somayajulu.
http://marc.info/?l=linux-scsi&m=
121745486221819&w=2
There are a few things done differently:
- Transport support is included
- Event delivery is included
- The vendor message is now its own unique message type, considered
part of the generic "SCSI Transport".
- LLDD entry points are now registered rather than included in the
scsi_host_template.
Background: When I started to implement the event handler via template,
I had to either: muck up scsi_add_host and scsi_remove_host; or have
the event handler search all possible shosts. Neither was acceptable.
Moving to a registration solves this, and also limits the scope of
the changes to something that could be backported to a distro without
breaking an already-released-distro kabi. However, I admit it isn't
as elegant, as the passing of the LLDD host template in the
registration and the complexity around dynamic add/remove shows.
- The receive path was augmented to require a unique identifier for
the LLDD before the message was allowed to be handed off to the
driver. Given how quickly very fatal errors occur if there's msg
mismatches (which I saw in testing my own tools :), I believe this
to be a very good thing. The id plays off the vendor id scheme already
introduced for the vendor unique event messages used by FC.
Additionally, the id use as the basis of the registration/deregistration.
- Send assist functions, for both the transport and LLDDs are included.
[fujita.tomonori@lab.ntt.co.jp: fix missing cast]
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>