diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-19 05:05:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-19 05:05:43 -0400 |
commit | 3a383cc0b8cc33af188fe2062b6ba5a69af25fa7 (patch) | |
tree | 1e264bf17970cb54ddab4158221ffa7c23e00b48 | |
parent | c51f2ff0075b77f272da93b7155aa666a77c8fe7 (diff) |
Revert "usb: gadget: NCM: Protect dev->port_usb using dev->lock"
This reverts commit c9ffc78745f89e300fe704348dd8e6800acf4d18 as it was
reported to be broken.
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Jim Baxter <jim_baxter@mentor.com>
Cc: Harish Jenny K N <harish_kandiga@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/gadget/function/u_ether.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 8cb08033b7c1..9c8c9ed1dc9e 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c | |||
@@ -553,16 +553,14 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, | |||
553 | spin_lock_irqsave(&dev->lock, flags); | 553 | spin_lock_irqsave(&dev->lock, flags); |
554 | if (dev->port_usb) | 554 | if (dev->port_usb) |
555 | skb = dev->wrap(dev->port_usb, skb); | 555 | skb = dev->wrap(dev->port_usb, skb); |
556 | spin_unlock_irqrestore(&dev->lock, flags); | ||
556 | if (!skb) { | 557 | if (!skb) { |
557 | /* Multi frame CDC protocols may store the frame for | 558 | /* Multi frame CDC protocols may store the frame for |
558 | * later which is not a dropped frame. | 559 | * later which is not a dropped frame. |
559 | */ | 560 | */ |
560 | if (dev->port_usb && | 561 | if (dev->port_usb && |
561 | dev->port_usb->supports_multi_frame) { | 562 | dev->port_usb->supports_multi_frame) |
562 | spin_unlock_irqrestore(&dev->lock, flags); | ||
563 | goto multiframe; | 563 | goto multiframe; |
564 | } | ||
565 | spin_unlock_irqrestore(&dev->lock, flags); | ||
566 | goto drop; | 564 | goto drop; |
567 | } | 565 | } |
568 | } | 566 | } |
@@ -580,7 +578,6 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, | |||
580 | req->zero = 0; | 578 | req->zero = 0; |
581 | else | 579 | else |
582 | req->zero = 1; | 580 | req->zero = 1; |
583 | spin_unlock_irqrestore(&dev->lock, flags); | ||
584 | 581 | ||
585 | /* use zlp framing on tx for strict CDC-Ether conformance, | 582 | /* use zlp framing on tx for strict CDC-Ether conformance, |
586 | * though any robust network rx path ignores extra padding. | 583 | * though any robust network rx path ignores extra padding. |