diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2017-10-02 13:38:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-02 11:24:41 -0700 |
commit | 22b7de1000e66d739c431d6be4e7e97c69fa7c98 (patch) | |
tree | f26d6823b1946b7cf72e30c385f5d910699f0f4e /include/linux/thunderbolt.h | |
parent | 2a91ec63f8a11e70d4b958dd4df867fec0247179 (diff) | |
download | lwn-22b7de1000e66d739c431d6be4e7e97c69fa7c98.tar.gz lwn-22b7de1000e66d739c431d6be4e7e97c69fa7c98.zip |
thunderbolt: Use spinlock in ring serialization
This makes it possible to enqueue frames also from atomic context which
is needed for example, when networking packets are sent over a
Thunderbolt cable.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Michael Jamet <michael.jamet@intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/thunderbolt.h')
-rw-r--r-- | include/linux/thunderbolt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/thunderbolt.h b/include/linux/thunderbolt.h index e3b9af7be0ad..cf9e42db780f 100644 --- a/include/linux/thunderbolt.h +++ b/include/linux/thunderbolt.h @@ -448,7 +448,7 @@ struct tb_nhi { * @eof_mask: Bit mask used to detect end of frame PDF */ struct tb_ring { - struct mutex lock; + spinlock_t lock; struct tb_nhi *nhi; int size; int hop; |