On Thu, Nov 10, 2005 at 08:01:47AM +0100, Oliver Neukum wrote: > > However, you not only removed the notification, but also the very check. > This is not nice at all. You are depending on disconnect() cleaning up the > whole mess needlessly.
Actually, that check is buggy. There is no serialisation with the killing side. For instance, it has absolutely zero effect if CPU0 CPU1 kaweth_close kaweth_usb_receiv urb->status == 0 status & KAWETH_STATUS_CLOSING == 0 status |= KAWETH_STATUS_CLOSING kaweth_resubmit_rx_urb usb_kill_urb(rx_urb) Fortunately, usb_kill_urb causes kaweth_resubmit_rx_urb to fail with EPERM. As you can see, the urb->status check is not needed to ensure that the URB will not be resubmitted. Since you can't rely on urb->status to always be ECONNRESET/ESHUTDOWN in a shutdown case, it should be removed. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel