|
@@ -276,6 +276,7 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
|
|
{
|
|
{
|
|
int newctrl;
|
|
int newctrl;
|
|
int difference;
|
|
int difference;
|
|
|
|
+ unsigned long flags;
|
|
struct usb_cdc_notification *dr = (struct usb_cdc_notification *)buf;
|
|
struct usb_cdc_notification *dr = (struct usb_cdc_notification *)buf;
|
|
unsigned char *data = buf + sizeof(struct usb_cdc_notification);
|
|
unsigned char *data = buf + sizeof(struct usb_cdc_notification);
|
|
|
|
|
|
@@ -303,7 +304,7 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
|
|
}
|
|
}
|
|
|
|
|
|
difference = acm->ctrlin ^ newctrl;
|
|
difference = acm->ctrlin ^ newctrl;
|
|
- spin_lock(&acm->read_lock);
|
|
|
|
|
|
+ spin_lock_irqsave(&acm->read_lock, flags);
|
|
acm->ctrlin = newctrl;
|
|
acm->ctrlin = newctrl;
|
|
acm->oldcount = acm->iocount;
|
|
acm->oldcount = acm->iocount;
|
|
|
|
|
|
@@ -321,7 +322,7 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
|
|
acm->iocount.parity++;
|
|
acm->iocount.parity++;
|
|
if (difference & ACM_CTRL_OVERRUN)
|
|
if (difference & ACM_CTRL_OVERRUN)
|
|
acm->iocount.overrun++;
|
|
acm->iocount.overrun++;
|
|
- spin_unlock(&acm->read_lock);
|
|
|
|
|
|
+ spin_unlock_irqrestore(&acm->read_lock, flags);
|
|
|
|
|
|
if (difference)
|
|
if (difference)
|
|
wake_up_all(&acm->wioctl);
|
|
wake_up_all(&acm->wioctl);
|