]> git.baikalelectronics.ru Git - kernel.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)
commit669512d373d9aa3f2e8c913247ba03812a193734
treed5648773052baf985db8290774fea4907e558257
parent47dd1acb8573a8fbbc1c1bcd58aad15c84c565d2
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