Lines Matching refs:cp

763 	struct io_accel1_cmd *cp = &h->ioaccel_cmd_pool[c->cmdindex];  in set_ioaccel1_performant_mode()  local
768 cp->ReplyQueue = smp_processor_id() % h->nreply_queues; in set_ioaccel1_performant_mode()
781 struct io_accel2_cmd *cp = &h->ioaccel2_cmd_pool[c->cmdindex]; in set_ioaccel2_performant_mode() local
786 cp->reply_queue = smp_processor_id() % h->nreply_queues; in set_ioaccel2_performant_mode()
792 c->busaddr |= (h->ioaccel2_blockFetchTable[cp->sg_count]); in set_ioaccel2_performant_mode()
1759 static void complete_scsi_command(struct CommandList *cp) in complete_scsi_command() argument
1771 ei = cp->err_info; in complete_scsi_command()
1772 cmd = cp->scsi_cmd; in complete_scsi_command()
1773 h = cp->h; in complete_scsi_command()
1777 if ((cp->cmd_type == CMD_SCSI) && in complete_scsi_command()
1778 (le16_to_cpu(cp->Header.SGTotal) > h->max_cmd_sg_entries)) in complete_scsi_command()
1779 hpsa_unmap_sg_chain_block(h, cp); in complete_scsi_command()
1784 if (cp->cmd_type == CMD_IOACCEL2 || cp->cmd_type == CMD_IOACCEL1) in complete_scsi_command()
1785 atomic_dec(&cp->phys_disk->ioaccel_cmds_out); in complete_scsi_command()
1787 if (cp->cmd_type == CMD_IOACCEL2) in complete_scsi_command()
1788 return process_ioaccel2_completion(h, cp, cmd, dev); in complete_scsi_command()
1794 if (cp->cmd_type == CMD_IOACCEL1) in complete_scsi_command()
1795 atomic_dec(&cp->phys_disk->ioaccel_cmds_out); in complete_scsi_command()
1796 cmd_free(h, cp); in complete_scsi_command()
1814 if (cp->cmd_type == CMD_IOACCEL1) { in complete_scsi_command()
1815 struct io_accel1_cmd *c = &h->ioaccel_cmd_pool[cp->cmdindex]; in complete_scsi_command()
1816 cp->Header.SGList = scsi_sg_count(cmd); in complete_scsi_command()
1817 cp->Header.SGTotal = cpu_to_le16(cp->Header.SGList); in complete_scsi_command()
1818 cp->Request.CDBLen = le16_to_cpu(c->io_flags) & in complete_scsi_command()
1820 cp->Header.tag = c->tag; in complete_scsi_command()
1821 memcpy(cp->Header.LUN.LunAddrBytes, c->CISS_LUN, 8); in complete_scsi_command()
1822 memcpy(cp->Request.CDB, c->CDB, cp->Request.CDBLen); in complete_scsi_command()
1831 INIT_WORK(&cp->work, hpsa_command_resubmit_worker); in complete_scsi_command()
1833 h->resubmit_wq, &cp->work); in complete_scsi_command()
1864 cp, ei->ScsiStatus, in complete_scsi_command()
1869 "Returning no connection.\n", cp), in complete_scsi_command()
1891 "CDB %16phN data overrun\n", cp->Request.CDB); in complete_scsi_command()
1908 cp->Request.CDB); in complete_scsi_command()
1913 cp->Request.CDB); in complete_scsi_command()
1918 cp->Request.CDB); in complete_scsi_command()
1923 cp->Request.CDB, ei->ScsiStatus); in complete_scsi_command()
1928 cp->Request.CDB); in complete_scsi_command()
1933 cp->Request.CDB); in complete_scsi_command()
1938 cp->Request.CDB); in complete_scsi_command()
1950 "cp %p had HP SSD Smart Path error\n", cp); in complete_scsi_command()
1955 cp, ei->CommandStatus); in complete_scsi_command()
1957 cmd_free(h, cp); in complete_scsi_command()
1973 struct CommandList *cp, in hpsa_map_one() argument
1981 cp->Header.SGList = 0; in hpsa_map_one()
1982 cp->Header.SGTotal = cpu_to_le16(0); in hpsa_map_one()
1989 cp->Header.SGList = 0; in hpsa_map_one()
1990 cp->Header.SGTotal = cpu_to_le16(0); in hpsa_map_one()
1993 cp->SG[0].Addr = cpu_to_le64(addr64); in hpsa_map_one()
1994 cp->SG[0].Len = cpu_to_le32(buflen); in hpsa_map_one()
1995 cp->SG[0].Ext = cpu_to_le32(HPSA_SG_LAST); /* we are not chaining */ in hpsa_map_one()
1996 cp->Header.SGList = 1; /* no. SGs contig in this cmd */ in hpsa_map_one()
1997 cp->Header.SGTotal = cpu_to_le16(1); /* total sgs in cmd list */ in hpsa_map_one()
2071 struct CommandList *cp) in hpsa_scsi_interpret_error() argument
2073 const struct ErrorInfo *ei = cp->err_info; in hpsa_scsi_interpret_error()
2074 struct device *d = &cp->h->pdev->dev; in hpsa_scsi_interpret_error()
2079 hpsa_print_cmd(h, "SCSI status", cp); in hpsa_scsi_interpret_error()
2094 hpsa_print_cmd(h, "overrun condition", cp); in hpsa_scsi_interpret_error()
2100 hpsa_print_cmd(h, "invalid command", cp); in hpsa_scsi_interpret_error()
2105 hpsa_print_cmd(h, "protocol error", cp); in hpsa_scsi_interpret_error()
2108 hpsa_print_cmd(h, "hardware error", cp); in hpsa_scsi_interpret_error()
2111 hpsa_print_cmd(h, "connection lost", cp); in hpsa_scsi_interpret_error()
2114 hpsa_print_cmd(h, "aborted", cp); in hpsa_scsi_interpret_error()
2117 hpsa_print_cmd(h, "abort failed", cp); in hpsa_scsi_interpret_error()
2120 hpsa_print_cmd(h, "unsolicited abort", cp); in hpsa_scsi_interpret_error()
2123 hpsa_print_cmd(h, "timed out", cp); in hpsa_scsi_interpret_error()
2126 hpsa_print_cmd(h, "unabortable", cp); in hpsa_scsi_interpret_error()
2129 hpsa_print_cmd(h, "unknown status", cp); in hpsa_scsi_interpret_error()
3259 struct CommandList *cp, in hpsa_scatter_gather() argument
3275 curr_sg = cp->SG; in hpsa_scatter_gather()
3282 curr_sg = h->cmd_sg_list[cp->cmdindex]; in hpsa_scatter_gather()
3296 cp->Header.SGList = h->max_cmd_sg_entries; in hpsa_scatter_gather()
3297 cp->Header.SGTotal = cpu_to_le16(use_sg + 1); in hpsa_scatter_gather()
3298 if (hpsa_map_sg_chain_block(h, cp)) { in hpsa_scatter_gather()
3307 cp->Header.SGList = (u8) use_sg; /* no. SGs contig in this cmd */ in hpsa_scatter_gather()
3308 cp->Header.SGTotal = cpu_to_le16(use_sg); /* total sgs in cmd list */ in hpsa_scatter_gather()
3365 struct io_accel1_cmd *cp = &h->ioaccel_cmd_pool[c->cmdindex]; in hpsa_scsi_ioaccel1_queue_command() local
3391 (c->cmdindex * sizeof(*cp)); in hpsa_scsi_ioaccel1_queue_command()
3401 curr_sg = cp->SG; in hpsa_scsi_ioaccel1_queue_command()
3435 cp->dev_handle = cpu_to_le16(ioaccel_handle & 0xFFFF); in hpsa_scsi_ioaccel1_queue_command()
3436 cp->transfer_len = cpu_to_le32(total_len); in hpsa_scsi_ioaccel1_queue_command()
3437 cp->io_flags = cpu_to_le16(IOACCEL1_IOFLAGS_IO_REQ | in hpsa_scsi_ioaccel1_queue_command()
3439 cp->control = cpu_to_le32(control); in hpsa_scsi_ioaccel1_queue_command()
3440 memcpy(cp->CDB, cdb, cdb_len); in hpsa_scsi_ioaccel1_queue_command()
3441 memcpy(cp->CISS_LUN, scsi3addr, 8); in hpsa_scsi_ioaccel1_queue_command()
3467 struct CommandList *c, struct io_accel2_cmd *cp) in set_encrypt_ioaccel2() argument
3478 cp->dekindex = map->dekindex; in set_encrypt_ioaccel2()
3481 cp->direction |= IOACCEL2_DIRECTION_ENCRYPT_MASK; in set_encrypt_ioaccel2()
3516 cp->tweak_lower = cpu_to_le32(first_block); in set_encrypt_ioaccel2()
3517 cp->tweak_upper = cpu_to_le32(first_block >> 32); in set_encrypt_ioaccel2()
3525 struct io_accel2_cmd *cp = &h->ioaccel2_cmd_pool[c->cmdindex]; in hpsa_scsi_ioaccel2_queue_command() local
3546 (c->cmdindex * sizeof(*cp)); in hpsa_scsi_ioaccel2_queue_command()
3549 memset(cp, 0, sizeof(*cp)); in hpsa_scsi_ioaccel2_queue_command()
3550 cp->IU_type = IOACCEL2_IU_TYPE; in hpsa_scsi_ioaccel2_queue_command()
3560 curr_sg = cp->sg; in hpsa_scsi_ioaccel2_queue_command()
3576 cp->direction &= ~IOACCEL2_DIRECTION_MASK; in hpsa_scsi_ioaccel2_queue_command()
3577 cp->direction |= IOACCEL2_DIR_DATA_OUT; in hpsa_scsi_ioaccel2_queue_command()
3580 cp->direction &= ~IOACCEL2_DIRECTION_MASK; in hpsa_scsi_ioaccel2_queue_command()
3581 cp->direction |= IOACCEL2_DIR_DATA_IN; in hpsa_scsi_ioaccel2_queue_command()
3584 cp->direction &= ~IOACCEL2_DIRECTION_MASK; in hpsa_scsi_ioaccel2_queue_command()
3585 cp->direction |= IOACCEL2_DIR_NO_DATA; in hpsa_scsi_ioaccel2_queue_command()
3594 cp->direction &= ~IOACCEL2_DIRECTION_MASK; in hpsa_scsi_ioaccel2_queue_command()
3595 cp->direction |= IOACCEL2_DIR_NO_DATA; in hpsa_scsi_ioaccel2_queue_command()
3599 set_encrypt_ioaccel2(h, c, cp); in hpsa_scsi_ioaccel2_queue_command()
3601 cp->scsi_nexus = cpu_to_le32(ioaccel_handle); in hpsa_scsi_ioaccel2_queue_command()
3602 cp->Tag = cpu_to_le32(c->cmdindex << DIRECT_LOOKUP_SHIFT); in hpsa_scsi_ioaccel2_queue_command()
3603 memcpy(cp->cdb, cdb, sizeof(cp->cdb)); in hpsa_scsi_ioaccel2_queue_command()
3606 cp->sg_count = (u8) use_sg; in hpsa_scsi_ioaccel2_queue_command()
3608 cp->data_len = cpu_to_le32(total_len); in hpsa_scsi_ioaccel2_queue_command()
3609 cp->err_ptr = cpu_to_le64(c->busaddr + in hpsa_scsi_ioaccel2_queue_command()
3611 cp->err_len = cpu_to_le32(sizeof(cp->error_data)); in hpsa_scsi_ioaccel2_queue_command()
4747 u32 cp; in hpsa_ioctl32_passthru() local
4758 err |= get_user(cp, &arg32->buf); in hpsa_ioctl32_passthru()
4759 arg64.buf = compat_ptr(cp); in hpsa_ioctl32_passthru()
4784 u32 cp; in hpsa_ioctl32_big_passthru() local
4796 err |= get_user(cp, &arg32->buf); in hpsa_ioctl32_big_passthru()
4797 arg64.buf = compat_ptr(cp); in hpsa_ioctl32_big_passthru()
7324 struct io_accel1_cmd *cp = &h->ioaccel_cmd_pool[i]; in hpsa_enter_performant_mode() local
7326 cp->function = IOACCEL1_FUNCTION_SCSIIO; in hpsa_enter_performant_mode()
7327 cp->err_info = (u32) (h->errinfo_pool_dhandle + in hpsa_enter_performant_mode()
7329 cp->err_info_len = sizeof(struct ErrorInfo); in hpsa_enter_performant_mode()
7330 cp->sgl_offset = IOACCEL1_SGLOFFSET; in hpsa_enter_performant_mode()
7331 cp->host_context_flags = in hpsa_enter_performant_mode()
7333 cp->timeout_sec = 0; in hpsa_enter_performant_mode()
7334 cp->ReplyQueue = 0; in hpsa_enter_performant_mode()
7335 cp->tag = in hpsa_enter_performant_mode()
7337 cp->host_addr = in hpsa_enter_performant_mode()