linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Felipe Balbi <balbi@ti.com>, Dmitry Lifshitz <lifshitz@compulab.co.il>
Cc: linux-omap@vger.kernel.org
Subject: omap2430 regression due to "usb: musb: fix incorrect usage of resource pointer"
Date: Fri, 26 Jul 2013 19:14:45 +1000	[thread overview]
Message-ID: <20130726191445.1b2aaef7@notabene.brown> (raw)

[-- Attachment #1: Type: text/plain, Size: 1490 bytes --]


Hi,
 the commit:

commit 09fc7d22b024692b2fe8a943b246de1af307132b
Author: Felipe Balbi <balbi@ti.com>
Date:   Wed Apr 24 17:21:42 2013 +0300

    usb: musb: fix incorrect usage of resource pointer
    
    We can't simply pass the resource pointer from our
    device down to our children, otherwise module
    reinsertion will not work as the resource will
    continue to be marked as busy.
    
    Fix it by building a proper struct resource for
    our child musb device.
 

(even with the subsequent compile fix applied) breaks my USB-OTG port on my
GTA04.

I must admit that I don't see the point of the patch at all.
Instead of passing one array to platform_device_add_resources()
which will copy it into malloced space, it copies bits of the array onto
the stack on passes that for platform_device_add_resources to copy.
What is the value of the second copy??

But that isn't the real problem.  The real problem is that in omap2430_probe,
on my board at least, pdev->num_resources == 3.  But only the first 2 entries
in the array are copied.

If I make the array one entry larger and copy the extra entry it works.  Of
course that might break for someone else who only has 2 resources to copy....

Can we go back to just leaving it to platform_device_add_resources to do the
copying it have I missed something?  (I can't see where the new old code
would mark something as 'busy' that the new code won't mark as busy...)

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

             reply	other threads:[~2013-07-26  9:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26  9:14 NeilBrown [this message]
2013-07-26 10:20 ` omap2430 regression due to "usb: musb: fix incorrect usage of resource pointer" Felipe Balbi
2013-07-26 12:24   ` NeilBrown
2013-07-26 13:51     ` Felipe Balbi
2013-07-26 22:15       ` NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130726191445.1b2aaef7@notabene.brown \
    --to=neilb@suse.de \
    --cc=balbi@ti.com \
    --cc=lifshitz@compulab.co.il \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).