[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0804021601490.2107-100000@iolanthe.rowland.org>
Date: Wed, 2 Apr 2008 16:09:55 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Mark Lord <lkml@....ca>
cc: Oliver Neukum <oliver@...kum.org>, Pavel Machek <pavel@...e.cz>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Greg KH <gregkh@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>, <jikos@...e.cz>,
<linux-usb@...r.kernel.org>
Subject: Re: 2.6.25-rc7: Ugh. ---> PATCH
On Wed, 2 Apr 2008, Mark Lord wrote:
> When comparing 2.6.24 against 2.6.25, this line of code
> stood out as not looking entirely correct, given the new
> uses of QH_STATE_UNLINK_WAIT in 2.6.25.
> --- linux-2.6.25-rc8/drivers/usb/host/ehci-hcd.c 2008-03-11 11:18:40.000000000 -0400
> +++ linux/drivers/usb/host/ehci-hcd.c 2008-04-02 11:36:13.000000000 -0400
> @@ -815,7 +815,7 @@
> end_unlink_async(ehci);
>
> /* if it's not linked then there's nothing to do */
> - if (qh->qh_state != QH_STATE_LINKED)
> + if (qh->qh_state != QH_STATE_LINKED && qh->qh_state != QH_STATE_UNLINK_WAIT)
> ;
>
> /* defer till later if busy */
To answer your implied question...
QH_STATE_UNLINK_WAIT doesn't have a new meaning in 2.6.25. Just as
before, it means that qh is on a queue waiting to be unlinked.
qh->qh_state can never be equal to QH_STATE_UNLINK_WAIT at this point.
If it were, it would mean that some part of the driver had tried to
unlink qh twice. But even then, the correct move would be to follow
the "nothing to do" path -- since qh is already waiting to be unlinked,
there's no point trying to do any more.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists