diff --git a/packages/linux/patches/3.14.1/linux-999.03-0001-fix-mceusb.patch b/packages/linux/patches/3.14.1/linux-999.03-0001-fix-mceusb.patch new file mode 100644 index 0000000000..8036e7465e --- /dev/null +++ b/packages/linux/patches/3.14.1/linux-999.03-0001-fix-mceusb.patch @@ -0,0 +1,92 @@ +--- linux-3.14.1/drivers/media/rc/mceusb.c 2014-04-09 12:37:46.510492000 -0500 ++++ linux-3.14.1/drivers/media/rc/mceusb.c 2014-04-23 17:58:17.224854949 -0500 +@@ -761,11 +761,18 @@ static void mce_request_packet(struct mc + } + + /* outbound data */ +- pipe = usb_sndintpipe(ir->usbdev, +- ir->usb_ep_out->bEndpointAddress); +- usb_fill_int_urb(async_urb, ir->usbdev, pipe, +- async_buf, size, mce_async_callback, +- ir, ir->usb_ep_out->bInterval); ++ if (usb_endpoint_xfer_int(ir->usb_ep_out)) { ++ pipe = usb_sndintpipe(ir->usbdev, ++ ir->usb_ep_out->bEndpointAddress); ++ usb_fill_int_urb(async_urb, ir->usbdev, pipe, async_buf, ++ size, mce_async_callback, ir, ++ ir->usb_ep_out->bInterval); ++ } else { ++ pipe = usb_sndbulkpipe(ir->usbdev, ++ ir->usb_ep_out->bEndpointAddress); ++ usb_fill_bulk_urb(async_urb, ir->usbdev, pipe, async_buf, ++ size, mce_async_callback, ir); ++ } + memcpy(async_buf, data, size); + + } else if (urb_type == MCEUSB_RX) { +@@ -1283,34 +1290,26 @@ static int mceusb_dev_probe(struct usb_i + for (i = 0; i < idesc->desc.bNumEndpoints; ++i) { + ep = &idesc->endpoint[i].desc; + +- if ((ep_in == NULL) +- && ((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) +- == USB_DIR_IN) +- && (((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) +- == USB_ENDPOINT_XFER_BULK) +- || ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) +- == USB_ENDPOINT_XFER_INT))) { +- +- ep_in = ep; +- ep_in->bmAttributes = USB_ENDPOINT_XFER_INT; +- ep_in->bInterval = 1; +- mce_dbg(&intf->dev, "acceptable inbound endpoint " +- "found\n"); ++ if (ep_in == NULL) { ++ if (usb_endpoint_is_bulk_in(ep)) { ++ ep_in = ep; ++ mce_dbg(&intf->dev, "acceptable bulk inbound endpoint found\n"); ++ } else if (usb_endpoint_is_int_in(ep)) { ++ ep_in = ep; ++ ep_in->bInterval = 1; ++ mce_dbg(&intf->dev, "acceptable interrupt inbound endpoint found\n"); ++ } + } + +- if ((ep_out == NULL) +- && ((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) +- == USB_DIR_OUT) +- && (((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) +- == USB_ENDPOINT_XFER_BULK) +- || ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) +- == USB_ENDPOINT_XFER_INT))) { +- +- ep_out = ep; +- ep_out->bmAttributes = USB_ENDPOINT_XFER_INT; +- ep_out->bInterval = 1; +- mce_dbg(&intf->dev, "acceptable outbound endpoint " +- "found\n"); ++ if (ep_out == NULL) { ++ if (usb_endpoint_is_bulk_out(ep)) { ++ ep_out = ep; ++ mce_dbg(&intf->dev, "acceptable bulk outbound endpoint found\n"); ++ } else if (usb_endpoint_is_int_out(ep)) { ++ ep_out = ep; ++ ep_out->bInterval = 1; ++ mce_dbg(&intf->dev, "acceptable interrupt outbound endpoint found\n"); ++ } + } + } + if (ep_in == NULL) { +@@ -1318,7 +1317,11 @@ static int mceusb_dev_probe(struct usb_i + return -ENODEV; + } + +- pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress); ++ if (usb_endpoint_xfer_int(ep_in)) { ++ pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress); ++ } else { ++ pipe = usb_rcvbulkpipe(dev, ep_in->bEndpointAddress); ++ } + maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); + + ir = kzalloc(sizeof(struct mceusb_dev), GFP_KERNEL);