Re: [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58

Matthew Dharm
2003-02-02T03:49:14Z

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

So, I was trying to implement this bit of logic in usb-storage, when I
discovered that scsi_set_device_offline() doesn't exist.

Okay, what did I miss? I'm sure it's obvious, but for the life of me I
don't see it.

Matt

On Fri, Jan 24, 2003 at 07:05:29PM -0500, Doug Ledford wrote:
> > (i) Doesn't scsi_set_device_offline() work on devices, not hosts? How do I
> > map from my host to my device list?
>
> Well, in hosts.c::scsi_remove_host() we do it thusly:
>
> list_for_each_entry(sdev, &shost->my_devices, siblings)
> if (scsi_check_device_busy(sdev))
> return 1;
>
> > (ii) Do I need to call scsi_set_device_offline() for each device? I
> > presume 'yes'.
>
> Yes. As people pointed out to me the reason a USB device is done as a
> host is because it very well may *be* a host with several devices behind
> it, so it must handle the multiple device scenario correctly and set all
> devices offline and clean up after all of them that might be behind this
> bridge.

--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver

I'm seen in many forms. Now open your mouth. It's caffeine time.
-- Cola Man to Greg
User Friendly, 10/28/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]