Re: 1394 sbp-2 target mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/02/2012 21:36, Andy Grover wrote:
On 02/02/2012 02:26 AM, Chris Boot wrote:
I've dusted off my code a bit and compile-tested it (only) so far. I
thought I'd push what I have into github so you can take an early look
while I start setting up my testing rig again.

The code as it is now is at:
git://github.com/bootc/Linux-SBP-2-Target.git
https://github.com/bootc/Linux-SBP-2-Target

I know my locking leaves something to be desired and I'm sure I'm using
atomics wrong, and I'm sure you'll tell me a lot more is wrong too! :-)
But I'd like to hear all of your comments.

PS: if you try to actually use it, you have to blacklist the
firewire-sbp2 module or bad things will happen as it tries to connect to
the target on the local node.

Hi Chris,

Thanks, checking it out. I'm not familiar with fw tech&  driver APIs so
trying to wrap my head around it in comparison with other fabric modules.

Does just registering the management agent cause firewire-sbp2 start
poking us? What is it keying off?

What would you say is the next missing piece, then? I'm looking at the
Configuration ROM section in the sbp-2 spec and hoping we don't have to
do all that from scratch :)

Regards -- Andy

Andy,

The config ROM is available to all nodes in a firewire network, and for SBP-2/3 this describes the address of the Management Agent and what LUNs are available to be logged-into. I've got this bit sorted and the code for this is in sbp_configfs.c:sbp_update_unit_directory().

The Management Agent takes requests from the initiator to log into a target LUN. When a LUN is logged-in the target tells the initiator where it can find the Target Agent. I have login/logout/reconnect more-or-less done for the Management Agent - this is in sbp_management_agent.c and sbp_login.c.

The initiator then sends SCSI commands to the target agent. I have the basics of the target agent in place. I stopped at the point I actually receive a Command Block ORB containing SCSI commands, as I had no clue how to easily submit those to the target core. Most of this is in sbp_target_agent.c and the beginnings of handling SCSI commands is in sbp_scsi_cmnd.c.

Reading the USB gadget code I have a bit more of an idea now so should be able to get rudimentary handling of commands done tomorrow I hope now I have my test rig resurrected.

Basically, you can create a target, create SBP-2/3 units within it and add LUNs to it. Inititators can see those and login to them, but then stall (and time out) when it comes to actually sending SCSI commands to it.

Cheers,
Chris

--
Chris Boot
bootc@xxxxxxxxx
Tel: 01271 414100
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux