aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/fcoe/fcoe.h
diff options
context:
space:
mode:
authorChris Leech <christopher.leech@intel.com>2009-08-25 14:00:23 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 12:07:38 -0500
commit2e70e2415193b84c1b79ec373af15c3f280ad7c4 (patch)
tree84799295b00350f3fa33ca3becd7511d07e97791 /drivers/scsi/fcoe/fcoe.h
parentc863df33bb784eecfb24090d2258fa0d3f653750 (diff)
[SCSI] fcoe: Fix module ref count bug by adding NETDEV UNREGISTER handling
Fixes reference counting on fcoe_instance and net_device, and adds NETDEV_UNREGISTER notifier handling so that you can unload network drivers. FCoE no longer increments the module use count for the network driver. On an NETDEV_UNREGISTER event, destroying the FCoE instance is deferred to a workqueue context to avoid RTNL deadlocks. Based in part by an earlier patch from John Fastabend John's patch description: Currently, the netdev module ref count is not decremented with module_put() when the module is unloaded while fcoe instances are present. To fix this removed reference count on netdev module completely and added functionality to netdev event handling for NETDEV_UNREGISTER events. This allows fcoe to remove devices cleanly when the netdev module is unloaded so we no longer need to hold a reference count for the netdev module. Signed-off-by: Chris Leech <christopher.leech@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.h')
-rw-r--r--drivers/scsi/fcoe/fcoe.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/fcoe/fcoe.h b/drivers/scsi/fcoe/fcoe.h
index ff229288b7f..ce7f60fb1bc 100644
--- a/drivers/scsi/fcoe/fcoe.h
+++ b/drivers/scsi/fcoe/fcoe.h
@@ -93,9 +93,11 @@ struct fcoe_interface {
*/
struct fcoe_port {
struct fcoe_interface *fcoe;
+ struct fc_lport *lport;
struct sk_buff_head fcoe_pending_queue;
u8 fcoe_pending_queue_active;
struct timer_list timer; /* queue timer */
+ struct work_struct destroy_work; /* to prevent rtnl deadlocks */
};
#define fcoe_from_ctlr(fip) container_of(fip, struct fcoe_interface, ctlr)