aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2006-08-18 17:30:09 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-02 16:33:49 -0400
commit84314fd4740ad73550c76dee4a9578979d84af48 (patch)
treef8902dbe4134f9bab4f6886bb6c0b2a30797ceaa /drivers/scsi/scsi.c
parentdeb81d80ba27da8dfabc29ccb5977db8f4942a0a (diff)
[SCSI] SCSI and FC Transport: add netlink support for posting of transport events
This patch formally adds support for the posting of FC events via netlink. It is a followup to the original RFC at: http://marc.theaimsgroup.com/?l=linux-scsi&m=114530667923464&w=2 and the initial posting at: http://marc.theaimsgroup.com/?l=linux-scsi&m=115507374832500&w=2 The patch has been updated to optimize the send path, per the discussions in the initial posting. Per discussions at the Storage Summit and at OLS, we are to use netlink for async events from transports. Also per discussions, to avoid a netlink protocol per transport, I've create a single NETLINK_SCSITRANSPORT protocol, which can then be used by all transports. This patch: - Creates new files scsi_netlink.c and scsi_netlink.h, which contains the single and shared definitions for the SCSI Transport. It is tied into the base SCSI subsystem intialization. Contains a single interface routine, scsi_send_transport_event(), for a transport to send an event (via multicast to a protocol specific group). - Creates a new scsi_netlink_fc.h file, which contains the FC netlink event messages - Adds 3 new routines to the fc transport: fc_get_event_number() - to get a FC event # fc_host_post_event() - to send a simple FC event (32 bits of data) fc_host_post_vendor_event() - to send a Vendor unique event, with arbitrary amounts of data. Note: the separation of event number allows for a LLD to send a standard event, followed by vendor-specific data for the event. Note: This patch assumes 2 prior fc transport patches have been installed: http://marc.theaimsgroup.com/?l=linux-scsi&m=115555807316329&w=2 http://marc.theaimsgroup.com/?l=linux-scsi&m=115581614930261&w=2 Sorry - next time I'll do something like making these individual patches of the same posting when I know they'll be posted closely together. Signed-off-by: James Smart <James.Smart@emulex.com> Tidy up configuration not to make SCSI always select NET Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 37843927e47f..eedfd059b82b 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1118,6 +1118,8 @@ static int __init init_scsi(void)
1118 for_each_possible_cpu(i) 1118 for_each_possible_cpu(i)
1119 INIT_LIST_HEAD(&per_cpu(scsi_done_q, i)); 1119 INIT_LIST_HEAD(&per_cpu(scsi_done_q, i));
1120 1120
1121 scsi_netlink_init();
1122
1121 printk(KERN_NOTICE "SCSI subsystem initialized\n"); 1123 printk(KERN_NOTICE "SCSI subsystem initialized\n");
1122 return 0; 1124 return 0;
1123 1125
@@ -1138,6 +1140,7 @@ cleanup_queue:
1138 1140
1139static void __exit exit_scsi(void) 1141static void __exit exit_scsi(void)
1140{ 1142{
1143 scsi_netlink_exit();
1141 scsi_sysfs_unregister(); 1144 scsi_sysfs_unregister();
1142 scsi_exit_sysctl(); 1145 scsi_exit_sysctl();
1143 scsi_exit_hosts(); 1146 scsi_exit_hosts();