diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-10-09 09:53:22 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-10-09 09:53:22 +0000 |
commit | db959910da84c8ab12cbc59c0484d41a0b589549 (patch) | |
tree | 21c4e031d963730f3660285266e25d4d90af243c /packages/linux | |
parent | edbe836e847558e823eb6954b1976d866aee9085 (diff) | |
parent | ec5a5fcd488d5f7b2751647120b4d2fec507eda9 (diff) |
merge of '4b614ea9dfb14d8f67ed00b35c59a2f23b49e2da'
and '9a0857ebdef17f18989f0702e43595ce522a7a24'
Diffstat (limited to 'packages/linux')
-rw-r--r-- | packages/linux/linux-omap/dvb-fix-dma.diff | 60 | ||||
-rw-r--r-- | packages/linux/linux-omap/fix-irq33.diff | 111 | ||||
-rw-r--r-- | packages/linux/linux-omap/musb-fix-endpoints.diff | 197 | ||||
-rw-r--r-- | packages/linux/linux-omap_git.bb | 5 | ||||
-rw-r--r-- | packages/linux/linux-openmoko-devel_git.bb | 15 |
5 files changed, 376 insertions, 12 deletions
diff --git a/packages/linux/linux-omap/dvb-fix-dma.diff b/packages/linux/linux-omap/dvb-fix-dma.diff new file mode 100644 index 0000000000..e05473fc7f --- /dev/null +++ b/packages/linux/linux-omap/dvb-fix-dma.diff @@ -0,0 +1,60 @@ +Hi, +I post this patch that fixes a kernel crash that happens when using a dvb +usb stick on a mips platform and I think even on other platforms on which +the dma access in not cache-coherent. + +The problem's origin is that, inside the method usb_bulk_urb_init of file +drivers/media/dvb/dvb-usb/usb-urb.c, stream->urb_list[i]->transfer_buffer +points to a memory area that has been allocated to be dma-coherent but +stream->urb_list[i]->transfer_flags doesn't include the +URB_NO_TRANSFER_DMA_MAP flag and stream->urb_list[i]->transfer_dma is not +set. +When later on the stream->urb_list[i]->transfer_buffer pointer is used +inside function usb_hcd_submit_urb of file drivers/usb/core/hcd.c since the +flag URB_NO_TRANSFER_DMA_MAP is not set the urb->transfer_buffer pointer is +passed to the dma_map_single function that since the address is dma-coherent +returns a wrong tranfer_dma address that later on leads to the kernel crash. + +The problem is solved by setting the URB_NO_TRANSFER_DMA_MAP flag and the +stream->urb_list[i]->transfer_dma address. + +Perhaps to be more safe the URB_NO_TRANSFER_DMA_MAP flag can be set only +if stream->urb_list[i]->transfer_dma != 0. + +I don't know if half of the fault can be of the dma_map_single function that +should anyway returns a valid address both for a not dma-coherent and a +dma-coherent address. + +Just to be clear: +I've done this patch to solve my problem and I tested it only on a mips +platform +but I think it should not cause any problems on other platforms. +I posted it here to help someone else that can have my same problem and to +point it out +to the mantainer of this part of code. +You can use it at your own risk and I'm not resposible in any way for any +problem or +damage that it can cause. +I'm available to discuss about it + +Bye + +Michele Scorcia + +-------------------- + + + + +--- /tmp/usb-urb.c 2008-10-08 09:53:23.000000000 +0200 ++++ git/drivers/media/dvb/dvb-usb/usb-urb.c 2008-10-08 09:54:16.000000000 +0200 +@@ -152,7 +152,8 @@ + stream->props.u.bulk.buffersize, + usb_urb_complete, stream); + +- stream->urb_list[i]->transfer_flags = 0; ++ stream->urb_list[i]->transfer_flags = URB_NO_TRANSFER_DMA_MAP; ++ stream->urb_list[i]->transfer_dma = stream->dma_addr[i]; + stream->urbs_initialized++; + } + return 0; diff --git a/packages/linux/linux-omap/fix-irq33.diff b/packages/linux/linux-omap/fix-irq33.diff new file mode 100644 index 0000000000..709f042ab7 --- /dev/null +++ b/packages/linux/linux-omap/fix-irq33.diff @@ -0,0 +1,111 @@ +From: "Nathan Monson" <nmonson@gmail.com> +To: "linux-omap@vger.kernel.org List" <linux-omap@vger.kernel.org> +Subject: Re: omapfb: help from userspace +Cc: "TK, Pratheesh Gangadhar" <pratheesh@ti.com> + +On Wed, Oct 8, 2008 at 11:36 AM, Nathan Monson <nmonson@gmail.com> wrote: +> "Felipe Contreras" <felipe.contreras@gmail.com> writes: +>> irq -33, desc: c0335cf8, depth: 0, count: 0, unhandled: 0 +> +> On the BeagleBoard list, Pratheesh Gangadhar said that mapping I/O +> regions as Strongly Ordered suppresses this problem: +> http://groups.google.com/group/beagleboard/browse_thread/thread/23e1c95b4bfb09b5/70d12dca569ca503?show_docid=70d12dca569ca503 + +Pratheesh helped me make a patch against the latest linux-omap git to +try this. + +With this patch, my IRQ -33 problems with the DSP have disappeared. +Before, I would end up in IRQ -33 loop after 10 invocations of the DSP +Bridge 'ping.out' utility. I just finished running it 50,000 times +without error. + +As stated before, this patch is just a workaround for testing +purposes, not a fix. Who knows what performance side effects it +has... + +--- +diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h +index 9eb936e..5cb4f5f 100644 +--- a/arch/arm/include/asm/mach/map.h ++++ b/arch/arm/include/asm/mach/map.h +@@ -25,6 +25,7 @@ struct map_desc { + #define MT_HIGH_VECTORS 8 + #define MT_MEMORY 9 + #define MT_ROM 10 ++#define MT_MEMORY_SO 11 + + #define MT_NONSHARED_DEVICE MT_DEVICE_NONSHARED + #define MT_IXP2000_DEVICE MT_DEVICE_IXP2000 +diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c +index adbe21f..c11c0e8 100644 +--- a/arch/arm/mach-omap2/io.c ++++ b/arch/arm/mach-omap2/io.c +@@ -119,13 +119,13 @@ static struct map_desc omap34xx_io_desc[] __initdata = { + .virtual = L3_34XX_VIRT, + .pfn = __phys_to_pfn(L3_34XX_PHYS), + .length = L3_34XX_SIZE, +- .type = MT_DEVICE ++ .type = MT_MEMORY_SO + }, + { + .virtual = L4_34XX_VIRT, + .pfn = __phys_to_pfn(L4_34XX_PHYS), + .length = L4_34XX_SIZE, +- .type = MT_DEVICE ++ .type = MT_MEMORY_SO + }, + { + .virtual = L4_WK_34XX_VIRT, +@@ -137,19 +137,19 @@ static struct map_desc omap34xx_io_desc[] __initdata = { + .virtual = OMAP34XX_GPMC_VIRT, + .pfn = __phys_to_pfn(OMAP34XX_GPMC_PHYS), + .length = OMAP34XX_GPMC_SIZE, +- .type = MT_DEVICE ++ .type = MT_MEMORY_SO + }, + { + .virtual = OMAP343X_SMS_VIRT, + .pfn = __phys_to_pfn(OMAP343X_SMS_PHYS), + .length = OMAP343X_SMS_SIZE, +- .type = MT_DEVICE ++ .type = MT_MEMORY_SO + }, + { + .virtual = OMAP343X_SDRC_VIRT, + .pfn = __phys_to_pfn(OMAP343X_SDRC_PHYS), + .length = OMAP343X_SDRC_SIZE, +- .type = MT_DEVICE ++ .type = MT_MEMORY_SO + }, + { + .virtual = L4_PER_34XX_VIRT, +@@ -161,7 +161,7 @@ static struct map_desc omap34xx_io_desc[] __initdata = { + .virtual = L4_EMU_34XX_VIRT, + .pfn = __phys_to_pfn(L4_EMU_34XX_PHYS), + .length = L4_EMU_34XX_SIZE, +- .type = MT_DEVICE ++ .type = MT_MEMORY_SO + }, + }; + #endif +diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c +index a713e40..d5f25ad 100644 +--- a/arch/arm/mm/mmu.c ++++ b/arch/arm/mm/mmu.c +@@ -245,6 +245,10 @@ static struct mem_type mem_types[] = { + .prot_sect = PMD_TYPE_SECT, + .domain = DOMAIN_KERNEL, + }, ++ [MT_MEMORY_SO] = { ++ .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_UNCACHED, ++ .domain = DOMAIN_KERNEL, ++ }, + }; + + const struct mem_type *get_mem_type(unsigned int type) +-- +-- +To unsubscribe from this list: send the line "unsubscribe linux-omap" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html + diff --git a/packages/linux/linux-omap/musb-fix-endpoints.diff b/packages/linux/linux-omap/musb-fix-endpoints.diff new file mode 100644 index 0000000000..5d1201f014 --- /dev/null +++ b/packages/linux/linux-omap/musb-fix-endpoints.diff @@ -0,0 +1,197 @@ +From: Ajay Kumar Gupta <ajay.gupta@ti.com> +To: linux-usb@vger.kernel.org +Cc: linux-omap@vger.kernel.org, david-b@pacbell.net, me@felipebalbi.com, + Ajay Kumar Gupta <ajay.gupta@ti.com> +Subject: [PATCH] MUSB: BULK request on different available endpoints +Date: Tue, 7 Oct 2008 11:12:24 +0530 + +Fixes co-working issue of usb serial device with usb/net devices while +oter endpoints are free and can be used.This patch implements the policy +that if endpoint resources are available then different BULK request goes +to different endpoint otherwise they are multiplexed to one reserved +endpoint as currently done. + +NAK limit scheme has to be added for multiplexed BULK request scenario +to avoid endpoint starvation due to usb/net devices. + +musb->periodic[] flag setting is also updated.It use to set this flag for +an endpoint even when only rx or tx is used.Now flag setting is done on +rx/tx basis of an endpoint. + +Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> +--- + drivers/usb/musb/musb_host.c | 94 ++++++++++++++++++++++++------------------ + drivers/usb/musb/musb_host.h | 1 + + 2 files changed, 55 insertions(+), 40 deletions(-) + +--- /tmp/musb_host.c 2008-10-07 10:10:49.000000000 +0200 ++++ git/drivers/usb/musb/musb_host.c 2008-10-07 10:13:59.000000000 +0200 +@@ -378,27 +378,32 @@ + + switch (qh->type) { + ++ case USB_ENDPOINT_XFER_CONTROL: ++ case USB_ENDPOINT_XFER_BULK: ++ /* fifo policy for these lists, except that NAKing ++ * should rotate a qh to the end (for fairness). ++ */ ++ if (qh->mux == 1) { ++ head = qh->ring.prev; ++ list_del(&qh->ring); ++ kfree(qh); ++ qh = first_qh(head); ++ break; ++ } + case USB_ENDPOINT_XFER_ISOC: + case USB_ENDPOINT_XFER_INT: + /* this is where periodic bandwidth should be + * de-allocated if it's tracked and allocated; + * and where we'd update the schedule tree... + */ +- musb->periodic[ep->epnum] = NULL; ++ if (is_in) ++ musb->periodic[2 * ep->epnum - 2] = NULL; ++ else ++ musb->periodic[2 * ep->epnum - 1] = NULL; + kfree(qh); + qh = NULL; + break; + +- case USB_ENDPOINT_XFER_CONTROL: +- case USB_ENDPOINT_XFER_BULK: +- /* fifo policy for these lists, except that NAKing +- * should rotate a qh to the end (for fairness). +- */ +- head = qh->ring.prev; +- list_del(&qh->ring); +- kfree(qh); +- qh = first_qh(head); +- break; + } + } + return qh; +@@ -1728,22 +1733,9 @@ + u16 maxpacket; + + /* use fixed hardware for control and bulk */ +- switch (qh->type) { +- case USB_ENDPOINT_XFER_CONTROL: ++ if (qh->type == USB_ENDPOINT_XFER_CONTROL) { + head = &musb->control; + hw_ep = musb->control_ep; +- break; +- case USB_ENDPOINT_XFER_BULK: +- hw_ep = musb->bulk_ep; +- if (is_in) +- head = &musb->in_bulk; +- else +- head = &musb->out_bulk; +- break; +- } +- if (head) { +- idle = list_empty(head); +- list_add_tail(&qh->ring, head); + goto success; + } + +@@ -1778,7 +1770,8 @@ + for (epnum = 1; epnum < musb->nr_endpoints; epnum++) { + int diff; + +- if (musb->periodic[epnum]) ++ if ((is_in && musb->periodic[2 * epnum - 2]) || ++ (!is_in && musb->periodic[2 * epnum - 1])) + continue; + hw_ep = &musb->endpoints[epnum]; + if (hw_ep == musb->bulk_ep) +@@ -1789,19 +1782,36 @@ + else + diff = hw_ep->max_packet_sz_tx - maxpacket; + +- if (diff > 0 && best_diff > diff) { ++ if (diff >= 0 && best_diff > diff) { + best_diff = diff; + best_end = epnum; + } + } +- if (best_end < 0) ++ /* use bulk reserved ep1 if no other ep is free*/ ++ if (best_end < 0 && qh->type == USB_ENDPOINT_XFER_BULK) { ++ hw_ep = musb->bulk_ep; ++ if (is_in) ++ head = &musb->in_bulk; ++ else ++ head = &musb->out_bulk; ++ goto success; ++ } else if (best_end < 0) + return -ENOSPC; + + idle = 1; ++ qh->mux = 0; + hw_ep = musb->endpoints + best_end; +- musb->periodic[best_end] = qh; +- DBG(4, "qh %p periodic slot %d\n", qh, best_end); ++ if (is_in) ++ musb->periodic[2 * best_end - 2] = qh; ++ else ++ musb->periodic[2 * best_end - 1] = qh; ++ DBG(4, "qh %p periodic slot %d%s\n", qh, best_end, is_in ? "Rx" : "Tx"); + success: ++ if (head) { ++ idle = list_empty(head); ++ list_add_tail(&qh->ring, head); ++ qh->mux = 1; ++ } + qh->hw_ep = hw_ep; + qh->hep->hcpriv = qh; + if (idle) +@@ -2065,11 +2075,13 @@ + sched = &musb->control; + break; + case USB_ENDPOINT_XFER_BULK: +- if (usb_pipein(urb->pipe)) +- sched = &musb->in_bulk; +- else +- sched = &musb->out_bulk; +- break; ++ if (qh->mux == 1) { ++ if (usb_pipein(urb->pipe)) ++ sched = &musb->in_bulk; ++ else ++ sched = &musb->out_bulk; ++ break; ++ } + default: + /* REVISIT when we get a schedule tree, periodic + * transfers won't always be at the head of a +@@ -2131,11 +2143,13 @@ + sched = &musb->control; + break; + case USB_ENDPOINT_XFER_BULK: +- if (is_in) +- sched = &musb->in_bulk; +- else +- sched = &musb->out_bulk; +- break; ++ if (qh->mux == 1) { ++ if (is_in) ++ sched = &musb->in_bulk; ++ else ++ sched = &musb->out_bulk; ++ break; ++ } + case USB_ENDPOINT_XFER_ISOC: + case USB_ENDPOINT_XFER_INT: + for (i = 0; i < musb->nr_endpoints; i++) { +--- /tmp/musb_host.h 2008-10-07 08:59:38.000000000 +0200 ++++ git/drivers/usb/musb/musb_host.h 2008-10-07 10:10:54.000000000 +0200 +@@ -53,7 +53,8 @@ + + struct list_head ring; /* of musb_qh */ + /* struct musb_qh *next; */ /* for periodic tree */ +- ++ u8 mux; /* qh multiplexed to hw_ep */ ++ + unsigned offset; /* in urb->transfer_buffer */ + unsigned segsize; /* current xfer fragment */ + diff --git a/packages/linux/linux-omap_git.bb b/packages/linux/linux-omap_git.bb index b00572771c..14de954e7c 100644 --- a/packages/linux/linux-omap_git.bb +++ b/packages/linux/linux-omap_git.bb @@ -9,7 +9,7 @@ COMPATIBLE_MACHINE = "omap5912osk|omap1710h3|omap2430sdp|omap2420h4|beagleboard| SRCREV = "e1c49d7d22af768188e2a54c167ed79919361e55" PV = "2.6.26+2.6.27-rc7+${PR}+git${SRCREV}" -PR = "r11" +PR = "r14" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \ file://defconfig" @@ -33,6 +33,9 @@ SRC_URI_append = " \ file://musb-fix-ISO-in-unlink.diff;patch=1 \ file://musb-fix-multiple-bulk-transfers.diff;patch=1 \ file://mru-256MB.diff;patch=1 \ + file://musb-fix-endpoints.diff;patch=1 \ + file://dvb-fix-dma.diff;patch=1 \ + file://fix-irq33.diff;patch=1 \ " diff --git a/packages/linux/linux-openmoko-devel_git.bb b/packages/linux/linux-openmoko-devel_git.bb index c68b5c2e69..dac670abf9 100644 --- a/packages/linux/linux-openmoko-devel_git.bb +++ b/packages/linux/linux-openmoko-devel_git.bb @@ -5,21 +5,14 @@ DESCRIPTION = "Linux 2.6.x (development) kernel for the Openmoko Neo Smartphones DEFAULT_PREFERENCE = "-1" -KERNEL_RELEASE = "2.6.24" +KERNEL_RELEASE = "2.6.26" KERNEL_VERSION = "${KERNEL_RELEASE}" -PV = "${KERNEL_RELEASE}+gitr${SRCREV}" -PR = "r4" +PV = "${KERNEL_RELEASE}+${PR}-gitr${SRCREV}" +PR = "r0" SRC_URI = "\ - git://git.openmoko.org/git/kernel.git;protocol=git;branch=andy \ - \ - file://0001-squashfs-with-lzma.patch;patch=1 \ - file://0002-squashfs-initrd.patch;patch=1 \ - file://0003-squashfs-force-O2.patch;patch=1 \ - file://0004-squashfs-Kconfig.patch;patch=1 \ - file://0005-squashfs-Makefile.patch;patch=1 \ - \ + git://git.openmoko.org/git/kernel.git;protocol=git;branch=stable-tracking \ file://defconfig-oe \ " S = "${WORKDIR}/git" |