mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: "Kristian Høgsberg" <krh@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/3] Import fw-sbp2 driver.
Date: Fri, 15 Dec 2006 19:27:56 +0100	[thread overview]
Message-ID: <4582E92C.7030004@s5r6.in-berlin.de> (raw)
In-Reply-To: <4582BA68.1010303@redhat.com>

(added Cc: lsml)

Kristian Høgsberg wrote at lkml:
> I saw that the stack
[the FireWire stack]
> creates a struct device per LUN, which is kinda gross in my opinion.

If you mean regular "unit directories" here, not SCSI LUs, then one
device per unit makes sense. Different units of a node may implement
different protocols and may have different lifetimes.

If you mean the special representation of SBP-2 logical units by
multiple leaf entries in one and the same unit directory (Why the heck
did they allow two different representations?), then you are right that
the burden could certainly be shifted from the FireWire core to the
SBP-2 protocol driver, WRT ROM scanning and generic device representation.

> It's easy enough to discover the LUNs from the rom, I just need to
> figure out how to tell the SCSI stack about multiple LUNs.

Since REPORT LUNS is not guaranteed to work with SBP-2 targets, we stick
to scsi_add_device(). With some effort we could supply scsi_add_device()
with common instances of Scsi_Host and target for units which reside on
the same target. Alas the scsi_add_device() API has a concept of target
which is quite unfit for most SCSI transports other than SPI. We have
got the following alternatives:
 - Implement a mapping of SAM targets to scsi_add_device targets in
   sbp2. Effectively, map from pointer or EUI-64 to uint. <linux/idr.h>
   has an infrastructure for such a mapping.
   (This is not the Linux way of doing things, but wicked people may be
   tempted to call it 'the Linux SCSI way so far'.)
 - Reform the scsi_add_device API to support SAM targets.
 - Leave stuff as is, concentrate on fixing the FireWire stack's issues
   first.
If you look closely, you see the order of list items reflecting my
personal preference. :-)

Of course, as mentioned before, a precondition to represent multiple LUs
beneath a single representation of a target is to convert sbp2 to
instantiante only one Scsi_Host for many or all SBP-2 units.
-- 
Stefan Richter
-=====-=-==- ==-- -====
http://arcgraph.de/sr/

  reply	other threads:[~2006-12-15 18:27 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05  5:22 [PATCH 0/3] New firewire stack Kristian Høgsberg
2006-12-05  5:22 ` [PATCH 2/3] Import fw-ohci driver Kristian Høgsberg
2006-12-05  5:54   ` Pete Zaitcev
2006-12-05  5:58   ` Jeff Garzik
2006-12-05  6:09     ` Benjamin Herrenschmidt
2006-12-09  2:08     ` Kristian Høgsberg
2006-12-09  7:31       ` Stefan Richter
2006-12-10 21:47         ` Kristian Høgsberg
2006-12-10 22:59           ` Stefan Richter
2006-12-10 23:00             ` alignment and packing of struct types (was Re: [PATCH 2/3] Import fw-ohci driver.) Stefan Richter
2006-12-05  5:22 ` [PATCH 3/3] Import fw-sbp2 driver Kristian Høgsberg
2006-12-05  6:07   ` Jeff Garzik
2006-12-05 18:18     ` Stefan Richter
2006-12-14 20:48     ` Kristian Høgsberg
2006-12-14 21:40       ` Stefan Richter
2006-12-15 15:08         ` Kristian Høgsberg
2006-12-15 18:27           ` Stefan Richter [this message]
2006-12-05  5:42 ` [PATCH 0/3] New firewire stack Benjamin Herrenschmidt
2006-12-05  6:20   ` Kristian Høgsberg
2006-12-05 16:28     ` Ray Lee
2006-12-05 23:24       ` Kristian Høgsberg
2006-12-05  7:05   ` David Miller
2006-12-05 16:42     ` Kristian Høgsberg
2006-12-05 18:49       ` Stefan Richter
2006-12-05 21:41         ` Benjamin Herrenschmidt
2006-12-05 23:15           ` Stefan Richter
2006-12-05  8:46 ` Marcel Holtmann
2006-12-05 15:13   ` Kristian Høgsberg
2006-12-05 15:30     ` Marcel Holtmann
2006-12-06 16:21       ` Geert Uytterhoeven
2006-12-06 16:32         ` Stefan Richter
2006-12-05 16:05     ` Erik Mouw
2006-07-12 14:56       ` Pavel Machek
2006-12-08 15:09         ` Stefan Richter
2006-12-09 19:44           ` Kristian Høgsberg
2006-12-10 12:57             ` Stefan Richter
2006-12-10 22:17               ` Kristian Høgsberg
2006-12-10 23:21                 ` Stefan Richter
2006-12-09 21:51           ` Benjamin Herrenschmidt
2006-12-09 22:51             ` Stefan Richter
2006-12-05 16:53       ` Marcel Holtmann
2006-12-05 23:27         ` Kristian Høgsberg
2006-12-05 18:49 ` Alexey Dobriyan
2006-12-05 19:53   ` Stefan Richter
2006-12-05 23:21   ` Kristian Høgsberg
2006-12-06  5:35     ` Ben Collins
2006-12-06  8:56       ` Stefan Richter
2006-12-06 11:40         ` Alexander Neundorf
2006-12-06 12:38           ` Stefan Richter
2006-12-06 21:21             ` Kristian Høgsberg
2006-12-06 14:49         ` Ben Collins
2006-12-07  0:31           ` Kristian Høgsberg
2006-12-06  8:36     ` Stefan Richter
2006-12-06 22:27       ` Kristian Høgsberg
2006-12-06 23:55         ` Stefan Richter
2006-12-05 23:23 ` Olaf Hering

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=4582E92C.7030004@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=jeff@garzik.org \
    --cc=krh@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®