Lines Matching refs:c

194 static int sendcmd_withirq_core(ctlr_info_t *h, CommandList_struct *c,
196 static int process_sendcmd_error(ctlr_info_t *h, CommandList_struct *c);
200 static int check_for_unit_attention(ctlr_info_t *h, CommandList_struct *c);
248 static void set_performant_mode(ctlr_info_t *h, CommandList_struct *c) in set_performant_mode() argument
251 c->busaddr |= 1 | (h->blockFetchTable[c->Header.SGList] << 1); in set_performant_mode()
257 static inline void addQ(struct list_head *list, CommandList_struct *c) in addQ() argument
259 list_add_tail(&c->list, list); in addQ()
262 static inline void removeQ(CommandList_struct *c) in removeQ() argument
272 if (WARN_ON(list_empty(&c->list))) { in removeQ()
273 c->cmd_type = CMD_MSG_STALE; in removeQ()
277 list_del_init(&c->list); in removeQ()
281 CommandList_struct *c) in enqueue_cmd_and_start_io() argument
284 set_performant_mode(h, c); in enqueue_cmd_and_start_io()
286 addQ(&h->reqQ, c); in enqueue_cmd_and_start_io()
338 static void cciss_unmap_sg_chain_block(ctlr_info_t *h, CommandList_struct *c) in cciss_unmap_sg_chain_block() argument
343 if (c->Header.SGTotal <= h->max_cmd_sgentries) in cciss_unmap_sg_chain_block()
346 chain_sg = &c->SG[h->max_cmd_sgentries - 1]; in cciss_unmap_sg_chain_block()
352 static void cciss_map_sg_chain_block(ctlr_info_t *h, CommandList_struct *c, in cciss_map_sg_chain_block() argument
358 chain_sg = &c->SG[h->max_cmd_sgentries - 1]; in cciss_map_sg_chain_block()
976 CommandList_struct *c; in cmd_alloc() local
986 c = h->cmd_pool + i; in cmd_alloc()
987 memset(c, 0, sizeof(CommandList_struct)); in cmd_alloc()
989 c->err_info = h->errinfo_pool + i; in cmd_alloc()
990 memset(c->err_info, 0, sizeof(ErrorInfo_struct)); in cmd_alloc()
995 c->cmdindex = i; in cmd_alloc()
997 INIT_LIST_HEAD(&c->list); in cmd_alloc()
998 c->busaddr = (__u32) cmd_dma_handle; in cmd_alloc()
1000 c->ErrDesc.Addr.lower = temp64.val32.lower; in cmd_alloc()
1001 c->ErrDesc.Addr.upper = temp64.val32.upper; in cmd_alloc()
1002 c->ErrDesc.Len = sizeof(ErrorInfo_struct); in cmd_alloc()
1004 c->ctlr = h->ctlr; in cmd_alloc()
1005 return c; in cmd_alloc()
1013 CommandList_struct *c; in cmd_special_alloc() local
1017 c = pci_zalloc_consistent(h->pdev, sizeof(CommandList_struct), in cmd_special_alloc()
1019 if (c == NULL) in cmd_special_alloc()
1022 c->cmdindex = -1; in cmd_special_alloc()
1024 c->err_info = pci_zalloc_consistent(h->pdev, sizeof(ErrorInfo_struct), in cmd_special_alloc()
1027 if (c->err_info == NULL) { in cmd_special_alloc()
1029 sizeof(CommandList_struct), c, cmd_dma_handle); in cmd_special_alloc()
1033 INIT_LIST_HEAD(&c->list); in cmd_special_alloc()
1034 c->busaddr = (__u32) cmd_dma_handle; in cmd_special_alloc()
1036 c->ErrDesc.Addr.lower = temp64.val32.lower; in cmd_special_alloc()
1037 c->ErrDesc.Addr.upper = temp64.val32.upper; in cmd_special_alloc()
1038 c->ErrDesc.Len = sizeof(ErrorInfo_struct); in cmd_special_alloc()
1040 c->ctlr = h->ctlr; in cmd_special_alloc()
1041 return c; in cmd_special_alloc()
1044 static void cmd_free(ctlr_info_t *h, CommandList_struct *c) in cmd_free() argument
1048 i = c - h->cmd_pool; in cmd_free()
1053 static void cmd_special_free(ctlr_info_t *h, CommandList_struct *c) in cmd_special_free() argument
1057 temp64.val32.lower = c->ErrDesc.Addr.lower; in cmd_special_free()
1058 temp64.val32.upper = c->ErrDesc.Addr.upper; in cmd_special_free()
1060 c->err_info, (dma_addr_t) temp64.val); in cmd_special_free()
1061 pci_free_consistent(h->pdev, sizeof(CommandList_struct), c, in cmd_special_free()
1062 (dma_addr_t) cciss_tag_discard_error_bits(h, (u32) c->busaddr)); in cmd_special_free()
1275 static void check_ioctl_unit_attention(ctlr_info_t *h, CommandList_struct *c) in check_ioctl_unit_attention() argument
1277 if (c->err_info->CommandStatus == CMD_TARGET_STATUS && in check_ioctl_unit_attention()
1278 c->err_info->ScsiStatus != SAM_STAT_CHECK_CONDITION) in check_ioctl_unit_attention()
1279 (void)check_for_unit_attention(h, c); in check_ioctl_unit_attention()
1464 CommandList_struct *c; in cciss_passthru() local
1496 c = cmd_special_alloc(h); in cciss_passthru()
1497 if (!c) { in cciss_passthru()
1502 c->cmd_type = CMD_IOCTL_PEND; in cciss_passthru()
1504 c->Header.ReplyQueue = 0; /* unused in simple mode */ in cciss_passthru()
1506 c->Header.SGList = 1; in cciss_passthru()
1507 c->Header.SGTotal = 1; in cciss_passthru()
1509 c->Header.SGList = 0; in cciss_passthru()
1510 c->Header.SGTotal = 0; in cciss_passthru()
1512 c->Header.LUN = iocommand.LUN_info; in cciss_passthru()
1514 c->Header.Tag.lower = c->busaddr; in cciss_passthru()
1517 c->Request = iocommand.Request; in cciss_passthru()
1523 c->SG[0].Addr.lower = temp64.val32.lower; in cciss_passthru()
1524 c->SG[0].Addr.upper = temp64.val32.upper; in cciss_passthru()
1525 c->SG[0].Len = iocommand.buf_size; in cciss_passthru()
1526 c->SG[0].Ext = 0; /* we are not chaining */ in cciss_passthru()
1528 c->waiting = &wait; in cciss_passthru()
1530 enqueue_cmd_and_start_io(h, c); in cciss_passthru()
1534 temp64.val32.lower = c->SG[0].Addr.lower; in cciss_passthru()
1535 temp64.val32.upper = c->SG[0].Addr.upper; in cciss_passthru()
1538 check_ioctl_unit_attention(h, c); in cciss_passthru()
1541 iocommand.error_info = *(c->err_info); in cciss_passthru()
1544 cmd_special_free(h, c); in cciss_passthru()
1552 cmd_special_free(h, c); in cciss_passthru()
1557 cmd_special_free(h, c); in cciss_passthru()
1564 CommandList_struct *c; in cciss_bigpassthru() local
1635 c = cmd_special_alloc(h); in cciss_bigpassthru()
1636 if (!c) { in cciss_bigpassthru()
1640 c->cmd_type = CMD_IOCTL_PEND; in cciss_bigpassthru()
1641 c->Header.ReplyQueue = 0; in cciss_bigpassthru()
1642 c->Header.SGList = sg_used; in cciss_bigpassthru()
1643 c->Header.SGTotal = sg_used; in cciss_bigpassthru()
1644 c->Header.LUN = ioc->LUN_info; in cciss_bigpassthru()
1645 c->Header.Tag.lower = c->busaddr; in cciss_bigpassthru()
1647 c->Request = ioc->Request; in cciss_bigpassthru()
1651 c->SG[i].Addr.lower = temp64.val32.lower; in cciss_bigpassthru()
1652 c->SG[i].Addr.upper = temp64.val32.upper; in cciss_bigpassthru()
1653 c->SG[i].Len = buff_size[i]; in cciss_bigpassthru()
1654 c->SG[i].Ext = 0; /* we are not chaining */ in cciss_bigpassthru()
1656 c->waiting = &wait; in cciss_bigpassthru()
1657 enqueue_cmd_and_start_io(h, c); in cciss_bigpassthru()
1661 temp64.val32.lower = c->SG[i].Addr.lower; in cciss_bigpassthru()
1662 temp64.val32.upper = c->SG[i].Addr.upper; in cciss_bigpassthru()
1667 check_ioctl_unit_attention(h, c); in cciss_bigpassthru()
1669 ioc->error_info = *(c->err_info); in cciss_bigpassthru()
1671 cmd_special_free(h, c); in cciss_bigpassthru()
1680 cmd_special_free(h, c); in cciss_bigpassthru()
1687 cmd_special_free(h, c); in cciss_bigpassthru()
1814 CommandList_struct *c = rq->completion_data; in cciss_softirq_done() local
1815 ctlr_info_t *h = hba[c->ctlr]; in cciss_softirq_done()
1816 SGDescriptor_struct *curr_sg = c->SG; in cciss_softirq_done()
1822 if (c->Request.Type.Direction == XFER_READ) in cciss_softirq_done()
1829 for (i = 0; i < c->Header.SGList; i++) { in cciss_softirq_done()
1831 cciss_unmap_sg_chain_block(h, c); in cciss_softirq_done()
1833 curr_sg = h->cmd_sg_list[c->cmdindex]; in cciss_softirq_done()
1847 rq->resid_len = c->err_info->ResidualCnt; in cciss_softirq_done()
1852 cmd_free(h, c); in cciss_softirq_done()
2526 static int fill_cmd(ctlr_info_t *h, CommandList_struct *c, __u8 cmd, void *buff, in fill_cmd() argument
2533 c->cmd_type = CMD_IOCTL_PEND; in fill_cmd()
2534 c->Header.ReplyQueue = 0; in fill_cmd()
2536 c->Header.SGList = 1; in fill_cmd()
2537 c->Header.SGTotal = 1; in fill_cmd()
2539 c->Header.SGList = 0; in fill_cmd()
2540 c->Header.SGTotal = 0; in fill_cmd()
2542 c->Header.Tag.lower = c->busaddr; in fill_cmd()
2543 memcpy(c->Header.LUN.LunAddrBytes, scsi3addr, 8); in fill_cmd()
2545 c->Request.Type.Type = cmd_type; in fill_cmd()
2551 c->Request.CDB[1] = 0x01; in fill_cmd()
2552 c->Request.CDB[2] = page_code; in fill_cmd()
2554 c->Request.CDBLen = 6; in fill_cmd()
2555 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2556 c->Request.Type.Direction = XFER_READ; in fill_cmd()
2557 c->Request.Timeout = 0; in fill_cmd()
2558 c->Request.CDB[0] = CISS_INQUIRY; in fill_cmd()
2559 c->Request.CDB[4] = size & 0xFF; in fill_cmd()
2566 c->Request.CDBLen = 12; in fill_cmd()
2567 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2568 c->Request.Type.Direction = XFER_READ; in fill_cmd()
2569 c->Request.Timeout = 0; in fill_cmd()
2570 c->Request.CDB[0] = cmd; in fill_cmd()
2571 c->Request.CDB[6] = (size >> 24) & 0xFF; /* MSB */ in fill_cmd()
2572 c->Request.CDB[7] = (size >> 16) & 0xFF; in fill_cmd()
2573 c->Request.CDB[8] = (size >> 8) & 0xFF; in fill_cmd()
2574 c->Request.CDB[9] = size & 0xFF; in fill_cmd()
2578 c->Request.CDBLen = 10; in fill_cmd()
2579 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2580 c->Request.Type.Direction = XFER_READ; in fill_cmd()
2581 c->Request.Timeout = 0; in fill_cmd()
2582 c->Request.CDB[0] = cmd; in fill_cmd()
2585 c->Request.CDBLen = 16; in fill_cmd()
2586 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2587 c->Request.Type.Direction = XFER_READ; in fill_cmd()
2588 c->Request.Timeout = 0; in fill_cmd()
2589 c->Request.CDB[0] = cmd; in fill_cmd()
2590 c->Request.CDB[1] = 0x10; in fill_cmd()
2591 c->Request.CDB[10] = (size >> 24) & 0xFF; in fill_cmd()
2592 c->Request.CDB[11] = (size >> 16) & 0xFF; in fill_cmd()
2593 c->Request.CDB[12] = (size >> 8) & 0xFF; in fill_cmd()
2594 c->Request.CDB[13] = size & 0xFF; in fill_cmd()
2595 c->Request.Timeout = 0; in fill_cmd()
2596 c->Request.CDB[0] = cmd; in fill_cmd()
2599 c->Request.CDBLen = 12; in fill_cmd()
2600 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2601 c->Request.Type.Direction = XFER_WRITE; in fill_cmd()
2602 c->Request.Timeout = 0; in fill_cmd()
2603 c->Request.CDB[0] = BMIC_WRITE; in fill_cmd()
2604 c->Request.CDB[6] = BMIC_CACHE_FLUSH; in fill_cmd()
2605 c->Request.CDB[7] = (size >> 8) & 0xFF; in fill_cmd()
2606 c->Request.CDB[8] = size & 0xFF; in fill_cmd()
2609 c->Request.CDBLen = 6; in fill_cmd()
2610 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2611 c->Request.Type.Direction = XFER_NONE; in fill_cmd()
2612 c->Request.Timeout = 0; in fill_cmd()
2621 c->Request.CDBLen = 12; in fill_cmd()
2622 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2623 c->Request.Type.Direction = XFER_WRITE; in fill_cmd()
2624 c->Request.Timeout = 0; in fill_cmd()
2625 c->Request.CDB[0] = cmd; /* abort */ in fill_cmd()
2626 c->Request.CDB[1] = 0; /* abort a command */ in fill_cmd()
2628 memcpy(&c->Request.CDB[4], buff, 8); in fill_cmd()
2631 c->Request.CDBLen = 16; in fill_cmd()
2632 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2633 c->Request.Type.Direction = XFER_NONE; in fill_cmd()
2634 c->Request.Timeout = 0; in fill_cmd()
2635 memset(&c->Request.CDB[0], 0, sizeof(c->Request.CDB)); in fill_cmd()
2636 c->Request.CDB[0] = cmd; /* reset */ in fill_cmd()
2637 c->Request.CDB[1] = CCISS_RESET_TYPE_TARGET; in fill_cmd()
2640 c->Request.CDBLen = 1; in fill_cmd()
2641 c->Request.Type.Attribute = ATTR_SIMPLE; in fill_cmd()
2642 c->Request.Type.Direction = XFER_WRITE; in fill_cmd()
2643 c->Request.Timeout = 0; in fill_cmd()
2644 c->Request.CDB[0] = cmd; in fill_cmd()
2660 c->SG[0].Addr.lower = buff_dma_handle.val32.lower; in fill_cmd()
2661 c->SG[0].Addr.upper = buff_dma_handle.val32.upper; in fill_cmd()
2662 c->SG[0].Len = size; in fill_cmd()
2663 c->SG[0].Ext = 0; /* we are not chaining */ in fill_cmd()
2671 CommandList_struct *c; in cciss_send_reset() local
2674 c = cmd_alloc(h); in cciss_send_reset()
2675 if (!c) in cciss_send_reset()
2677 return_status = fill_cmd(h, c, CCISS_RESET_MSG, NULL, 0, 0, in cciss_send_reset()
2679 c->Request.CDB[1] = reset_type; /* fill_cmd defaults to target reset */ in cciss_send_reset()
2681 cmd_special_free(h, c); in cciss_send_reset()
2684 c->waiting = NULL; in cciss_send_reset()
2685 enqueue_cmd_and_start_io(h, c); in cciss_send_reset()
2693 static int check_target_status(ctlr_info_t *h, CommandList_struct *c) in check_target_status() argument
2695 switch (c->err_info->ScsiStatus) { in check_target_status()
2699 switch (0xf & c->err_info->SenseInfo[2]) { in check_target_status()
2703 if (check_for_unit_attention(h, c)) in check_target_status()
2707 c->Request.CDB[0], c->err_info->SenseInfo[2]); in check_target_status()
2713 c->Request.CDB[0], c->err_info->ScsiStatus); in check_target_status()
2719 static int process_sendcmd_error(ctlr_info_t *h, CommandList_struct *c) in process_sendcmd_error() argument
2723 if (c->err_info->CommandStatus == CMD_SUCCESS) in process_sendcmd_error()
2726 switch (c->err_info->CommandStatus) { in process_sendcmd_error()
2728 return_status = check_target_status(h, c); in process_sendcmd_error()
2736 "reported invalid\n", c->Request.CDB[0]); in process_sendcmd_error()
2741 "protocol error\n", c->Request.CDB[0]); in process_sendcmd_error()
2746 " hardware error\n", c->Request.CDB[0]); in process_sendcmd_error()
2751 "connection lost\n", c->Request.CDB[0]); in process_sendcmd_error()
2756 "aborted\n", c->Request.CDB[0]); in process_sendcmd_error()
2761 "abort failed\n", c->Request.CDB[0]); in process_sendcmd_error()
2766 c->Request.CDB[0]); in process_sendcmd_error()
2775 "unknown status %x\n", c->Request.CDB[0], in process_sendcmd_error()
2776 c->err_info->CommandStatus); in process_sendcmd_error()
2782 static int sendcmd_withirq_core(ctlr_info_t *h, CommandList_struct *c, in sendcmd_withirq_core() argument
2790 c->waiting = &wait; in sendcmd_withirq_core()
2791 enqueue_cmd_and_start_io(h, c); in sendcmd_withirq_core()
2795 if (c->err_info->CommandStatus == 0 || !attempt_retry) in sendcmd_withirq_core()
2798 return_status = process_sendcmd_error(h, c); in sendcmd_withirq_core()
2801 c->retry_count < MAX_CMD_RETRIES) { in sendcmd_withirq_core()
2803 c->Request.CDB[0]); in sendcmd_withirq_core()
2804 c->retry_count++; in sendcmd_withirq_core()
2806 memset(c->err_info, 0, sizeof(ErrorInfo_struct)); in sendcmd_withirq_core()
2814 buff_dma_handle.val32.lower = c->SG[0].Addr.lower; in sendcmd_withirq_core()
2815 buff_dma_handle.val32.upper = c->SG[0].Addr.upper; in sendcmd_withirq_core()
2817 c->SG[0].Len, PCI_DMA_BIDIRECTIONAL); in sendcmd_withirq_core()
2825 CommandList_struct *c; in sendcmd_withirq() local
2828 c = cmd_special_alloc(h); in sendcmd_withirq()
2829 if (!c) in sendcmd_withirq()
2831 return_status = fill_cmd(h, c, cmd, buff, size, page_code, in sendcmd_withirq()
2834 return_status = sendcmd_withirq_core(h, c, 1); in sendcmd_withirq()
2836 cmd_special_free(h, c); in sendcmd_withirq()
3006 CommandList_struct *c; in start_io() local
3009 c = list_entry(h->reqQ.next, CommandList_struct, list); in start_io()
3017 removeQ(c); in start_io()
3021 h->access.submit_command(h, c); in start_io()
3024 addQ(&h->cmpQ, c); in start_io()
3031 static inline void resend_cciss_cmd(ctlr_info_t *h, CommandList_struct *c) in resend_cciss_cmd() argument
3034 memset(c->err_info, 0, sizeof(ErrorInfo_struct)); in resend_cciss_cmd()
3037 addQ(&h->reqQ, c); in resend_cciss_cmd()
3288 CommandList_struct *c; in do_cciss_request() local
3307 c = cmd_alloc(h); in do_cciss_request()
3308 if (!c) in do_cciss_request()
3313 tmp_sg = h->scatter_list[c->cmdindex]; in do_cciss_request()
3316 c->cmd_type = CMD_RWREQ; in do_cciss_request()
3317 c->rq = creq; in do_cciss_request()
3321 c->Header.ReplyQueue = 0; /* unused in simple mode */ in do_cciss_request()
3325 cciss_set_tag_index(&c->Header.Tag.lower, c->cmdindex); in do_cciss_request()
3326 cciss_mark_tag_indexed(&c->Header.Tag.lower); in do_cciss_request()
3327 memcpy(&c->Header.LUN, drv->LunID, sizeof(drv->LunID)); in do_cciss_request()
3328 c->Request.CDBLen = 10; /* 12 byte commands not in FW yet; */ in do_cciss_request()
3329 c->Request.Type.Type = TYPE_CMD; /* It is a command. */ in do_cciss_request()
3330 c->Request.Type.Attribute = ATTR_SIMPLE; in do_cciss_request()
3331 c->Request.Type.Direction = in do_cciss_request()
3333 c->Request.Timeout = 0; /* Don't time out */ in do_cciss_request()
3334 c->Request.CDB[0] = in do_cciss_request()
3343 if (c->Request.Type.Direction == XFER_READ) in do_cciss_request()
3348 curr_sg = c->SG; in do_cciss_request()
3356 curr_sg = h->cmd_sg_list[c->cmdindex]; in do_cciss_request()
3370 cciss_map_sg_chain_block(h, c, h->cmd_sg_list[c->cmdindex], in do_cciss_request()
3382 c->Header.SGTotal = seg + chained; in do_cciss_request()
3384 c->Header.SGList = c->Header.SGTotal; in do_cciss_request()
3386 c->Header.SGList = h->max_cmd_sgentries; in do_cciss_request()
3387 set_performant_mode(h, c); in do_cciss_request()
3391 c->Request.CDB[1] = 0; in do_cciss_request()
3392 c->Request.CDB[2] = (start_blk >> 24) & 0xff; /* MSB */ in do_cciss_request()
3393 c->Request.CDB[3] = (start_blk >> 16) & 0xff; in do_cciss_request()
3394 c->Request.CDB[4] = (start_blk >> 8) & 0xff; in do_cciss_request()
3395 c->Request.CDB[5] = start_blk & 0xff; in do_cciss_request()
3396 c->Request.CDB[6] = 0; /* (sect >> 24) & 0xff; MSB */ in do_cciss_request()
3397 c->Request.CDB[7] = (blk_rq_sectors(creq) >> 8) & 0xff; in do_cciss_request()
3398 c->Request.CDB[8] = blk_rq_sectors(creq) & 0xff; in do_cciss_request()
3399 c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0; in do_cciss_request()
3403 c->Request.CDBLen = 16; in do_cciss_request()
3404 c->Request.CDB[1]= 0; in do_cciss_request()
3405 c->Request.CDB[2]= (upper32 >> 24) & 0xff; /* MSB */ in do_cciss_request()
3406 c->Request.CDB[3]= (upper32 >> 16) & 0xff; in do_cciss_request()
3407 c->Request.CDB[4]= (upper32 >> 8) & 0xff; in do_cciss_request()
3408 c->Request.CDB[5]= upper32 & 0xff; in do_cciss_request()
3409 c->Request.CDB[6]= (start_blk >> 24) & 0xff; in do_cciss_request()
3410 c->Request.CDB[7]= (start_blk >> 16) & 0xff; in do_cciss_request()
3411 c->Request.CDB[8]= (start_blk >> 8) & 0xff; in do_cciss_request()
3412 c->Request.CDB[9]= start_blk & 0xff; in do_cciss_request()
3413 c->Request.CDB[10]= (blk_rq_sectors(creq) >> 24) & 0xff; in do_cciss_request()
3414 c->Request.CDB[11]= (blk_rq_sectors(creq) >> 16) & 0xff; in do_cciss_request()
3415 c->Request.CDB[12]= (blk_rq_sectors(creq) >> 8) & 0xff; in do_cciss_request()
3416 c->Request.CDB[13]= blk_rq_sectors(creq) & 0xff; in do_cciss_request()
3417 c->Request.CDB[14] = c->Request.CDB[15] = 0; in do_cciss_request()
3420 c->Request.CDBLen = creq->cmd_len; in do_cciss_request()
3421 memcpy(c->Request.CDB, creq->cmd, BLK_MAX_CDB); in do_cciss_request()
3430 addQ(&h->reqQ, c); in do_cciss_request()
3471 static inline void finish_cmd(ctlr_info_t *h, CommandList_struct *c, in finish_cmd() argument
3474 removeQ(c); in finish_cmd()
3475 if (likely(c->cmd_type == CMD_RWREQ)) in finish_cmd()
3476 complete_command(h, c, 0); in finish_cmd()
3477 else if (c->cmd_type == CMD_IOCTL_PEND) in finish_cmd()
3478 complete(c->waiting); in finish_cmd()
3480 else if (c->cmd_type == CMD_SCSI) in finish_cmd()
3481 complete_scsi_command(c, 0, raw_tag); in finish_cmd()
3511 CommandList_struct *c; in process_indexed_cmd() local
3516 c = h->cmd_pool + tag_index; in process_indexed_cmd()
3517 finish_cmd(h, c, raw_tag); in process_indexed_cmd()
3524 CommandList_struct *c = NULL; in process_nonindexed_cmd() local
3528 list_for_each_entry(c, &h->cmpQ, list) { in process_nonindexed_cmd()
3529 busaddr_masked = cciss_tag_discard_error_bits(h, c->busaddr); in process_nonindexed_cmd()
3531 finish_cmd(h, c, raw_tag); in process_nonindexed_cmd()
3760 static int check_for_unit_attention(ctlr_info_t *h, CommandList_struct *c) in check_for_unit_attention() argument
3762 if (c->err_info->SenseInfo[2] != UNIT_ATTENTION) in check_for_unit_attention()
3765 switch (c->err_info->SenseInfo[12]) { in check_for_unit_attention()