In your message on you write:
>       By point-to-point you don't mean a direct attach do you? In this
> case the BIOS of the HBA would have had its connectivity type set to,
> parhaps, LOOP ONLY. For the switch connection to work check that the
> connectivity type in the HBA BIOS is set to POINT TO POINT ONLY. Also,
> check, in Red Hat, /var/log/messages for what connectivity type the HBA has
> detected with the switch it should indicate an F Port. The qla2x00 driver
> will also tell you the targets it has detected on the fabric. If it's not
> detecting any targets check to insure that the target and the HBA reside in
> the same zone on the fabric. 
>       After the driver has loaded you'll find entries in procfs,
> /proc/scsi/qla2x00/<HBA target>. You can cat() these files to see what LUNs
> were detected by the driver. You can also gleen this information from
> /var/log/messages where you'll also be able to determine which /dev/sd
> device nodes are attached to which LUNs and the size that LUNs have been
> detected as. 
>       The same driver, qla2x00 is used for both the QLA2100 and QLA2200
> HBA's. If you are using the qlogicfc or isp drivers, I don't believe either
> support the QLA2200FC HBA.

This is incorrect.  The linux 2.4 kernel qlogicfc driver does indeed support
the QLA2200FC HBA.  


> 
> Wayne
> Sr Attach Engineer
> EMC Corp
> 
> email:       [EMAIL PROTECTED]
> 
> "One man can make a difference, and every man should try."  - JFK
> 
> 
> -----Original Message-----
> From: Ana Yuseepi [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 21, 2001 5:47 AM
> To: [EMAIL PROTECTED]
> Subject: ioctl SCC3
> 
> 
> Good day to all,
> 
>  am trying to send an SCC-3 command to a target device. This command 
>  also transfer data to the target device.
> 
>  I'd like to ask how is exactly the placement of the data? am using ioctl in
> my program,
> 
>  result = ioctl(fd, 1, buffer);
> 
>  where:
>  fd - is the file descriptor
>  data in buffer is:
>  byte 3-0   - size of data to be transferred to device + size of cdblen + 8
>  byte 7-4   - (defaults to 0. I assume that this is length of buffer 
>  to receive data FROM the device)
>  byte 19-8 - cdb(12 bytes)
>  byte n - 20 - data to be transferred to the device.
> 
>  my program works fine with qla2100 and the device connected point-to-point.
> 
>  but it doesn't work with qla2200 and switches.
> 
>  any idea on what is wrong?
> 
>  i appreciate any help...
>

Here is some code I use to do this sort of stuff (Sorry about using C++)

int issueScsiCmd(int fd, 
                 unsigned char *cmd, 
                 size_t cmdLen, 
                 unsigned char *outData, 
                 size_t outDataLen,
                 unsigned char *inData, 
                 size_t inDataLen, 
                 unsigned char *scsiSenseKey)
{
   // fd is assumed to be open before making this call.

   ScsiData sdata;
   memset(&sdata, 0, sizeof(sdata));
   *scsiSenseKey = NO_SENSE;

   sdata.outLen = outDataLen;
   sdata.inLen = inDataLen;
   memcpy(&sdata.cmd, cmd, cmdLen);
   if (outData != (unsigned char*)NULL)
      memcpy(&sdata.cmd[cmdLen], outData, outDataLen);  
   status = ioctl(fd, SCSI_IOCTL_SEND_COMMAND, &sdata);
   if (status < 0)
   {
      // OS error.
      fprintf(stderr, "SCSI cmd %02x on failed - %s", 
                       cmd[0], 
                       sys_errlist[errno]));
      return RETURN_ERROR_SYSTEM;
   }
   if (status > 0)
   {
      // SCSI or driver error.
      unsigned char scsiStatus = (status & 0x000000ff) > 1; 

      // Fill outData with request sense info.
      if (scsiStatus == CHECK_CONDITION)
      {
         *scsiSenseKey = sdata.cmd[2] & 0x0f;
         memcpy(inData, &sdata.cmd[0], SCSI_SENSE_BUFFER_LEN);
         return RETURN_ERROR_SCSI;
      }
      else
         return RETURN_ERROR_SYSTEM;
  // Everything OK, copy data if any.
   if (inData != (unsigned char*)NULL)
      memcpy(inData, &sdata.cmd[0], inDataLen);

   return RETURN_OK;
}


I then call this using something like:

   // SCSI data structures.
   unsigned char scsiCmd[MAX_SCSI_CMD_LEN];
   unsigned char inScsiData[MAX_SCSI_DATA_LEN];
   unsigned char scsiSenseKey;
   //
   // INQUIRY (standard).
   memset(scsiCmd, 0, MAX_SCSI_CMD_LEN);
   memset(inScsiData, 0, MAX_SCSI_DATA_LEN);
   scsiCmd[0] = INQUIRY;
   scsiCmd[4] = INQUIRY_CMD_IN_DATA_LEN;  // Allocation length.
   int ret;
   ret = issueScsiCmd(fd,
                      scsiCmd,
                      INQUIRY_CMD_LEN,
                      (unsigned char *)NULL,
                      0,
                      inScsiData,
                      INQUIRY_CMD_IN_DATA_LEN,
                      &scsiSenseKey);



Hope this helps.

Andrew Patterson

 
>  -Ana
> 
> 
> Get 250 color business cards for FREE!
> http://businesscards.lycos.com/vp/fastpath/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [EMAIL PROTECTED]
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [EMAIL PROTECTED]


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to