kernels/linux-2.4.0/drivers/scsi/ips.c
/****************************************************************************/
/*                                                                          */
/* Routine Name: ips_rdcap                                                  */
/*                                                                          */
/* Routine Description:                                                     */
/*                                                                          */
/*   Simulate a read capacity command to a logical drive                    */
/*                                                                          */
/****************************************************************************/


Routine Description.

Simulate a read capacity command to a logical drive
Routine Description . Simulate a read capacity command to a logical drive
static int
ips_rdcap(ips_ha_t *ha, ips_scb_t *scb) {
   IPS_CAPACITY *cap;
   METHOD_TRACE("ips_rdcap", 1);
   if (scb->scsi_cmd->bufflen < 8)
      return (0);
   cap = (IPS_CAPACITY *) scb->scsi_cmd->request_buffer;
   cap->lba = htonl(ha->adapt->logical_drive_info.drive_info[scb->target_id].sector_count - 1);
   cap->len = htonl((u32) IPS_BLKSIZE);
   return (1);
}
static int ips_rdcap ( ips_ha_t * ha , ips_scb_t * scb ) { IPS_CAPACITY * cap ; METHOD_TRACE ( " " , 1 ) ; if ( scb -> scsi_cmd -> bufflen < 8 ) return ( 0 ) ; cap = ( IPS_CAPACITY * ) scb -> scsi_cmd -> request_buffer ; cap -> lba = htonl ( ha -> adapt -> logical_drive_info . drive_info [ scb -> target_id ] . sector_count - 1 ) ; cap -> len = htonl ( ( u32 ) IPS_BLKSIZE ) ; return ( 1 ) ; }
Routine Name: ips_rdcap
Routine Name : ips_rdcap