Re: [RFC 1/3] xhci: Handle URB cancel, complete and resubmit race.

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

 



Am Samstag, 24. Oktober 2009 02:53:00 schrieb Sarah Sharp:
> @@ -507,8 +507,11 @@ static void handle_stopped_endpoint(struct xhci_hcd
> *xhci, ep = &xhci->devs[slot_id]->eps[ep_index];
>         ep_ring = ep->ring;
>  
> -       if (list_empty(&ep->cancelled_td_list))
> +       if (list_empty(&ep->cancelled_td_list)) {
> +               ep->ep_state &= ~EP_HALT_PENDING;
> +               ring_ep_doorbell(xhci, slot_id, ep_index);
>                 return;
> +       }

Presumably the interrupt handler cares about ep->ep_state.
Yet it may run on another CPU. Nothing makes sure ep->ep_state
is flushed into main memory. I think you need an smp_wmb()
before ring_ep_doorbell(), as it doesn't contain a memory ordering
primitive.

	Regards
		Oliver

--
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