linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
@ 2009-04-14 16:16 Vladislav Bolkhovitin
  2009-04-14 18:14 ` Jeff Garzik
  2009-06-05 18:10 ` Foster_Brian
  0 siblings, 2 replies; 13+ messages in thread
From: Vladislav Bolkhovitin @ 2009-04-14 16:16 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel, scst-devel, Andy Yan, James Bottomley

Hi All,

I'm glad to announce that a target driver for Marvell 88SE64xx(3G) and 
88SE94xx(6G) SAS cards has been just added in the SCST SVN repository. A 
lot of thanks to Marvell and Andy Yan!

This driver allows to use a SAS controller based on Marvell 88SE64xx or 
88SE94xx chips as a SAN storage server (target). More info you can find 
on the SCST page http://scst.sourceforge.net.

You can download the driver from SCST SVN by running a command:

$ svn co https://scst.svn.sourceforge.net/svnroot/scst

Vlad

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-04-14 16:16 [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards Vladislav Bolkhovitin
@ 2009-04-14 18:14 ` Jeff Garzik
  2009-06-05 18:10 ` Foster_Brian
  1 sibling, 0 replies; 13+ messages in thread
From: Jeff Garzik @ 2009-04-14 18:14 UTC (permalink / raw)
  To: Vladislav Bolkhovitin
  Cc: linux-scsi, linux-kernel, scst-devel, Andy Yan, James Bottomley

Vladislav Bolkhovitin wrote:
> Hi All,
> 
> I'm glad to announce that a target driver for Marvell 88SE64xx(3G) and 
> 88SE94xx(6G) SAS cards has been just added in the SCST SVN repository. A 
> lot of thanks to Marvell and Andy Yan!
> 
> This driver allows to use a SAS controller based on Marvell 88SE64xx or 
> 88SE94xx chips as a SAN storage server (target). More info you can find 
> on the SCST page http://scst.sourceforge.net.
> 
> You can download the driver from SCST SVN by running a command:
> 
> $ svn co https://scst.svn.sourceforge.net/svnroot/scst

Nice!

I'm glad to see this progressing.  I'm amazed that some of my original 
mvsas code still remains :)

I'll give this a shot on my 6440.

	Jeff




