Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Mostly simple cases of overlapping changes (adding code nearby, a function whose name changes, for example). Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -535,13 +535,15 @@ static int acm_notify_serial_state(struct f_acm *acm)
|
||||
{
|
||||
struct usb_composite_dev *cdev = acm->port.func.config->cdev;
|
||||
int status;
|
||||
__le16 serial_state;
|
||||
|
||||
spin_lock(&acm->lock);
|
||||
if (acm->notify_req) {
|
||||
dev_dbg(&cdev->gadget->dev, "acm ttyGS%d serial state %04x\n",
|
||||
acm->port_num, acm->serial_state);
|
||||
serial_state = cpu_to_le16(acm->serial_state);
|
||||
status = acm_cdc_notify(acm, USB_CDC_NOTIFY_SERIAL_STATE,
|
||||
0, &acm->serial_state, sizeof(acm->serial_state));
|
||||
0, &serial_state, sizeof(acm->serial_state));
|
||||
} else {
|
||||
acm->pending = true;
|
||||
status = 0;
|
||||
|
@@ -367,7 +367,7 @@ try_again:
|
||||
count = min_t(unsigned, count, hidg->report_length);
|
||||
|
||||
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
|
||||
status = copy_from_user(hidg->req->buf, buffer, count);
|
||||
status = copy_from_user(req->buf, buffer, count);
|
||||
|
||||
if (status != 0) {
|
||||
ERROR(hidg->func.config->cdev,
|
||||
@@ -378,9 +378,9 @@ try_again:
|
||||
|
||||
spin_lock_irqsave(&hidg->write_spinlock, flags);
|
||||
|
||||
/* we our function has been disabled by host */
|
||||
/* when our function has been disabled by host */
|
||||
if (!hidg->req) {
|
||||
free_ep_req(hidg->in_ep, hidg->req);
|
||||
free_ep_req(hidg->in_ep, req);
|
||||
/*
|
||||
* TODO
|
||||
* Should we fail with error here?
|
||||
@@ -394,7 +394,7 @@ try_again:
|
||||
req->complete = f_hidg_req_complete;
|
||||
req->context = hidg;
|
||||
|
||||
status = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC);
|
||||
status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC);
|
||||
if (status < 0) {
|
||||
ERROR(hidg->func.config->cdev,
|
||||
"usb_ep_queue error on int endpoint %zd\n", status);
|
||||
|
@@ -594,6 +594,14 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
|
||||
opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U);
|
||||
opts->streaming_maxburst = min(opts->streaming_maxburst, 15U);
|
||||
|
||||
/* For SS, wMaxPacketSize has to be 1024 if bMaxBurst is not 0 */
|
||||
if (opts->streaming_maxburst &&
|
||||
(opts->streaming_maxpacket % 1024) != 0) {
|
||||
opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024);
|
||||
INFO(cdev, "overriding streaming_maxpacket to %d\n",
|
||||
opts->streaming_maxpacket);
|
||||
}
|
||||
|
||||
/* Fill in the FS/HS/SS Video Streaming specific descriptors from the
|
||||
* module parameters.
|
||||
*
|
||||
@@ -625,7 +633,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
|
||||
uvc_ss_streaming_comp.bMaxBurst = opts->streaming_maxburst;
|
||||
uvc_ss_streaming_comp.wBytesPerInterval =
|
||||
cpu_to_le16(max_packet_size * max_packet_mult *
|
||||
opts->streaming_maxburst);
|
||||
(opts->streaming_maxburst + 1));
|
||||
|
||||
/* Allocate endpoints. */
|
||||
ep = usb_ep_autoconfig(cdev->gadget, &uvc_control_ep);
|
||||
|
Reference in New Issue
Block a user