Re: Hi, some prob with SBP2 code;

James Chacon <[email protected]>
Newsgroups gmane.os.netbsd.ports.i386,gmane.os.netbsd.general,gmane.os.netbsd.devel.general
Message-ID <[email protected]>
Can you send me dmesg output without all the additional commenting/etc?

i.e. turn debug up to full but otherwise use the code in tree. It's a lot
simpler for me to read then.

James

>
>hi jason,
>
>well i commented the call to sbp2_free() in sbpscsi_match function.
>But still i m not able to login into the HDD. i m able to send the login ORB 
>to the device but then it just gets stuck. I m sending u the dmesg to help u. 
>I m not able to figure out what is going wrong.
>The control executes the LOGIN ANS function successfully for the first time 
>but since it does not recieve WRITE_REQ_BLOCK TCODE from the device to write 
>the status or the REsponse packet, it stucks. How can i Correct this problem. 
>I m working on TX4927 chip from TOSHIBA.
>------------------------------------------------------------------------------------
>
>fwnode0: Link Speed: 400Mb/s, max_rec: 64 bytes
>
><In SBP2_init><Registering call back for STATUS FIFO>
>
>Registering a handlerFWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F0010004
>In Herefwohci_handler_set: ctx 2, tcode 1, key 0x0, 0xf0010004, 0x0
>
>
>Detected SBPSCSI DEVICE
>
>sbpscsi0 at fwnode0+++++Here in sbpsci_attach++++++++
>scsibus0 at sbpscsi0: 1 target, 1 lun per target
>
>fwnode0: Config rom dump:
>fwnode0: 0x00: 0x0430f522 0x31333934 0x00ff5002 0x0002c000
>fwnode0: 0x10: 0x05210550 0x0006e8d7 0x0c0083c0 0x0300a0b8
>fwnode0: 0x20: 0x81000011 0x0400500a 0x81000015 0xd1000001
>fwnode0: 0x30: 0x000c3bf1 0x1200609e 0x13010483 0x3ca0b82b
>fwnode0: 0x40: 0x5400c000 0x3a001e08 0x3800609e 0x390104d8
>fwnode0: 0x50: 0x3b000000 0x3d0000ff 0x14000000 0x17000000
>fwnode0: 0x60: 0x8100000e 0x0005083d 0x00000000 0x00000000
>fwnode0: 0x70: 0x42454e43 0x454e5400 0x00000000 0x000629e0
>fwnode0: 0x80: 0x00000000 0x00000000 0x4c534920 0x35303120
>fwnode0: 0x90: 0x72657620 0x35353200 0x000a7f10 0x00000000
>fwnode0: 0xa0: 0x00000000 0x46697265 0x57697265 0x20332e35
>fwnode0: 0xb0: 0x22204844 0x44000000 0x00000000 0x00000000
>fwnode0: 0xc0: 0x00000000
>Directory: Root-Directory
>
>Node-Capabilities: 0x000083c0
>Module-Vendor-Id: 0x0000a0b8
>Text descriptor: BENCENT
>Module-Hw-Version: 0x0000500a
>Text descriptor: LSI 501 rev 552
>
>    Directory: Unit-Directory
>
>    Unit-Spec-Id: 0x0000609e
>    Unit-Sw-Version: 0x00010483
>    SBP2 Firmware Revision: 0x00a0b82b
>    SBP2 Management Agent: 0x0000c000
>    SBP2 Unit Characteristics: 0x00001e08
>    SBP2 Command Set Spec Id: 0x0000609e
>    SBP2 Command Set: SCSI 2
>    SBP2 Command Set Revision: 0x00000000
>    SBP2 Reconnect Timeout: 0x000000ff
>    SBP2 Logical Unit Number: 0x00000000
>    Model: 0x00000000
>    Text descriptor: FireWire 3.5" HDD
>
>fwohci_buf_pktget: desc 16, off 1068, req 4096, res 3028, len 4, avail 0
>fwohci_buf_input: no input for 3
>LEAVING ARRS_INPUT********
>##########RSPKT#########IN ARRS INPUT^^^^^^^^fwohci_buf_pktget: desc 16, off 
>106
>8, req 4096, res 3028, len 4, avail 0
>fwohci_buf_input: no input for 3
>LEAVING ARRS_INPUT********IN SCSIBUS_CONFIG
>IN SCSI_PROBE_BUS
>probing for deviceIn probe deviceIn SCSI_SCSIPI_CMDCalled 
>sbpscsi_scsipi_request
>Got req_run_xfer
>xs control: 0x000001c4, timeout: 10000
>opcode: 0x00
>0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>Going for RUNCMD
>Going for LOGIN
>Alloc'ing more orbs
>ORB ADDR:0F0010008
>RESP ADDR:0F001000C
>FWOHCI_INREG: 
>HIGH:0   LOW:F0010008
>In Herefwohci_handler_set: ctx 2, tcode 5, key 0x0, 0xf0010008, 0x0
>FWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F001000C
>In Herefwohci_handler_set: ctx 2, tcode 1, key 0x0, 0xf001000c, 0x0
>
>fwohci_write:High:ffff  Low:f0030000
>fwohci_at_output: tcode 0x1, tlabel 0x37 hlen 16, dlen 8
>    0002dd10 ffc0ffff f0030000 00080000$
>    00000000 f0010008$
>fwohci_at_output: desc 32
>    02000010 00000000 00000000 00000000 0002dd10 ffc0ffff f0030000 00080000
>    103c0008 0053abd0 00000000 00000000
>FWOHCI_INREG: Welcome to the new dimensionfwohci1: intmask=0x00000031: 
>ReqTxComp
>lete(0x8052) RQPkt(0x8452) RSPkt(0x9451)
>
>HIGH:0   LOW:F0010008
>In Herefwohci_handler_set: ctx 2, tcode 5, key 0x0, 0xf0010008, 0x0
>FWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F0010010
>In Herefwohci_handler_set: ctx 2, tcode 5, key 0x0, 0xf0010010, 0x0
>##########REQTXCOMPLETE#########fwohci_at_done: desc 32 (3)
>    02000010 00000000 00000000 00000000 0002dd10 ffc0ffff f0030000 00080000
>    103c0008 0053abd0 00000000 8452b3a5
>##########RQPKT#########fwohci_buf_pktget: desc 0, off 0, req 4096, res 4060, 
>le
>n 4, avail 36
>fwohci_buf_pktget: desc 0, off 4, req 4096, res 4060, len 8, avail 32
>fwohci_buf_input: tcode=0xe, tlabel=0x0, hlen=12, dlen=0
>fwohci_buf_pktget: desc 0, off 12, req 4096, res 4060, len 4, avail 24
>fwohci_phy_input: BusReset: 0x00010000
>fwohci_buf_pktget: desc 0, off 16, req 4096, res 4060, len 4, avail 20
>fwohci_buf_pktget: desc 0, off 20, req 4096, res 4060, len 12, avail 16
>fwohci_buf_input: tcode=0x5, tlabel=0x16, hlen=16, dlen=0
>fwohci_buf_pktget: desc 0, off 32, req 4096, res 4060, len 4, avail 4
>
>
>In Login Ans
>
>
>fwohci_write:High:20    Low:0
>fwohci_at_output: tcode 0x7, tlabel 0x16 hlen 16, dlen 32
>    00025970 ffc00020 00000000 00200000$
>    00000000 f0010010 00000000 f001000c 90400000 00000010 00000000 f0010004$
>fwohci_at_output: desc 32
>    02000010 00000000 00000000 00001edf 00025970 ffc00020 00000000 00200000
>    103c0020 00ca6c00 00000000 00000000
>
><The OUTPUT_MORE_IMMEDIATE packet is sent on the bus. There is not last 
>immediate packet corresponding to completion of context program. Is this the 
>problem>
>
>returning from LOGIN_ANS: SUCCESS
>fwohci1: intmask=0x00000002: RespTxComplete(0x8051)
>fwohci_buf_pktget: desc 0, off 36, req 4096, res 4060, len 4, avail 0
>fwohci_buf_input: no input for 2
>##########RSPKT#########IN ARRS INPUT^^^^^^^^
>
><This is the WRITE RESPONSE PACKET for the WRITE REQ BLOCK TO the MANAGEMENT 
>AGENT REGISTER>
>
>fwohci_buf_pktget: desc 16, off 1068, req 4096, res 3012, len 4, avail 16
>fwohci_buf_pktget: desc 16, off 1072, req 4096, res 3012, len 8, avail 12
>fwohci_buf_input: tcode=0x2, tlabel=0x37, hlen=12, dlen=0
>fwohci_buf_pktget: desc 16, off 1080, req 4096, res 3012, len 4, avail 4
>fwohci_arrs_input: tcode 0x2, from 0xffc0, tlabel 0x37, rcode 0x0, hlen 12,
>dlen  0
>fwohci_arrs_input: no listner
>fwohci_buf_pktget: desc 16, off 1084, req 4096, res 3012, len 4, avail 0
>fwohci_buf_input: no input for 3
>
>LEAVING ARRS_INPUT********##########RESPTXCOMPLETE#########fwohci_at_done: 
>desc
>32 (3)
>    02000010 00000000 00000000 00001edf 00025970 ffc00020 00000000 00200000
>    103c0020 00ca6c00 00000000 84510000
>
>
>In Login Ans
>
>Freeing orb at addr: 0x00000000f0010008 status_rec: 0x0
>FWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F0010008
><Since the ORB state is SENT STATE therefore LOGIN ANS RETURNS>
>returning from LOGIN_ANS: incomplete0
>
>nfs_boot: DHCP next-server: 192.168.5.180
>nfs_boot: my_name=Client
>nfs_boot: my_addr=192.168.5.205
>nfs_boot: my_mask=255.255.255.0
>root on NetBSD:/usr/build
>root time: 0x3f3a2279
>readclock: 3/8/13/8/31/37
>=>1060763497 (1060774521)
>root file system type: nfs
>warning: no /dev/console
>init path (default /sbin/init):
>init: copying out path `/sbin/init' 11
>init: Creating mfs /dev
>
>Called sbp2_abort
>ERROR:5In SCSI_SCSIPI_CMDCalled sbpscsi_scsipi_request
>Got req_run_xfer
>xs control: 0x00401004, timeout: 10000
>opcode: 0x12
>0x00 0x00 0x00 0x4a 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>Going for RUNCMDGoing for LOGINORB ADDR:0F0010008RESP 
>ADDR:0F0010014FWOHCI_INREG
>: Welcome to the new dimension
>HIGH:0   LOW:F0010008
>In Herefwohci_handler_set: ctx 2, tcode 5, key 0x0, 0xf0010008, 0x0
>FWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F0010014
>In Herefwohci_handler_set: ctx 2, tcode 1, key 0x0, 0xf0010014, 0x0
>
>fwohci_write:High:ffff  Low:f0030000
>fwohci_at_output: tcode 0x1, tlabel 0x38 hlen 16, dlen 8
>    0002e110 ffc0ffff f0030000 00080000$
>    00000000 f0010008$
>fwohci_at_output: desc 32
>    02000010 00000000 00000000 00000000 0002e110 ffc0ffff f0030000 00080000
>    103c0008 0053abd0 00000000 00000000
>FWOHCI_INREG: Welcome to the new dimensionfwohci1: intmask=0x00000031: 
>ReqTxComp
>lete(0x8052) RQPkt(0x9452) RSPkt(0x9451)
>
>HIGH:0   LOW:F0010008
>In Herefwohci_handler_set: ctx 2, tcode 5, key 0x0, 0xf0010008, 0x0
>FWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F0020000
>fwohci_handler_set: ctx 2, tcode 1, key 0x0, 0xf0020000, 0x4a
>FWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F0010018
>In Herefwohci_handler_set: ctx 2, tcode 5, key 0x0, 0xf0010018, 0x0
>##########REQTXCOMPLETE#########fwohci_at_done: desc 32 (3)
>    02000010 00000000 00000000 00000000 0002e110 ffc0ffff f0030000 00080000
>    103c0008 0053abd0 00000000 8452cbf8
>##########RQPKT#########fwohci_buf_pktget: desc 0, off 36, req 4096, res 4040, 
>l
>en 4, avail 20
>fwohci_buf_pktget: desc 0, off 40, req 4096, res 4040, len 12, avail 16
>fwohci_buf_input: tcode=0x5, tlabel=0x16, hlen=16, dlen=0
>fwohci_buf_pktget: desc 0, off 52, req 4096, res 4040, len 4, avail 4
>
>
>In Login Ans
>
>
>fwohci_write:High:20    Low:0
>fwohci_at_output: tcode 0x7, tlabel 0x16 hlen 16, dlen 32
>    00025970 ffc00020 00000000 00200000$
>    00000000 f0010018 00000000 f0010014 90400000 00000010 00000000 f0010004$
>fwohci_at_output: desc 32
>    02000010 00000000 00000000 000035b2 00025970 ffc00020 00000000 00200000
>    103c0020 00ca3800 00000000 00000000
>returning from LOGIN_ANS: SUCCESSfwohci1: intmask=0x00000002: 
>RespTxComplete(0x8
>051)
>fwohci_buf_pktget: desc 0, off 56, req 4096, res 4040, len 4, avail 0
>fwohci_buf_input: no input for 2
>##########RSPKT#########IN ARRS INPUT^^^^^^^^fwohci_buf_pktget: desc 16, off 
>108
>4, req 4096, res 2996, len 4, avail 16
>fwohci_buf_pktget: desc 16, off 1088, req 4096, res 2996, len 8, avail 12
>fwohci_buf_input: tcode=0x2, tlabel=0x38, hlen=12, dlen=0
>fwohci_buf_pktget: desc 16, off 1096, req 4096, res 2996, len 4, avail 4
>fwohci_arrs_input: tcode 0x2, from 0xffc0, tlabel 0x38, rcode 0x0, hlen 12, 
>dlen
> 0
>fwohci_arrs_input: no listner
>fwohci_buf_pktget: desc 16, off 1100, req 4096, res 2996, len 4, avail 0
>fwohci_buf_input: no input for 3
>LEAVING ARRS_INPUT********##########RESPTXCOMPLETE#########fwohci_at_done: 
>desc
>32 (3)
>    02000010 00000000 00000000 000035b2 00025970 ffc00020 00000000 00200000
>    103c0020 00ca3800 00000000 84510000
>
>
>In Login Ans
>
>Freeing orb at addr: 0x00000000f0010008 status_rec: 0x0
>FWOHCI_INREG: Welcome to the new dimension
>HIGH:0   LOW:F0010008
>returning from LOGIN_ANS: incomplete0
>------------------------------------------------------------------------------------
>
>REGARDS
>Rishabh Kumar Goel.
>
>
>On Monday 11 Aug 2003 3:35 pm, James Chacon wrote:
>> >This is a multi-part message in MIME format.
>> >
>> >------_=_NextPart_001_01C35FC6.C917FD93
>> >Content-Type: text/plain;
>> >	charset="iso-8859-1"
>> >Content-Transfer-Encoding: quoted-printable
>> >
>> >Hi james,
>> >=20
>> >I m working on firewire SBP2 driver code for NetBSD for Toshiba =
>> >processor. I m facing a lot of problems wrto SBP2 driver architecture.=20
>> >1.         I did not understand the need for calling sbp2_free() form =
>> >sbpscsi_match().
>>
>> There is a bug there but in general this is cleaning up data structures
>> that can't exist until an actual attach happens.
>>
>> >2.         the sbp2_init() function does not make a login call or in =
>> >other words, sbp2_login function is not called though it registers a =
>> >handler function and that too for WRITE_REQ_BLOCK.
>>
>> You don't want it to at this stage. Drives can be plugged into multiple
>> hosts and simply probing them on the box shouldn't cause a login. On first
>> access to the drive (usually the scsi probes) it'll log into the drive.
>>
>> James
>>
>> >Regards,
>> >Rishabh
>> >
>> >------_=_NextPart_001_01C35FC6.C917FD93
>> >Content-Type: text/html;
>> >	charset="iso-8859-1"
>> >Content-Transfer-Encoding: quoted-printable
>> >
>> ><html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
>> >xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
>> >xmlns=3D"http://www.w3.org/TR/REC-html40">
>> >
>> ><head>
>> ><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
>> >charset=3Diso-8859-1">
>> >
>> >
>> ><meta name=3DProgId content=3DWord.Document>
>> ><meta name=3DGenerator content=3D"Microsoft Word 10">
>> ><meta name=3DOriginator content=3D"Microsoft Word 10">
>> ><link rel=3DFile-List href=3D"cid:[email protected]">
>> ><!--[if gte mso 9]><xml>
>> > <o:OfficeDocumentSettings>
>> >  <o:DoNotRelyOnCSS/>
>> > </o:OfficeDocumentSettings>
>> ></xml><![endif]--><!--[if gte mso 9]><xml>
>> > <w:WordDocument>
>> >  <w:SpellingState>Clean</w:SpellingState>
>> >  <w:GrammarState>Clean</w:GrammarState>
>> >  <w:DocumentKind>DocumentEmail</w:DocumentKind>
>> >  <w:EnvelopeVis/>
>> >  <w:Compatibility>
>> >   <w:BreakWrappedTables/>
>> >   <w:SnapToGridInCell/>
>> >   <w:WrapTextWithPunct/>
>> >   <w:UseAsianBreakRules/>
>> >  </w:Compatibility>
>> >  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
>> > </w:WordDocument>
>> ></xml><![endif]-->
>> ><style>
>> ><!--
>> > /* Style Definitions */
>> > p.MsoNormal, li.MsoNormal, div.MsoNormal
>> >	{mso-style-parent:"";
>> >	margin:0in;
>> >	margin-bottom:.0001pt;
>> >	mso-pagination:widow-orphan;
>> >	font-size:12.0pt;
>> >	font-family:"Times New Roman";
>> >	mso-fareast-font-family:"Times New Roman";}
>> >a:link, span.MsoHyperlink
>> >	{color:blue;
>> >	text-decoration:underline;
>> >	text-underline:single;}
>> >a:visited, span.MsoHyperlinkFollowed
>> >	{color:purple;
>> >	text-decoration:underline;
>> >	text-underline:single;}
>> >span.EmailStyle17
>> >	{mso-style-type:personal-compose;
>> >	mso-style-noshow:yes;
>> >	mso-ansi-font-size:10.0pt;
>> >	mso-bidi-font-size:10.0pt;
>> >	font-family:Arial;
>> >	mso-ascii-font-family:Arial;
>> >	mso-hansi-font-family:Arial;
>> >	mso-bidi-font-family:Arial;
>> >	color:windowtext;}
>> >span.SpellE
>> >	{mso-style-name:"";
>> >	mso-spl-e:yes;}
>> >span.GramE
>> >	{mso-style-name:"";
>> >	mso-gram-e:yes;}
>> >@page Section1
>> >	{size:8.5in 11.0in;
>> >	margin:1.0in 1.25in 1.0in 1.25in;
>> >	mso-header-margin:.5in;
>> >	mso-footer-margin:.5in;
>> >	mso-paper-source:0;}
>> >div.Section1
>> >	{page:Section1;}
>> >-->
>> ></style>
>> ><!--[if gte mso 10]>
>> ><style>
>> > /* Style Definitions */=20
>> > table.MsoNormalTable
>> >	{mso-style-name:"Table Normal";
>> >	mso-tstyle-rowband-size:0;
>> >	mso-tstyle-colband-size:0;
>> >	mso-style-noshow:yes;
>> >	mso-style-parent:"";
>> >	mso-padding-alt:0in 5.4pt 0in 5.4pt;
>> >	mso-para-margin:0in;
>> >	mso-para-margin-bottom:.0001pt;
>> >	mso-pagination:widow-orphan;
>> >	font-size:10.0pt;
>> >	font-family:"Times New Roman";}
>> ></style>
>> ><![endif]-->
>> ></head>
>> >
>> ><body lang=3DEN-US link=3Dblue vlink=3Dpurple =
>> >style=3D'tab-interval:.5in'>
>> >
>> ><div class=3DSection1>
>> >
>> ><p class=3DMsoNormal><font size=3D2 face=3DArial><span =
>> >style=3D'font-size:10.0pt;
>> >font-family:Arial'>Hi <span =
>> >class=3DSpellE>james</span>,<o:p></o:p></span></font></p>
>> >
>> ><p class=3DMsoNormal><font size=3D2 face=3DArial><span =
>> >style=3D'font-size:10.0pt;
>> >font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>
>> >
>> ><p class=3DMsoNormal><span class=3DGramE><font size=3D2 =
>> >face=3DArial><span
>> >style=3D'font-size:10.0pt;font-family:Arial'>I m working on <span =
>> >class=3DSpellE>firewire</span>
>> >SBP2 driver code for <span class=3DSpellE>NetBSD</span> for Toshiba =
>> >processor.</span></font></span><font
>> >size=3D2 face=3DArial><span =
>> >style=3D'font-size:10.0pt;font-family:Arial'> <span
>> >class=3DGramE>I m facing a lot of problems <span =
>> >class=3DSpellE>wrto</span> SBP2
>> >driver architecture.</span> <o:p></o:p></span></font></p>
>> >
>> ><p class=3DMsoNormal><font size=3D2 face=3DArial><span =
>> >style=3D'font-size:10.0pt;
>> >font-family:Arial'>1.<span =
>> >style=3D'mso-tab-count:1'>=A0=A0=A0=A0=A0=A0=A0=A0 </span>I did not
>> >understand the need for calling sbp2_<span class=3DGramE>free(</span>) =
>> >form <span
>> >class=3DSpellE>sbpscsi_match</span>().<o:p></o:p></span></font></p>
>> >
>> ><p class=3DMsoNormal style=3D'margin-left:.5in;text-indent:-.5in'><font =
>> >size=3D2
>> >face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'>2.<span
>> >style=3D'mso-tab-count:1'>=A0=A0=A0=A0=A0=A0=A0=A0 </span><span =
>> >class=3DGramE>the</span>
>> >sbp2_init() function does not make a login call or in other words, =
>> >sbp2_login
>> >function is not called though it registers a handler function and that =
>> >too for
>> >WRITE_REQ_BLOCK.<o:p></o:p></span></font></p>
>> >
>> ><p class=3DMsoNormal style=3D'margin-left:.5in;text-indent:-.5in'><font =
>> >size=3D2
>> >face=3DArial><span =
>> >style=3D'font-size:10.0pt;font-family:Arial'>Regards,<o:p></o:p></span></=
>> >font></p>
>> >
>> ><p class=3DMsoNormal style=3D'margin-left:.5in;text-indent:-.5in'><font =
>> >size=3D2
>> >face=3DArial><span =
>> >style=3D'font-size:10.0pt;font-family:Arial'>Rishabh<o:p></o:p></span></f=
>> >ont></p>
>> >
>> ></div>
>> >
>> ></body>
>> >
>> ></html>
>> >
>> >------_=_NextPart_001_01C35FC6.C917FD93--
>> >Scanned by SecureSynergy VirusScreen Service.
>> >For more information log on to : http://www.securesynergyonline.com or
>> > http://www.securesynergy.com
>
>-- 
>Regards,
>Rishabh Kumar Goel
>Associate Software Engineer
>SoCrates Software India Pvt. Ltd.
>Bangalore
>
>Scanned by SecureSynergy VirusScreen Service. 
>For more information log on to : http://www.securesynergyonline.com or http://www.securesynergy.com
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.