* [PATCH 5/5] initdev:kernel: USB and SCSI block init device notification, v3
@ 2009-05-02 2:30 David VomLehn
[not found] ` <20090502023000.GA16076-CFZJ1or75eBPWxJt6d6B6bQa8qPdvLwY@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: David VomLehn @ 2009-05-02 2:30 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, linux-usb, greg, linux-scsi, netdev, arjan
From: Alan Stern <stern@rowland.harvard.edu
Add notification of device discovery for USB and SCSI block devices.
History
v3 Change bootdev_* to initdev_*
v2 Correct location of call to bootdev_found
v1 Initial version
Signed-off-by: Alan Stern <stern@rowland.harvard.edu
Signed-off-by: David VomLehn <dvomlehn@cisco.com>
---
drivers/scsi/scsi_scan.c | 2 ++
drivers/usb/storage/usb.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 6f51ca4..735b061 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1834,6 +1834,7 @@ static int do_scan_async(void *_data)
struct async_scan_data *data = _data;
do_scsi_scan_host(data->shost);
scsi_finish_async_scan(data);
+ initdev_probe_done(BOOTDEV_BLOCK_MASK);
return 0;
}
@@ -1855,6 +1856,7 @@ void scsi_scan_host(struct Scsi_Host *shost)
return;
}
+ initdev_found(BOOTDEV_BLOCK_MASK);
p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no);
if (IS_ERR(p))
do_scan_async(data);
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 8060b85..ea7abab 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -837,6 +837,7 @@ static int usb_stor_scan_thread(void * __us)
/* Should we unbind if no devices were detected? */
}
+ initdev_probe_done(BOOTDEV_BLOCK_MASK);
complete_and_exit(&us->scanning_done, 0);
}
@@ -937,10 +938,12 @@ int usb_stor_probe2(struct us_data *us)
}
/* Start up the thread for delayed SCSI-device scanning */
+ initdev_found(BOOTDEV_BLOCK_MASK);
th = kthread_create(usb_stor_scan_thread, us, "usb-stor-scan");
if (IS_ERR(th)) {
printk(KERN_WARNING USB_STORAGE
"Unable to start the device-scanning thread\n");
+ initdev_probe_done(BOOTDEV_BLOCK_MASK);
complete(&us->scanning_done);
quiesce_and_remove_host(us);
result = PTR_ERR(th);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 5/5] initdev:kernel: USB and SCSI block init device notification, v3
[not found] ` <20090502023000.GA16076-CFZJ1or75eBPWxJt6d6B6bQa8qPdvLwY@public.gmane.org>
@ 2009-05-02 3:55 ` Ming Lei
2009-05-05 0:19 ` David VomLehn
0 siblings, 1 reply; 5+ messages in thread
From: Ming Lei @ 2009-05-02 3:55 UTC (permalink / raw)
To: David VomLehn
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
linux-usb-u79uwXL29TY76Z2rM5mHXA, greg-U8xfFu+wG4EAvxtiuMwx3w,
linux-scsi-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
arjan-wEGCiKHe2LqWVfeAwA7xHQ
On Fri, 1 May 2009 19:30:00 -0700
David VomLehn <dvomlehn-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> wrote:
> From: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org
>
> Add notification of device discovery for USB and SCSI block devices.
>
> History
> v3 Change bootdev_* to initdev_*
> v2 Correct location of call to bootdev_found
> v1 Initial version
>
> Signed-off-by: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org
> Signed-off-by: David VomLehn <dvomlehn-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/scsi/scsi_scan.c | 2 ++
> drivers/usb/storage/usb.c | 3 +++
> 2 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> index 6f51ca4..735b061 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -1834,6 +1834,7 @@ static int do_scan_async(void *_data)
> struct async_scan_data *data = _data;
> do_scsi_scan_host(data->shost);
> scsi_finish_async_scan(data);
> + initdev_probe_done(BOOTDEV_BLOCK_MASK);
Which code are waiting for the block device's probe done?
> return 0;
> }
>
> @@ -1855,6 +1856,7 @@ void scsi_scan_host(struct Scsi_Host *shost)
> return;
> }
>
> + initdev_found(BOOTDEV_BLOCK_MASK);
> p = kthread_run(do_scan_async, data, "scsi_scan_%d",
> shost->host_no); if (IS_ERR(p))
> do_scan_async(data);
> diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
> index 8060b85..ea7abab 100644
> --- a/drivers/usb/storage/usb.c
> +++ b/drivers/usb/storage/usb.c
> @@ -837,6 +837,7 @@ static int usb_stor_scan_thread(void * __us)
> /* Should we unbind if no devices were detected? */
> }
>
> + initdev_probe_done(BOOTDEV_BLOCK_MASK);
the same question with above.
> complete_and_exit(&us->scanning_done, 0);
> }
>
> @@ -937,10 +938,12 @@ int usb_stor_probe2(struct us_data *us)
> }
>
> /* Start up the thread for delayed SCSI-device scanning */
> + initdev_found(BOOTDEV_BLOCK_MASK);
> th = kthread_create(usb_stor_scan_thread, us,
> "usb-stor-scan"); if (IS_ERR(th)) {
> printk(KERN_WARNING USB_STORAGE
> "Unable to start the device-scanning
> thread\n");
> + initdev_probe_done(BOOTDEV_BLOCK_MASK);
the same question with above.
> complete(&us->scanning_done);
> quiesce_and_remove_host(us);
> result = PTR_ERR(th);
> --
--
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5/5] initdev:kernel: USB and SCSI block init device notification, v3
2009-05-02 3:55 ` Ming Lei
@ 2009-05-05 0:19 ` David VomLehn
[not found] ` <20090505001950.GC29124-CFZJ1or75eBPWxJt6d6B6bQa8qPdvLwY@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: David VomLehn @ 2009-05-05 0:19 UTC (permalink / raw)
To: Ming Lei; +Cc: linux-kernel, akpm, linux-usb, greg, linux-scsi, netdev, arjan
On Fri, May 01, 2009 at 11:55:39PM -0400, Ming Lei wrote:
> On Fri, 1 May 2009 19:30:00 -0700
> David VomLehn <dvomlehn@cisco.com> wrote:
>
> > From: Alan Stern <stern@rowland.harvard.edu
> > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> > index 6f51ca4..735b061 100644
> > --- a/drivers/scsi/scsi_scan.c
> > +++ b/drivers/scsi/scsi_scan.c
...
> > @@ -1834,6 +1834,7 @@ static int do_scan_async(void *_data)
> > struct async_scan_data *data = _data;
> > do_scsi_scan_host(data->shost);
> > scsi_finish_async_scan(data);
> > + initdev_probe_done(BOOTDEV_BLOCK_MASK);
>
> Which code are waiting for the block device's probe done?
None yet. That remains to be done.
> > diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
> > index 8060b85..ea7abab 100644
> > --- a/drivers/usb/storage/usb.c
> > +++ b/drivers/usb/storage/usb.c
> > @@ -837,6 +837,7 @@ static int usb_stor_scan_thread(void * __us)
> > /* Should we unbind if no devices were detected? */
> > }
> >
> > + initdev_probe_done(BOOTDEV_BLOCK_MASK);
>
> the same question with above.
Same answer.
> > @@ -937,10 +938,12 @@ int usb_stor_probe2(struct us_data *us)
> > }
> >
> > /* Start up the thread for delayed SCSI-device scanning */
> > + initdev_found(BOOTDEV_BLOCK_MASK);
> > th = kthread_create(usb_stor_scan_thread, us,
> > "usb-stor-scan"); if (IS_ERR(th)) {
> > printk(KERN_WARNING USB_STORAGE
> > "Unable to start the device-scanning
> > thread\n");
> > + initdev_probe_done(BOOTDEV_BLOCK_MASK);
>
> the same question with above.
Same answer.
> Lei Ming
Thanks!
David VomLehn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5/5] initdev:kernel: USB and SCSI block init device notification, v3
[not found] ` <20090505001950.GC29124-CFZJ1or75eBPWxJt6d6B6bQa8qPdvLwY@public.gmane.org>
@ 2009-05-05 4:05 ` Ming Lei
2009-06-05 17:55 ` David VomLehn
0 siblings, 1 reply; 5+ messages in thread
From: Ming Lei @ 2009-05-05 4:05 UTC (permalink / raw)
To: David VomLehn
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
linux-usb-u79uwXL29TY76Z2rM5mHXA, greg-U8xfFu+wG4EAvxtiuMwx3w,
linux-scsi-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
arjan-wEGCiKHe2LqWVfeAwA7xHQ
2009/5/5 David VomLehn <dvomlehn-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>:
> On Fri, May 01, 2009 at 11:55:39PM -0400, Ming Lei wrote:
>> On Fri, 1 May 2009 19:30:00 -0700
>> David VomLehn <dvomlehn-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> wrote:
>>
>> > From: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org
>> > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
>> > index 6f51ca4..735b061 100644
>> > --- a/drivers/scsi/scsi_scan.c
>> > +++ b/drivers/scsi/scsi_scan.c
> ...
>> > @@ -1834,6 +1834,7 @@ static int do_scan_async(void *_data)
>> > struct async_scan_data *data = _data;
>> > do_scsi_scan_host(data->shost);
>> > scsi_finish_async_scan(data);
>> > + initdev_probe_done(BOOTDEV_BLOCK_MASK);
>>
>> Which code are waiting for the block device's probe done?
>
> None yet. That remains to be done.
>
Would you mind submitting the code path of waitting for probe done to allow a
intact review? Without the waitting code, it is a a little difficult
to undersand or verify
your patch, IMHO.
Thanks
--
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5/5] initdev:kernel: USB and SCSI block init device notification, v3
2009-05-05 4:05 ` Ming Lei
@ 2009-06-05 17:55 ` David VomLehn
0 siblings, 0 replies; 5+ messages in thread
From: David VomLehn @ 2009-06-05 17:55 UTC (permalink / raw)
To: Ming Lei; +Cc: linux-kernel, akpm, linux-usb, greg, linux-scsi, netdev, arjan
On Tue, May 05, 2009 at 12:05:19AM -0400, Ming Lei wrote:
> 2009/5/5 David VomLehn <dvomlehn@cisco.com>:
> > On Fri, May 01, 2009 at 11:55:39PM -0400, Ming Lei wrote:
> >> On Fri, 1 May 2009 19:30:00 -0700
> >> David VomLehn <dvomlehn@cisco.com> wrote:
> >>
> >> > From: Alan Stern <stern@rowland.harvard.edu
> >> > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> >> > index 6f51ca4..735b061 100644
> >> > --- a/drivers/scsi/scsi_scan.c
> >> > +++ b/drivers/scsi/scsi_scan.c
> > ...
> >> > @@ -1834,6 +1834,7 @@ static int do_scan_async(void *_data)
> >> > struct async_scan_data *data = _data;
> >> > do_scsi_scan_host(data->shost);
> >> > scsi_finish_async_scan(data);
> >> > + initdev_probe_done(BOOTDEV_BLOCK_MASK);
> >>
> >> Which code are waiting for the block device's probe done?
> >
> > None yet. That remains to be done.
> >
>
> Would you mind submitting the code path of waitting for probe done to allow a
> intact review? Without the waitting code, it is a a little difficult
> to undersand or verify
> your patch, IMHO.
This will be in the next spin of the patch, coming soon (possibly today).
> Thanks
> Lei Ming
David VomLehn
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-06-05 17:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-02 2:30 [PATCH 5/5] initdev:kernel: USB and SCSI block init device notification, v3 David VomLehn
[not found] ` <20090502023000.GA16076-CFZJ1or75eBPWxJt6d6B6bQa8qPdvLwY@public.gmane.org>
2009-05-02 3:55 ` Ming Lei
2009-05-05 0:19 ` David VomLehn
[not found] ` <20090505001950.GC29124-CFZJ1or75eBPWxJt6d6B6bQa8qPdvLwY@public.gmane.org>
2009-05-05 4:05 ` Ming Lei
2009-06-05 17:55 ` David VomLehn
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).