|
|
@@ -510,9 +510,10 @@ static inline void btusb_free_frags(struct btusb_data *data)
|
|
|
static int btusb_recv_intr(struct btusb_data *data, void *buffer, int count)
|
|
|
{
|
|
|
struct sk_buff *skb;
|
|
|
+ unsigned long flags;
|
|
|
int err = 0;
|
|
|
|
|
|
- spin_lock(&data->rxlock);
|
|
|
+ spin_lock_irqsave(&data->rxlock, flags);
|
|
|
skb = data->evt_skb;
|
|
|
|
|
|
while (count) {
|
|
|
@@ -557,7 +558,7 @@ static int btusb_recv_intr(struct btusb_data *data, void *buffer, int count)
|
|
|
}
|
|
|
|
|
|
data->evt_skb = skb;
|
|
|
- spin_unlock(&data->rxlock);
|
|
|
+ spin_unlock_irqrestore(&data->rxlock, flags);
|
|
|
|
|
|
return err;
|
|
|
}
|
|
|
@@ -565,9 +566,10 @@ static int btusb_recv_intr(struct btusb_data *data, void *buffer, int count)
|
|
|
static int btusb_recv_bulk(struct btusb_data *data, void *buffer, int count)
|
|
|
{
|
|
|
struct sk_buff *skb;
|
|
|
+ unsigned long flags;
|
|
|
int err = 0;
|
|
|
|
|
|
- spin_lock(&data->rxlock);
|
|
|
+ spin_lock_irqsave(&data->rxlock, flags);
|
|
|
skb = data->acl_skb;
|
|
|
|
|
|
while (count) {
|
|
|
@@ -614,7 +616,7 @@ static int btusb_recv_bulk(struct btusb_data *data, void *buffer, int count)
|
|
|
}
|
|
|
|
|
|
data->acl_skb = skb;
|
|
|
- spin_unlock(&data->rxlock);
|
|
|
+ spin_unlock_irqrestore(&data->rxlock, flags);
|
|
|
|
|
|
return err;
|
|
|
}
|
|
|
@@ -622,9 +624,10 @@ static int btusb_recv_bulk(struct btusb_data *data, void *buffer, int count)
|
|
|
static int btusb_recv_isoc(struct btusb_data *data, void *buffer, int count)
|
|
|
{
|
|
|
struct sk_buff *skb;
|
|
|
+ unsigned long flags;
|
|
|
int err = 0;
|
|
|
|
|
|
- spin_lock(&data->rxlock);
|
|
|
+ spin_lock_irqsave(&data->rxlock, flags);
|
|
|
skb = data->sco_skb;
|
|
|
|
|
|
while (count) {
|
|
|
@@ -669,7 +672,7 @@ static int btusb_recv_isoc(struct btusb_data *data, void *buffer, int count)
|
|
|
}
|
|
|
|
|
|
data->sco_skb = skb;
|
|
|
- spin_unlock(&data->rxlock);
|
|
|
+ spin_unlock_irqrestore(&data->rxlock, flags);
|
|
|
|
|
|
return err;
|
|
|
}
|
|
|
@@ -1067,6 +1070,7 @@ static void btusb_tx_complete(struct urb *urb)
|
|
|
struct sk_buff *skb = urb->context;
|
|
|
struct hci_dev *hdev = (struct hci_dev *)skb->dev;
|
|
|
struct btusb_data *data = hci_get_drvdata(hdev);
|
|
|
+ unsigned long flags;
|
|
|
|
|
|
BT_DBG("%s urb %p status %d count %d", hdev->name, urb, urb->status,
|
|
|
urb->actual_length);
|
|
|
@@ -1080,9 +1084,9 @@ static void btusb_tx_complete(struct urb *urb)
|
|
|
hdev->stat.err_tx++;
|
|
|
|
|
|
done:
|
|
|
- spin_lock(&data->txlock);
|
|
|
+ spin_lock_irqsave(&data->txlock, flags);
|
|
|
data->tx_in_flight--;
|
|
|
- spin_unlock(&data->txlock);
|
|
|
+ spin_unlock_irqrestore(&data->txlock, flags);
|
|
|
|
|
|
kfree(urb->setup_packet);
|
|
|
|