Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156327
b: refs/heads/master
c: a1b9744
h: refs/heads/master
i:
  156325: 9e01b94
  156323: 600378e
  156319: d18afc0
v: v3
  • Loading branch information
David S. Miller committed Jul 30, 2009
1 parent e622c4d commit a8cb6e0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89c3a8aca28e6d57f2ae945d97858a372d624b81
refs/heads/master: a1b97440eec0ea3e53183cde8fe82ff8c1ffb091
23 changes: 21 additions & 2 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static int cnic_send_nlmsg(struct cnic_local *cp, u32 type,
}

rcu_read_lock();
ulp_ops = rcu_dereference(cp->ulp_ops[CNIC_ULP_ISCSI]);
ulp_ops = rcu_dereference(cnic_ulp_tbl[CNIC_ULP_ISCSI]);
if (ulp_ops)
ulp_ops->iscsi_nl_send_msg(cp->dev, msg_type, buf, len);
rcu_read_unlock();
Expand Down Expand Up @@ -319,6 +319,20 @@ static int cnic_abort_prep(struct cnic_sock *csk)
return 0;
}

static void cnic_uio_stop(void)
{
struct cnic_dev *dev;

read_lock(&cnic_dev_lock);
list_for_each_entry(dev, &cnic_dev_list, list) {
struct cnic_local *cp = dev->cnic_priv;

if (cp->cnic_uinfo)
cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
}
read_unlock(&cnic_dev_lock);
}

int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops)
{
struct cnic_dev *dev;
Expand Down Expand Up @@ -390,6 +404,9 @@ int cnic_unregister_driver(int ulp_type)
}
read_unlock(&cnic_dev_lock);

if (ulp_type == CNIC_ULP_ISCSI)
cnic_uio_stop();

rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL);

mutex_unlock(&cnic_lock);
Expand Down Expand Up @@ -632,7 +649,6 @@ static void cnic_free_resc(struct cnic_dev *dev)
int i = 0;

if (cp->cnic_uinfo) {
cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
while (cp->uio_dev != -1 && i < 15) {
msleep(100);
i++;
Expand Down Expand Up @@ -1057,6 +1073,9 @@ static void cnic_ulp_stop(struct cnic_dev *dev)
struct cnic_local *cp = dev->cnic_priv;
int if_type;

if (cp->cnic_uinfo)
cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);

rcu_read_lock();
for (if_type = 0; if_type < MAX_CNIC_ULP_TYPE; if_type++) {
struct cnic_ulp_ops *ulp_ops;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/inetdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)

#define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING)
#define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING)
#define IN_DEV_RPFILTER(in_dev) IN_DEV_ANDCONF((in_dev), RP_FILTER)
#define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER)
#define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \
ACCEPT_SOURCE_ROUTE)
#define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY)
Expand Down
1 change: 1 addition & 0 deletions trunk/net/irda/irttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
}
/* Dup */
memcpy(new, orig, sizeof(struct tsap_cb));
spin_lock_init(&new->lock);

/* We don't need the old instance any more */
spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
Expand Down

0 comments on commit a8cb6e0

Please sign in to comment.