summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srp/ib_srp.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2011-12-26 16:49:18 +0000
committerRoland Dreier <roland@purestorage.com>2012-11-30 17:40:31 -0800
commitef6c49d87c3418c442a22e55e3ce2f91b163d69e (patch)
treec1348935f77b750c3f82caa847db6c944aeb4961 /drivers/infiniband/ulp/srp/ib_srp.h
parentee12d6a80cfcd08b862ed3c8e109442e466b0302 (diff)
downloadblackbird-op-linux-ef6c49d87c3418c442a22e55e3ce2f91b163d69e.tar.gz
blackbird-op-linux-ef6c49d87c3418c442a22e55e3ce2f91b163d69e.zip
IB/srp: Eliminate state SRP_TARGET_DEAD
Only queue removal work after having changed the target state into SRP_TARGET_REMOVED and not if that state was already equal to SRP_TARGET_REMOVED. That allows us to remove the state SRP_TARGET_DEAD. Add a call to srp_disconnect_target() in srp_remove_target() -- due to previous changes it is now safe to invoke that function even if the IB connection has already been disconnected. This change allows us to replace the target removal code in srp_remove_one() by an (indirect) call to srp_remove_target(). Rename srp_target_port.work into srp_target_port.remove_work to reflect its usage. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: David Dillow <dillowda@ornl.gov> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/srp/ib_srp.h')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h
index ef95fa4ca3ef..de2d0b3c0bfe 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.h
+++ b/drivers/infiniband/ulp/srp/ib_srp.h
@@ -80,8 +80,7 @@ enum {
enum srp_target_state {
SRP_TARGET_LIVE,
- SRP_TARGET_DEAD,
- SRP_TARGET_REMOVED
+ SRP_TARGET_REMOVED,
};
enum srp_iu_type {
@@ -175,7 +174,7 @@ struct srp_target_port {
struct srp_iu *rx_ring[SRP_RQ_SIZE];
struct srp_request req_ring[SRP_CMD_SQ_SIZE];
- struct work_struct work;
+ struct work_struct remove_work;
struct list_head list;
struct completion done;
OpenPOWER on IntegriCloud