Re: Synchronizing scsi_remove_host and the error handler

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

 



On Tue, 9 Aug 2005, Stefan Richter wrote:

> > It already is in the core.  If you're interested, read 
> > drivers/usb/core/usb.c:usb_lock_device_for_reset().
> 
> I was actually browsing the usb/storage/scsiglue.c, but only
> old code at lxr.linux.no, 2.6.11 in fact. Sorry, I see now that
> this is way too old to look at. However the scsiglue.c's
> device_reset and bus_reset in Linus' tree are still using down().

2.6.11 isn't too old.  The code hasn't really changed since then.

However, you're looking at the wrong semaphore.  (Yes, the call to

	down(&(us->dev_semaphore));

in bus_reset() would also create a deadlock, but it's not really needed
and I'm going to take it out.)  You should instead be looking at the call
to usb_lock_device_for_reset() -- notice how it uses usb_trylock_device().

Alan Stern

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux