On Wed, Aug 07, 2013 at 03:50:42PM +0800, Ming Lei wrote:
> On Wed, Aug 7, 2013 at 1:41 PM, Christoffer Dall
> <christoffer.d...@linaro.org> wrote:
> > Hi all,
> >
> > I've found that booting a recent kernel (and as far back as 3.9 at
> > least) I get a kernel bug during boot with VM debugging enabled.  I
> > haven't had time to dig further into it, but wanted to check if this is
> > a known issue?
> 
> Remember Catalin introduced the flush_dcache_page() to fix
> cache incoherency problem when PIO reading from USB mass
> storage device to mapped page, so the flush should not need
> for pages not in page cache.
> 
> Care to test below patch to see if the problem can be fixed?
> 
> diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
> index 2facee5..9d47c71 100644
> --- a/drivers/usb/host/isp1760-hcd.c
> +++ b/drivers/usb/host/isp1760-hcd.c
> @@ -707,8 +707,12 @@ __acquires(priv->lock)
>               void *ptr;
>               for (ptr = urb->transfer_buffer;
>                    ptr < urb->transfer_buffer + urb->transfer_buffer_length;
> -                  ptr += PAGE_SIZE)
> -                     flush_dcache_page(virt_to_page(ptr));
> +                  ptr += PAGE_SIZE) {
> +                     struct page *page = virt_to_page(ptr);
> +                     if (PageSlab(page))
> +                             break;
> +                     flush_dcache_page(page);
> +             }
>       }
> 
>       /* complete() can reenter this HCD */
> 
Yep, that fixes it. Thanks!!

-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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