lkml.org 
[lkml]   [2013]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] usb: dwc3: core: modify IO memory resource after deferred probe completes
Date
> From: Felipe Balbi [mailto:balbi@ti.com]
> Sent: Friday, July 26, 2013 2:54 AM
> > > > Also, this is not *modifying* what was passed, just skipping the xHCI
> > > > address space so we don't request_mem_region() an area we won't really
> > > > handle and prevent xhci-hcd.ko from probing.
> > >
> > > Hmm? platform_get_resource() returns a pointer to an entry in the
> > > platform_device's resource[] array. And "res->start +=" modifies the
> > > entry pointed at. If it didn't, the bug fixed by this patch wouldn't
> > > have happened.
> > >
> > > Are you sure this code will work OK if you build the driver as a module,
> > > modprobe it, rmmod it, and then modprobe it again? Seems like it won't,
> > > unless the dev->resource[] array gets reinitialized in between somehow.
>
> gotta try that one... Perhaps the correct way would be to copy the
> resource to a private struct resource and modify that one, leaving
> pdev->resources untouched.

Maybe this is a dumb question, but why can't the driver that is going
to use the resource after this just "know" that it has to add
DWC3_GLOBALS_REGS_START to the start address? Are there some versions
of the core where that is not the case?

Or, maybe there should be two sets of resources?

--
Paul



\
 
 \ /
  Last update: 2013-07-26 21:01    [W:0.057 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site