lkml.org 
[lkml]   [2007]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/6] firewire: SBP-2 highlevel driver
Christoph Hellwig wrote:
>> >> + sd->scsi_host->hostdata[0] = (unsigned long)unit;
...
> scsi_host_alloc
> is designed to allocate space for your private data aswell. So you
> should call it early on an allocate the sbp2_device as part of the Scsi_Host
> instead of just stuffing in a pointer.

Aha, OK.

As long as we have 1 SBP-2 target LU == 1 instance of struct Scsi_Host,
the usage of ->hostdata as backpointer to an fw_unit is appropriate
though. The lifetime of the fw_unit starts before and ends after that
of the Scsi_Host. Of course if we reorganize this to use Scsi_Host more
as a representation of an SBP-2 initiator port (or for all our initiator
ports at once), some oddities like this ->hostdata usage will go away.

>> > The discovery of LUs of SBP-2 targets happens on the IEEE 1212
>> > level of things.
[...]
> Okay, so sbp2 decided to be non-standard here, what a pity.

Well, SBP-2 (the spec) is from the earlier days when the SCSI
Architecture Model was young and there didn't exist that many other SCSI
transports/interconnects besides SCSI Parallel Interconnect. And for
better or worse, SBP-3 inherited this part of SBP-2's specialties.

> It's probably better to use scsi_scan_target with a specific lun,
> though as scsi_add_device is a rather awkward API.

Looking into these things were on my long-term agenda for mainline's
sbp2 driver anyway. My plans just got dragged out when I expanded my
activities from ieee1394/sbp2 to ieee1394/. As far as fw-sbp2 is
concerned, I don't know if these issues (which it merely took over from
sbp2) need to be addressed before integration into mainline. fw-sbp2 is
something in the middle between a new submission and a gradual update.

Do you see the TODOs related to integration with the SCSI stack (which
apply to sbp2 as well) as blocking for fw-sbp2?

Thanks for looking into it and for all the advice,
--
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-05-04 13:25    [W:0.208 / U:0.492 seconds]
©2003-2014 Jasper Spaans. Advertise on this site