Re: [PATCH] usb/isp1760: Implement Errata 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 08, 2011 at 01:23:06PM +0000, Russell King wrote:
> On Tue, Feb 08, 2011 at 02:16:11PM +0100, Sebastian Andrzej Siewior wrote:
> >>> @@ -850,6 +851,11 @@ static void enqueue_an_ATL_packet(struct usb_hcd 
> >>> *hcd, struct isp1760_qh *qh,
> >>>       skip_map&= ~queue_entry;
> >>>       isp1760_writel(skip_map, hcd->regs + HC_ATL_PTD_SKIPMAP_REG);
> >>>
> >>> +    priv->atl_queued++;
> >>> +    if (priv->atl_queued == 2)
> >>> +        isp1760_writel(INTERRUPT_ENABLE_MASK,
> >>> +                hcd->regs + INTERRUPT_ENABLE_SOT_MASK);
> >>
> >>    Perhaps it's:
> >>
> >>         isp1760_writel(INTERRUPT_ENABLE_[SOT_]MASK,
> >>                 hcd->regs + HC_INTERRUPT_ENABLE);
> >
> > No, it's not perhaps it is what it should be. Very good catch, thank you
> > Sergei.
> >
> >>    Othrwise it doesn't make much sense...
> >
> > Right. But now I wonder if this patch is still required since it worked
> > without the fix. However Russell complained about a short delay.
> 
> Maybe the additional writes - even though they don't change any bits in
> the register - mean that the race condition is less likely to occur due
> to timing differences.

Note that it would be a _significant_ timing disturbance as
INTERRUPT_ENABLE_SOT_MASK corresponds to 0x8a, which will cause a
misaligned access to an IO address.  That may result in the alignment
handler being invoked, which will be much longer than just a single
write:

root@vexpress:~# cat /proc/cpu/alignment
...
System:         217
...
Word:           217
...

That's after a few seconds of running minicom on the ftdi_sio port.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux