]> git.karo-electronics.de Git - linux-beck.git/commit
caif: Use RCU instead of spin-lock in caif_dev.c
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>
Fri, 13 May 2011 02:44:00 +0000 (02:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 May 2011 21:45:54 +0000 (17:45 -0400)
commitbd30ce4bc0b7dc859c1d1cba7ad87e08642418b0
treed5648773052baf985db8290774fea4907e558257
parent0b1e9738deb30f4c35c0add43a52dcd0608b227e
caif: Use RCU instead of spin-lock in caif_dev.c

RCU read_lock and refcount is used to protect in-flight packets.

Use RCU and counters to manage freeing lower part of the CAIF stack if
CAIF-link layer is removed. Old solution based on delaying removal of
device is removed.

When CAIF link layer goes down the use of CAIF link layer is disabled
(by calling caif_set_phy_state()), but removal and freeing of the
lower part of the CAIF stack is done when Link layer is unregistered.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/caif/cfcnfg.h
net/caif/caif_dev.c