From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/drivers/staging/octeon-usb/octeon-hcd.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'kernel/drivers/staging/octeon-usb/octeon-hcd.c') diff --git a/kernel/drivers/staging/octeon-usb/octeon-hcd.c b/kernel/drivers/staging/octeon-usb/octeon-hcd.c index 9e5476e35..6f2871784 100644 --- a/kernel/drivers/staging/octeon-usb/octeon-hcd.c +++ b/kernel/drivers/staging/octeon-usb/octeon-hcd.c @@ -499,15 +499,21 @@ static int octeon_alloc_temp_buffer(struct urb *urb, gfp_t mem_flags) static void octeon_free_temp_buffer(struct urb *urb) { struct octeon_temp_buffer *temp; + size_t length; if (!(urb->transfer_flags & URB_ALIGNED_TEMP_BUFFER)) return; temp = container_of(urb->transfer_buffer, struct octeon_temp_buffer, data); - if (usb_urb_dir_in(urb)) - memcpy(temp->orig_buffer, urb->transfer_buffer, - urb->actual_length); + if (usb_urb_dir_in(urb)) { + if (usb_pipeisoc(urb->pipe)) + length = urb->transfer_buffer_length; + else + length = urb->actual_length; + + memcpy(temp->orig_buffer, urb->transfer_buffer, length); + } urb->transfer_buffer = temp->orig_buffer; urb->transfer_flags &= ~URB_ALIGNED_TEMP_BUFFER; kfree(temp); @@ -1233,7 +1239,7 @@ static int cvmx_usb_fill_tx_hw(struct cvmx_usb_state *usb, usb->index) ^ 4; int words = available; - /* Limit the amount of data to waht the SW fifo has */ + /* Limit the amount of data to what the SW fifo has */ if (fifo->entry[i].size <= available) { words = fifo->entry[i].size; fifo->tail++; @@ -1843,7 +1849,7 @@ static void cvmx_usb_start_channel(struct cvmx_usb_state *usb, int channel, transaction->xfersize = usbc_hctsiz.s.xfersize; transaction->pktcnt = usbc_hctsiz.s.pktcnt; } - /* Remeber when we start a split transaction */ + /* Remember when we start a split transaction */ if (cvmx_usb_pipe_needs_split(usb, pipe)) usb->active_split = transaction; USB_SET_FIELD32(CVMX_USBCX_HCCHARX(channel, usb->index), @@ -3210,9 +3216,9 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, * Allocate a structure to use for our private list of * isochronous packets. */ - iso_packet = kmalloc(urb->number_of_packets * - sizeof(struct cvmx_usb_iso_packet), - GFP_ATOMIC); + iso_packet = kmalloc_array(urb->number_of_packets, + sizeof(struct cvmx_usb_iso_packet), + GFP_ATOMIC); if (iso_packet) { int i; /* Fill the list with the data from the URB */ @@ -3737,6 +3743,7 @@ static const struct of_device_id octeon_usb_match[] = { }, {}, }; +MODULE_DEVICE_TABLE(of, octeon_usb_match); static struct platform_driver octeon_usb_driver = { .driver = { -- cgit 1.2.3-korg