public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Some question about usb scsi storage driver
@ 2014-07-04 14:44 loody
       [not found] ` <CANudz+sXH55BJDWf3zy18ERixQWDnqtfv7GHmHPsqqJG9EGyxg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: loody @ 2014-07-04 14:44 UTC (permalink / raw)
  To: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	SCSI development list

hi all:
when I trace kernel driver source about usb scsi storage driver, I
have below 2 questions:
1. in sd.c -> static int sd_probe(struct device *dev)
    we use below macro to get scsi_device.
           struct scsi_device *sdp = to_scsi_device(dev);

    take usb for example, is usb storage driver allocate memory for
scsi_device then calling sd_probe?
    I am looking for usb_stor_probe1 and usb_stor_probe2 but not find
where it is.

2. at the end of sd.c -> sd_probe, why we call async_schedule_domain like below
      async_schedule_domain(sd_probe_async, sdkp, &scsi_sd_probe_domain);
    to finish scsi device initialization?
    Couldn't we put what sd_probe_async directly in sd_probe?
    is there any benefit to do so?

-- 
Regards,
--
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] 3+ messages in thread

end of thread, other threads:[~2014-07-04 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-04 14:44 Some question about usb scsi storage driver loody
     [not found] ` <CANudz+sXH55BJDWf3zy18ERixQWDnqtfv7GHmHPsqqJG9EGyxg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-04 15:47   ` Maurizio Lombardi
2014-07-04 16:35   ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox