From: Christoph Hellwig <hch@lst.de>
To: "Adam J. Richter" <adam@freya.yggdrasil.com>
Cc: andmike@us.ibm.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] get rid of ->detect for upper layer drivers
Date: Thu, 7 Nov 2002 16:42:06 +0100 [thread overview]
Message-ID: <20021107164206.C9189@lst.de> (raw)
In-Reply-To: <200211071532.HAA21625@freya.yggdrasil.com>; from adam@freya.yggdrasil.com on Thu, Nov 07, 2002 at 07:32:08AM -0800
On Thu, Nov 07, 2002 at 07:32:08AM -0800, Adam J. Richter wrote:
> Michael Anderson wrote:
> >The removal of detect should eventually result in other reductions /
> >cleaner code (If the sg binding issue can be resolved cleanly).
>
> What makes you think that? You need a way to ask "is this
> driver interested in this device" and that's all that the code
> remaining in scsi_device_template.detect() does after you remove the
> side effects (i.e., the counter incrementing), and it does so about as
> simply as possible.
"Is this driver interested" is a fundamentally racy concept. We want to
only support "attach if you're interested". That's like the other
driver infrastructure works, too.
> I haven't looked at it closely, but there seems to be
> workaround in the generic device code for its inability to bind more
> than one driver to a device: struct device_interface, which seems to
> duplicate much of the generic driver interface but lacks
> device->driver_data, which we could compensate for by adding
> a field in struct scsi_device:
>
> struct scsi_device {
> ...
> struct sg_device *sg_dev; /* For use by SCSI generic only. */
> };
Yupp, that's the way I'd prefer. In addition get rid of the whole
driver template for sg.
next parent reply other threads:[~2002-11-07 15:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200211071532.HAA21625@freya.yggdrasil.com>
2002-11-07 15:42 ` Christoph Hellwig [this message]
2002-11-07 16:27 ` [PATCH] get rid of ->detect for upper layer drivers Mike Anderson
2002-11-07 18:42 Adam J. Richter
2002-11-07 19:02 ` J.E.J. Bottomley
-- strict thread matches above, loose matches on Subject: below --
2002-11-07 18:30 Adam J. Richter
2002-11-07 17:47 Adam J. Richter
2002-11-07 18:08 ` J.E.J. Bottomley
2002-11-07 18:56 ` Mike Anderson
2002-11-07 16:22 Adam J. Richter
2002-11-07 16:16 Adam J. Richter
2002-11-07 12:25 Adam J. Richter
2002-11-07 14:25 ` Mike Anderson
2002-11-07 15:39 ` Christoph Hellwig
2002-11-07 15:50 ` J.E.J. Bottomley
2002-11-07 15:53 ` Christoph Hellwig
2002-11-07 19:44 ` Patrick Mansfield
2002-11-07 15:36 ` Christoph Hellwig
2002-11-07 2:49 Christoph Hellwig
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=20021107164206.C9189@lst.de \
--to=hch@lst.de \
--cc=adam@freya.yggdrasil.com \
--cc=andmike@us.ibm.com \
--cc=linux-scsi@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.