[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4582E92C.7030004@s5r6.in-berlin.de>
Date: Fri, 15 Dec 2006 19:27:56 +0100
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Kristian Høgsberg <krh@...hat.com>
CC: Jeff Garzik <jeff@...zik.org>, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org
Subject: Re: [PATCH 3/3] Import fw-sbp2 driver.
(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/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists