H A D | card_ddcb.c | 118 * pddcb->priv[6] = 0xcc; # cleared 121 * pddcb->priv[7] = 0xaa; # appended 124 * pddcb->priv[7] = 0xbb; # tapped 127 * pddcb->priv[6] = 0xff; # finished 130 static inline void ddcb_mark_tapped(struct ddcb *pddcb) ddcb_mark_tapped() argument 132 pddcb->priv[7] = 0xbb; /* tapped */ ddcb_mark_tapped() 135 static inline void ddcb_mark_appended(struct ddcb *pddcb) ddcb_mark_appended() argument 137 pddcb->priv[7] = 0xaa; /* appended */ ddcb_mark_appended() 140 static inline void ddcb_mark_cleared(struct ddcb *pddcb) ddcb_mark_cleared() argument 142 pddcb->priv[6] = 0xcc; /* cleared */ ddcb_mark_cleared() 145 static inline void ddcb_mark_finished(struct ddcb *pddcb) ddcb_mark_finished() argument 147 pddcb->priv[6] = 0xff; /* finished */ ddcb_mark_finished() 150 static inline void ddcb_mark_unused(struct ddcb *pddcb) ddcb_mark_unused() argument 152 pddcb->priv_64 = cpu_to_be64(0); /* not tapped */ ddcb_mark_unused() 175 struct ddcb *pddcb; print_ddcb_info() local 185 pddcb = queue->ddcb_vaddr; print_ddcb_info() 191 be16_to_cpu(pddcb->retc_16), print_ddcb_info() 192 be16_to_cpu(pddcb->seqnum_16), print_ddcb_info() 193 pddcb->hsi, print_ddcb_info() 194 pddcb->shi, print_ddcb_info() 195 be64_to_cpu(pddcb->priv_64), print_ddcb_info() 196 pddcb->cmd); print_ddcb_info() 197 pddcb++; print_ddcb_info() 275 struct ddcb *pddcb, int ddcb_no) enqueue_ddcb() 288 ddcb_mark_unused(pddcb); enqueue_ddcb() 299 ddcb_mark_appended(pddcb); enqueue_ddcb() 317 ddcb_mark_tapped(pddcb); enqueue_ddcb() 340 struct ddcb *pddcb = &queue->ddcb_vaddr[req->num]; copy_ddcb_results() local 342 memcpy(&req->cmd.asv[0], &pddcb->asv[0], DDCB_ASV_LENGTH); copy_ddcb_results() 345 req->cmd.vcrc = be16_to_cpu(pddcb->vcrc_16); copy_ddcb_results() 346 req->cmd.deque_ts = be64_to_cpu(pddcb->deque_ts_64); copy_ddcb_results() 347 req->cmd.cmplt_ts = be64_to_cpu(pddcb->cmplt_ts_64); copy_ddcb_results() 349 req->cmd.attn = be16_to_cpu(pddcb->attn_16); copy_ddcb_results() 350 req->cmd.progress = be32_to_cpu(pddcb->progress_32); copy_ddcb_results() 351 req->cmd.retc = be16_to_cpu(pddcb->retc_16); copy_ddcb_results() 358 memcpy(&req->debug_data.ddcb_finished, pddcb, copy_ddcb_results() 383 struct ddcb *pddcb; genwqe_check_ddcb_queue() local 387 pddcb = &queue->ddcb_vaddr[queue->ddcb_act]; genwqe_check_ddcb_queue() 389 if ((pddcb->icrc_hsi_shi_32 & DDCB_COMPLETED_BE32) == genwqe_check_ddcb_queue() 411 retc_16 = be16_to_cpu(pddcb->retc_16); genwqe_check_ddcb_queue() 412 if ((pddcb->hsi == 0x44) && (retc_16 <= 0x101)) { genwqe_check_ddcb_queue() 414 u64 ddcb_offs = (u64)pddcb - (u64)queue->ddcb_vaddr; genwqe_check_ddcb_queue() 421 __func__, be16_to_cpu(pddcb->seqnum_16), genwqe_check_ddcb_queue() 422 pddcb->hsi, retc_16, errcnts, status, genwqe_check_ddcb_queue() 430 genwqe_hexdump(pci_dev, pddcb, sizeof(*pddcb)); genwqe_check_ddcb_queue() 432 ddcb_mark_finished(pddcb); genwqe_check_ddcb_queue() 435 vcrc = genwqe_crc16(pddcb->asv, genwqe_check_ddcb_queue() 438 vcrc_16 = be16_to_cpu(pddcb->vcrc_16); genwqe_check_ddcb_queue() 443 pddcb->pre, VCRC_LENGTH(req->cmd.asv_length), genwqe_check_ddcb_queue() 513 struct ddcb *pddcb; __genwqe_wait_ddcb() local 532 pddcb = &queue->ddcb_vaddr[req->num]; __genwqe_wait_ddcb() 533 genwqe_hexdump(pci_dev, pddcb, sizeof(*pddcb)); __genwqe_wait_ddcb() 576 struct ddcb *pddcb; get_next_ddcb() local 582 pddcb = &queue->ddcb_vaddr[queue->ddcb_next]; get_next_ddcb() 586 if ((pddcb->icrc_hsi_shi_32 & DDCB_COMPLETED_BE32) == 0x00000000) get_next_ddcb() 593 pu64 = (u64 *)pddcb; get_next_ddcb() 604 pddcb->pre = DDCB_PRESET_PRE; /* 128 */ get_next_ddcb() 605 pddcb->seqnum_16 = cpu_to_be16(queue->ddcb_seq++); get_next_ddcb() 606 return pddcb; get_next_ddcb() 626 struct ddcb *pddcb = NULL; __genwqe_purge_ddcb() local 642 pddcb = &queue->ddcb_vaddr[req->num]; __genwqe_purge_ddcb() 653 old = pddcb->icrc_hsi_shi_32; /* read SHI/HSI in BE32 */ __genwqe_purge_ddcb() 657 icrc_hsi_shi = cmpxchg(&pddcb->icrc_hsi_shi_32, __genwqe_purge_ddcb() 665 icrc_hsi_shi = pddcb->icrc_hsi_shi_32; __genwqe_purge_ddcb() 687 ddcb_mark_cleared(pddcb); __genwqe_purge_ddcb() 699 icrc_hsi_shi = pddcb->icrc_hsi_shi_32; __genwqe_purge_ddcb() 717 genwqe_hexdump(pci_dev, pddcb, sizeof(*pddcb)); __genwqe_purge_ddcb() 761 struct ddcb *pddcb; __genwqe_enqueue_ddcb() local 791 pddcb = get_next_ddcb(cd, queue, &req->num); /* get ptr and num */ __genwqe_enqueue_ddcb() 792 if (pddcb == NULL) { __genwqe_enqueue_ddcb() 824 pddcb->cmdopts_16 = cpu_to_be16(req->cmd.cmdopts); __genwqe_enqueue_ddcb() 825 pddcb->cmd = req->cmd.cmd; __genwqe_enqueue_ddcb() 826 pddcb->acfunc = req->cmd.acfunc; /* functional unit */ __genwqe_enqueue_ddcb() 837 pddcb->xdir = 0x1; __genwqe_enqueue_ddcb() 839 pddcb->xdir = 0x0; __genwqe_enqueue_ddcb() 842 pddcb->psp = (((req->cmd.asiv_length / 8) << 4) | __genwqe_enqueue_ddcb() 844 pddcb->disp_ts_64 = cpu_to_be64(req->cmd.disp_ts); __genwqe_enqueue_ddcb() 860 memcpy(&pddcb->__asiv[0], /* destination */ __genwqe_enqueue_ddcb() 864 pddcb->n.ats_64 = cpu_to_be64(req->cmd.ats); __genwqe_enqueue_ddcb() 865 memcpy(&pddcb->n.asiv[0], /* destination */ __genwqe_enqueue_ddcb() 870 pddcb->icrc_hsi_shi_32 = cpu_to_be32(0x00000000); /* for crc */ __genwqe_enqueue_ddcb() 876 icrc = genwqe_crc16((const u8 *)pddcb, __genwqe_enqueue_ddcb() 878 pddcb->icrc_hsi_shi_32 = cpu_to_be32((u32)icrc << 16); __genwqe_enqueue_ddcb() 882 pddcb->icrc_hsi_shi_32 |= DDCB_INTR_BE32; __genwqe_enqueue_ddcb() 885 genwqe_hexdump(pci_dev, pddcb, sizeof(*pddcb)); __genwqe_enqueue_ddcb() 892 memcpy(&req->debug_data.ddcb_before, pddcb, __genwqe_enqueue_ddcb() 896 enqueue_ddcb(cd, queue, pddcb, req->num); __genwqe_enqueue_ddcb() 983 struct ddcb *pddcb; genwqe_next_ddcb_ready() local 993 pddcb = &queue->ddcb_vaddr[queue->ddcb_act]; genwqe_next_ddcb_ready() 994 if (pddcb->icrc_hsi_shi_32 & DDCB_COMPLETED_BE32) { /* ddcb ready */ genwqe_next_ddcb_ready() 1026 struct ddcb *pddcb; setup_ddcb_queue() local 1068 pddcb = &queue->ddcb_vaddr[i]; /* DDCBs */ setup_ddcb_queue() 1069 pddcb->icrc_hsi_shi_32 = DDCB_COMPLETED_BE32; setup_ddcb_queue() 1070 pddcb->retc_16 = cpu_to_be16(0xfff); setup_ddcb_queue() 274 enqueue_ddcb(struct genwqe_dev *cd, struct ddcb_queue *queue, struct ddcb *pddcb, int ddcb_no) enqueue_ddcb() argument
|