^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-04-14 16:16 [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards Vladislav Bolkhovitin
  2009-04-14 18:14 ` Jeff Garzik
@ 2009-06-05 18:10 ` Foster_Brian
  2009-06-07  4:16   ` Andy Yan
  2009-06-08 15:30   ` Vladislav Bolkhovitin
  1 sibling, 2 replies; 13+ messages in thread
From: Foster_Brian @ 2009-06-05 18:10 UTC (permalink / raw)
  To: vst, linux-scsi; +Cc: scst-devel, ayan, James.Bottomley

> Hi All,
> 
> I'm glad to announce that a target driver for Marvell 88SE64xx(3G) and
> 88SE94xx(6G) SAS cards has been just added in the SCST SVN repository.
A
> lot of thanks to Marvell and Andy Yan!
> 
> This driver allows to use a SAS controller based on Marvell 88SE64xx
or
> 88SE94xx chips as a SAN storage server (target). More info you can
find
> on the SCST page http://scst.sourceforge.net.
> 
> You can download the driver from SCST SVN by running a command:
> 
> $ svn co https://scst.svn.sourceforge.net/svnroot/scst
> 

Hi Vlad/Andy,

Is this target driver expected to work with 6320 cards as well? Using
this driver, I was able to discover a SATA drive connected to the 6320
in initiator mode. 

I connected the 6320 directly to a second 6320 on another machine, set
up a virtual LUN with SCST (added to the default group, etc.) and
enabled target mode, but I'm not seeing anything on the initiator side. 

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-05 18:10 ` Foster_Brian
@ 2009-06-07  4:16   ` Andy Yan
  2009-06-08 15:30   ` Vladislav Bolkhovitin
  1 sibling, 0 replies; 13+ messages in thread
From: Andy Yan @ 2009-06-07  4:16 UTC (permalink / raw)
  To: Foster_Brian@emc.com, vst@vlnb.net, linux-scsi@vger.kernel.org
  Cc: scst-devel@lists.sourceforge.net,
	James.Bottomley@HansenPartnership.com

Brian,
	This driver can work with 6320, and I will add a README for this target driver with next updates for code, I think you will find the cause you can't detect the LUN.

Regards
Andy Yan

-----Original Message-----
From: Foster_Brian@emc.com [mailto:Foster_Brian@emc.com] 
Sent: 2009年6月6日 2:10
To: vst@vlnb.net; linux-scsi@vger.kernel.org
Cc: scst-devel@lists.sourceforge.net; Andy Yan; James.Bottomley@HansenPartnership.com
Subject: RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards

> Hi All,
> 
> I'm glad to announce that a target driver for Marvell 88SE64xx(3G) and
> 88SE94xx(6G) SAS cards has been just added in the SCST SVN repository.
A
> lot of thanks to Marvell and Andy Yan!
> 
> This driver allows to use a SAS controller based on Marvell 88SE64xx
or
> 88SE94xx chips as a SAN storage server (target). More info you can
find
> on the SCST page http://scst.sourceforge.net.
> 
> You can download the driver from SCST SVN by running a command:
> 
> $ svn co https://scst.svn.sourceforge.net/svnroot/scst
> 

Hi Vlad/Andy,

Is this target driver expected to work with 6320 cards as well? Using
this driver, I was able to discover a SATA drive connected to the 6320
in initiator mode. 

I connected the 6320 directly to a second 6320 on another machine, set
up a virtual LUN with SCST (added to the default group, etc.) and
enabled target mode, but I'm not seeing anything on the initiator side. 

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-05 18:10 ` Foster_Brian
  2009-06-07  4:16   ` Andy Yan
@ 2009-06-08 15:30   ` Vladislav Bolkhovitin
  2009-06-08 18:14     ` Foster_Brian
  1 sibling, 1 reply; 13+ messages in thread
From: Vladislav Bolkhovitin @ 2009-06-08 15:30 UTC (permalink / raw)
  To: Foster_Brian; +Cc: linux-scsi, scst-devel, ayan, James.Bottomley

Hi Brian,

Foster_Brian@emc.com, on 06/05/2009 10:10 PM wrote:
>> Hi All,
>>
>> I'm glad to announce that a target driver for Marvell 88SE64xx(3G) and
>> 88SE94xx(6G) SAS cards has been just added in the SCST SVN repository.
> A
>> lot of thanks to Marvell and Andy Yan!
>>
>> This driver allows to use a SAS controller based on Marvell 88SE64xx
> or
>> 88SE94xx chips as a SAN storage server (target). More info you can
> find
>> on the SCST page http://scst.sourceforge.net.
>>
>> You can download the driver from SCST SVN by running a command:
>>
>> $ svn co https://scst.svn.sourceforge.net/svnroot/scst
>>
> 
> Hi Vlad/Andy,
> 
> Is this target driver expected to work with 6320 cards as well? Using
> this driver, I was able to discover a SATA drive connected to the 6320
> in initiator mode. 
> 
> I connected the 6320 directly to a second 6320 on another machine, set
> up a virtual LUN with SCST (added to the default group, etc.) and
> enabled target mode, but I'm not seeing anything on the initiator side. 

Double check you don't have in the kernel log messages like "tgt_dev for 
LUN X not found, command to unexisting LU?" (I assume you have SCST 
tracing enabled, it is by default so in the SVN trunk/). If you do, then 
you didn't setup the virtual LUN correctly.

Vlad

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-08 15:30   ` Vladislav Bolkhovitin
@ 2009-06-08 18:14     ` Foster_Brian
  2009-06-09  1:27       ` Andy Yan
  0 siblings, 1 reply; 13+ messages in thread
From: Foster_Brian @ 2009-06-08 18:14 UTC (permalink / raw)
  To: vst; +Cc: linux-scsi, scst-devel, ayan, James.Bottomley



> Foster_Brian@emc.com, on 06/05/2009 10:10 PM wrote:
> >> Hi All,
> >>
> >> I'm glad to announce that a target driver for Marvell 88SE64xx(3G)
and
> >> 88SE94xx(6G) SAS cards has been just added in the SCST SVN
repository.
> > A
> >> lot of thanks to Marvell and Andy Yan!
> >>
> >> This driver allows to use a SAS controller based on Marvell
88SE64xx
> > or
> >> 88SE94xx chips as a SAN storage server (target). More info you can
> > find
> >> on the SCST page http://scst.sourceforge.net.
> >>
> >> You can download the driver from SCST SVN by running a command:
> >>
> >> $ svn co https://scst.svn.sourceforge.net/svnroot/scst
> >>
> >
> > Hi Vlad/Andy,
> >
> > Is this target driver expected to work with 6320 cards as well?
Using
> > this driver, I was able to discover a SATA drive connected to the
6320
> > in initiator mode.
> >
> > I connected the 6320 directly to a second 6320 on another machine,
set
> > up a virtual LUN with SCST (added to the default group, etc.) and
> > enabled target mode, but I'm not seeing anything on the initiator
side.
> 
> Double check you don't have in the kernel log messages like "tgt_dev
for
> LUN X not found, command to unexisting LU?" (I assume you have SCST
> tracing enabled, it is by default so in the SVN trunk/). If you do,
then
> you didn't setup the virtual LUN correctly.
> 
> Vlad

Thanks Vlad. I think my SCST configuration is Ok. I did experiment
previously with the iSCSI target and the scst_local driver, and both
worked fine.

Andy,

Thanks for the README. I followed the steps in the file and see the same
result. The following shows the commands I'm using and the associated
output. 

On the target side, I load the SCST/mvsas drivers and enable target
mode. This looks like it works, but my 'target_mode' file is slightly
different from what is shown in the README:

root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
phy  dev sas address     attach dev type   attach sas address  target
mode
0    5005043011ab0000                      0                   0
1    5005043011ab0000                      0                   0
2    5005043011ab0000                      0                   0
3    5005043011ab0000                      0                   0

root@ix12-1:/sys/class/scsi_host/host17# echo "enable 1" > target_mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
898:get enable
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
853:Enable phy1
Jun  8 09:53:20 ix12-1 kernel: scst: Target mvst_scst (db0f2cc0) for
template mvst_scst registered successfully
Jun  8 09:53:20 ix12-1 kernel: [3054]: mvst_register_tgt_handler:Enable
lun for host 0(0,db140000)
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2290:initiator attaching 0000000000000000,map 2 on port[1]
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 0 to target mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 1 to target mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 2 to target mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 3 to target mode
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[0] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[1] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[2] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[3] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2301:Enable target mode......

root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
phy  dev sas address     attach dev type   attach sas address  target
mode
0    5005043011ab0000                      0                   1
1    5005043011ab0000                      0                   1
2    5005043011ab0000                      0                   1
3    5005043011ab0000                      0                   1

Next, I create the virtual LUN and add it to the default group as LUN 0:

root@ix12-1:/proc/scsi_tgt/vdisk# echo "open test
/mnt/soho_storage/disk" > vdisk
Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Registering virtual FILEIO
device test
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4791
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4792
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4793
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4794
Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Attached SCSI target virtual
disk test (file="/mnt/soho_storage/disk", fs=1000MB, bs=512,
nblocks=2048000, cyln=1000)
Jun  8 09:54:27 ix12-1 kernel: scst: Attached SCSI target mid-level to
virtual device test (id 1)
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4795

root@ix12-1:/proc/scsi_tgt# echo "add test" > groups/Default/devices
Jun  8 09:55:19 ix12-1 kernel: scst: Added device test to group Default
(LUN 0, rd_only 0)

... and finally, I load the mvsas driver on the initiator side:

root@ix12-2:/# modprobe mvsas
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi0, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi1, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi2, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi5, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi6, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi7, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi8, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi9, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi10, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi12, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi13, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi14, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi15, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Processing thread started, PID 9166
Jun  8 21:56:04 ix12-2 kernel: scst: Init thread started, PID 9167
Jun  8 21:56:04 ix12-2 kernel: scst: Task management thread started, PID
9168
Jun  8 21:56:04 ix12-2 kernel: scst: SCST version 1.0.1 loaded
successfully (max mem for commands 221MB, per device 88MB)
Jun  8 21:56:04 ix12-2 kernel: scst: Enabled features: TRACING
Jun  8 21:56:04 ix12-2 kernel: scst: Management thread started, PID 9169
Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: driver version
0.8.3
Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: PCI INT A ->
Link[LNKA] -> GSI 5 (level, low) -> IRQ 5
Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: setting latency timer
to 64
Jun  8 21:56:05 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
491:Init flash rom ok,flash type is 0x101.
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 0 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 1 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 2 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 3 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: PCI-E x1,
Bandwidth Usage: 2.5 Gbps
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 0 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 0 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 1 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 1 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 2 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 2 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 3 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 3 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: scsi17 : mvsas
Jun  8 21:56:08 ix12-2 kernel: scst: Target template mvst_scst
registered successfully

At this point I would have expected a new SCSI disk to appear for the
virtual LUN, any thoughts? Thanks.

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-08 18:14     ` Foster_Brian
@ 2009-06-09  1:27       ` Andy Yan
  2009-06-09 13:03         ` Foster_Brian
  2009-06-10 18:40         ` Vladislav Bolkhovitin
  0 siblings, 2 replies; 13+ messages in thread
From: Andy Yan @ 2009-06-09  1:27 UTC (permalink / raw)
  To: Foster_Brian@emc.com, vst@vlnb.net
  Cc: linux-scsi@vger.kernel.org, scst-devel@lists.sourceforge.net,
	James.Bottomley@HansenPartnership.com

Brian,
	Please set unique SAS address for each SAS port of target controller, and make sure you do correct connection, you can get the SAS address of attaching device from "attach sas address ".Then enable target mode and add target LUN.

Regards
Andy Yan

-----Original Message-----
From: Foster_Brian@emc.com [mailto:Foster_Brian@emc.com] 
Sent: 2009年6月9日 2:14
To: vst@vlnb.net
Cc: linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; Andy Yan; James.Bottomley@HansenPartnership.com
Subject: RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards



> Foster_Brian@emc.com, on 06/05/2009 10:10 PM wrote:
> >> Hi All,
> >>
> >> I'm glad to announce that a target driver for Marvell 88SE64xx(3G)
and
> >> 88SE94xx(6G) SAS cards has been just added in the SCST SVN
repository.
> > A
> >> lot of thanks to Marvell and Andy Yan!
> >>
> >> This driver allows to use a SAS controller based on Marvell
88SE64xx
> > or
> >> 88SE94xx chips as a SAN storage server (target). More info you can
> > find
> >> on the SCST page http://scst.sourceforge.net.
> >>
> >> You can download the driver from SCST SVN by running a command:
> >>
> >> $ svn co https://scst.svn.sourceforge.net/svnroot/scst
> >>
> >
> > Hi Vlad/Andy,
> >
> > Is this target driver expected to work with 6320 cards as well?
Using
> > this driver, I was able to discover a SATA drive connected to the
6320
> > in initiator mode.
> >
> > I connected the 6320 directly to a second 6320 on another machine,
set
> > up a virtual LUN with SCST (added to the default group, etc.) and
> > enabled target mode, but I'm not seeing anything on the initiator
side.
> 
> Double check you don't have in the kernel log messages like "tgt_dev
for
> LUN X not found, command to unexisting LU?" (I assume you have SCST
> tracing enabled, it is by default so in the SVN trunk/). If you do,
then
> you didn't setup the virtual LUN correctly.
> 
> Vlad

Thanks Vlad. I think my SCST configuration is Ok. I did experiment
previously with the iSCSI target and the scst_local driver, and both
worked fine.

Andy,

