linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gene Heskett <gene.heskett@verizon.net>
To: David Brownell <david-b@pacbell.net>
Cc: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [linux-usb-devel] 2.6.5-rc3-mm4 breaks xsane, hangs on device scan at launch
Date: Tue, 6 Apr 2004 16:06:49 -0400	[thread overview]
Message-ID: <200404061606.49587.gene.heskett@verizon.net> (raw)
In-Reply-To: <407300D0.4030100@pacbell.net>

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On Tuesday 06 April 2004 15:11, David Brownell wrote:
>Gene Heskett wrote:
>> Nope, 2.6.5-mm1 hangs xsane just like 2.6.5-rc3-mm4 did...
>
>Ah, I think I see the problem.  This .text.lock.devio entry is more
>like devio::driver_disconnect(), which wouldn't previously have been
>called on that path.
>
>Try this patch.

Well, if you were a trophy hunter, I'd have to say "Skin that one, 
take it to the taxidermist and mount it on the wall, Dave" :-)

2.6.5-mm1 & xsane works again.  I'd assume that 2.6.5-rc3-mm4 would 
also respond correctly to this patch, but of course I haven't tried 
it.

Good catch & many thanks.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.

[-- Attachment #2: Diff-xsane-hang --]
[-- Type: text/x-diff, Size: 1028 bytes --]

Disable a usbfs disconnect() synchronization hack, which recently
started deadlocking because this routine is now called in a different 
context.

It shouldn't be needed any longer now that usbcore shuts down endpoints
as part of driver unbinding.  (Except maybe on UHCI, which will have
canceled but not necessarily completed all requests.)


--- 1.60/drivers/usb/core/devio.c	Tue Mar 30 09:19:53 2004
+++ edited/drivers/usb/core/devio.c	Tue Apr  6 12:07:06 2004
@@ -339,18 +339,17 @@
 	if (!ps)
 		return;
 
-	/* this waits till synchronous requests complete */
-	down_write (&ps->devsem);
+	/* NOTE:  this relies on usbcore having canceled and completed
+	 * all pending I/O requests; 2.6 does that.
+	 */
 
 	/* prevent new I/O requests */
 	ps->dev = 0;
-	ps->ifclaimed = 0;
+	clear_bit(intf->cur_altsetting->desc.bInterfaceNumber, &ps->ifclaimed);
 	usb_set_intfdata (intf, NULL);
 
 	/* force async requests to complete */
 	destroy_all_async (ps);
-
-	up_write (&ps->devsem);
 }
 
 struct usb_driver usbdevfs_driver = {

      parent reply	other threads:[~2004-04-06 20:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-04  2:13 2.6.5-rc3-mm4 breaks xsane, hangs on device scan at launch Gene Heskett
2004-04-04 11:21 ` Gene Heskett
     [not found] ` <200404061334.49888.gene.heskett@verizon.net>
     [not found]   ` <407300D0.4030100@pacbell.net>
2004-04-06 20:06     ` Gene Heskett [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200404061606.49587.gene.heskett@verizon.net \
    --to=gene.heskett@verizon.net \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).