Re: [PATCH] usb/gadget: push USB_REQ_SET_INTERFACE and USB_REQ_SET_CONFIGURATION into process context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sebastian Andrzej Siewior | 2012-01-24 17:53:13 [+0100]:

>diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
>index a95de6a..4e1aa31 100644
>--- a/drivers/usb/gadget/composite.c
>+++ b/drivers/usb/gadget/composite.c
>+	case USB_REQ_SET_CONFIGURATION:
>+		if (gadget_is_otg(cdev->gadget)) {
>+			if (cdev->gadget->a_hnp_support)
>+				DBG(cdev, "HNP available\n");
>+			else if (cdev->gadget->a_alt_hnp_support)
>+				DBG(cdev, "HNP on another port\n");
>+			else
>+				VDBG(cdev, "HNP inactive\n");
>+		}
>+		spin_lock_irq(&cdev->lock);
>+		value = set_config(cdev, ctrl, w_value);
>+		spin_unlock_irq(&cdev->lock);
>+	}

I am still atomic in set_config() but I am getting closer. Next thing
would be to replace the lock with a mutex.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux