public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* building SCSI CDB over FC
@ 2002-11-08  2:44 shankar krishna
  2002-11-08 17:52 ` Sumit Agarwal
  0 siblings, 1 reply; 4+ messages in thread
From: shankar krishna @ 2002-11-08  2:44 UTC (permalink / raw)
  To: linux-scsi

Hi,

I am trying to send SCSI CDB over Fibre channel HBA.

Using IBM FC disk drive and qlogic HBA(QLA2300).

I want to build my own CDB (not with 'write' cmd which
sends an "ex write" to target) - eventually to build some
vendor specific CDBs!

Can anybody help me in this?

Rgds,
-Shankar.
PS: I am using FC analyser(FCacccess) inbetween Drive and HBA to
see the frames and their contents. If I do a "write"
of my own CDB, it sends it as data not as a command!!




_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


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

* Re: building SCSI CDB over FC
  2002-11-08  2:44 building SCSI CDB over FC shankar krishna
@ 2002-11-08 17:52 ` Sumit Agarwal
  0 siblings, 0 replies; 4+ messages in thread
From: Sumit Agarwal @ 2002-11-08 17:52 UTC (permalink / raw)
  To: shankar krishna; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]

Check the r_ctl bits of your FCP CDB while generating your
FCP IU. It should be unsolicited command. The best way to
send your commands are using ioctl's so try to use them.

Thanks
- Sumit

shankar krishna wrote:
> 
> Hi,
> 
> I am trying to send SCSI CDB over Fibre channel HBA.
> 
> Using IBM FC disk drive and qlogic HBA(QLA2300).
> 
> I want to build my own CDB (not with 'write' cmd which
> sends an "ex write" to target) - eventually to build some
> vendor specific CDBs!
> 
> Can anybody help me in this?
> 
> Rgds,
> -Shankar.
> PS: I am using FC analyser(FCacccess) inbetween Drive and HBA to
> see the frames and their contents. If I do a "write"
> of my own CDB, it sends it as data not as a command!!
> 
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
> 
> -
> 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

[-- Attachment #2: Card for Sumit Agarwal --]
[-- Type: text/x-vcard, Size: 397 bytes --]

begin:vcard 
n:Agarwal;Sumit
tel;fax:(91)(80)2200196
tel;home:+919845205210
tel;work:2051126
x-mozilla-html:FALSE
url:www.hp.com
org:HP-ISO;HPUX
version:2.1
email;internet:aksumit@india.hp.com
title:Senior Software Engineer
adr;quoted-printable:;;Hewlett-Packard,=0D=0AIndia Software Operation Pvt. Ltd.,=0D=0A29, Cunningham Road,=0D=0A;Bangalore;Karnataka;560052;India
fn:Sumit Agarwal
end:vcard

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

* Re: building SCSI CDB over FC
@ 2002-11-08 21:03 shankar krishna
  2002-11-08 23:12 ` Doug Ledford
  0 siblings, 1 reply; 4+ messages in thread
From: shankar krishna @ 2002-11-08 21:03 UTC (permalink / raw)
  To: aksumit; +Cc: linux-scsi

Sumit:
You are correct. I sent the
following command to send the
CDB. It did send correctly.

if (ioctl(sd_fd,SCSI_IOCTL_SEND_COMMAND,&cdb_buf))
{
/* ERROR */
}

where cdb_buf is of type Scsi_Ioctl_Command.

DGilbert:
"
Notes:
The SCSI command length is determined by examining the 1st byte of the given 
command [1] . There is no way to override this.
"

The above claim that 1st octet should be the length
of CDB is not true...In the analyser I could see
that "if I sent the length of CDB it is sending
it as OPCODE" which essentially is the first byte.

You may want to correct it in the
document(www.torque.net/sg) that you
told me. It was very useful.

Thanks,
-Shankar.

>From: Sumit Agarwal <aksumit@india.hp.com>
>To: shankar krishna <kshan01@hotmail.com>
>CC: linux-scsi@vger.kernel.org
>Subject: Re: building SCSI CDB over FC
>Date: Fri, 08 Nov 2002 11:52:58 -0600
>
>Check the r_ctl bits of your FCP CDB while generating your
>FCP IU. It should be unsolicited command. The best way to
>send your commands are using ioctl's so try to use them.
>
>Thanks
>- Sumit
>
>shankar krishna wrote:
> >
> > Hi,
> >
> > I am trying to send SCSI CDB over Fibre channel HBA.
> >
> > Using IBM FC disk drive and qlogic HBA(QLA2300).
> >
> > I want to build my own CDB (not with 'write' cmd which
> > sends an "ex write" to target) - eventually to build some
> > vendor specific CDBs!
> >
> > Can anybody help me in this?
> >
> > Rgds,
> > -Shankar.
> > PS: I am using FC analyser(FCacccess) inbetween Drive and HBA to
> > see the frames and their contents. If I do a "write"
> > of my own CDB, it sends it as data not as a command!!
> >
> > _________________________________________________________________
> > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> > http://join.msn.com/?page=features/virus
> >
> > -
> > 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
><< aksumit.vcf >>


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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

* Re: building SCSI CDB over FC
  2002-11-08 21:03 shankar krishna
@ 2002-11-08 23:12 ` Doug Ledford
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2002-11-08 23:12 UTC (permalink / raw)
  To: shankar krishna; +Cc: aksumit, linux-scsi

On Fri, Nov 08, 2002 at 02:03:16PM -0700, shankar krishna wrote:
> Sumit:
> You are correct. I sent the
> following command to send the
> CDB. It did send correctly.
> 
> if (ioctl(sd_fd,SCSI_IOCTL_SEND_COMMAND,&cdb_buf))
> {
> /* ERROR */
> }
> 
> where cdb_buf is of type Scsi_Ioctl_Command.
> 
> DGilbert:
> "
> Notes:
> The SCSI command length is determined by examining the 1st byte of the 
> given command [1] . There is no way to override this.
> "
> 
> The above claim that 1st octet should be the length
> of CDB is not true...In the analyser I could see
> that "if I sent the length of CDB it is sending
> it as OPCODE" which essentially is the first byte.
> 
> You may want to correct it in the
> document(www.torque.net/sg) that you
> told me. It was very useful.

I believe you are mis-interpreting the documentation.  The first byte of 
the command is the opcode, and with scsi_ioctl_send_command the code reads 
the opcode and looks it up in a table to determine the length of the scsi 
command, and that length is the length that can't be over-ridden.

-- 
  Doug Ledford <dledford@redhat.com>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  

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

end of thread, other threads:[~2002-11-08 23:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-08  2:44 building SCSI CDB over FC shankar krishna
2002-11-08 17:52 ` Sumit Agarwal
  -- strict thread matches above, loose matches on Subject: below --
2002-11-08 21:03 shankar krishna
2002-11-08 23:12 ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox