Thanks Ohad,

It looks like this patch is missing from the arago-project linux-omap3 code 
base.

We've been using the most recent release - T1816XPSP_04.00.00.12.

What would the procedure be to get this patch applied to the arago-project? 

Stuart

-----Original Message-----
From: Ohad Ben-Cohen [mailto:o...@wizery.com] 
Sent: 15 September 2011 14:12
To: Stuart Brown
Cc: linux-omap@vger.kernel.org; Brian Murray
Subject: Re: Kernel Halt with framebuffer enabled: omap_mbox_get()

Hi Stuart,

On Thu, Sep 15, 2011 at 3:22 PM, Stuart Brown <stuart.br...@plexus.com> wrote:
> Doing some investigation it looks like the for loop in mach-omap2/mailbox.c: 
> omap_mbox_get() might be wrong:
>
>      for(mbox = *mboxes; mbox; mbox++)
...
> I'm hesitant to query this as it looks like this change has been in the 
> kernel for about a year, so perhaps I'm missing something?

You're probably missing the following patch from Kevin:

commit c03773206bf2249a890c4d420ed32ef500630095
Author: Kevin Hilman <khil...@ti.com>
Date:   Fri Feb 11 19:56:43 2011 +0000

    OMAP2+: mailbox: fix lookups for multiple mailboxes

    The pointer math in omap_mbox_get() is not quite right, and leads to
    passing NULL to strcmp() when searching for an mbox that is not first
    in the list.

    Convert to using array indexing as is done in all the other functions
    which walk the mbox list.

    Tested on OMAP2420/n810, OMAP3630/zoom3, OMAP4430/Blaze

    Signed-off-by: Kevin Hilman <khil...@ti.com>
    Signed-off-by: Tony Lindgren <t...@atomide.com>

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 459b319..49d3208 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -322,15 +322,18 @@ static void omap_mbox_fini(struct omap_mbox *mbox)

 struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb)
 {
-       struct omap_mbox *mbox;
-       int ret;
+       struct omap_mbox *_mbox, *mbox = NULL;
+       int i, ret;

        if (!mboxes)
                return ERR_PTR(-EINVAL);

-       for (mbox = *mboxes; mbox; mbox++)
-               if (!strcmp(mbox->name, name))
+       for (i = 0; (_mbox = mboxes[i]); i++) {
+               if (!strcmp(_mbox->name, name)) {
+                       mbox = _mbox;
                        break;
+               }
+       }

        if (!mbox)
                return ERR_PTR(-ENOENT);


Plexus Corp. 
Registered address: Pinnacle Hill, Kelso, Roxburghshire, TD5 8XX. 
Registered in Scotland: number SC146948.

This email transmission is confidential and intended solely for the person or 
organisation to whom it is addressed. If you are not the intended recipient, 
you must not copy, distribute or disseminate the information, or take any 
action in reliance of it. Any views expressed in this message are those of the 
individual sender, except where the sender specifically states them to be the 
views of Plexus Corp. If you have received this message in error, do not open 
any attachment but please notify the sender (above) deleting this message from 
your system. Please rely on your own virus check no responsibility is taken by 
the sender for any damage rising out of any bug or virus infection.

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

Reply via email to