Lines Matching defs:cmd
1189 static int aac_bounds_32(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba)
1192 int cid = scmd_id(cmd);
1194 cmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 |
1199 memcpy(cmd->sense_buffer, &dev->fsa_dev[cid].sense_data,
1202 cmd->scsi_done(cmd);
1208 static int aac_bounds_64(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba)
1215 static int aac_read_raw_io(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count)
1231 dev->fsa_dev[scmd_id(cmd)].block_size);
1232 readcmd2->cid = cpu_to_le16(scmd_id(cmd));
1234 ret = aac_build_sgraw2(cmd, readcmd2,
1247 dev->fsa_dev[scmd_id(cmd)].block_size);
1248 readcmd->cid = cpu_to_le16(scmd_id(cmd));
1252 ret = aac_build_sgraw(cmd, &readcmd->sg);
1270 (void *) cmd);
1273 static int aac_read_block64(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count)
1282 readcmd->cid = cpu_to_le16(scmd_id(cmd));
1288 ret = aac_build_sg64(cmd, &readcmd->sg);
1305 (void *) cmd);
1308 static int aac_read_block(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count)
1318 readcmd->cid = cpu_to_le32(scmd_id(cmd));
1321 dev->fsa_dev[scmd_id(cmd)].block_size);
1323 ret = aac_build_sg(cmd, &readcmd->sg);
1340 (void *) cmd);
1343 static int aac_write_raw_io(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count, int fua)
1359 dev->fsa_dev[scmd_id(cmd)].block_size);
1360 writecmd2->cid = cpu_to_le16(scmd_id(cmd));
1365 ret = aac_build_sgraw2(cmd, writecmd2,
1378 dev->fsa_dev[scmd_id(cmd)].block_size);
1379 writecmd->cid = cpu_to_le16(scmd_id(cmd));
1386 ret = aac_build_sgraw(cmd, &writecmd->sg);
1404 (void *) cmd);
1407 static int aac_write_block64(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count, int fua)
1416 writecmd->cid = cpu_to_le16(scmd_id(cmd));
1422 ret = aac_build_sg64(cmd, &writecmd->sg);
1439 (void *) cmd);
1442 static int aac_write_block(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count, int fua)
1452 writecmd->cid = cpu_to_le32(scmd_id(cmd));
1455 dev->fsa_dev[scmd_id(cmd)].block_size);
1459 ret = aac_build_sg(cmd, &writecmd->sg);
1476 (void *) cmd);
1479 static struct aac_srb * aac_scsi_common(struct fib * fib, struct scsi_cmnd * cmd)
1487 switch(cmd->sc_data_direction){
1505 srbcmd->channel = cpu_to_le32(aac_logical_to_phys(scmd_channel(cmd)));
1506 srbcmd->id = cpu_to_le32(scmd_id(cmd));
1507 srbcmd->lun = cpu_to_le32(cmd->device->lun);
1509 timeout = cmd->request->timeout/HZ;
1514 srbcmd->cdb_size = cpu_to_le32(cmd->cmd_len);
1519 struct scsi_cmnd *cmd)
1526 dev = (struct aac_dev *)cmd->device->host->hostdata;
1531 switch (cmd->sc_data_direction) {
1543 hbacmd->lun[1] = cpu_to_le32(cmd->device->lun);
1545 bus = aac_logical_to_phys(scmd_channel(cmd));
1546 target = scmd_id(cmd);
1553 memcpy(hbacmd->cdb, cmd->cmnd, cmd->cmd_len);
1554 hbacmd->data_length = cpu_to_le32(scsi_bufflen(cmd));
1566 static int aac_scsi_64(struct fib * fib, struct scsi_cmnd * cmd)
1569 struct aac_srb * srbcmd = aac_scsi_common(fib, cmd);
1572 ret = aac_build_sg64(cmd, (struct sgmap64 *) &srbcmd->sg);
1575 srbcmd->count = cpu_to_le32(scsi_bufflen(cmd));
1578 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len);
1594 (void *) cmd);
1597 static int aac_scsi_32(struct fib * fib, struct scsi_cmnd * cmd)
1600 struct aac_srb * srbcmd = aac_scsi_common(fib, cmd);
1603 ret = aac_build_sg(cmd, (struct sgmap *)&srbcmd->sg);
1606 srbcmd->count = cpu_to_le32(scsi_bufflen(cmd));
1609 memcpy(srbcmd->cdb, cmd->cmnd, cmd->cmd_len);
1623 (fib_callback) aac_srb_callback, (void *) cmd);
1626 static int aac_scsi_32_64(struct fib * fib, struct scsi_cmnd * cmd)
1631 return aac_scsi_32(fib, cmd);
1634 static int aac_adapter_hba(struct fib *fib, struct scsi_cmnd *cmd)
1636 struct aac_hba_cmd_req *hbacmd = aac_construct_hbacmd(fib, cmd);
1640 dev = (struct aac_dev *)cmd->device->host->hostdata;
1642 ret = aac_build_sghba(cmd, hbacmd,
1655 (void *) cmd);
2606 struct scsi_cmnd *cmd = context;
2608 if (!aac_valid_context(cmd, fibptr))
2618 cmd->result = DID_OK << 16 |
2621 struct scsi_device *sdev = cmd->device;
2627 cmd->result = DID_OK << 16 |
2632 memcpy(cmd->sense_buffer, &dev->fsa_dev[cid].sense_data,
2639 cmd->scsi_done(cmd);
3374 int aac_dev_ioctl(struct aac_dev *dev, unsigned int cmd, void __user *arg)
3376 switch (cmd) {
3392 * @context: the context set in the fib - here it is scsi cmd
3546 pr_info("aacraid: SRB ERROR(%u) %s scsi cmd 0x%x -scsi status 0x%x\n",
3682 * @context: the context set in the fib - here it is scsi cmd
3862 printk(KERN_WARNING"aacraid: cmd len %08lX cmd underflow %08X\n",
3906 printk(KERN_WARNING"aacraid: cmd len %08lX cmd underflow %08X\n",
3954 printk(KERN_WARNING"aacraid: cmd len %08lX cmd underflow %08X\n",
4035 printk(KERN_WARNING"aacraid: cmd len %08lX cmd underflow %08X\n",
4139 pr_warn("aacraid: cmd len %08lX cmd underflow %08X\n",