Thanks for the README. I followed the steps in the file and see the same
result. The following shows the commands I'm using and the associated
output. 

On the target side, I load the SCST/mvsas drivers and enable target
mode. This looks like it works, but my 'target_mode' file is slightly
different from what is shown in the README:

root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
phy  dev sas address     attach dev type   attach sas address  target
mode
0    5005043011ab0000                      0                   0
1    5005043011ab0000                      0                   0
2    5005043011ab0000                      0                   0
3    5005043011ab0000                      0                   0

root@ix12-1:/sys/class/scsi_host/host17# echo "enable 1" > target_mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
898:get enable
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
853:Enable phy1
Jun  8 09:53:20 ix12-1 kernel: scst: Target mvst_scst (db0f2cc0) for
template mvst_scst registered successfully
Jun  8 09:53:20 ix12-1 kernel: [3054]: mvst_register_tgt_handler:Enable
lun for host 0(0,db140000)
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2290:initiator attaching 0000000000000000,map 2 on port[1]
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 0 to target mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 1 to target mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 2 to target mode
Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2199:set phy 3 to target mode
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[0] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[1] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[2] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
1779:Reset phy[3] to notify iniator
Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
2301:Enable target mode......

root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
phy  dev sas address     attach dev type   attach sas address  target
mode
0    5005043011ab0000                      0                   1
1    5005043011ab0000                      0                   1
2    5005043011ab0000                      0                   1
3    5005043011ab0000                      0                   1

Next, I create the virtual LUN and add it to the default group as LUN 0:

root@ix12-1:/proc/scsi_tgt/vdisk# echo "open test
/mnt/soho_storage/disk" > vdisk
Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Registering virtual FILEIO
device test
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4791
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4792
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4793
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4794
Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Attached SCSI target virtual
disk test (file="/mnt/soho_storage/disk", fs=1000MB, bs=512,
nblocks=2048000, cyln=1000)
Jun  8 09:54:27 ix12-1 kernel: scst: Attached SCSI target mid-level to
virtual device test (id 1)
Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4795

root@ix12-1:/proc/scsi_tgt# echo "add test" > groups/Default/devices
Jun  8 09:55:19 ix12-1 kernel: scst: Added device test to group Default
(LUN 0, rd_only 0)

... and finally, I load the mvsas driver on the initiator side:

root@ix12-2:/# modprobe mvsas
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi0, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi1, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi2, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi5, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi6, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi7, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi8, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi9, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi10, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi12, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi13, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi14, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
scsi15, channel 0, id 0, lun 0, type 0
Jun  8 21:56:04 ix12-2 kernel: scst: Processing thread started, PID 9166
Jun  8 21:56:04 ix12-2 kernel: scst: Init thread started, PID 9167
Jun  8 21:56:04 ix12-2 kernel: scst: Task management thread started, PID
9168
Jun  8 21:56:04 ix12-2 kernel: scst: SCST version 1.0.1 loaded
successfully (max mem for commands 221MB, per device 88MB)
Jun  8 21:56:04 ix12-2 kernel: scst: Enabled features: TRACING
Jun  8 21:56:04 ix12-2 kernel: scst: Management thread started, PID 9169
Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: driver version
0.8.3
Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: PCI INT A ->
Link[LNKA] -> GSI 5 (level, low) -> IRQ 5
Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: setting latency timer
to 64
Jun  8 21:56:05 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
491:Init flash rom ok,flash type is 0x101.
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 0 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 1 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 2 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
527:Phy 3 SAS ADDRESS 5005043011ab0000
Jun  8 21:56:06 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: PCI-E x1,
Bandwidth Usage: 2.5 Gbps
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 0 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 0 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 1 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 1 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 2 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 2 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1246:port 3 attach dev info is 0
Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
1248:port 3 attach sas addr is 0
Jun  8 21:56:08 ix12-2 kernel: scsi17 : mvsas
Jun  8 21:56:08 ix12-2 kernel: scst: Target template mvst_scst
registered successfully

At this point I would have expected a new SCSI disk to appear for the
virtual LUN, any thoughts? Thanks.

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-09  1:27       ` Andy Yan
@ 2009-06-09 13:03         ` Foster_Brian
  2009-06-10  0:17           ` Andy Yan
  2009-06-10 18:40         ` Vladislav Bolkhovitin
  1 sibling, 1 reply; 13+ messages in thread
From: Foster_Brian @ 2009-06-09 13:03 UTC (permalink / raw)
  To: ayan, vst; +Cc: linux-scsi, scst-devel, James.Bottomley

> Brian,
> 	Please set unique SAS address for each SAS port of target
> controller, and make sure you do correct connection, you can get the
SAS
> address of attaching device from "attach sas address ".Then enable
target
> mode and add target LUN.
> 
> Regards
> Andy Yan
> 

Not quite sure I follow... Is this value read from HW at init time? Do
we have an interface available where I can explicitly set a SAS address
for the port? Thanks.

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-09 13:03         ` Foster_Brian
@ 2009-06-10  0:17           ` Andy Yan
  0 siblings, 0 replies; 13+ messages in thread
From: Andy Yan @ 2009-06-10  0:17 UTC (permalink / raw)
  To: Foster_Brian@emc.com, vst@vlnb.net
  Cc: linux-scsi@vger.kernel.org, scst-devel@lists.sourceforge.net,
	James.Bottomley@HansenPartnership.com

Brian,
	You should get a tool for HBA parameter configuration, or you can directly change the code of setting SAS address in last function of mv_spi.c.

Regards
Andy Yan

-----Original Message-----
From: Foster_Brian@emc.com [mailto:Foster_Brian@emc.com] 
Sent: 2009年6月9日 21:03
To: Andy Yan; vst@vlnb.net
Cc: linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; James.Bottomley@HansenPartnership.com
Subject: RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards

> Brian,
> 	Please set unique SAS address for each SAS port of target
> controller, and make sure you do correct connection, you can get the
SAS
> address of attaching device from "attach sas address ".Then enable
target
> mode and add target LUN.
> 
> Regards
> Andy Yan
> 

Not quite sure I follow... Is this value read from HW at init time? Do
we have an interface available where I can explicitly set a SAS address
for the port? Thanks.

Brian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-09  1:27       ` Andy Yan
  2009-06-09 13:03         ` Foster_Brian
@ 2009-06-10 18:40         ` Vladislav Bolkhovitin
  2009-06-11  1:11           ` Andy Yan
  1 sibling, 1 reply; 13+ messages in thread
From: Vladislav Bolkhovitin @ 2009-06-10 18:40 UTC (permalink / raw)
  To: Andy Yan
  Cc: Foster_Brian@emc.com, linux-scsi@vger.kernel.org,
	scst-devel@lists.sourceforge.net,
	James.Bottomley@HansenPartnership.com

Andy Yan, on 06/09/2009 05:27 AM wrote:
> Brian,
> Please set unique SAS address for each SAS port of target controller,
> and make sure you do correct connection, you can get the SAS address of
> attaching device from "attach sas address ".Then enable target mode and
> add target LUN.

Do you mean "add target LUN and then enable target mode"? Otherwise an 
initiator can connect while there are no LUNs configured on the target 
and confused by it.

> Regards
> Andy Yan
> 
> -----Original Message-----
> From: Foster_Brian@emc.com [mailto:Foster_Brian@emc.com] 
> Sent: 2009年6月9日 2:14
> To: vst@vlnb.net
> Cc: linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; Andy Yan; James.Bottomley@HansenPartnership.com
> Subject: RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
> 
> 
> 
>> Foster_Brian@emc.com, on 06/05/2009 10:10 PM wrote:
>>>> Hi All,
>>>>
>>>> I'm glad to announce that a target driver for Marvell 88SE64xx(3G)
> and
>>>> 88SE94xx(6G) SAS cards has been just added in the SCST SVN
> repository.
>>> A
>>>> lot of thanks to Marvell and Andy Yan!
>>>>
>>>> This driver allows to use a SAS controller based on Marvell
> 88SE64xx
>>> or
>>>> 88SE94xx chips as a SAN storage server (target). More info you can
>>> find
>>>> on the SCST page http://scst.sourceforge.net.
>>>>
>>>> You can download the driver from SCST SVN by running a command:
>>>>
>>>> $ svn co https://scst.svn.sourceforge.net/svnroot/scst
>>>>
>>> Hi Vlad/Andy,
>>>
>>> Is this target driver expected to work with 6320 cards as well?
> Using
>>> this driver, I was able to discover a SATA drive connected to the
> 6320
>>> in initiator mode.
>>>
>>> I connected the 6320 directly to a second 6320 on another machine,
> set
>>> up a virtual LUN with SCST (added to the default group, etc.) and
>>> enabled target mode, but I'm not seeing anything on the initiator
> side.
>> Double check you don't have in the kernel log messages like "tgt_dev
> for
>> LUN X not found, command to unexisting LU?" (I assume you have SCST
>> tracing enabled, it is by default so in the SVN trunk/). If you do,
> then
>> you didn't setup the virtual LUN correctly.
>>
>> Vlad
> 
> Thanks Vlad. I think my SCST configuration is Ok. I did experiment
> previously with the iSCSI target and the scst_local driver, and both
> worked fine.
> 
> Andy,
> 
> Thanks for the README. I followed the steps in the file and see the same
> result. The following shows the commands I'm using and the associated
> output. 
> 
> On the target side, I load the SCST/mvsas drivers and enable target
> mode. This looks like it works, but my 'target_mode' file is slightly
> different from what is shown in the README:
> 
> root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
> phy  dev sas address     attach dev type   attach sas address  target
> mode
> 0    5005043011ab0000                      0                   0
> 1    5005043011ab0000                      0                   0
> 2    5005043011ab0000                      0                   0
> 3    5005043011ab0000                      0                   0
> 
> root@ix12-1:/sys/class/scsi_host/host17# echo "enable 1" > target_mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
> 898:get enable
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
> 853:Enable phy1
> Jun  8 09:53:20 ix12-1 kernel: scst: Target mvst_scst (db0f2cc0) for
> template mvst_scst registered successfully
> Jun  8 09:53:20 ix12-1 kernel: [3054]: mvst_register_tgt_handler:Enable
> lun for host 0(0,db140000)
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2290:initiator attaching 0000000000000000,map 2 on port[1]
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 0 to target mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 1 to target mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 2 to target mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 3 to target mode
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[0] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[1] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[2] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[3] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2301:Enable target mode......
> 
> root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
> phy  dev sas address     attach dev type   attach sas address  target
> mode
> 0    5005043011ab0000                      0                   1
> 1    5005043011ab0000                      0                   1
> 2    5005043011ab0000                      0                   1
> 3    5005043011ab0000                      0                   1
> 
> Next, I create the virtual LUN and add it to the default group as LUN 0:
> 
> root@ix12-1:/proc/scsi_tgt/vdisk# echo "open test
> /mnt/soho_storage/disk" > vdisk
> Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Registering virtual FILEIO
> device test
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4791
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4792
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4793
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4794
> Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Attached SCSI target virtual
> disk test (file="/mnt/soho_storage/disk", fs=1000MB, bs=512,
> nblocks=2048000, cyln=1000)
> Jun  8 09:54:27 ix12-1 kernel: scst: Attached SCSI target mid-level to
> virtual device test (id 1)
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4795
> 
> root@ix12-1:/proc/scsi_tgt# echo "add test" > groups/Default/devices
> Jun  8 09:55:19 ix12-1 kernel: scst: Added device test to group Default
> (LUN 0, rd_only 0)
> 
> ... and finally, I load the mvsas driver on the initiator side:
> 
> root@ix12-2:/# modprobe mvsas
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi0, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi1, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi2, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi5, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi6, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi7, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi8, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi9, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi10, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi12, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi13, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi14, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi15, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Processing thread started, PID 9166
> Jun  8 21:56:04 ix12-2 kernel: scst: Init thread started, PID 9167
> Jun  8 21:56:04 ix12-2 kernel: scst: Task management thread started, PID
> 9168
> Jun  8 21:56:04 ix12-2 kernel: scst: SCST version 1.0.1 loaded
> successfully (max mem for commands 221MB, per device 88MB)
> Jun  8 21:56:04 ix12-2 kernel: scst: Enabled features: TRACING
> Jun  8 21:56:04 ix12-2 kernel: scst: Management thread started, PID 9169
> Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: driver version
> 0.8.3
> Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: PCI INT A ->
> Link[LNKA] -> GSI 5 (level, low) -> IRQ 5
> Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: setting latency timer
> to 64
> Jun  8 21:56:05 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 491:Init flash rom ok,flash type is 0x101.
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 0 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 1 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 2 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 3 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: PCI-E x1,
> Bandwidth Usage: 2.5 Gbps
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 0 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 0 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 1 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 1 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 2 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 2 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 3 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 3 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: scsi17 : mvsas
> Jun  8 21:56:08 ix12-2 kernel: scst: Target template mvst_scst
> registered successfully
> 
> At this point I would have expected a new SCSI disk to appear for the
> virtual LUN, any thoughts? Thanks.
> 
> Brian
> N嫥叉靣笡y氊b瞂千v豝�)藓{.n�+壏{北�"妠ay�\x1d蕠跈�,j\af"穐殝鄗�\x1e畐ア�\f⒎:+v墾妛鑚豰稛��\a珣赙zZ+凒殠娸"濟!tml=

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-10 18:40         ` Vladislav Bolkhovitin
@ 2009-06-11  1:11           ` Andy Yan
  2009-06-11  7:52             ` Vladislav Bolkhovitin
  0 siblings, 1 reply; 13+ messages in thread
From: Andy Yan @ 2009-06-11  1:11 UTC (permalink / raw)
  To: Vladislav Bolkhovitin
  Cc: Foster_Brian@emc.com, linux-scsi@vger.kernel.org,
	scst-devel@lists.sourceforge.net,
	James.Bottomley@HansenPartnership.com

No, enable target mode and then add LUN.

-----Original Message-----
From: Vladislav Bolkhovitin [mailto:vst@vlnb.net] 
Sent: 2009年6月11日 2:41
To: Andy Yan
Cc: Foster_Brian@emc.com; linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; James.Bottomley@HansenPartnership.com
Subject: Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards

Andy Yan, on 06/09/2009 05:27 AM wrote:
> Brian,
> Please set unique SAS address for each SAS port of target controller,
> and make sure you do correct connection, you can get the SAS address of
> attaching device from "attach sas address ".Then enable target mode and
> add target LUN.

Do you mean "add target LUN and then enable target mode"? Otherwise an 
initiator can connect while there are no LUNs configured on the target 
and confused by it.

> Regards
> Andy Yan
> 
> -----Original Message-----
> From: Foster_Brian@emc.com [mailto:Foster_Brian@emc.com] 
> Sent: 2009年6月9日 2:14
> To: vst@vlnb.net
> Cc: linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; Andy Yan; James.Bottomley@HansenPartnership.com
> Subject: RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
> 
> 
> 
>> Foster_Brian@emc.com, on 06/05/2009 10:10 PM wrote:
>>>> Hi All,
>>>>
>>>> I'm glad to announce that a target driver for Marvell 88SE64xx(3G)
> and
>>>> 88SE94xx(6G) SAS cards has been just added in the SCST SVN
> repository.
>>> A
>>>> lot of thanks to Marvell and Andy Yan!
>>>>
>>>> This driver allows to use a SAS controller based on Marvell
> 88SE64xx
>>> or
>>>> 88SE94xx chips as a SAN storage server (target). More info you can
>>> find
>>>> on the SCST page http://scst.sourceforge.net.
>>>>
>>>> You can download the driver from SCST SVN by running a command:
>>>>
>>>> $ svn co https://scst.svn.sourceforge.net/svnroot/scst
>>>>
>>> Hi Vlad/Andy,
>>>
>>> Is this target driver expected to work with 6320 cards as well?
> Using
>>> this driver, I was able to discover a SATA drive connected to the
> 6320
>>> in initiator mode.
>>>
>>> I connected the 6320 directly to a second 6320 on another machine,
> set
>>> up a virtual LUN with SCST (added to the default group, etc.) and
>>> enabled target mode, but I'm not seeing anything on the initiator
> side.
>> Double check you don't have in the kernel log messages like "tgt_dev
> for
>> LUN X not found, command to unexisting LU?" (I assume you have SCST
>> tracing enabled, it is by default so in the SVN trunk/). If you do,
> then
>> you didn't setup the virtual LUN correctly.
>>
>> Vlad
> 
> Thanks Vlad. I think my SCST configuration is Ok. I did experiment
> previously with the iSCSI target and the scst_local driver, and both
> worked fine.
> 
> Andy,
> 
> Thanks for the README. I followed the steps in the file and see the same
> result. The following shows the commands I'm using and the associated
> output. 
> 
> On the target side, I load the SCST/mvsas drivers and enable target
> mode. This looks like it works, but my 'target_mode' file is slightly
> different from what is shown in the README:
> 
> root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
> phy  dev sas address     attach dev type   attach sas address  target
> mode
> 0    5005043011ab0000                      0                   0
> 1    5005043011ab0000                      0                   0
> 2    5005043011ab0000                      0                   0
> 3    5005043011ab0000                      0                   0
> 
> root@ix12-1:/sys/class/scsi_host/host17# echo "enable 1" > target_mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
> 898:get enable
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_init.c
> 853:Enable phy1
> Jun  8 09:53:20 ix12-1 kernel: scst: Target mvst_scst (db0f2cc0) for
> template mvst_scst registered successfully
> Jun  8 09:53:20 ix12-1 kernel: [3054]: mvst_register_tgt_handler:Enable
> lun for host 0(0,db140000)
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2290:initiator attaching 0000000000000000,map 2 on port[1]
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 0 to target mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 1 to target mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 2 to target mode
> Jun  8 09:53:20 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2199:set phy 3 to target mode
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[0] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[1] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[2] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 1779:Reset phy[3] to notify iniator
> Jun  8 09:53:22 ix12-1 kernel: /home/brian/scst/mvsas_tgt/mv_tgt.c
> 2301:Enable target mode......
> 
> root@ix12-1:/sys/class/scsi_host/host17# cat target_mode
> phy  dev sas address     attach dev type   attach sas address  target
> mode
> 0    5005043011ab0000                      0                   1
> 1    5005043011ab0000                      0                   1
> 2    5005043011ab0000                      0                   1
> 3    5005043011ab0000                      0                   1
> 
> Next, I create the virtual LUN and add it to the default group as LUN 0:
> 
> root@ix12-1:/proc/scsi_tgt/vdisk# echo "open test
> /mnt/soho_storage/disk" > vdisk
> Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Registering virtual FILEIO
> device test
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4791
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4792
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4793
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4794
> Jun  8 09:54:27 ix12-1 kernel: dev_vdisk: Attached SCSI target virtual
> disk test (file="/mnt/soho_storage/disk", fs=1000MB, bs=512,
> nblocks=2048000, cyln=1000)
> Jun  8 09:54:27 ix12-1 kernel: scst: Attached SCSI target mid-level to
> virtual device test (id 1)
> Jun  8 09:54:27 ix12-1 kernel: scst: Processing thread started, PID 4795
> 
> root@ix12-1:/proc/scsi_tgt# echo "add test" > groups/Default/devices
> Jun  8 09:55:19 ix12-1 kernel: scst: Added device test to group Default
> (LUN 0, rd_only 0)
> 
> ... and finally, I load the mvsas driver on the initiator side:
> 
> root@ix12-2:/# modprobe mvsas
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi0, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi1, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi2, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi5, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi6, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi7, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi8, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi9, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi10, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi12, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi13, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi14, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Attached SCSI target mid-level at
> scsi15, channel 0, id 0, lun 0, type 0
> Jun  8 21:56:04 ix12-2 kernel: scst: Processing thread started, PID 9166
> Jun  8 21:56:04 ix12-2 kernel: scst: Init thread started, PID 9167
> Jun  8 21:56:04 ix12-2 kernel: scst: Task management thread started, PID
> 9168
> Jun  8 21:56:04 ix12-2 kernel: scst: SCST version 1.0.1 loaded
> successfully (max mem for commands 221MB, per device 88MB)
> Jun  8 21:56:04 ix12-2 kernel: scst: Enabled features: TRACING
> Jun  8 21:56:04 ix12-2 kernel: scst: Management thread started, PID 9169
> Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: driver version
> 0.8.3
> Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: PCI INT A ->
> Link[LNKA] -> GSI 5 (level, low) -> IRQ 5
> Jun  8 21:56:04 ix12-2 kernel: mvsas 0000:03:00.0: setting latency timer
> to 64
> Jun  8 21:56:05 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 491:Init flash rom ok,flash type is 0x101.
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 0 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 1 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 2 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_spi.c
> 527:Phy 3 SAS ADDRESS 5005043011ab0000
> Jun  8 21:56:06 ix12-2 kernel: mvsas 0000:03:00.0: mvsas: PCI-E x1,
> Bandwidth Usage: 2.5 Gbps
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 0 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 0 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 1 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 1 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 2 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 2 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1246:port 3 attach dev info is 0
> Jun  8 21:56:08 ix12-2 kernel: /home/brian/scst/mvsas_tgt/mv_sas.c
> 1248:port 3 attach sas addr is 0
> Jun  8 21:56:08 ix12-2 kernel: scsi17 : mvsas
> Jun  8 21:56:08 ix12-2 kernel: scst: Target template mvst_scst
> registered successfully
> 
> At this point I would have expected a new SCSI disk to appear for the
> virtual LUN, any thoughts? Thanks.
> 
> Brian
> N嫥叉靣笡y氊b瞂千v豝�)藓{.n�+壏{北�"妠ay�\x1d蕠跈�,j\rf"穐殝鄗�\x1e畐ア�
⒎:+v墾妛鑚豰稛��\r珣赙zZ+凒殠娸"濟!tml=


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-11  1:11           ` Andy Yan
@ 2009-06-11  7:52             ` Vladislav Bolkhovitin
  2009-06-12  9:51               ` Andy Yan
  0 siblings, 1 reply; 13+ messages in thread
From: Vladislav Bolkhovitin @ 2009-06-11  7:52 UTC (permalink / raw)
  To: Andy Yan
  Cc: Foster_Brian@emc.com, linux-scsi@vger.kernel.org,
	scst-devel@lists.sourceforge.net,
	James.Bottomley@HansenPartnership.com

Andy Yan, on 06/11/2009 05:11 AM wrote:
> No, enable target mode and then add LUN.

Why to have the race window open?

Vlad

> -----Original Message-----
> From: Vladislav Bolkhovitin [mailto:vst@vlnb.net] 
> Sent: 2009年6月11日 2:41
> To: Andy Yan
> Cc: Foster_Brian@emc.com; linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; James.Bottomley@HansenPartnership.com
> Subject: Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
> 
> Andy Yan, on 06/09/2009 05:27 AM wrote:
>> Brian,
>> Please set unique SAS address for each SAS port of target controller,
>> and make sure you do correct connection, you can get the SAS address of
>> attaching device from "attach sas address ".Then enable target mode and
>> add target LUN.
> 
> Do you mean "add target LUN and then enable target mode"? Otherwise an 
> initiator can connect while there are no LUNs configured on the target 
> and confused by it.
> 
>> Regards
>> Andy Yan

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
  2009-06-11  7:52             ` Vladislav Bolkhovitin
@ 2009-06-12  9:51               ` Andy Yan
  0 siblings, 0 replies; 13+ messages in thread
From: Andy Yan @ 2009-06-12  9:51 UTC (permalink / raw)
  To: Vladislav Bolkhovitin
  Cc: Foster_Brian@emc.com, linux-scsi@vger.kernel.org,
	scst-devel@lists.sourceforge.net,
	James.Bottomley@HansenPartnership.com

Vlad,
	This design is for hot LUN changes, for Linux don't care unit attention
"report lun change", so reset phy is used to trigger the initiator to rescan
the phy when "report lun change" event is gotten, also it try to support dynamic
connection of two controller (both are initiator && target). If some good idea for resolve this issue, very welcome, thanks!

Andy Yan

-----Original Message-----
From: Vladislav Bolkhovitin [mailto:vst@vlnb.net] 
Sent: 2009年6月11日 15:53
To: Andy Yan
Cc: Foster_Brian@emc.com; linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; James.Bottomley@HansenPartnership.com
Subject: Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards

Andy Yan, on 06/11/2009 05:11 AM wrote:
> No, enable target mode and then add LUN.

Why to have the race window open?

Vlad

> -----Original Message-----
> From: Vladislav Bolkhovitin [mailto:vst@vlnb.net] 
> Sent: 2009年6月11日 2:41
> To: Andy Yan
> Cc: Foster_Brian@emc.com; linux-scsi@vger.kernel.org; scst-devel@lists.sourceforge.net; James.Bottomley@HansenPartnership.com
> Subject: Re: [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards
> 
> Andy Yan, on 06/09/2009 05:27 AM wrote:
>> Brian,
>> Please set unique SAS address for each SAS port of target controller,
>> and make sure you do correct connection, you can get the SAS address of
>> attaching device from "attach sas address ".Then enable target mode and
>> add target LUN.
> 
> Do you mean "add target LUN and then enable target mode"? Otherwise an 
> initiator can connect while there are no LUNs configured on the target 
> and confused by it.
> 
>> Regards
>> Andy Yan


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-06-12  9:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-14 16:16 [ANNOUNCE]: A target driver for Marvell 88SE64xx(3G) and 88SE94xx(6G) SAS cards Vladislav Bolkhovitin
2009-04-14 18:14 ` Jeff Garzik
2009-06-05 18:10 ` Foster_Brian
2009-06-07  4:16   ` Andy Yan
2009-06-08 15:30   ` Vladislav Bolkhovitin
2009-06-08 18:14     ` Foster_Brian
2009-06-09  1:27       ` Andy Yan
2009-06-09 13:03         ` Foster_Brian
2009-06-10  0:17           ` Andy Yan
2009-06-10 18:40         ` Vladislav Bolkhovitin
2009-06-11  1:11           ` Andy Yan
2009-06-11  7:52             ` Vladislav Bolkhovitin
2009-06-12  9:51               ` Andy Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).