rcd 73 arch/x86/kernel/cpu/mce/apei.c struct cper_mce_record rcd; rcd 75 arch/x86/kernel/cpu/mce/apei.c memset(&rcd, 0, sizeof(rcd)); rcd 76 arch/x86/kernel/cpu/mce/apei.c memcpy(rcd.hdr.signature, CPER_SIG_RECORD, CPER_SIG_SIZE); rcd 77 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.revision = CPER_RECORD_REV; rcd 78 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.signature_end = CPER_SIG_END; rcd 79 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.section_count = 1; rcd 80 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.error_severity = CPER_SEV_FATAL; rcd 82 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.validation_bits = 0; rcd 83 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.record_length = sizeof(rcd); rcd 84 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.creator_id = CPER_CREATOR_MCE; rcd 85 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.notification_type = CPER_NOTIFY_MCE; rcd 86 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.record_id = cper_next_record_id(); rcd 87 arch/x86/kernel/cpu/mce/apei.c rcd.hdr.flags = CPER_HW_ERROR_FLAGS_PREVERR; rcd 89 arch/x86/kernel/cpu/mce/apei.c rcd.sec_hdr.section_offset = (void *)&rcd.mce - (void *)&rcd; rcd 90 arch/x86/kernel/cpu/mce/apei.c rcd.sec_hdr.section_length = sizeof(rcd.mce); rcd 91 arch/x86/kernel/cpu/mce/apei.c rcd.sec_hdr.revision = CPER_SEC_REV; rcd 93 arch/x86/kernel/cpu/mce/apei.c rcd.sec_hdr.validation_bits = 0; rcd 94 arch/x86/kernel/cpu/mce/apei.c rcd.sec_hdr.flags = CPER_SEC_PRIMARY; rcd 95 arch/x86/kernel/cpu/mce/apei.c rcd.sec_hdr.section_type = CPER_SECTION_TYPE_MCE; rcd 96 arch/x86/kernel/cpu/mce/apei.c rcd.sec_hdr.section_severity = CPER_SEV_FATAL; rcd 98 arch/x86/kernel/cpu/mce/apei.c memcpy(&rcd.mce, m, sizeof(*m)); rcd 100 arch/x86/kernel/cpu/mce/apei.c return erst_write(&rcd.hdr); rcd 105 arch/x86/kernel/cpu/mce/apei.c struct cper_mce_record rcd; rcd 118 arch/x86/kernel/cpu/mce/apei.c rc = erst_read(*record_id, &rcd.hdr, sizeof(rcd)); rcd 125 arch/x86/kernel/cpu/mce/apei.c else if (rc != sizeof(rcd) || rcd 126 arch/x86/kernel/cpu/mce/apei.c !guid_equal(&rcd.hdr.creator_id, &CPER_CREATOR_MCE)) rcd 128 arch/x86/kernel/cpu/mce/apei.c memcpy(m, &rcd.mce, sizeof(*m)); rcd 156 drivers/acpi/apei/erst-dbg.c struct cper_record_header *rcd; rcd 183 drivers/acpi/apei/erst-dbg.c rcd = erst_dbg_buf; rcd 185 drivers/acpi/apei/erst-dbg.c if (rcd->record_length != usize) rcd 977 drivers/acpi/apei/erst.c struct cper_pstore_record *rcd; rcd 978 drivers/acpi/apei/erst.c size_t rcd_len = sizeof(*rcd) + erst_info.bufsize; rcd 983 drivers/acpi/apei/erst.c rcd = kmalloc(rcd_len, GFP_KERNEL); rcd 984 drivers/acpi/apei/erst.c if (!rcd) { rcd 999 drivers/acpi/apei/erst.c len = erst_read(record_id, &rcd->hdr, rcd_len); rcd 1003 drivers/acpi/apei/erst.c else if (len < 0 || len < sizeof(*rcd)) { rcd 1007 drivers/acpi/apei/erst.c if (!guid_equal(&rcd->hdr.creator_id, &CPER_CREATOR_PSTORE)) rcd 1015 drivers/acpi/apei/erst.c memcpy(record->buf, rcd->data, len - sizeof(*rcd)); rcd 1019 drivers/acpi/apei/erst.c if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG_Z)) { rcd 1022 drivers/acpi/apei/erst.c } else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG)) rcd 1024 drivers/acpi/apei/erst.c else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_MCE)) rcd 1029 drivers/acpi/apei/erst.c if (rcd->hdr.validation_bits & CPER_VALID_TIMESTAMP) rcd 1030 drivers/acpi/apei/erst.c record->time.tv_sec = rcd->hdr.timestamp; rcd 1036 drivers/acpi/apei/erst.c kfree(rcd); rcd 1037 drivers/acpi/apei/erst.c return (rc < 0) ? rc : (len - sizeof(*rcd)); rcd 1042 drivers/acpi/apei/erst.c struct cper_pstore_record *rcd = (struct cper_pstore_record *) rcd 1043 drivers/acpi/apei/erst.c (erst_info.buf - sizeof(*rcd)); rcd 1046 drivers/acpi/apei/erst.c memset(rcd, 0, sizeof(*rcd)); rcd 1047 drivers/acpi/apei/erst.c memcpy(rcd->hdr.signature, CPER_SIG_RECORD, CPER_SIG_SIZE); rcd 1048 drivers/acpi/apei/erst.c rcd->hdr.revision = CPER_RECORD_REV; rcd 1049 drivers/acpi/apei/erst.c rcd->hdr.signature_end = CPER_SIG_END; rcd 1050 drivers/acpi/apei/erst.c rcd->hdr.section_count = 1; rcd 1051 drivers/acpi/apei/erst.c rcd->hdr.error_severity = CPER_SEV_FATAL; rcd 1053 drivers/acpi/apei/erst.c rcd->hdr.validation_bits = CPER_VALID_TIMESTAMP; rcd 1054 drivers/acpi/apei/erst.c rcd->hdr.timestamp = ktime_get_real_seconds(); rcd 1055 drivers/acpi/apei/erst.c rcd->hdr.record_length = sizeof(*rcd) + record->size; rcd 1056 drivers/acpi/apei/erst.c rcd->hdr.creator_id = CPER_CREATOR_PSTORE; rcd 1057 drivers/acpi/apei/erst.c rcd->hdr.notification_type = CPER_NOTIFY_MCE; rcd 1058 drivers/acpi/apei/erst.c rcd->hdr.record_id = cper_next_record_id(); rcd 1059 drivers/acpi/apei/erst.c rcd->hdr.flags = CPER_HW_ERROR_FLAGS_PREVERR; rcd 1061 drivers/acpi/apei/erst.c rcd->sec_hdr.section_offset = sizeof(*rcd); rcd 1062 drivers/acpi/apei/erst.c rcd->sec_hdr.section_length = record->size; rcd 1063 drivers/acpi/apei/erst.c rcd->sec_hdr.revision = CPER_SEC_REV; rcd 1065 drivers/acpi/apei/erst.c rcd->sec_hdr.validation_bits = 0; rcd 1066 drivers/acpi/apei/erst.c rcd->sec_hdr.flags = CPER_SEC_PRIMARY; rcd 1070 drivers/acpi/apei/erst.c rcd->sec_hdr.section_type = CPER_SECTION_TYPE_DMESG_Z; rcd 1072 drivers/acpi/apei/erst.c rcd->sec_hdr.section_type = CPER_SECTION_TYPE_DMESG; rcd 1075 drivers/acpi/apei/erst.c rcd->sec_hdr.section_type = CPER_SECTION_TYPE_MCE; rcd 1080 drivers/acpi/apei/erst.c rcd->sec_hdr.section_severity = CPER_SEV_FATAL; rcd 1082 drivers/acpi/apei/erst.c ret = erst_write(&rcd->hdr); rcd 1083 drivers/acpi/apei/erst.c record->id = rcd->hdr.record_id; rcd 130 drivers/cpufreq/sa1110-cpufreq.c static inline void set_mdcas(u_int *mdcas, int delayed, u_int rcd) rcd 134 drivers/cpufreq/sa1110-cpufreq.c rcd = 2 * rcd - 1; rcd 135 drivers/cpufreq/sa1110-cpufreq.c shift = delayed + 1 + rcd; rcd 137 drivers/cpufreq/sa1110-cpufreq.c mdcas[0] = (1 << rcd) - 1; rcd 892 drivers/infiniband/hw/hfi1/affinity.c struct hfi1_ctxtdata *rcd = NULL; rcd 911 drivers/infiniband/hw/hfi1/affinity.c rcd = (struct hfi1_ctxtdata *)msix->arg; rcd 912 drivers/infiniband/hw/hfi1/affinity.c if (rcd->ctxt == HFI1_CTRL_CTXT) rcd 916 drivers/infiniband/hw/hfi1/affinity.c scnprintf(extra, 64, "ctxt %u", rcd->ctxt); rcd 970 drivers/infiniband/hw/hfi1/affinity.c struct hfi1_ctxtdata *rcd; rcd 985 drivers/infiniband/hw/hfi1/affinity.c rcd = (struct hfi1_ctxtdata *)msix->arg; rcd 987 drivers/infiniband/hw/hfi1/affinity.c if (rcd->ctxt != HFI1_CTRL_CTXT) rcd 129 drivers/infiniband/hw/hfi1/aspm.c void __aspm_ctx_disable(struct hfi1_ctxtdata *rcd) rcd 136 drivers/infiniband/hw/hfi1/aspm.c spin_lock_irqsave(&rcd->aspm_lock, flags); rcd 138 drivers/infiniband/hw/hfi1/aspm.c if (!rcd->aspm_intr_enable) rcd 141 drivers/infiniband/hw/hfi1/aspm.c prev = rcd->aspm_ts_last_intr; rcd 143 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_ts_last_intr = now; rcd 149 drivers/infiniband/hw/hfi1/aspm.c restart_timer = ktime_to_ns(ktime_sub(now, rcd->aspm_ts_timer_sched)) > rcd 154 drivers/infiniband/hw/hfi1/aspm.c if (rcd->aspm_enabled && close_interrupts) { rcd 155 drivers/infiniband/hw/hfi1/aspm.c aspm_disable_inc(rcd->dd); rcd 156 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_enabled = false; rcd 161 drivers/infiniband/hw/hfi1/aspm.c mod_timer(&rcd->aspm_timer, rcd 163 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_ts_timer_sched = now; rcd 166 drivers/infiniband/hw/hfi1/aspm.c spin_unlock_irqrestore(&rcd->aspm_lock, flags); rcd 172 drivers/infiniband/hw/hfi1/aspm.c struct hfi1_ctxtdata *rcd = from_timer(rcd, t, aspm_timer); rcd 175 drivers/infiniband/hw/hfi1/aspm.c spin_lock_irqsave(&rcd->aspm_lock, flags); rcd 176 drivers/infiniband/hw/hfi1/aspm.c aspm_enable_dec(rcd->dd); rcd 177 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_enabled = true; rcd 178 drivers/infiniband/hw/hfi1/aspm.c spin_unlock_irqrestore(&rcd->aspm_lock, flags); rcd 187 drivers/infiniband/hw/hfi1/aspm.c struct hfi1_ctxtdata *rcd; rcd 192 drivers/infiniband/hw/hfi1/aspm.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 193 drivers/infiniband/hw/hfi1/aspm.c if (rcd) { rcd 194 drivers/infiniband/hw/hfi1/aspm.c del_timer_sync(&rcd->aspm_timer); rcd 195 drivers/infiniband/hw/hfi1/aspm.c spin_lock_irqsave(&rcd->aspm_lock, flags); rcd 196 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_intr_enable = false; rcd 197 drivers/infiniband/hw/hfi1/aspm.c spin_unlock_irqrestore(&rcd->aspm_lock, flags); rcd 198 drivers/infiniband/hw/hfi1/aspm.c hfi1_rcd_put(rcd); rcd 209 drivers/infiniband/hw/hfi1/aspm.c struct hfi1_ctxtdata *rcd; rcd 219 drivers/infiniband/hw/hfi1/aspm.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 220 drivers/infiniband/hw/hfi1/aspm.c if (rcd) { rcd 221 drivers/infiniband/hw/hfi1/aspm.c spin_lock_irqsave(&rcd->aspm_lock, flags); rcd 222 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_intr_enable = true; rcd 223 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_enabled = true; rcd 224 drivers/infiniband/hw/hfi1/aspm.c spin_unlock_irqrestore(&rcd->aspm_lock, flags); rcd 225 drivers/infiniband/hw/hfi1/aspm.c hfi1_rcd_put(rcd); rcd 230 drivers/infiniband/hw/hfi1/aspm.c static void aspm_ctx_init(struct hfi1_ctxtdata *rcd) rcd 232 drivers/infiniband/hw/hfi1/aspm.c spin_lock_init(&rcd->aspm_lock); rcd 233 drivers/infiniband/hw/hfi1/aspm.c timer_setup(&rcd->aspm_timer, aspm_ctx_timer_function, 0); rcd 234 drivers/infiniband/hw/hfi1/aspm.c rcd->aspm_intr_supported = rcd->dd->aspm_supported && rcd 236 drivers/infiniband/hw/hfi1/aspm.c rcd->ctxt < rcd->dd->first_dyn_alloc_ctxt; rcd 241 drivers/infiniband/hw/hfi1/aspm.c struct hfi1_ctxtdata *rcd; rcd 248 drivers/infiniband/hw/hfi1/aspm.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 249 drivers/infiniband/hw/hfi1/aspm.c if (rcd) rcd 250 drivers/infiniband/hw/hfi1/aspm.c aspm_ctx_init(rcd); rcd 251 drivers/infiniband/hw/hfi1/aspm.c hfi1_rcd_put(rcd); rcd 63 drivers/infiniband/hw/hfi1/aspm.h void __aspm_ctx_disable(struct hfi1_ctxtdata *rcd); rcd 67 drivers/infiniband/hw/hfi1/aspm.h static inline void aspm_ctx_disable(struct hfi1_ctxtdata *rcd) rcd 70 drivers/infiniband/hw/hfi1/aspm.h if (likely(!rcd->aspm_intr_supported)) rcd 73 drivers/infiniband/hw/hfi1/aspm.h __aspm_ctx_disable(rcd); rcd 5244 drivers/infiniband/hw/hfi1/chip.c bool is_urg_masked(struct hfi1_ctxtdata *rcd) rcd 5247 drivers/infiniband/hw/hfi1/chip.c u32 is = IS_RCVURGENT_START + rcd->ctxt; rcd 5250 drivers/infiniband/hw/hfi1/chip.c mask = read_csr(rcd->dd, CCE_INT_MASK + (8 * (is / 64))); rcd 6839 drivers/infiniband/hw/hfi1/chip.c struct hfi1_ctxtdata *rcd; rcd 6846 drivers/infiniband/hw/hfi1/chip.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 6847 drivers/infiniband/hw/hfi1/chip.c hfi1_rcvctrl(dd, HFI1_RCVCTRL_CTXT_DIS, rcd); rcd 6848 drivers/infiniband/hw/hfi1/chip.c hfi1_rcd_put(rcd); rcd 6862 drivers/infiniband/hw/hfi1/chip.c struct hfi1_ctxtdata *rcd; rcd 6866 drivers/infiniband/hw/hfi1/chip.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 6869 drivers/infiniband/hw/hfi1/chip.c if (!rcd || rcd 6870 drivers/infiniband/hw/hfi1/chip.c (i >= dd->first_dyn_alloc_ctxt && !rcd->is_vnic)) { rcd 6871 drivers/infiniband/hw/hfi1/chip.c hfi1_rcd_put(rcd); rcd 6876 drivers/infiniband/hw/hfi1/chip.c rcvmask |= rcd->rcvhdrtail_kvaddr ? rcd 6878 drivers/infiniband/hw/hfi1/chip.c hfi1_rcvctrl(dd, rcvmask, rcd); rcd 6879 drivers/infiniband/hw/hfi1/chip.c hfi1_rcd_put(rcd); rcd 8190 drivers/infiniband/hw/hfi1/chip.c struct hfi1_ctxtdata *rcd; rcd 8194 drivers/infiniband/hw/hfi1/chip.c rcd = hfi1_rcd_get_by_index(dd, source); rcd 8195 drivers/infiniband/hw/hfi1/chip.c if (rcd) { rcd 8196 drivers/infiniband/hw/hfi1/chip.c handle_user_interrupt(rcd); rcd 8197 drivers/infiniband/hw/hfi1/chip.c hfi1_rcd_put(rcd); rcd 8221 drivers/infiniband/hw/hfi1/chip.c struct hfi1_ctxtdata *rcd; rcd 8225 drivers/infiniband/hw/hfi1/chip.c rcd = hfi1_rcd_get_by_index(dd, source); rcd 8226 drivers/infiniband/hw/hfi1/chip.c if (rcd) { rcd 8227 drivers/infiniband/hw/hfi1/chip.c handle_user_interrupt(rcd); rcd 8228 drivers/infiniband/hw/hfi1/chip.c hfi1_rcd_put(rcd); rcd 8379 drivers/infiniband/hw/hfi1/chip.c static inline void clear_recv_intr(struct hfi1_ctxtdata *rcd) rcd 8381 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = rcd->dd; rcd 8382 drivers/infiniband/hw/hfi1/chip.c u32 addr = CCE_INT_CLEAR + (8 * rcd->ireg); rcd 8384 drivers/infiniband/hw/hfi1/chip.c write_csr(dd, addr, rcd->imask); rcd 8390 drivers/infiniband/hw/hfi1/chip.c void force_recv_intr(struct hfi1_ctxtdata *rcd) rcd 8392 drivers/infiniband/hw/hfi1/chip.c write_csr(rcd->dd, CCE_INT_FORCE + (8 * rcd->ireg), rcd->imask); rcd 8405 drivers/infiniband/hw/hfi1/chip.c static inline int check_packet_present(struct hfi1_ctxtdata *rcd) rcd 8410 drivers/infiniband/hw/hfi1/chip.c if (!rcd->rcvhdrtail_kvaddr) rcd 8411 drivers/infiniband/hw/hfi1/chip.c present = (rcd->seq_cnt == rcd 8412 drivers/infiniband/hw/hfi1/chip.c rhf_rcv_seq(rhf_to_cpu(get_rhf_addr(rcd)))); rcd 8414 drivers/infiniband/hw/hfi1/chip.c present = (rcd->head != get_rcvhdrtail(rcd)); rcd 8420 drivers/infiniband/hw/hfi1/chip.c tail = (u32)read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_TAIL); rcd 8421 drivers/infiniband/hw/hfi1/chip.c return rcd->head != tail; rcd 8434 drivers/infiniband/hw/hfi1/chip.c struct hfi1_ctxtdata *rcd = data; rcd 8435 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = rcd->dd; rcd 8439 drivers/infiniband/hw/hfi1/chip.c trace_hfi1_receive_interrupt(dd, rcd); rcd 8441 drivers/infiniband/hw/hfi1/chip.c aspm_ctx_disable(rcd); rcd 8444 drivers/infiniband/hw/hfi1/chip.c disposition = rcd->do_interrupt(rcd, 0); rcd 8460 drivers/infiniband/hw/hfi1/chip.c clear_recv_intr(rcd); rcd 8461 drivers/infiniband/hw/hfi1/chip.c present = check_packet_present(rcd); rcd 8463 drivers/infiniband/hw/hfi1/chip.c force_recv_intr(rcd); rcd 8474 drivers/infiniband/hw/hfi1/chip.c struct hfi1_ctxtdata *rcd = data; rcd 8478 drivers/infiniband/hw/hfi1/chip.c (void)rcd->do_interrupt(rcd, 1); rcd 8488 drivers/infiniband/hw/hfi1/chip.c clear_recv_intr(rcd); rcd 8489 drivers/infiniband/hw/hfi1/chip.c present = check_packet_present(rcd); rcd 8491 drivers/infiniband/hw/hfi1/chip.c force_recv_intr(rcd); rcd 9931 drivers/infiniband/hw/hfi1/chip.c void hfi1_clear_tids(struct hfi1_ctxtdata *rcd) rcd 9933 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = rcd->dd; rcd 9937 drivers/infiniband/hw/hfi1/chip.c for (i = rcd->eager_base; i < rcd->eager_base + rcd 9938 drivers/infiniband/hw/hfi1/chip.c rcd->egrbufs.alloced; i++) rcd 9941 drivers/infiniband/hw/hfi1/chip.c for (i = rcd->expected_base; rcd 9942 drivers/infiniband/hw/hfi1/chip.c i < rcd->expected_base + rcd->expected_count; i++) rcd 10063 drivers/infiniband/hw/hfi1/chip.c return (dd->rcd[0]->rcvhdrqentsize - 2/*PBC/RHF*/ + 1/*ICRC*/) << 2; rcd 10108 drivers/infiniband/hw/hfi1/chip.c dd->rcd[0]->rcvhdrqentsize)); rcd 10117 drivers/infiniband/hw/hfi1/chip.c dd->rcd[0]->rcvhdrqentsize)); rcd 11762 drivers/infiniband/hw/hfi1/chip.c static void adjust_rcv_timeout(struct hfi1_ctxtdata *rcd, u32 npkts) rcd 11764 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = rcd->dd; rcd 11765 drivers/infiniband/hw/hfi1/chip.c u32 timeout = rcd->rcvavail_timeout; rcd 11794 drivers/infiniband/hw/hfi1/chip.c rcd->rcvavail_timeout = timeout; rcd 11799 drivers/infiniband/hw/hfi1/chip.c write_kctxt_csr(dd, rcd->ctxt, RCV_AVAIL_TIME_OUT, rcd 11804 drivers/infiniband/hw/hfi1/chip.c void update_usrhead(struct hfi1_ctxtdata *rcd, u32 hd, u32 updegr, u32 egrhd, rcd 11807 drivers/infiniband/hw/hfi1/chip.c struct hfi1_devdata *dd = rcd->dd; rcd 11809 drivers/infiniband/hw/hfi1/chip.c u32 ctxt = rcd->ctxt; rcd 11816 drivers/infiniband/hw/hfi1/chip.c adjust_rcv_timeout(rcd, npkts); rcd 11828 drivers/infiniband/hw/hfi1/chip.c u32 hdrqempty(struct hfi1_ctxtdata *rcd) rcd 11832 drivers/infiniband/hw/hfi1/chip.c head = (read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_HEAD) rcd 11835 drivers/infiniband/hw/hfi1/chip.c if (rcd->rcvhdrtail_kvaddr) rcd 11836 drivers/infiniband/hw/hfi1/chip.c tail = get_rcvhdrtail(rcd); rcd 11838 drivers/infiniband/hw/hfi1/chip.c tail = read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_TAIL); rcd 11880 drivers/infiniband/hw/hfi1/chip.c struct hfi1_ctxtdata *rcd) rcd 11886 drivers/infiniband/hw/hfi1/chip.c if (!rcd) rcd 11889 drivers/infiniband/hw/hfi1/chip.c ctxt = rcd->ctxt; rcd 11899 drivers/infiniband/hw/hfi1/chip.c rcd->rcvhdrq_dma); rcd 11900 drivers/infiniband/hw/hfi1/chip.c if (rcd->rcvhdrtail_kvaddr) rcd 11902 drivers/infiniband/hw/hfi1/chip.c rcd->rcvhdrqtailaddr_dma); rcd 11903 drivers/infiniband/hw/hfi1/chip.c rcd->seq_cnt = 1; rcd 11906 drivers/infiniband/hw/hfi1/chip.c rcd->head = 0; rcd 11914 drivers/infiniband/hw/hfi1/chip.c memset(rcd->rcvhdrq, 0, rcvhdrq_size(rcd)); rcd 11917 drivers/infiniband/hw/hfi1/chip.c rcd->rcvavail_timeout = dd->rcv_intr_timeout_csr; rcd 11924 drivers/infiniband/hw/hfi1/chip.c rcvctrl |= ((u64)encoded_size(rcd->egrbufs.rcvtid_size) rcd 11936 drivers/infiniband/hw/hfi1/chip.c reg = (((u64)(rcd->egrbufs.alloced >> RCV_SHIFT) rcd 11939 drivers/infiniband/hw/hfi1/chip.c (((rcd->eager_base >> RCV_SHIFT) rcd 11950 drivers/infiniband/hw/hfi1/chip.c reg = (((rcd->expected_count >> RCV_SHIFT) rcd 11953 drivers/infiniband/hw/hfi1/chip.c (((rcd->expected_base >> RCV_SHIFT) rcd 11977 drivers/infiniband/hw/hfi1/chip.c set_intr_bits(dd, IS_RCVAVAIL_START + rcd->ctxt, rcd 11978 drivers/infiniband/hw/hfi1/chip.c IS_RCVAVAIL_START + rcd->ctxt, true); rcd 11982 drivers/infiniband/hw/hfi1/chip.c set_intr_bits(dd, IS_RCVAVAIL_START + rcd->ctxt, rcd 11983 drivers/infiniband/hw/hfi1/chip.c IS_RCVAVAIL_START + rcd->ctxt, false); rcd 11986 drivers/infiniband/hw/hfi1/chip.c if ((op & HFI1_RCVCTRL_TAILUPD_ENB) && rcd->rcvhdrtail_kvaddr) rcd 12016 drivers/infiniband/hw/hfi1/chip.c set_intr_bits(dd, IS_RCVURGENT_START + rcd->ctxt, rcd 12017 drivers/infiniband/hw/hfi1/chip.c IS_RCVURGENT_START + rcd->ctxt, true); rcd 12019 drivers/infiniband/hw/hfi1/chip.c set_intr_bits(dd, IS_RCVURGENT_START + rcd->ctxt, rcd 12020 drivers/infiniband/hw/hfi1/chip.c IS_RCVURGENT_START + rcd->ctxt, false); rcd 12049 drivers/infiniband/hw/hfi1/chip.c (u64)rcd->rcvavail_timeout << rcd 14588 drivers/infiniband/hw/hfi1/chip.c int hfi1_set_ctxt_jkey(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd, rcd 14594 drivers/infiniband/hw/hfi1/chip.c if (!rcd || !rcd->sc) rcd 14597 drivers/infiniband/hw/hfi1/chip.c hw_ctxt = rcd->sc->hw_context; rcd 14602 drivers/infiniband/hw/hfi1/chip.c if (HFI1_CAP_KGET_MASK(rcd->flags, ALLOW_PERM_JKEY)) rcd 14618 drivers/infiniband/hw/hfi1/chip.c write_kctxt_csr(dd, rcd->ctxt, RCV_KEY_CTRL, reg); rcd 14623 drivers/infiniband/hw/hfi1/chip.c int hfi1_clear_ctxt_jkey(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd) rcd 14628 drivers/infiniband/hw/hfi1/chip.c if (!rcd || !rcd->sc) rcd 14631 drivers/infiniband/hw/hfi1/chip.c hw_ctxt = rcd->sc->hw_context; rcd 14644 drivers/infiniband/hw/hfi1/chip.c write_kctxt_csr(dd, rcd->ctxt, RCV_KEY_CTRL, 0); rcd 14649 drivers/infiniband/hw/hfi1/chip.c int hfi1_set_ctxt_pkey(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd, rcd 14655 drivers/infiniband/hw/hfi1/chip.c if (!rcd || !rcd->sc) rcd 14658 drivers/infiniband/hw/hfi1/chip.c hw_ctxt = rcd->sc->hw_context; rcd 795 drivers/infiniband/hw/hfi1/chip.h void update_usrhead(struct hfi1_ctxtdata *rcd, u32 hd, u32 updegr, u32 egrhd, rcd 804 drivers/infiniband/hw/hfi1/chip.h u32 hdrqempty(struct hfi1_ctxtdata *rcd); rcd 807 drivers/infiniband/hw/hfi1/chip.h bool is_urg_masked(struct hfi1_ctxtdata *rcd); rcd 832 drivers/infiniband/hw/hfi1/chip.h void force_recv_intr(struct hfi1_ctxtdata *rcd); rcd 1419 drivers/infiniband/hw/hfi1/chip.h void hfi1_clear_tids(struct hfi1_ctxtdata *rcd); rcd 1425 drivers/infiniband/hw/hfi1/chip.h struct hfi1_ctxtdata *rcd); rcd 1430 drivers/infiniband/hw/hfi1/chip.h int hfi1_set_ctxt_jkey(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd, rcd 139 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_ctxtdata *rcd; rcd 142 drivers/infiniband/hw/hfi1/debugfs.c rcd = hfi1_rcd_get_by_index(dd, j); rcd 143 drivers/infiniband/hw/hfi1/debugfs.c if (rcd) { rcd 144 drivers/infiniband/hw/hfi1/debugfs.c n_packets += rcd->opstats->stats[i].n_packets; rcd 145 drivers/infiniband/hw/hfi1/debugfs.c n_bytes += rcd->opstats->stats[i].n_bytes; rcd 147 drivers/infiniband/hw/hfi1/debugfs.c hfi1_rcd_put(rcd); rcd 230 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_ctxtdata *rcd; rcd 240 drivers/infiniband/hw/hfi1/debugfs.c rcd = hfi1_rcd_get_by_index_safe(dd, i); rcd 241 drivers/infiniband/hw/hfi1/debugfs.c if (!rcd) rcd 244 drivers/infiniband/hw/hfi1/debugfs.c for (j = 0; j < ARRAY_SIZE(rcd->opstats->stats); j++) rcd 245 drivers/infiniband/hw/hfi1/debugfs.c n_packets += rcd->opstats->stats[j].n_packets; rcd 247 drivers/infiniband/hw/hfi1/debugfs.c hfi1_rcd_put(rcd); rcd 371 drivers/infiniband/hw/hfi1/debugfs.c if (!dd->rcd || *pos >= dd->n_krcv_queues) rcd 382 drivers/infiniband/hw/hfi1/debugfs.c if (!dd->rcd || *pos >= dd->n_krcv_queues) rcd 395 drivers/infiniband/hw/hfi1/debugfs.c struct hfi1_ctxtdata *rcd; rcd 399 drivers/infiniband/hw/hfi1/debugfs.c rcd = hfi1_rcd_get_by_index_safe(dd, i); rcd 400 drivers/infiniband/hw/hfi1/debugfs.c if (rcd) rcd 401 drivers/infiniband/hw/hfi1/debugfs.c seqfile_dump_rcd(s, rcd); rcd 402 drivers/infiniband/hw/hfi1/debugfs.c hfi1_rcd_put(rcd); rcd 199 drivers/infiniband/hw/hfi1/driver.c static inline void *get_egrbuf(const struct hfi1_ctxtdata *rcd, u64 rhf, rcd 204 drivers/infiniband/hw/hfi1/driver.c *update |= !(idx & (rcd->egrbufs.threshold - 1)) && !offset; rcd 205 drivers/infiniband/hw/hfi1/driver.c return (void *)(((u64)(rcd->egrbufs.rcvtids[idx].addr)) + rcd 209 drivers/infiniband/hw/hfi1/driver.c static inline void *hfi1_get_header(struct hfi1_ctxtdata *rcd, rcd 214 drivers/infiniband/hw/hfi1/driver.c return (void *)(rhf_addr - rcd->rhf_offset + offset); rcd 217 drivers/infiniband/hw/hfi1/driver.c static inline struct ib_header *hfi1_get_msgheader(struct hfi1_ctxtdata *rcd, rcd 220 drivers/infiniband/hw/hfi1/driver.c return (struct ib_header *)hfi1_get_header(rcd, rhf_addr); rcd 224 drivers/infiniband/hw/hfi1/driver.c *hfi1_get_16B_header(struct hfi1_ctxtdata *rcd, rcd 227 drivers/infiniband/hw/hfi1/driver.c return (struct hfi1_16b_header *)hfi1_get_header(rcd, rhf_addr); rcd 250 drivers/infiniband/hw/hfi1/driver.c static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd, rcd 256 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ibport *ibp = rcd_to_iport(rcd); rcd 333 drivers/infiniband/hw/hfi1/driver.c hfi1_rc_hdrerr(rcd, packet, qp); rcd 411 drivers/infiniband/hw/hfi1/driver.c static inline void init_packet(struct hfi1_ctxtdata *rcd, rcd 414 drivers/infiniband/hw/hfi1/driver.c packet->rsize = rcd->rcvhdrqentsize; /* words */ rcd 415 drivers/infiniband/hw/hfi1/driver.c packet->maxcnt = rcd->rcvhdrq_cnt * packet->rsize; /* words */ rcd 416 drivers/infiniband/hw/hfi1/driver.c packet->rcd = rcd; rcd 419 drivers/infiniband/hw/hfi1/driver.c packet->rhf_addr = get_rhf_addr(rcd); rcd 421 drivers/infiniband/hw/hfi1/driver.c packet->rhqoff = rcd->head; rcd 536 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd; rcd 547 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 549 drivers/infiniband/hw/hfi1/driver.c mdata->rcd = rcd; rcd 554 drivers/infiniband/hw/hfi1/driver.c if (HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL)) { rcd 555 drivers/infiniband/hw/hfi1/driver.c mdata->ps_tail = get_rcvhdrtail(rcd); rcd 556 drivers/infiniband/hw/hfi1/driver.c if (rcd->ctxt == HFI1_CTRL_CTXT) rcd 557 drivers/infiniband/hw/hfi1/driver.c mdata->ps_seq = rcd->seq_cnt; rcd 562 drivers/infiniband/hw/hfi1/driver.c mdata->ps_seq = rcd->seq_cnt; rcd 567 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd) rcd 569 drivers/infiniband/hw/hfi1/driver.c if (HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL)) rcd 575 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd) rcd 581 drivers/infiniband/hw/hfi1/driver.c if ((rcd->ctxt == HFI1_CTRL_CTXT) && (mdata->ps_head != mdata->ps_tail)) rcd 588 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd) rcd 595 drivers/infiniband/hw/hfi1/driver.c if (!HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL) || rcd 596 drivers/infiniband/hw/hfi1/driver.c (rcd->ctxt == HFI1_CTRL_CTXT)) { rcd 610 drivers/infiniband/hw/hfi1/driver.c #define prescan_rxq(rcd, packet) \ rcd 612 drivers/infiniband/hw/hfi1/driver.c if (rcd->ppd->cc_prescan) \ rcd 617 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 623 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ibport *ibp = rcd_to_iport(rcd); rcd 624 drivers/infiniband/hw/hfi1/driver.c __le32 *rhf_addr = (__le32 *)rcd->rcvhdrq + mdata.ps_head + rcd 625 drivers/infiniband/hw/hfi1/driver.c packet->rcd->rhf_offset; rcd 628 drivers/infiniband/hw/hfi1/driver.c struct rvt_dev_info *rdi = &rcd->dd->verbs_dev.rdi; rcd 633 drivers/infiniband/hw/hfi1/driver.c if (ps_done(&mdata, rhf, rcd)) rcd 636 drivers/infiniband/hw/hfi1/driver.c if (ps_skip(&mdata, rhf, rcd)) rcd 642 drivers/infiniband/hw/hfi1/driver.c packet->hdr = hfi1_get_msgheader(packet->rcd, rhf_addr); rcd 676 drivers/infiniband/hw/hfi1/driver.c update_ps_mdata(&mdata, rcd); rcd 683 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 689 drivers/infiniband/hw/hfi1/driver.c list_for_each_entry_safe(qp, nqp, &rcd->qp_wait_list, rspwait) { rcd 719 drivers/infiniband/hw/hfi1/driver.c this_cpu_inc(*packet->rcd->dd->rcv_limit); rcd 737 drivers/infiniband/hw/hfi1/driver.c packet->rcd->dd->ctx0_seq_drop++; rcd 746 drivers/infiniband/hw/hfi1/driver.c packet->rhf_addr = (__le32 *)packet->rcd->rcvhdrq + packet->rhqoff + rcd 747 drivers/infiniband/hw/hfi1/driver.c packet->rcd->rhf_offset; rcd 765 drivers/infiniband/hw/hfi1/driver.c packet->ebuf = get_egrbuf(packet->rcd, packet->rhf, rcd 773 drivers/infiniband/hw/hfi1/driver.c packet->tlen - ((packet->rcd->rcvhdrqentsize - rcd 786 drivers/infiniband/hw/hfi1/driver.c packet->rcd->rhf_rcv_function_map[packet->etype](packet); rcd 796 drivers/infiniband/hw/hfi1/driver.c packet->rhf_addr = (__le32 *)packet->rcd->rcvhdrq + packet->rhqoff + rcd 797 drivers/infiniband/hw/hfi1/driver.c packet->rcd->rhf_offset; rcd 812 drivers/infiniband/hw/hfi1/driver.c update_usrhead(packet->rcd, packet->rhqoff, packet->updegr, rcd 827 drivers/infiniband/hw/hfi1/driver.c update_usrhead(packet->rcd, packet->rcd->head, packet->updegr, rcd 834 drivers/infiniband/hw/hfi1/driver.c int handle_receive_interrupt_nodma_rtail(struct hfi1_ctxtdata *rcd, int thread) rcd 840 drivers/infiniband/hw/hfi1/driver.c init_packet(rcd, &packet); rcd 842 drivers/infiniband/hw/hfi1/driver.c if (seq != rcd->seq_cnt) { rcd 847 drivers/infiniband/hw/hfi1/driver.c prescan_rxq(rcd, &packet); rcd 852 drivers/infiniband/hw/hfi1/driver.c if (++rcd->seq_cnt > 13) rcd 853 drivers/infiniband/hw/hfi1/driver.c rcd->seq_cnt = 1; rcd 854 drivers/infiniband/hw/hfi1/driver.c if (seq != rcd->seq_cnt) rcd 859 drivers/infiniband/hw/hfi1/driver.c rcd->head = packet.rhqoff; rcd 865 drivers/infiniband/hw/hfi1/driver.c int handle_receive_interrupt_dma_rtail(struct hfi1_ctxtdata *rcd, int thread) rcd 871 drivers/infiniband/hw/hfi1/driver.c init_packet(rcd, &packet); rcd 872 drivers/infiniband/hw/hfi1/driver.c hdrqtail = get_rcvhdrtail(rcd); rcd 879 drivers/infiniband/hw/hfi1/driver.c prescan_rxq(rcd, &packet); rcd 888 drivers/infiniband/hw/hfi1/driver.c rcd->head = packet.rhqoff; rcd 896 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd; rcd 905 drivers/infiniband/hw/hfi1/driver.c rcd = hfi1_rcd_get_by_index_safe(dd, ctxt); rcd 906 drivers/infiniband/hw/hfi1/driver.c if (rcd) { rcd 907 drivers/infiniband/hw/hfi1/driver.c rcd->do_interrupt = rcd 909 drivers/infiniband/hw/hfi1/driver.c hfi1_rcd_put(rcd); rcd 915 drivers/infiniband/hw/hfi1/driver.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 916 drivers/infiniband/hw/hfi1/driver.c if (rcd) rcd 917 drivers/infiniband/hw/hfi1/driver.c rcd->do_interrupt = rcd 919 drivers/infiniband/hw/hfi1/driver.c hfi1_rcd_put(rcd); rcd 925 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd; rcd 934 drivers/infiniband/hw/hfi1/driver.c rcd = hfi1_rcd_get_by_index_safe(dd, ctxt); rcd 935 drivers/infiniband/hw/hfi1/driver.c if (rcd) { rcd 936 drivers/infiniband/hw/hfi1/driver.c rcd->do_interrupt = rcd 938 drivers/infiniband/hw/hfi1/driver.c hfi1_rcd_put(rcd); rcd 944 drivers/infiniband/hw/hfi1/driver.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 945 drivers/infiniband/hw/hfi1/driver.c if (rcd) rcd 946 drivers/infiniband/hw/hfi1/driver.c rcd->do_interrupt = rcd 948 drivers/infiniband/hw/hfi1/driver.c hfi1_rcd_put(rcd); rcd 954 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd; rcd 959 drivers/infiniband/hw/hfi1/driver.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 960 drivers/infiniband/hw/hfi1/driver.c if (!rcd) rcd 962 drivers/infiniband/hw/hfi1/driver.c if (i < dd->first_dyn_alloc_ctxt || rcd->is_vnic) rcd 963 drivers/infiniband/hw/hfi1/driver.c rcd->do_interrupt = &handle_receive_interrupt; rcd 965 drivers/infiniband/hw/hfi1/driver.c hfi1_rcd_put(rcd); rcd 969 drivers/infiniband/hw/hfi1/driver.c static inline int set_armed_to_active(struct hfi1_ctxtdata *rcd, rcd 973 drivers/infiniband/hw/hfi1/driver.c struct work_struct *lsaw = &rcd->ppd->linkstate_active_work; rcd 978 drivers/infiniband/hw/hfi1/driver.c struct ib_header *hdr = hfi1_get_msgheader(packet->rcd, rcd 983 drivers/infiniband/hw/hfi1/driver.c packet->rcd, rcd 988 drivers/infiniband/hw/hfi1/driver.c int hwstate = driver_lstate(rcd->ppd); rcd 997 drivers/infiniband/hw/hfi1/driver.c queue_work(rcd->ppd->link_wq, lsaw); rcd 1010 drivers/infiniband/hw/hfi1/driver.c int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread) rcd 1012 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = rcd->dd; rcd 1019 drivers/infiniband/hw/hfi1/driver.c needset = (rcd->ctxt == HFI1_CTRL_CTXT) ? 0 : 1; rcd 1021 drivers/infiniband/hw/hfi1/driver.c init_packet(rcd, &packet); rcd 1023 drivers/infiniband/hw/hfi1/driver.c if (!HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL)) { rcd 1026 drivers/infiniband/hw/hfi1/driver.c if (seq != rcd->seq_cnt) { rcd 1032 drivers/infiniband/hw/hfi1/driver.c hdrqtail = get_rcvhdrtail(rcd); rcd 1043 drivers/infiniband/hw/hfi1/driver.c if (rcd->ctxt == HFI1_CTRL_CTXT) { rcd 1046 drivers/infiniband/hw/hfi1/driver.c if (seq != rcd->seq_cnt) rcd 1051 drivers/infiniband/hw/hfi1/driver.c prescan_rxq(rcd, &packet); rcd 1061 drivers/infiniband/hw/hfi1/driver.c packet.rhf_addr = (__le32 *)rcd->rcvhdrq + rcd 1063 drivers/infiniband/hw/hfi1/driver.c rcd->rhf_offset; rcd 1071 drivers/infiniband/hw/hfi1/driver.c if (unlikely(rcd->ppd->host_link_state == rcd 1073 drivers/infiniband/hw/hfi1/driver.c set_armed_to_active(rcd, &packet, dd)) rcd 1078 drivers/infiniband/hw/hfi1/driver.c if (!HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL)) { rcd 1081 drivers/infiniband/hw/hfi1/driver.c if (++rcd->seq_cnt > 13) rcd 1082 drivers/infiniband/hw/hfi1/driver.c rcd->seq_cnt = 1; rcd 1083 drivers/infiniband/hw/hfi1/driver.c if (seq != rcd->seq_cnt) rcd 1087 drivers/infiniband/hw/hfi1/driver.c set_nodma_rtail(dd, rcd->ctxt); rcd 1097 drivers/infiniband/hw/hfi1/driver.c if (rcd->ctxt == HFI1_CTRL_CTXT) { rcd 1100 drivers/infiniband/hw/hfi1/driver.c if (++rcd->seq_cnt > 13) rcd 1101 drivers/infiniband/hw/hfi1/driver.c rcd->seq_cnt = 1; rcd 1102 drivers/infiniband/hw/hfi1/driver.c if (!last && (seq != rcd->seq_cnt)) rcd 1109 drivers/infiniband/hw/hfi1/driver.c set_dma_rtail(dd, rcd->ctxt); rcd 1118 drivers/infiniband/hw/hfi1/driver.c rcd->head = packet.rhqoff; rcd 1151 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd; rcd 1163 drivers/infiniband/hw/hfi1/driver.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 1164 drivers/infiniband/hw/hfi1/driver.c if (rcd) rcd 1165 drivers/infiniband/hw/hfi1/driver.c force_recv_intr(rcd); rcd 1166 drivers/infiniband/hw/hfi1/driver.c hfi1_rcd_put(rcd); rcd 1378 drivers/infiniband/hw/hfi1/driver.c if (dd->rcd) rcd 1413 drivers/infiniband/hw/hfi1/driver.c hfi1_get_msgheader(packet->rcd, rcd 1420 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd = packet->rcd->ppd; rcd 1449 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); rcd 1508 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 1509 drivers/infiniband/hw/hfi1/driver.c struct hfi1_pportdata *ppd = rcd->ppd; rcd 1514 drivers/infiniband/hw/hfi1/driver.c hfi1_get_16B_header(packet->rcd, rcd 1581 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 1584 drivers/infiniband/hw/hfi1/driver.c dd_dev_err(rcd->dd, rcd 1586 drivers/infiniband/hw/hfi1/driver.c rcd->ctxt, packet->rhf, rcd 1599 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 1601 drivers/infiniband/hw/hfi1/driver.c rcv_hdrerr(rcd, rcd->ppd, packet); rcd 1632 drivers/infiniband/hw/hfi1/driver.c if (packet->rcd->is_vnic) rcd 1644 drivers/infiniband/hw/hfi1/driver.c struct hfi1_devdata *dd = packet->rcd->dd; rcd 1688 drivers/infiniband/hw/hfi1/driver.c hfi1_dbg_fault_suppress_err(&packet->rcd->dd->verbs_dev) && rcd 1697 drivers/infiniband/hw/hfi1/driver.c dd_dev_err(packet->rcd->dd, rcd 1710 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 1712 drivers/infiniband/hw/hfi1/driver.c if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet)) rcd 1728 drivers/infiniband/hw/hfi1/driver.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 1731 drivers/infiniband/hw/hfi1/driver.c if (hfi1_handle_kdeth_eflags(rcd, rcd->ppd, packet)) rcd 1741 drivers/infiniband/hw/hfi1/driver.c dd_dev_err(packet->rcd->dd, "Invalid packet type %d. Dropping\n", rcd 1746 drivers/infiniband/hw/hfi1/driver.c void seqfile_dump_rcd(struct seq_file *s, struct hfi1_ctxtdata *rcd) rcd 1752 drivers/infiniband/hw/hfi1/driver.c rcd->ctxt, rcd->rcvhdrq_cnt, rcd->rcvhdrqentsize, rcd 1753 drivers/infiniband/hw/hfi1/driver.c HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL) ? rcd 1755 drivers/infiniband/hw/hfi1/driver.c read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_HEAD) & rcd 1757 drivers/infiniband/hw/hfi1/driver.c read_uctxt_csr(rcd->dd, rcd->ctxt, RCV_HDR_TAIL)); rcd 1759 drivers/infiniband/hw/hfi1/driver.c init_packet(rcd, &packet); rcd 1763 drivers/infiniband/hw/hfi1/driver.c __le32 *rhf_addr = (__le32 *)rcd->rcvhdrq + mdata.ps_head + rcd 1764 drivers/infiniband/hw/hfi1/driver.c rcd->rhf_offset; rcd 1772 drivers/infiniband/hw/hfi1/driver.c if (ps_done(&mdata, rhf, rcd)) rcd 1775 drivers/infiniband/hw/hfi1/driver.c if (ps_skip(&mdata, rhf, rcd)) rcd 1781 drivers/infiniband/hw/hfi1/driver.c packet.hdr = hfi1_get_msgheader(rcd, rhf_addr); rcd 1800 drivers/infiniband/hw/hfi1/driver.c update_ps_mdata(&mdata, rcd); rcd 65 drivers/infiniband/hw/hfi1/exp_rcv.c void hfi1_exp_tid_group_init(struct hfi1_ctxtdata *rcd) rcd 67 drivers/infiniband/hw/hfi1/exp_rcv.c hfi1_exp_tid_set_init(&rcd->tid_group_list); rcd 68 drivers/infiniband/hw/hfi1/exp_rcv.c hfi1_exp_tid_set_init(&rcd->tid_used_list); rcd 69 drivers/infiniband/hw/hfi1/exp_rcv.c hfi1_exp_tid_set_init(&rcd->tid_full_list); rcd 76 drivers/infiniband/hw/hfi1/exp_rcv.c int hfi1_alloc_ctxt_rcv_groups(struct hfi1_ctxtdata *rcd) rcd 78 drivers/infiniband/hw/hfi1/exp_rcv.c struct hfi1_devdata *dd = rcd->dd; rcd 84 drivers/infiniband/hw/hfi1/exp_rcv.c ngroups = rcd->expected_count / dd->rcv_entries.group_size; rcd 85 drivers/infiniband/hw/hfi1/exp_rcv.c rcd->groups = rcd 86 drivers/infiniband/hw/hfi1/exp_rcv.c kcalloc_node(ngroups, sizeof(*rcd->groups), rcd 87 drivers/infiniband/hw/hfi1/exp_rcv.c GFP_KERNEL, rcd->numa_id); rcd 88 drivers/infiniband/hw/hfi1/exp_rcv.c if (!rcd->groups) rcd 90 drivers/infiniband/hw/hfi1/exp_rcv.c tidbase = rcd->expected_base; rcd 92 drivers/infiniband/hw/hfi1/exp_rcv.c grp = &rcd->groups[i]; rcd 95 drivers/infiniband/hw/hfi1/exp_rcv.c tid_group_add_tail(grp, &rcd->tid_group_list); rcd 113 drivers/infiniband/hw/hfi1/exp_rcv.c void hfi1_free_ctxt_rcv_groups(struct hfi1_ctxtdata *rcd) rcd 115 drivers/infiniband/hw/hfi1/exp_rcv.c kfree(rcd->groups); rcd 116 drivers/infiniband/hw/hfi1/exp_rcv.c rcd->groups = NULL; rcd 117 drivers/infiniband/hw/hfi1/exp_rcv.c hfi1_exp_tid_group_init(rcd); rcd 119 drivers/infiniband/hw/hfi1/exp_rcv.c hfi1_clear_tids(rcd); rcd 192 drivers/infiniband/hw/hfi1/exp_rcv.h hfi1_tid_group_to_idx(struct hfi1_ctxtdata *rcd, struct tid_group *grp) rcd 194 drivers/infiniband/hw/hfi1/exp_rcv.h return grp - &rcd->groups[0]; rcd 203 drivers/infiniband/hw/hfi1/exp_rcv.h hfi1_idx_to_tid_group(struct hfi1_ctxtdata *rcd, u16 idx) rcd 205 drivers/infiniband/hw/hfi1/exp_rcv.h return &rcd->groups[idx]; rcd 208 drivers/infiniband/hw/hfi1/exp_rcv.h int hfi1_alloc_ctxt_rcv_groups(struct hfi1_ctxtdata *rcd); rcd 209 drivers/infiniband/hw/hfi1/exp_rcv.h void hfi1_free_ctxt_rcv_groups(struct hfi1_ctxtdata *rcd); rcd 210 drivers/infiniband/hw/hfi1/exp_rcv.h void hfi1_exp_tid_group_init(struct hfi1_ctxtdata *rcd); rcd 92 drivers/infiniband/hw/hfi1/fault.c struct hfi1_ctxtdata *rcd; rcd 95 drivers/infiniband/hw/hfi1/fault.c rcd = hfi1_rcd_get_by_index(dd, j); rcd 96 drivers/infiniband/hw/hfi1/fault.c if (rcd) { rcd 97 drivers/infiniband/hw/hfi1/fault.c n_packets += rcd->opstats->stats[i].n_packets; rcd 98 drivers/infiniband/hw/hfi1/fault.c n_bytes += rcd->opstats->stats[i].n_bytes; rcd 100 drivers/infiniband/hw/hfi1/fault.c hfi1_rcd_put(rcd); rcd 363 drivers/infiniband/hw/hfi1/fault.c struct hfi1_ibdev *ibd = &packet->rcd->dd->verbs_dev; rcd 945 drivers/infiniband/hw/hfi1/file_ops.c struct hfi1_ctxtdata **rcd) rcd 1022 drivers/infiniband/hw/hfi1/file_ops.c *rcd = uctxt; rcd 229 drivers/infiniband/hw/hfi1/hfi.h int (*do_interrupt)(struct hfi1_ctxtdata *rcd, int threaded); rcd 352 drivers/infiniband/hw/hfi1/hfi.h static inline u32 rcvhdrq_size(struct hfi1_ctxtdata *rcd) rcd 354 drivers/infiniband/hw/hfi1/hfi.h return PAGE_ALIGN(rcd->rcvhdrq_cnt * rcd 355 drivers/infiniband/hw/hfi1/hfi.h rcd->rcvhdrqentsize * sizeof(u32)); rcd 369 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_ctxtdata *rcd; rcd 1363 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_ctxtdata **rcd; rcd 1480 drivers/infiniband/hw/hfi1/hfi.h void handle_user_interrupt(struct hfi1_ctxtdata *rcd); rcd 1482 drivers/infiniband/hw/hfi1/hfi.h int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd); rcd 1483 drivers/infiniband/hw/hfi1/hfi.h int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd); rcd 1486 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_ctxtdata **rcd); rcd 1487 drivers/infiniband/hw/hfi1/hfi.h void hfi1_free_ctxt(struct hfi1_ctxtdata *rcd); rcd 1490 drivers/infiniband/hw/hfi1/hfi.h void hfi1_free_ctxtdata(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd); rcd 1491 drivers/infiniband/hw/hfi1/hfi.h int hfi1_rcd_put(struct hfi1_ctxtdata *rcd); rcd 1492 drivers/infiniband/hw/hfi1/hfi.h int hfi1_rcd_get(struct hfi1_ctxtdata *rcd); rcd 1496 drivers/infiniband/hw/hfi1/hfi.h int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread); rcd 1497 drivers/infiniband/hw/hfi1/hfi.h int handle_receive_interrupt_nodma_rtail(struct hfi1_ctxtdata *rcd, int thread); rcd 1498 drivers/infiniband/hw/hfi1/hfi.h int handle_receive_interrupt_dma_rtail(struct hfi1_ctxtdata *rcd, int thread); rcd 1516 drivers/infiniband/hw/hfi1/hfi.h static inline __le32 *get_rhf_addr(struct hfi1_ctxtdata *rcd) rcd 1518 drivers/infiniband/hw/hfi1/hfi.h return (__le32 *)rcd->rcvhdrq + rcd->head + rcd->rhf_offset; rcd 1856 drivers/infiniband/hw/hfi1/hfi.h static inline struct hfi1_ibport *rcd_to_iport(struct hfi1_ctxtdata *rcd) rcd 1858 drivers/infiniband/hw/hfi1/hfi.h return &rcd->ppd->ibport_data; rcd 2023 drivers/infiniband/hw/hfi1/hfi.h static inline void clear_rcvhdrtail(const struct hfi1_ctxtdata *rcd) rcd 2025 drivers/infiniband/hw/hfi1/hfi.h *((u64 *)rcd->rcvhdrtail_kvaddr) = 0ULL; rcd 2028 drivers/infiniband/hw/hfi1/hfi.h static inline u32 get_rcvhdrtail(const struct hfi1_ctxtdata *rcd) rcd 2034 drivers/infiniband/hw/hfi1/hfi.h return (u32)le64_to_cpu(*rcd->rcvhdrtail_kvaddr); rcd 2081 drivers/infiniband/hw/hfi1/hfi.h void seqfile_dump_rcd(struct seq_file *s, struct hfi1_ctxtdata *rcd); rcd 2456 drivers/infiniband/hw/hfi1/hfi.h struct hfi1_ibport *ibp = &packet->rcd->ppd->ibport_data; rcd 132 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd; rcd 138 drivers/infiniband/hw/hfi1/init.c ret = hfi1_create_ctxtdata(ppd, dd->node, &rcd); rcd 149 drivers/infiniband/hw/hfi1/init.c rcd->flags = HFI1_CAP_KGET(MULTI_PKT_EGR) | rcd 155 drivers/infiniband/hw/hfi1/init.c if (rcd->ctxt == HFI1_CTRL_CTXT) rcd 156 drivers/infiniband/hw/hfi1/init.c rcd->flags |= HFI1_CAP_DMA_RTAIL; rcd 157 drivers/infiniband/hw/hfi1/init.c rcd->seq_cnt = 1; rcd 159 drivers/infiniband/hw/hfi1/init.c rcd->sc = sc_alloc(dd, SC_ACK, rcd->rcvhdrqentsize, dd->node); rcd 160 drivers/infiniband/hw/hfi1/init.c if (!rcd->sc) { rcd 164 drivers/infiniband/hw/hfi1/init.c hfi1_init_ctxt(rcd->sc); rcd 177 drivers/infiniband/hw/hfi1/init.c dd->rcd = kcalloc_node(dd->num_rcv_contexts, sizeof(*dd->rcd), rcd 179 drivers/infiniband/hw/hfi1/init.c if (!dd->rcd) rcd 190 drivers/infiniband/hw/hfi1/init.c for (i = 0; dd->rcd && i < dd->first_dyn_alloc_ctxt; ++i) rcd 191 drivers/infiniband/hw/hfi1/init.c hfi1_free_ctxt(dd->rcd[i]); rcd 194 drivers/infiniband/hw/hfi1/init.c kfree(dd->rcd); rcd 195 drivers/infiniband/hw/hfi1/init.c dd->rcd = NULL; rcd 202 drivers/infiniband/hw/hfi1/init.c static void hfi1_rcd_init(struct hfi1_ctxtdata *rcd) rcd 204 drivers/infiniband/hw/hfi1/init.c kref_init(&rcd->kref); rcd 215 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd = rcd 218 drivers/infiniband/hw/hfi1/init.c spin_lock_irqsave(&rcd->dd->uctxt_lock, flags); rcd 219 drivers/infiniband/hw/hfi1/init.c rcd->dd->rcd[rcd->ctxt] = NULL; rcd 220 drivers/infiniband/hw/hfi1/init.c spin_unlock_irqrestore(&rcd->dd->uctxt_lock, flags); rcd 222 drivers/infiniband/hw/hfi1/init.c hfi1_free_ctxtdata(rcd->dd, rcd); rcd 224 drivers/infiniband/hw/hfi1/init.c kfree(rcd); rcd 233 drivers/infiniband/hw/hfi1/init.c int hfi1_rcd_put(struct hfi1_ctxtdata *rcd) rcd 235 drivers/infiniband/hw/hfi1/init.c if (rcd) rcd 236 drivers/infiniband/hw/hfi1/init.c return kref_put(&rcd->kref, hfi1_rcd_free); rcd 250 drivers/infiniband/hw/hfi1/init.c int hfi1_rcd_get(struct hfi1_ctxtdata *rcd) rcd 252 drivers/infiniband/hw/hfi1/init.c return kref_get_unless_zero(&rcd->kref); rcd 266 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd, u16 *index) rcd 273 drivers/infiniband/hw/hfi1/init.c if (!dd->rcd[ctxt]) rcd 277 drivers/infiniband/hw/hfi1/init.c rcd->ctxt = ctxt; rcd 278 drivers/infiniband/hw/hfi1/init.c dd->rcd[ctxt] = rcd; rcd 279 drivers/infiniband/hw/hfi1/init.c hfi1_rcd_init(rcd); rcd 327 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd = NULL; rcd 330 drivers/infiniband/hw/hfi1/init.c if (dd->rcd[ctxt]) { rcd 331 drivers/infiniband/hw/hfi1/init.c rcd = dd->rcd[ctxt]; rcd 332 drivers/infiniband/hw/hfi1/init.c if (!hfi1_rcd_get(rcd)) rcd 333 drivers/infiniband/hw/hfi1/init.c rcd = NULL; rcd 337 drivers/infiniband/hw/hfi1/init.c return rcd; rcd 348 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd; rcd 356 drivers/infiniband/hw/hfi1/init.c rcd = kzalloc_node(sizeof(*rcd), GFP_KERNEL, numa); rcd 357 drivers/infiniband/hw/hfi1/init.c if (rcd) { rcd 362 drivers/infiniband/hw/hfi1/init.c ret = allocate_rcd_index(dd, rcd, &ctxt); rcd 365 drivers/infiniband/hw/hfi1/init.c kfree(rcd); rcd 369 drivers/infiniband/hw/hfi1/init.c INIT_LIST_HEAD(&rcd->qp_wait_list); rcd 370 drivers/infiniband/hw/hfi1/init.c hfi1_exp_tid_group_init(rcd); rcd 371 drivers/infiniband/hw/hfi1/init.c rcd->ppd = ppd; rcd 372 drivers/infiniband/hw/hfi1/init.c rcd->dd = dd; rcd 373 drivers/infiniband/hw/hfi1/init.c rcd->numa_id = numa; rcd 374 drivers/infiniband/hw/hfi1/init.c rcd->rcv_array_groups = dd->rcv_entries.ngroups; rcd 375 drivers/infiniband/hw/hfi1/init.c rcd->rhf_rcv_function_map = normal_rhf_rcv_functions; rcd 377 drivers/infiniband/hw/hfi1/init.c mutex_init(&rcd->exp_mutex); rcd 378 drivers/infiniband/hw/hfi1/init.c spin_lock_init(&rcd->exp_lock); rcd 379 drivers/infiniband/hw/hfi1/init.c INIT_LIST_HEAD(&rcd->flow_queue.queue_head); rcd 380 drivers/infiniband/hw/hfi1/init.c INIT_LIST_HEAD(&rcd->rarr_queue.queue_head); rcd 382 drivers/infiniband/hw/hfi1/init.c hfi1_cdbg(PROC, "setting up context %u\n", rcd->ctxt); rcd 394 drivers/infiniband/hw/hfi1/init.c rcd->rcv_array_groups++; rcd 406 drivers/infiniband/hw/hfi1/init.c rcd->rcv_array_groups++; rcd 412 drivers/infiniband/hw/hfi1/init.c rcd->eager_base = base * dd->rcv_entries.group_size; rcd 414 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrq_cnt = rcvhdrcnt; rcd 415 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrqentsize = hfi1_hdrq_entsize; rcd 416 drivers/infiniband/hw/hfi1/init.c rcd->rhf_offset = rcd 417 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrqentsize - sizeof(u64) / sizeof(u32); rcd 429 drivers/infiniband/hw/hfi1/init.c max_entries = rcd->rcv_array_groups * rcd 432 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.count = round_down(rcvtids, rcd 434 drivers/infiniband/hw/hfi1/init.c if (rcd->egrbufs.count > MAX_EAGER_ENTRIES) { rcd 436 drivers/infiniband/hw/hfi1/init.c rcd->ctxt); rcd 437 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.count = MAX_EAGER_ENTRIES; rcd 441 drivers/infiniband/hw/hfi1/init.c rcd->ctxt, rcd->egrbufs.count); rcd 451 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers = rcd 452 drivers/infiniband/hw/hfi1/init.c kcalloc_node(rcd->egrbufs.count, rcd 453 drivers/infiniband/hw/hfi1/init.c sizeof(*rcd->egrbufs.buffers), rcd 455 drivers/infiniband/hw/hfi1/init.c if (!rcd->egrbufs.buffers) rcd 457 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtids = rcd 458 drivers/infiniband/hw/hfi1/init.c kcalloc_node(rcd->egrbufs.count, rcd 459 drivers/infiniband/hw/hfi1/init.c sizeof(*rcd->egrbufs.rcvtids), rcd 461 drivers/infiniband/hw/hfi1/init.c if (!rcd->egrbufs.rcvtids) rcd 463 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.size = eager_buffer_size; rcd 469 drivers/infiniband/hw/hfi1/init.c if (rcd->egrbufs.size < hfi1_max_mtu) { rcd 470 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.size = __roundup_pow_of_two(hfi1_max_mtu); rcd 473 drivers/infiniband/hw/hfi1/init.c rcd->ctxt, rcd->egrbufs.size); rcd 475 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size = HFI1_MAX_EAGER_BUFFER_SIZE; rcd 479 drivers/infiniband/hw/hfi1/init.c rcd->opstats = kzalloc_node(sizeof(*rcd->opstats), rcd 481 drivers/infiniband/hw/hfi1/init.c if (!rcd->opstats) rcd 485 drivers/infiniband/hw/hfi1/init.c hfi1_kern_init_ctxt_generations(rcd); rcd 488 drivers/infiniband/hw/hfi1/init.c *context = rcd; rcd 494 drivers/infiniband/hw/hfi1/init.c hfi1_free_ctxt(rcd); rcd 508 drivers/infiniband/hw/hfi1/init.c void hfi1_free_ctxt(struct hfi1_ctxtdata *rcd) rcd 510 drivers/infiniband/hw/hfi1/init.c hfi1_rcd_put(rcd); rcd 739 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd; rcd 746 drivers/infiniband/hw/hfi1/init.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 749 drivers/infiniband/hw/hfi1/init.c HFI1_RCVCTRL_TAILUPD_DIS, rcd); rcd 750 drivers/infiniband/hw/hfi1/init.c hfi1_rcd_put(rcd); rcd 761 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd; rcd 773 drivers/infiniband/hw/hfi1/init.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 774 drivers/infiniband/hw/hfi1/init.c if (!rcd) rcd 777 drivers/infiniband/hw/hfi1/init.c rcvmask |= HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL) ? rcd 779 drivers/infiniband/hw/hfi1/init.c if (!HFI1_CAP_KGET_MASK(rcd->flags, MULTI_PKT_EGR)) rcd 781 drivers/infiniband/hw/hfi1/init.c if (HFI1_CAP_KGET_MASK(rcd->flags, NODROP_RHQ_FULL)) rcd 783 drivers/infiniband/hw/hfi1/init.c if (HFI1_CAP_KGET_MASK(rcd->flags, NODROP_EGR_FULL)) rcd 787 drivers/infiniband/hw/hfi1/init.c hfi1_rcvctrl(dd, rcvmask, rcd); rcd 788 drivers/infiniband/hw/hfi1/init.c sc_enable(rcd->sc); rcd 789 drivers/infiniband/hw/hfi1/init.c hfi1_rcd_put(rcd); rcd 884 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd; rcd 927 drivers/infiniband/hw/hfi1/init.c for (i = 0; dd->rcd && i < dd->first_dyn_alloc_ctxt; ++i) { rcd 934 drivers/infiniband/hw/hfi1/init.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 935 drivers/infiniband/hw/hfi1/init.c if (!rcd) rcd 938 drivers/infiniband/hw/hfi1/init.c rcd->do_interrupt = &handle_receive_interrupt; rcd 940 drivers/infiniband/hw/hfi1/init.c lastfail = hfi1_create_rcvhdrq(dd, rcd); rcd 942 drivers/infiniband/hw/hfi1/init.c lastfail = hfi1_setup_eagerbufs(rcd); rcd 944 drivers/infiniband/hw/hfi1/init.c lastfail = hfi1_kern_exp_rcv_init(rcd, reinit); rcd 951 drivers/infiniband/hw/hfi1/init.c hfi1_rcd_put(rcd); rcd 1057 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd; rcd 1082 drivers/infiniband/hw/hfi1/init.c rcd = hfi1_rcd_get_by_index(dd, i); rcd 1087 drivers/infiniband/hw/hfi1/init.c HFI1_RCVCTRL_ONE_PKT_EGR_DIS, rcd); rcd 1088 drivers/infiniband/hw/hfi1/init.c hfi1_rcd_put(rcd); rcd 1141 drivers/infiniband/hw/hfi1/init.c void hfi1_free_ctxtdata(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd) rcd 1145 drivers/infiniband/hw/hfi1/init.c if (!rcd) rcd 1148 drivers/infiniband/hw/hfi1/init.c if (rcd->rcvhdrq) { rcd 1149 drivers/infiniband/hw/hfi1/init.c dma_free_coherent(&dd->pcidev->dev, rcvhdrq_size(rcd), rcd 1150 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrq, rcd->rcvhdrq_dma); rcd 1151 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrq = NULL; rcd 1152 drivers/infiniband/hw/hfi1/init.c if (rcd->rcvhdrtail_kvaddr) { rcd 1154 drivers/infiniband/hw/hfi1/init.c (void *)rcd->rcvhdrtail_kvaddr, rcd 1155 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrqtailaddr_dma); rcd 1156 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrtail_kvaddr = NULL; rcd 1161 drivers/infiniband/hw/hfi1/init.c kfree(rcd->egrbufs.rcvtids); rcd 1162 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtids = NULL; rcd 1164 drivers/infiniband/hw/hfi1/init.c for (e = 0; e < rcd->egrbufs.alloced; e++) { rcd 1165 drivers/infiniband/hw/hfi1/init.c if (rcd->egrbufs.buffers[e].dma) rcd 1167 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[e].len, rcd 1168 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[e].addr, rcd 1169 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[e].dma); rcd 1171 drivers/infiniband/hw/hfi1/init.c kfree(rcd->egrbufs.buffers); rcd 1172 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.alloced = 0; rcd 1173 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers = NULL; rcd 1175 drivers/infiniband/hw/hfi1/init.c sc_free(rcd->sc); rcd 1176 drivers/infiniband/hw/hfi1/init.c rcd->sc = NULL; rcd 1178 drivers/infiniband/hw/hfi1/init.c vfree(rcd->subctxt_uregbase); rcd 1179 drivers/infiniband/hw/hfi1/init.c vfree(rcd->subctxt_rcvegrbuf); rcd 1180 drivers/infiniband/hw/hfi1/init.c vfree(rcd->subctxt_rcvhdr_base); rcd 1181 drivers/infiniband/hw/hfi1/init.c kfree(rcd->opstats); rcd 1183 drivers/infiniband/hw/hfi1/init.c rcd->subctxt_uregbase = NULL; rcd 1184 drivers/infiniband/hw/hfi1/init.c rcd->subctxt_rcvegrbuf = NULL; rcd 1185 drivers/infiniband/hw/hfi1/init.c rcd->subctxt_rcvhdr_base = NULL; rcd 1186 drivers/infiniband/hw/hfi1/init.c rcd->opstats = NULL; rcd 1570 drivers/infiniband/hw/hfi1/init.c for (ctxt = 0; dd->rcd && ctxt < dd->num_rcv_contexts; ctxt++) { rcd 1571 drivers/infiniband/hw/hfi1/init.c struct hfi1_ctxtdata *rcd = dd->rcd[ctxt]; rcd 1573 drivers/infiniband/hw/hfi1/init.c if (rcd) { rcd 1574 drivers/infiniband/hw/hfi1/init.c hfi1_free_ctxt_rcv_groups(rcd); rcd 1575 drivers/infiniband/hw/hfi1/init.c hfi1_free_ctxt(rcd); rcd 1579 drivers/infiniband/hw/hfi1/init.c kfree(dd->rcd); rcd 1580 drivers/infiniband/hw/hfi1/init.c dd->rcd = NULL; rcd 1842 drivers/infiniband/hw/hfi1/init.c int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd) rcd 1847 drivers/infiniband/hw/hfi1/init.c if (!rcd->rcvhdrq) { rcd 1850 drivers/infiniband/hw/hfi1/init.c amt = rcvhdrq_size(rcd); rcd 1852 drivers/infiniband/hw/hfi1/init.c if (rcd->ctxt < dd->first_dyn_alloc_ctxt || rcd->is_vnic) rcd 1856 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrq = dma_alloc_coherent(&dd->pcidev->dev, amt, rcd 1857 drivers/infiniband/hw/hfi1/init.c &rcd->rcvhdrq_dma, rcd 1860 drivers/infiniband/hw/hfi1/init.c if (!rcd->rcvhdrq) { rcd 1863 drivers/infiniband/hw/hfi1/init.c amt, rcd->ctxt); rcd 1867 drivers/infiniband/hw/hfi1/init.c if (HFI1_CAP_KGET_MASK(rcd->flags, DMA_RTAIL) || rcd 1868 drivers/infiniband/hw/hfi1/init.c HFI1_CAP_UGET_MASK(rcd->flags, DMA_RTAIL)) { rcd 1869 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrtail_kvaddr = dma_alloc_coherent(&dd->pcidev->dev, rcd 1871 drivers/infiniband/hw/hfi1/init.c &rcd->rcvhdrqtailaddr_dma, rcd 1873 drivers/infiniband/hw/hfi1/init.c if (!rcd->rcvhdrtail_kvaddr) rcd 1883 drivers/infiniband/hw/hfi1/init.c reg = ((u64)(rcd->rcvhdrq_cnt >> HDRQ_SIZE_SHIFT) rcd 1886 drivers/infiniband/hw/hfi1/init.c write_kctxt_csr(dd, rcd->ctxt, RCV_HDR_CNT, reg); rcd 1887 drivers/infiniband/hw/hfi1/init.c reg = (encode_rcv_header_entry_size(rcd->rcvhdrqentsize) rcd 1890 drivers/infiniband/hw/hfi1/init.c write_kctxt_csr(dd, rcd->ctxt, RCV_HDR_ENT_SIZE, reg); rcd 1893 drivers/infiniband/hw/hfi1/init.c write_kctxt_csr(dd, rcd->ctxt, RCV_HDR_SIZE, reg); rcd 1899 drivers/infiniband/hw/hfi1/init.c write_kctxt_csr(dd, rcd->ctxt, RCV_HDR_TAIL_ADDR, rcd 1907 drivers/infiniband/hw/hfi1/init.c rcd->ctxt); rcd 1908 drivers/infiniband/hw/hfi1/init.c dma_free_coherent(&dd->pcidev->dev, amt, rcd->rcvhdrq, rcd 1909 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrq_dma); rcd 1910 drivers/infiniband/hw/hfi1/init.c rcd->rcvhdrq = NULL; rcd 1924 drivers/infiniband/hw/hfi1/init.c int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd) rcd 1926 drivers/infiniband/hw/hfi1/init.c struct hfi1_devdata *dd = rcd->dd; rcd 1948 drivers/infiniband/hw/hfi1/init.c if (rcd->egrbufs.size < (round_mtu * dd->rcv_entries.group_size)) rcd 1949 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.size = round_mtu * dd->rcv_entries.group_size; rcd 1954 drivers/infiniband/hw/hfi1/init.c if (!HFI1_CAP_KGET_MASK(rcd->flags, MULTI_PKT_EGR)) rcd 1955 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size = round_mtu; rcd 1961 drivers/infiniband/hw/hfi1/init.c if (rcd->egrbufs.size <= (1 << 20)) rcd 1962 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size = max((unsigned long)round_mtu, rcd 1963 drivers/infiniband/hw/hfi1/init.c rounddown_pow_of_two(rcd->egrbufs.size / 8)); rcd 1965 drivers/infiniband/hw/hfi1/init.c while (alloced_bytes < rcd->egrbufs.size && rcd 1966 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.alloced < rcd->egrbufs.count) { rcd 1967 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].addr = rcd 1969 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size, rcd 1970 drivers/infiniband/hw/hfi1/init.c &rcd->egrbufs.buffers[idx].dma, rcd 1972 drivers/infiniband/hw/hfi1/init.c if (rcd->egrbufs.buffers[idx].addr) { rcd 1973 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].len = rcd 1974 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size; rcd 1975 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtids[rcd->egrbufs.alloced].addr = rcd 1976 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].addr; rcd 1977 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtids[rcd->egrbufs.alloced].dma = rcd 1978 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].dma; rcd 1979 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.alloced++; rcd 1980 drivers/infiniband/hw/hfi1/init.c alloced_bytes += rcd->egrbufs.rcvtid_size; rcd 1992 drivers/infiniband/hw/hfi1/init.c if (rcd->egrbufs.rcvtid_size == round_mtu || rcd 1993 drivers/infiniband/hw/hfi1/init.c !HFI1_CAP_KGET_MASK(rcd->flags, MULTI_PKT_EGR)) { rcd 1995 drivers/infiniband/hw/hfi1/init.c rcd->ctxt); rcd 2000 drivers/infiniband/hw/hfi1/init.c new_size = rcd->egrbufs.rcvtid_size / 2; rcd 2008 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size = new_size; rcd 2016 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.alloced = 0; rcd 2018 drivers/infiniband/hw/hfi1/init.c if (i >= rcd->egrbufs.count) rcd 2020 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtids[i].dma = rcd 2021 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[j].dma + offset; rcd 2022 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtids[i].addr = rcd 2023 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[j].addr + offset; rcd 2024 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.alloced++; rcd 2025 drivers/infiniband/hw/hfi1/init.c if ((rcd->egrbufs.buffers[j].dma + offset + rcd 2027 drivers/infiniband/hw/hfi1/init.c (rcd->egrbufs.buffers[j].dma + rcd 2028 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[j].len)) { rcd 2035 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size = new_size; rcd 2038 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.numbufs = idx; rcd 2039 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.size = alloced_bytes; rcd 2043 drivers/infiniband/hw/hfi1/init.c rcd->ctxt, rcd->egrbufs.alloced, rcd 2044 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtid_size / 1024, rcd->egrbufs.size / 1024); rcd 2051 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.threshold = rcd 2052 drivers/infiniband/hw/hfi1/init.c rounddown_pow_of_two(rcd->egrbufs.alloced / 2); rcd 2058 drivers/infiniband/hw/hfi1/init.c max_entries = rcd->rcv_array_groups * dd->rcv_entries.group_size; rcd 2059 drivers/infiniband/hw/hfi1/init.c egrtop = roundup(rcd->egrbufs.alloced, dd->rcv_entries.group_size); rcd 2060 drivers/infiniband/hw/hfi1/init.c rcd->expected_count = max_entries - egrtop; rcd 2061 drivers/infiniband/hw/hfi1/init.c if (rcd->expected_count > MAX_TID_PAIR_ENTRIES * 2) rcd 2062 drivers/infiniband/hw/hfi1/init.c rcd->expected_count = MAX_TID_PAIR_ENTRIES * 2; rcd 2064 drivers/infiniband/hw/hfi1/init.c rcd->expected_base = rcd->eager_base + egrtop; rcd 2066 drivers/infiniband/hw/hfi1/init.c rcd->ctxt, rcd->egrbufs.alloced, rcd->expected_count, rcd 2067 drivers/infiniband/hw/hfi1/init.c rcd->eager_base, rcd->expected_base); rcd 2069 drivers/infiniband/hw/hfi1/init.c if (!hfi1_rcvbuf_validate(rcd->egrbufs.rcvtid_size, PT_EAGER, &order)) { rcd 2072 drivers/infiniband/hw/hfi1/init.c rcd->ctxt, rcd->egrbufs.rcvtid_size); rcd 2077 drivers/infiniband/hw/hfi1/init.c for (idx = 0; idx < rcd->egrbufs.alloced; idx++) { rcd 2078 drivers/infiniband/hw/hfi1/init.c hfi1_put_tid(dd, rcd->eager_base + idx, PT_EAGER, rcd 2079 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.rcvtids[idx].dma, order); rcd 2086 drivers/infiniband/hw/hfi1/init.c for (idx = 0; idx < rcd->egrbufs.alloced && rcd 2087 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].addr; rcd 2090 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].len, rcd 2091 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].addr, rcd 2092 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].dma); rcd 2093 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].addr = NULL; rcd 2094 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].dma = 0; rcd 2095 drivers/infiniband/hw/hfi1/init.c rcd->egrbufs.buffers[idx].len = 0; rcd 244 drivers/infiniband/hw/hfi1/intr.c void handle_user_interrupt(struct hfi1_ctxtdata *rcd) rcd 246 drivers/infiniband/hw/hfi1/intr.c struct hfi1_devdata *dd = rcd->dd; rcd 250 drivers/infiniband/hw/hfi1/intr.c if (bitmap_empty(rcd->in_use_ctxts, HFI1_MAX_SHARED_CTXTS)) rcd 253 drivers/infiniband/hw/hfi1/intr.c if (test_and_clear_bit(HFI1_CTXT_WAITING_RCV, &rcd->event_flags)) { rcd 254 drivers/infiniband/hw/hfi1/intr.c wake_up_interruptible(&rcd->wait); rcd 255 drivers/infiniband/hw/hfi1/intr.c hfi1_rcvctrl(dd, HFI1_RCVCTRL_INTRAVAIL_DIS, rcd); rcd 257 drivers/infiniband/hw/hfi1/intr.c &rcd->event_flags)) { rcd 258 drivers/infiniband/hw/hfi1/intr.c rcd->urgent++; rcd 259 drivers/infiniband/hw/hfi1/intr.c wake_up_interruptible(&rcd->wait); rcd 203 drivers/infiniband/hw/hfi1/msix.c int msix_request_rcd_irq(struct hfi1_ctxtdata *rcd) rcd 207 drivers/infiniband/hw/hfi1/msix.c nr = msix_request_irq(rcd->dd, rcd, receive_context_interrupt, rcd 208 drivers/infiniband/hw/hfi1/msix.c receive_context_thread, rcd->ctxt, IRQ_RCVCTXT); rcd 216 drivers/infiniband/hw/hfi1/msix.c rcd->ireg = (IS_RCVAVAIL_START + rcd->ctxt) / 64; rcd 217 drivers/infiniband/hw/hfi1/msix.c rcd->imask = ((u64)1) << ((IS_RCVAVAIL_START + rcd->ctxt) % 64); rcd 218 drivers/infiniband/hw/hfi1/msix.c rcd->msix_intr = nr; rcd 219 drivers/infiniband/hw/hfi1/msix.c remap_intr(rcd->dd, IS_RCVAVAIL_START + rcd->ctxt, nr); rcd 284 drivers/infiniband/hw/hfi1/msix.c struct hfi1_ctxtdata *rcd = hfi1_rcd_get_by_index_safe(dd, i); rcd 286 drivers/infiniband/hw/hfi1/msix.c if (rcd) rcd 287 drivers/infiniband/hw/hfi1/msix.c ret = msix_request_rcd_irq(rcd); rcd 288 drivers/infiniband/hw/hfi1/msix.c hfi1_rcd_put(rcd); rcd 356 drivers/infiniband/hw/hfi1/msix.c struct hfi1_ctxtdata *rcd = dd->vnic.ctxt[i]; rcd 359 drivers/infiniband/hw/hfi1/msix.c me = &dd->msix_info.msix_entries[rcd->msix_intr]; rcd 57 drivers/infiniband/hw/hfi1/msix.h int msix_request_rcd_irq(struct hfi1_ctxtdata *rcd); rcd 1881 drivers/infiniband/hw/hfi1/pio.c dd->rcd[0]->rcvhdrqentsize)); rcd 2023 drivers/infiniband/hw/hfi1/pio.c dd->rcd[0]->rcvhdrqentsize, dd->node); rcd 2047 drivers/infiniband/hw/hfi1/pio.c dd->rcd[0]->rcvhdrqentsize, dd->node); rcd 2057 drivers/infiniband/hw/hfi1/pio.c sc_alloc(dd, SC_KERNEL, dd->rcd[0]->rcvhdrqentsize, dd->node); rcd 1106 drivers/infiniband/hw/hfi1/rc.c hfi1_kern_clear_hw_flow(priv->rcd, qp); rcd 1247 drivers/infiniband/hw/hfi1/rc.c ibp = rcd_to_iport(packet->rcd); rcd 1268 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); rcd 1321 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); rcd 1389 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 1391 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ibport *ibp = rcd_to_iport(rcd); rcd 1428 drivers/infiniband/hw/hfi1/rc.c pbuf = sc_buffer_alloc(rcd->sc, plen, NULL, NULL); rcd 1643 drivers/infiniband/hw/hfi1/rc.c hfi1_kern_clear_hw_flow(priv->rcd, qp); rcd 1948 drivers/infiniband/hw/hfi1/rc.c static void set_restart_qp(struct rvt_qp *qp, struct hfi1_ctxtdata *rcd) rcd 1957 drivers/infiniband/hw/hfi1/rc.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 2008 drivers/infiniband/hw/hfi1/rc.c u64 val, struct hfi1_ctxtdata *rcd) rcd 2030 drivers/infiniband/hw/hfi1/rc.c ibp = rcd_to_iport(rcd); rcd 2067 drivers/infiniband/hw/hfi1/rc.c set_restart_qp(qp, rcd); rcd 2148 drivers/infiniband/hw/hfi1/rc.c set_restart_qp(qp, rcd); rcd 2307 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ctxtdata *rcd) rcd 2333 drivers/infiniband/hw/hfi1/rc.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 2347 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 2409 drivers/infiniband/hw/hfi1/rc.c if (!do_rc_ack(qp, aeth, psn, opcode, val, rcd) || rcd 2462 drivers/infiniband/hw/hfi1/rc.c if (!do_rc_ack(qp, aeth, psn, opcode, 0, rcd)) rcd 2501 drivers/infiniband/hw/hfi1/rc.c OP(RDMA_READ_RESPONSE_LAST), 0, rcd); rcd 2510 drivers/infiniband/hw/hfi1/rc.c ibp = rcd_to_iport(rcd); rcd 2511 drivers/infiniband/hw/hfi1/rc.c rdma_seq_err(qp, ibp, psn, rcd); rcd 2554 drivers/infiniband/hw/hfi1/rc.c int diff, struct hfi1_ctxtdata *rcd) rcd 2556 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ibport *ibp = rcd_to_iport(rcd); rcd 2580 drivers/infiniband/hw/hfi1/rc.c rc_defered_ack(rcd, qp); rcd 2807 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 2812 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ibport *ibp = rcd_to_iport(rcd); rcd 2851 drivers/infiniband/hw/hfi1/rc.c if (rc_rcv_error(ohdr, data, qp, opcode, psn, diff, rcd)) rcd 3212 drivers/infiniband/hw/hfi1/rc.c rc_defered_ack(rcd, qp); rcd 3220 drivers/infiniband/hw/hfi1/rc.c rc_defered_ack(rcd, qp); rcd 3228 drivers/infiniband/hw/hfi1/rc.c rc_defered_ack(rcd, qp); rcd 3238 drivers/infiniband/hw/hfi1/rc.c rc_defered_ack(rcd, qp); rcd 3252 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ctxtdata *rcd, rcd 3256 drivers/infiniband/hw/hfi1/rc.c struct hfi1_ibport *ibp = rcd_to_iport(rcd); rcd 3283 drivers/infiniband/hw/hfi1/rc.c rc_defered_ack(rcd, qp); rcd 25 drivers/infiniband/hw/hfi1/rc.h static inline void rc_defered_ack(struct hfi1_ctxtdata *rcd, rcd 31 drivers/infiniband/hw/hfi1/rc.h list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 55 drivers/infiniband/hw/hfi1/rc.h struct hfi1_ctxtdata *rcd); rcd 133 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd, rcd 197 drivers/infiniband/hw/hfi1/tid_rdma.c p->qp = (kdeth_qp << 16) | priv->rcd->ctxt; rcd 199 drivers/infiniband/hw/hfi1/tid_rdma.c p->jkey = priv->rcd->jkey; rcd 203 drivers/infiniband/hw/hfi1/tid_rdma.c p->urg = is_urg_masked(priv->rcd); rcd 298 drivers/infiniband/hw/hfi1/tid_rdma.c int hfi1_kern_exp_rcv_init(struct hfi1_ctxtdata *rcd, int reinit) rcd 305 drivers/infiniband/hw/hfi1/tid_rdma.c rcd->jkey = TID_RDMA_JKEY; rcd 306 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_set_ctxt_jkey(rcd->dd, rcd, rcd->jkey); rcd 307 drivers/infiniband/hw/hfi1/tid_rdma.c return hfi1_alloc_ctxt_rcv_groups(rcd); rcd 334 drivers/infiniband/hw/hfi1/tid_rdma.c return dd->rcd[ctxt]; rcd 343 drivers/infiniband/hw/hfi1/tid_rdma.c qpriv->rcd = qp_to_rcd(rdi, qp); rcd 368 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = qpriv->rcd->dd; rcd 468 drivers/infiniband/hw/hfi1/tid_rdma.c static struct rvt_qp *first_qp(struct hfi1_ctxtdata *rcd, rcd 470 drivers/infiniband/hw/hfi1/tid_rdma.c __must_hold(&rcd->exp_lock) rcd 474 drivers/infiniband/hw/hfi1/tid_rdma.c lockdep_assert_held(&rcd->exp_lock); rcd 502 drivers/infiniband/hw/hfi1/tid_rdma.c static bool kernel_tid_waiters(struct hfi1_ctxtdata *rcd, rcd 504 drivers/infiniband/hw/hfi1/tid_rdma.c __must_hold(&rcd->exp_lock) __must_hold(&qp->s_lock) rcd 510 drivers/infiniband/hw/hfi1/tid_rdma.c lockdep_assert_held(&rcd->exp_lock); rcd 511 drivers/infiniband/hw/hfi1/tid_rdma.c fqp = first_qp(rcd, queue); rcd 533 drivers/infiniband/hw/hfi1/tid_rdma.c static void dequeue_tid_waiter(struct hfi1_ctxtdata *rcd, rcd 535 drivers/infiniband/hw/hfi1/tid_rdma.c __must_hold(&rcd->exp_lock) __must_hold(&qp->s_lock) rcd 540 drivers/infiniband/hw/hfi1/tid_rdma.c lockdep_assert_held(&rcd->exp_lock); rcd 559 drivers/infiniband/hw/hfi1/tid_rdma.c static void queue_qp_for_tid_wait(struct hfi1_ctxtdata *rcd, rcd 561 drivers/infiniband/hw/hfi1/tid_rdma.c __must_hold(&rcd->exp_lock) __must_hold(&qp->s_lock) rcd 566 drivers/infiniband/hw/hfi1/tid_rdma.c lockdep_assert_held(&rcd->exp_lock); rcd 571 drivers/infiniband/hw/hfi1/tid_rdma.c rcd->dd->verbs_dev.n_tidwait++; rcd 674 drivers/infiniband/hw/hfi1/tid_rdma.c spin_lock(&priv->rcd->exp_lock); rcd 681 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock(&priv->rcd->exp_lock); rcd 689 drivers/infiniband/hw/hfi1/tid_rdma.c _tid_rdma_flush_wait(qp, &priv->rcd->flow_queue); rcd 690 drivers/infiniband/hw/hfi1/tid_rdma.c _tid_rdma_flush_wait(qp, &priv->rcd->rarr_queue); rcd 711 drivers/infiniband/hw/hfi1/tid_rdma.c static int kern_reserve_flow(struct hfi1_ctxtdata *rcd, int last) rcd 712 drivers/infiniband/hw/hfi1/tid_rdma.c __must_hold(&rcd->exp_lock) rcd 718 drivers/infiniband/hw/hfi1/tid_rdma.c !test_and_set_bit(last, &rcd->flow_mask)) rcd 721 drivers/infiniband/hw/hfi1/tid_rdma.c nr = ffz(rcd->flow_mask); rcd 723 drivers/infiniband/hw/hfi1/tid_rdma.c (sizeof(rcd->flow_mask) * BITS_PER_BYTE)); rcd 726 drivers/infiniband/hw/hfi1/tid_rdma.c set_bit(nr, &rcd->flow_mask); rcd 730 drivers/infiniband/hw/hfi1/tid_rdma.c static void kern_set_hw_flow(struct hfi1_ctxtdata *rcd, u32 generation, rcd 745 drivers/infiniband/hw/hfi1/tid_rdma.c write_uctxt_csr(rcd->dd, rcd->ctxt, rcd 749 drivers/infiniband/hw/hfi1/tid_rdma.c static u32 kern_setup_hw_flow(struct hfi1_ctxtdata *rcd, u32 flow_idx) rcd 750 drivers/infiniband/hw/hfi1/tid_rdma.c __must_hold(&rcd->exp_lock) rcd 752 drivers/infiniband/hw/hfi1/tid_rdma.c u32 generation = rcd->flows[flow_idx].generation; rcd 754 drivers/infiniband/hw/hfi1/tid_rdma.c kern_set_hw_flow(rcd, generation, flow_idx); rcd 767 drivers/infiniband/hw/hfi1/tid_rdma.c static void kern_clear_hw_flow(struct hfi1_ctxtdata *rcd, u32 flow_idx) rcd 768 drivers/infiniband/hw/hfi1/tid_rdma.c __must_hold(&rcd->exp_lock) rcd 770 drivers/infiniband/hw/hfi1/tid_rdma.c rcd->flows[flow_idx].generation = rcd 771 drivers/infiniband/hw/hfi1/tid_rdma.c kern_flow_generation_next(rcd->flows[flow_idx].generation); rcd 772 drivers/infiniband/hw/hfi1/tid_rdma.c kern_set_hw_flow(rcd, KERN_GENERATION_RESERVED, flow_idx); rcd 775 drivers/infiniband/hw/hfi1/tid_rdma.c int hfi1_kern_setup_hw_flow(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp) rcd 787 drivers/infiniband/hw/hfi1/tid_rdma.c spin_lock_irqsave(&rcd->exp_lock, flags); rcd 788 drivers/infiniband/hw/hfi1/tid_rdma.c if (kernel_tid_waiters(rcd, &rcd->flow_queue, qp)) rcd 791 drivers/infiniband/hw/hfi1/tid_rdma.c ret = kern_reserve_flow(rcd, fs->last_index); rcd 799 drivers/infiniband/hw/hfi1/tid_rdma.c rcd->flows[fs->index].generation = fs->generation; rcd 800 drivers/infiniband/hw/hfi1/tid_rdma.c fs->generation = kern_setup_hw_flow(rcd, fs->index); rcd 802 drivers/infiniband/hw/hfi1/tid_rdma.c dequeue_tid_waiter(rcd, &rcd->flow_queue, qp); rcd 804 drivers/infiniband/hw/hfi1/tid_rdma.c fqp = first_qp(rcd, &rcd->flow_queue); rcd 805 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock_irqrestore(&rcd->exp_lock, flags); rcd 810 drivers/infiniband/hw/hfi1/tid_rdma.c queue_qp_for_tid_wait(rcd, &rcd->flow_queue, qp); rcd 811 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock_irqrestore(&rcd->exp_lock, flags); rcd 815 drivers/infiniband/hw/hfi1/tid_rdma.c void hfi1_kern_clear_hw_flow(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp) rcd 824 drivers/infiniband/hw/hfi1/tid_rdma.c spin_lock_irqsave(&rcd->exp_lock, flags); rcd 825 drivers/infiniband/hw/hfi1/tid_rdma.c kern_clear_hw_flow(rcd, fs->index); rcd 826 drivers/infiniband/hw/hfi1/tid_rdma.c clear_bit(fs->index, &rcd->flow_mask); rcd 832 drivers/infiniband/hw/hfi1/tid_rdma.c fqp = first_qp(rcd, &rcd->flow_queue); rcd 833 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock_irqrestore(&rcd->exp_lock, flags); rcd 843 drivers/infiniband/hw/hfi1/tid_rdma.c void hfi1_kern_init_ctxt_generations(struct hfi1_ctxtdata *rcd) rcd 848 drivers/infiniband/hw/hfi1/tid_rdma.c rcd->flows[i].generation = mask_generation(prandom_u32()); rcd 849 drivers/infiniband/hw/hfi1/tid_rdma.c kern_set_hw_flow(rcd, KERN_GENERATION_RESERVED, i); rcd 1121 drivers/infiniband/hw/hfi1/tid_rdma.c dd = flow->req->rcd->dd; rcd 1137 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = flow->req->rcd->dd; rcd 1198 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd, char *s, rcd 1206 drivers/infiniband/hw/hfi1/tid_rdma.c dd_dev_err(rcd->dd, rcd 1232 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = flow->req->rcd; rcd 1233 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = rcd->dd; rcd 1244 drivers/infiniband/hw/hfi1/tid_rdma.c list_for_each_entry(group, &rcd->tid_group_list.list, list) { rcd 1245 drivers/infiniband/hw/hfi1/tid_rdma.c kern_add_tid_node(flow, rcd, "complete groups", group, rcd 1258 drivers/infiniband/hw/hfi1/tid_rdma.c list_for_each_entry(used, &rcd->tid_used_list.list, list) { rcd 1261 drivers/infiniband/hw/hfi1/tid_rdma.c kern_add_tid_node(flow, rcd, "used groups", used, use); rcd 1273 drivers/infiniband/hw/hfi1/tid_rdma.c if (group && &group->list == &rcd->tid_group_list.list) rcd 1275 drivers/infiniband/hw/hfi1/tid_rdma.c group = list_prepare_entry(group, &rcd->tid_group_list.list, rcd 1277 drivers/infiniband/hw/hfi1/tid_rdma.c if (list_is_last(&group->list, &rcd->tid_group_list.list)) rcd 1281 drivers/infiniband/hw/hfi1/tid_rdma.c kern_add_tid_node(flow, rcd, "complete continue", group, use); rcd 1296 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = flow->req->rcd; rcd 1297 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = rcd->dd; rcd 1321 drivers/infiniband/hw/hfi1/tid_rdma.c rcventry -= rcd->expected_base; rcd 1349 drivers/infiniband/hw/hfi1/tid_rdma.c tid_group_move(grp, &rcd->tid_used_list, rcd 1350 drivers/infiniband/hw/hfi1/tid_rdma.c &rcd->tid_full_list); rcd 1352 drivers/infiniband/hw/hfi1/tid_rdma.c tid_group_move(grp, &rcd->tid_group_list, rcd 1353 drivers/infiniband/hw/hfi1/tid_rdma.c &rcd->tid_used_list); rcd 1363 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = flow->req->rcd; rcd 1364 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = rcd->dd; rcd 1385 drivers/infiniband/hw/hfi1/tid_rdma.c tid_group_move(grp, &rcd->tid_full_list, rcd 1386 drivers/infiniband/hw/hfi1/tid_rdma.c &rcd->tid_used_list); rcd 1388 drivers/infiniband/hw/hfi1/tid_rdma.c tid_group_move(grp, &rcd->tid_used_list, rcd 1389 drivers/infiniband/hw/hfi1/tid_rdma.c &rcd->tid_group_list); rcd 1392 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = flow->req->rcd; rcd 1393 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = rcd->dd; rcd 1459 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = req->rcd; rcd 1487 drivers/infiniband/hw/hfi1/tid_rdma.c spin_lock_irqsave(&rcd->exp_lock, flags); rcd 1488 drivers/infiniband/hw/hfi1/tid_rdma.c if (kernel_tid_waiters(rcd, &rcd->rarr_queue, flow->req->qp)) rcd 1521 drivers/infiniband/hw/hfi1/tid_rdma.c dequeue_tid_waiter(rcd, &rcd->rarr_queue, flow->req->qp); rcd 1523 drivers/infiniband/hw/hfi1/tid_rdma.c fqp = first_qp(rcd, &rcd->rarr_queue); rcd 1524 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock_irqrestore(&rcd->exp_lock, flags); rcd 1530 drivers/infiniband/hw/hfi1/tid_rdma.c queue_qp_for_tid_wait(rcd, &rcd->rarr_queue, flow->req->qp); rcd 1531 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock_irqrestore(&rcd->exp_lock, flags); rcd 1550 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = req->rcd; rcd 1560 drivers/infiniband/hw/hfi1/tid_rdma.c spin_lock_irqsave(&rcd->exp_lock, flags); rcd 1567 drivers/infiniband/hw/hfi1/tid_rdma.c fqp = first_qp(rcd, &rcd->rarr_queue); rcd 1568 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock_irqrestore(&rcd->exp_lock, flags); rcd 1633 drivers/infiniband/hw/hfi1/tid_rdma.c req->rcd->numa_id); rcd 1663 drivers/infiniband/hw/hfi1/tid_rdma.c req->rcd = qpriv->rcd; rcd 1754 drivers/infiniband/hw/hfi1/tid_rdma.c qpriv->rcd->ctxt); rcd 1804 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_kern_clear_hw_flow(req->rcd, qp); rcd 1838 drivers/infiniband/hw/hfi1/tid_rdma.c if (hfi1_kern_setup_hw_flow(qpriv->rcd, qp)) rcd 1983 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = ((struct hfi1_qp_priv *)qp->priv)->rcd; rcd 2000 drivers/infiniband/hw/hfi1/tid_rdma.c rc_defered_ack(rcd, qp); rcd 2223 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 2328 drivers/infiniband/hw/hfi1/tid_rdma.c rc_defered_ack(rcd, qp); rcd 2447 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 2470 drivers/infiniband/hw/hfi1/tid_rdma.c update_r_next_psn_fecn(packet, priv, rcd, flow, fecn); rcd 2529 drivers/infiniband/hw/hfi1/tid_rdma.c if (!do_rc_ack(qp, aeth, ipsn, opcode, 0, rcd)) rcd 2546 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_kern_clear_hw_flow(priv->rcd, qp); rcd 2592 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_kern_clear_hw_flow(priv->rcd, qp); rcd 2622 drivers/infiniband/hw/hfi1/tid_rdma.c static void restart_tid_rdma_read_req(struct hfi1_ctxtdata *rcd, rcd 2636 drivers/infiniband/hw/hfi1/tid_rdma.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 2648 drivers/infiniband/hw/hfi1/tid_rdma.c static bool handle_read_kdeth_eflags(struct hfi1_ctxtdata *rcd, rcd 2653 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_pportdata *ppd = rcd->ppd; rcd 2700 drivers/infiniband/hw/hfi1/tid_rdma.c restart_tid_rdma_read_req(rcd, qp, rcd 2710 drivers/infiniband/hw/hfi1/tid_rdma.c &rcd->qp_wait_list); rcd 2791 drivers/infiniband/hw/hfi1/tid_rdma.c last_psn = read_r_next_psn(dd, rcd->ctxt, rcd 2800 drivers/infiniband/hw/hfi1/tid_rdma.c restart_tid_rdma_read_req(rcd, qp, rcd 2837 drivers/infiniband/hw/hfi1/tid_rdma.c bool hfi1_handle_kdeth_eflags(struct hfi1_ctxtdata *rcd, rcd 2868 drivers/infiniband/hw/hfi1/tid_rdma.c trace_input_ibhdr(rcd->dd, packet, !!(rhf_dc_info(packet->rhf))); rcd 2916 drivers/infiniband/hw/hfi1/tid_rdma.c ret = handle_read_kdeth_eflags(rcd, packet, rcv_type, rte, psn, rcd 2952 drivers/infiniband/hw/hfi1/tid_rdma.c read_r_next_psn(dd, rcd->ctxt, rcd 3169 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_kern_clear_hw_flow(qpriv->rcd, qp); rcd 3276 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_pportdata *ppd = qpriv->rcd->ppd; rcd 3420 drivers/infiniband/hw/hfi1/tid_rdma.c bytes_per_us = active_egress_rate(qpriv->rcd->ppd) / 8; rcd 3455 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = qpriv->rcd; rcd 3487 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_kern_clear_hw_flow(rcd, qp); rcd 3513 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_kern_clear_hw_flow(rcd, qp); rcd 3520 drivers/infiniband/hw/hfi1/tid_rdma.c ret = hfi1_kern_setup_hw_flow(qpriv->rcd, qp); rcd 3524 drivers/infiniband/hw/hfi1/tid_rdma.c &rcd->flow_queue); rcd 3558 drivers/infiniband/hw/hfi1/tid_rdma.c to_seg = position_in_queue(qpriv, &rcd->rarr_queue); rcd 3628 drivers/infiniband/hw/hfi1/tid_rdma.c rc_defered_ack(rcd, qp); rcd 3646 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 3813 drivers/infiniband/hw/hfi1/tid_rdma.c rc_defered_ack(rcd, qp); rcd 3915 drivers/infiniband/hw/hfi1/tid_rdma.c qpriv->rcd->ctxt); rcd 3990 drivers/infiniband/hw/hfi1/tid_rdma.c hfi1_kern_clear_hw_flow(qpriv->rcd, qp); rcd 4030 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 4088 drivers/infiniband/hw/hfi1/tid_rdma.c if (!do_rc_ack(qp, aeth, psn, opcode, 0, rcd)) rcd 4260 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = priv->rcd; rcd 4284 drivers/infiniband/hw/hfi1/tid_rdma.c update_r_next_psn_fecn(packet, priv, rcd, flow, fecn); rcd 4336 drivers/infiniband/hw/hfi1/tid_rdma.c rcd->flows[flow->idx].psn = psn & HFI1_KDETH_BTH_SEQ_MASK; rcd 4449 drivers/infiniband/hw/hfi1/tid_rdma.c qpriv->rcd->ctxt); rcd 4861 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd = qpriv->rcd; rcd 4890 drivers/infiniband/hw/hfi1/tid_rdma.c spin_lock(&rcd->exp_lock); rcd 4899 drivers/infiniband/hw/hfi1/tid_rdma.c rcd->flows[fs->index].generation = generation; rcd 4900 drivers/infiniband/hw/hfi1/tid_rdma.c fs->generation = kern_setup_hw_flow(rcd, fs->index); rcd 4955 drivers/infiniband/hw/hfi1/tid_rdma.c spin_unlock(&rcd->exp_lock); rcd 5501 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_ctxtdata *rcd, rcd 5511 drivers/infiniband/hw/hfi1/tid_rdma.c struct hfi1_devdata *dd = rcd->dd; rcd 5514 drivers/infiniband/hw/hfi1/tid_rdma.c read_r_next_psn(dd, rcd->ctxt, flow->idx); rcd 99 drivers/infiniband/hw/hfi1/tid_rdma.h struct hfi1_ctxtdata *rcd; rcd 209 drivers/infiniband/hw/hfi1/tid_rdma.h int hfi1_kern_exp_rcv_init(struct hfi1_ctxtdata *rcd, int reinit); rcd 236 drivers/infiniband/hw/hfi1/tid_rdma.h int hfi1_kern_setup_hw_flow(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp); rcd 237 drivers/infiniband/hw/hfi1/tid_rdma.h void hfi1_kern_clear_hw_flow(struct hfi1_ctxtdata *rcd, struct rvt_qp *qp); rcd 238 drivers/infiniband/hw/hfi1/tid_rdma.h void hfi1_kern_init_ctxt_generations(struct hfi1_ctxtdata *rcd); rcd 255 drivers/infiniband/hw/hfi1/tid_rdma.h bool hfi1_handle_kdeth_eflags(struct hfi1_ctxtdata *rcd, rcd 114 drivers/infiniband/hw/hfi1/trace_misc.h TP_STRUCT__entry(DD_DEV_ENTRY(packet->rcd->ppd->dd) rcd 122 drivers/infiniband/hw/hfi1/trace_misc.h TP_fast_assign(DD_DEV_ASSIGN(packet->rcd->ppd->dd); rcd 124 drivers/infiniband/hw/hfi1/trace_misc.h __entry->ctxt = packet->rcd->ctxt; rcd 68 drivers/infiniband/hw/hfi1/trace_rx.h TP_STRUCT__entry(DD_DEV_ENTRY(packet->rcd->dd) rcd 77 drivers/infiniband/hw/hfi1/trace_rx.h TP_fast_assign(DD_DEV_ASSIGN(packet->rcd->dd); rcd 79 drivers/infiniband/hw/hfi1/trace_rx.h __entry->ctxt = packet->rcd->ctxt; rcd 100 drivers/infiniband/hw/hfi1/trace_rx.h TP_PROTO(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd), rcd 101 drivers/infiniband/hw/hfi1/trace_rx.h TP_ARGS(dd, rcd), rcd 108 drivers/infiniband/hw/hfi1/trace_rx.h __entry->ctxt = rcd->ctxt; rcd 109 drivers/infiniband/hw/hfi1/trace_rx.h if (rcd->do_interrupt == rcd 113 drivers/infiniband/hw/hfi1/trace_rx.h } else if (rcd->do_interrupt == rcd 117 drivers/infiniband/hw/hfi1/trace_rx.h } else if (rcd->do_interrupt == rcd 307 drivers/infiniband/hw/hfi1/uc.c struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); rcd 861 drivers/infiniband/hw/hfi1/ud.c struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); rcd 370 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 373 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; rcd 391 drivers/infiniband/hw/hfi1/verbs.c trace_input_ibhdr(rcd->dd, packet, !!(rhf_dc_info(packet->rhf))); rcd 394 drivers/infiniband/hw/hfi1/verbs.c inc_opstats(tlen, &rcd->opstats->stats[opcode]); rcd 424 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 427 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; rcd 445 drivers/infiniband/hw/hfi1/verbs.c trace_input_ibhdr(rcd->dd, packet, !!(rhf_dc_info(packet->rhf))); rcd 448 drivers/infiniband/hw/hfi1/verbs.c inc_opstats(tlen, &rcd->opstats->stats[opcode]); rcd 478 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 479 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; rcd 498 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 499 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_pportdata *ppd = rcd->ppd; rcd 500 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ibport *ibp = rcd_to_iport(rcd); rcd 505 drivers/infiniband/hw/hfi1/verbs.c inc_opstats(packet->tlen, &rcd->opstats->stats[packet->opcode]); rcd 578 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 580 drivers/infiniband/hw/hfi1/verbs.c trace_input_ibhdr(rcd->dd, packet, !!(rhf_dc_info(packet->rhf))); rcd 586 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ctxtdata *rcd = packet->rcd; rcd 588 drivers/infiniband/hw/hfi1/verbs.c trace_input_ibhdr(rcd->dd, packet, false); rcd 1976 drivers/infiniband/hw/hfi1/verbs.c struct hfi1_ibport *ibp = rcd_to_iport(packet->rcd); rcd 161 drivers/infiniband/hw/hfi1/verbs.h struct hfi1_ctxtdata *rcd; /* QP's receive context */ rcd 413 drivers/infiniband/hw/hfi1/verbs.h struct hfi1_ctxtdata *rcd, rcd 526 drivers/infiniband/hw/hfi1/vnic_main.c struct hfi1_devdata *dd = packet->rcd->dd; rcd 558 drivers/infiniband/hw/hfi1/vnic_main.c l4_type, vesw_id, packet->rcd->ctxt); rcd 562 drivers/infiniband/hw/hfi1/vnic_main.c q_idx = packet->rcd->vnic_q_idx; rcd 730 drivers/infiniband/hw/qib/qib.h struct qib_ctxtdata **rcd; /* Receive Context Data */ rcd 1102 drivers/infiniband/hw/qib/qib.h struct qib_ctxtdata *rcd; rcd 1175 drivers/infiniband/hw/qib/qib.h (((struct qib_filedata *)(fp)->private_data)->rcd) rcd 1352 drivers/infiniband/hw/qib/qib.h static inline void qib_clear_rcvhdrtail(const struct qib_ctxtdata *rcd) rcd 1354 drivers/infiniband/hw/qib/qib.h *((u64 *) rcd->rcvhdrtail_kvaddr) = 0ULL; rcd 1357 drivers/infiniband/hw/qib/qib.h static inline u32 qib_get_rcvhdrtail(const struct qib_ctxtdata *rcd) rcd 1364 drivers/infiniband/hw/qib/qib.h *((volatile __le64 *)rcd->rcvhdrtail_kvaddr)); /* DMA'ed */ rcd 1367 drivers/infiniband/hw/qib/qib.h static inline u32 qib_get_hdrqtail(const struct qib_ctxtdata *rcd) rcd 1369 drivers/infiniband/hw/qib/qib.h const struct qib_devdata *dd = rcd->dd; rcd 1376 drivers/infiniband/hw/qib/qib.h rhf_addr = (__le32 *) rcd->rcvhdrq + rcd 1377 drivers/infiniband/hw/qib/qib.h rcd->head + dd->rhf_offset; rcd 1379 drivers/infiniband/hw/qib/qib.h hdrqtail = rcd->head; rcd 1380 drivers/infiniband/hw/qib/qib.h if (seq == rcd->seq_cnt) rcd 1383 drivers/infiniband/hw/qib/qib.h hdrqtail = qib_get_rcvhdrtail(rcd); rcd 103 drivers/infiniband/hw/qib/qib_debugfs.c if (!dd->rcd[j]) rcd 105 drivers/infiniband/hw/qib/qib_debugfs.c n_packets += dd->rcd[j]->opstats->stats[i].n_packets; rcd 106 drivers/infiniband/hw/qib/qib_debugfs.c n_bytes += dd->rcd[j]->opstats->stats[i].n_bytes; rcd 166 drivers/infiniband/hw/qib/qib_debugfs.c if (!dd->rcd[i]) rcd 169 drivers/infiniband/hw/qib/qib_debugfs.c for (j = 0; j < ARRAY_SIZE(dd->rcd[i]->opstats->stats); j++) rcd 170 drivers/infiniband/hw/qib/qib_debugfs.c n_packets += dd->rcd[i]->opstats->stats[j].n_packets; rcd 279 drivers/infiniband/hw/qib/qib_driver.c static inline void *qib_get_egrbuf(const struct qib_ctxtdata *rcd, u32 etail) rcd 281 drivers/infiniband/hw/qib/qib_driver.c const u32 chunk = etail >> rcd->rcvegrbufs_perchunk_shift; rcd 282 drivers/infiniband/hw/qib/qib_driver.c const u32 idx = etail & ((u32)rcd->rcvegrbufs_perchunk - 1); rcd 284 drivers/infiniband/hw/qib/qib_driver.c return rcd->rcvegrbuf[chunk] + (idx << rcd->dd->rcvegrbufsize_shift); rcd 291 drivers/infiniband/hw/qib/qib_driver.c static u32 qib_rcv_hdrerr(struct qib_ctxtdata *rcd, struct qib_pportdata *ppd, rcd 405 drivers/infiniband/hw/qib/qib_driver.c &rcd->qp_wait_list); rcd 440 drivers/infiniband/hw/qib/qib_driver.c u32 qib_kreceive(struct qib_ctxtdata *rcd, u32 *llic, u32 *npkts) rcd 442 drivers/infiniband/hw/qib/qib_driver.c struct qib_devdata *dd = rcd->dd; rcd 443 drivers/infiniband/hw/qib/qib_driver.c struct qib_pportdata *ppd = rcd->ppd; rcd 455 drivers/infiniband/hw/qib/qib_driver.c l = rcd->head; rcd 456 drivers/infiniband/hw/qib/qib_driver.c rhf_addr = (__le32 *) rcd->rcvhdrq + l + dd->rhf_offset; rcd 460 drivers/infiniband/hw/qib/qib_driver.c if (seq != rcd->seq_cnt) rcd 464 drivers/infiniband/hw/qib/qib_driver.c hdrqtail = qib_get_rcvhdrtail(rcd); rcd 484 drivers/infiniband/hw/qib/qib_driver.c ebuf = qib_get_egrbuf(rcd, etail); rcd 508 drivers/infiniband/hw/qib/qib_driver.c crcs += qib_rcv_hdrerr(rcd, ppd, rcd->ctxt, eflags, l, rcd 511 drivers/infiniband/hw/qib/qib_driver.c qib_ib_rcv(rcd, hdr, ebuf, tlen); rcd 524 drivers/infiniband/hw/qib/qib_driver.c rhf_addr = (__le32 *) rcd->rcvhdrq + l + dd->rhf_offset; rcd 528 drivers/infiniband/hw/qib/qib_driver.c if (++rcd->seq_cnt > 13) rcd 529 drivers/infiniband/hw/qib/qib_driver.c rcd->seq_cnt = 1; rcd 530 drivers/infiniband/hw/qib/qib_driver.c if (seq != rcd->seq_cnt) rcd 542 drivers/infiniband/hw/qib/qib_driver.c dd->f_update_usrhead(rcd, lval, updegr, etail, i); rcd 547 drivers/infiniband/hw/qib/qib_driver.c rcd->head = l; rcd 553 drivers/infiniband/hw/qib/qib_driver.c list_for_each_entry_safe(qp, nqp, &rcd->qp_wait_list, rspwait) { rcd 581 drivers/infiniband/hw/qib/qib_driver.c lval = (u64)rcd->head | dd->rhdrhead_intr_off; rcd 582 drivers/infiniband/hw/qib/qib_driver.c dd->f_update_usrhead(rcd, lval, updegr, etail, i); rcd 762 drivers/infiniband/hw/qib/qib_driver.c if (dd->rcd) rcd 764 drivers/infiniband/hw/qib/qib_driver.c if (!dd->rcd[i] || !dd->rcd[i]->cnt) rcd 101 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd = ctxt_fp(fp); rcd 104 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 105 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_pportdata *ppd = rcd->ppd; rcd 110 drivers/infiniband/hw/qib/qib_file_ops.c subctxt_cnt = rcd->subctxt_cnt; rcd 135 drivers/infiniband/hw/qib/qib_file_ops.c ret = dd->f_get_base_info(rcd, kinfo); rcd 141 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_tidegrcnt = rcd->rcvegrcnt; rcd 147 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvegrbuf_chunks * rcd->rcvegrbuf_size; rcd 148 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_rcv_egrperchunk = rcd->rcvegrbufs_perchunk; rcd 150 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvegrbuf_chunks; rcd 184 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_rcvhdr_base = (u64) rcd->rcvhdrq_phys; rcd 185 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_rcvhdr_tailaddr = (u64) rcd->rcvhdrqtailaddr_phys; rcd 187 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_rcv_egrbufs = (u64) rcd->rcvegr_phys; rcd 193 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_uregbase = (u64) dd->uregbase + dd->ureg_align * rcd->ctxt; rcd 195 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_piocnt = rcd->piocnt; rcd 196 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_piobufbase = (u64) rcd->piobufs; rcd 197 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_sendbuf_status = cvt_kvaddr(rcd->user_event_mask); rcd 199 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_piocnt = (rcd->piocnt / subctxt_cnt) + rcd 200 drivers/infiniband/hw/qib/qib_file_ops.c (rcd->piocnt % subctxt_cnt); rcd 202 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_piobufbase = (u64) rcd->piobufs + rcd 204 drivers/infiniband/hw/qib/qib_file_ops.c (rcd->piocnt - kinfo->spi_piocnt); rcd 208 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_piocnt = rcd->piocnt / subctxt_cnt; rcd 209 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_piobufbase = (u64) rcd->piobufs + rcd 215 drivers/infiniband/hw/qib/qib_file_ops.c cvt_kvaddr(&rcd->user_event_mask[subctxt_fp(fp)]); rcd 217 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_subctxt_uregbase = cvt_kvaddr(rcd->subctxt_uregbase); rcd 220 drivers/infiniband/hw/qib/qib_file_ops.c cvt_kvaddr(rcd->subctxt_rcvegrbuf); rcd 222 drivers/infiniband/hw/qib/qib_file_ops.c cvt_kvaddr(rcd->subctxt_rcvhdr_base); rcd 242 drivers/infiniband/hw/qib/qib_file_ops.c kinfo->spi_ctxt = rcd->ctxt; rcd 284 drivers/infiniband/hw/qib/qib_file_ops.c static int qib_tid_update(struct qib_ctxtdata *rcd, struct file *fp, rcd 290 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 308 drivers/infiniband/hw/qib/qib_file_ops.c ctxttid = rcd->ctxt * dd->rcvtidcnt; rcd 309 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->subctxt_cnt) { rcd 311 drivers/infiniband/hw/qib/qib_file_ops.c tid = rcd->tidcursor; rcd 314 drivers/infiniband/hw/qib/qib_file_ops.c tidcnt = (dd->rcvtidcnt / rcd->subctxt_cnt) + rcd 315 drivers/infiniband/hw/qib/qib_file_ops.c (dd->rcvtidcnt % rcd->subctxt_cnt); rcd 320 drivers/infiniband/hw/qib/qib_file_ops.c tidcnt = dd->rcvtidcnt / rcd->subctxt_cnt; rcd 332 drivers/infiniband/hw/qib/qib_file_ops.c pagep = (struct page **) rcd->tid_pg_list; rcd 457 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->subctxt_cnt) rcd 458 drivers/infiniband/hw/qib/qib_file_ops.c rcd->tidcursor = tid; rcd 483 drivers/infiniband/hw/qib/qib_file_ops.c static int qib_tid_free(struct qib_ctxtdata *rcd, unsigned subctxt, rcd 488 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 503 drivers/infiniband/hw/qib/qib_file_ops.c ctxttid = rcd->ctxt * dd->rcvtidcnt; rcd 504 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->subctxt_cnt) rcd 507 drivers/infiniband/hw/qib/qib_file_ops.c tidcnt = (dd->rcvtidcnt / rcd->subctxt_cnt) + rcd 508 drivers/infiniband/hw/qib/qib_file_ops.c (dd->rcvtidcnt % rcd->subctxt_cnt); rcd 511 drivers/infiniband/hw/qib/qib_file_ops.c tidcnt = dd->rcvtidcnt / rcd->subctxt_cnt; rcd 572 drivers/infiniband/hw/qib/qib_file_ops.c static int qib_set_part_key(struct qib_ctxtdata *rcd, u16 key) rcd 574 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_pportdata *ppd = rcd->ppd; rcd 594 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 0; i < ARRAY_SIZE(rcd->pkeys); i++) { rcd 595 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->pkeys[i] && pidx == -1) rcd 597 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->pkeys[i] == key) rcd 611 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pkeys[pidx] = key; rcd 633 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pkeys[pidx] = key; rcd 652 drivers/infiniband/hw/qib/qib_file_ops.c static int qib_manage_rcvq(struct qib_ctxtdata *rcd, unsigned subctxt, rcd 655 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 670 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->rcvhdrtail_kvaddr) rcd 671 drivers/infiniband/hw/qib/qib_file_ops.c qib_clear_rcvhdrtail(rcd); rcd 675 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, rcvctrl_op, rcd->ctxt); rcd 681 drivers/infiniband/hw/qib/qib_file_ops.c static void qib_clean_part_key(struct qib_ctxtdata *rcd, rcd 685 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_pportdata *ppd = rcd->ppd; rcd 687 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 0; i < ARRAY_SIZE(rcd->pkeys); i++) { rcd 688 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->pkeys[i]) rcd 693 drivers/infiniband/hw/qib/qib_file_ops.c (rcd->pkeys[i] & 0x7fff)) rcd 701 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pkeys[i] = 0; rcd 708 drivers/infiniband/hw/qib/qib_file_ops.c static int qib_mmap_mem(struct vm_area_struct *vma, struct qib_ctxtdata *rcd, rcd 711 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 745 drivers/infiniband/hw/qib/qib_file_ops.c what, rcd->ctxt, pfn, len, ret); rcd 783 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd, rcd 828 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd) rcd 830 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 836 drivers/infiniband/hw/qib/qib_file_ops.c size = rcd->rcvegrbuf_size; rcd 837 drivers/infiniband/hw/qib/qib_file_ops.c total_size = rcd->rcvegrbuf_chunks * size; rcd 859 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 0; i < rcd->rcvegrbuf_chunks; i++, start += size) { rcd 860 drivers/infiniband/hw/qib/qib_file_ops.c pfn = virt_to_phys(rcd->rcvegrbuf[i]) >> PAGE_SHIFT; rcd 894 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd, unsigned subctxt) rcd 896 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 903 drivers/infiniband/hw/qib/qib_file_ops.c subctxt_cnt = rcd->subctxt_cnt; rcd 904 drivers/infiniband/hw/qib/qib_file_ops.c size = rcd->rcvegrbuf_chunks * rcd->rcvegrbuf_size; rcd 911 drivers/infiniband/hw/qib/qib_file_ops.c if (pgaddr == cvt_kvaddr(rcd->subctxt_uregbase)) { rcd 912 drivers/infiniband/hw/qib/qib_file_ops.c addr = rcd->subctxt_uregbase; rcd 914 drivers/infiniband/hw/qib/qib_file_ops.c } else if (pgaddr == cvt_kvaddr(rcd->subctxt_rcvhdr_base)) { rcd 915 drivers/infiniband/hw/qib/qib_file_ops.c addr = rcd->subctxt_rcvhdr_base; rcd 916 drivers/infiniband/hw/qib/qib_file_ops.c size = rcd->rcvhdrq_size * subctxt_cnt; rcd 917 drivers/infiniband/hw/qib/qib_file_ops.c } else if (pgaddr == cvt_kvaddr(rcd->subctxt_rcvegrbuf)) { rcd 918 drivers/infiniband/hw/qib/qib_file_ops.c addr = rcd->subctxt_rcvegrbuf; rcd 920 drivers/infiniband/hw/qib/qib_file_ops.c } else if (pgaddr == cvt_kvaddr(rcd->subctxt_uregbase + rcd 922 drivers/infiniband/hw/qib/qib_file_ops.c addr = rcd->subctxt_uregbase + PAGE_SIZE * subctxt; rcd 924 drivers/infiniband/hw/qib/qib_file_ops.c } else if (pgaddr == cvt_kvaddr(rcd->subctxt_rcvhdr_base + rcd 925 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvhdrq_size * subctxt)) { rcd 926 drivers/infiniband/hw/qib/qib_file_ops.c addr = rcd->subctxt_rcvhdr_base + rcd 927 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvhdrq_size * subctxt; rcd 928 drivers/infiniband/hw/qib/qib_file_ops.c size = rcd->rcvhdrq_size; rcd 929 drivers/infiniband/hw/qib/qib_file_ops.c } else if (pgaddr == cvt_kvaddr(&rcd->user_event_mask[subctxt])) { rcd 930 drivers/infiniband/hw/qib/qib_file_ops.c addr = rcd->user_event_mask; rcd 932 drivers/infiniband/hw/qib/qib_file_ops.c } else if (pgaddr == cvt_kvaddr(rcd->subctxt_rcvegrbuf + rcd 934 drivers/infiniband/hw/qib/qib_file_ops.c addr = rcd->subctxt_rcvegrbuf + size * subctxt; rcd 977 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd; rcd 983 drivers/infiniband/hw/qib/qib_file_ops.c rcd = ctxt_fp(fp); rcd 984 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd || !(vma->vm_flags & VM_SHARED)) { rcd 988 drivers/infiniband/hw/qib/qib_file_ops.c dd = rcd->dd; rcd 1015 drivers/infiniband/hw/qib/qib_file_ops.c ret = mmap_kvaddr(vma, pgaddr, rcd, subctxt_fp(fp)); rcd 1022 drivers/infiniband/hw/qib/qib_file_ops.c ureg = dd->uregbase + dd->ureg_align * rcd->ctxt; rcd 1023 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->subctxt_cnt) { rcd 1025 drivers/infiniband/hw/qib/qib_file_ops.c piocnt = rcd->piocnt; rcd 1026 drivers/infiniband/hw/qib/qib_file_ops.c piobufs = rcd->piobufs; rcd 1029 drivers/infiniband/hw/qib/qib_file_ops.c piocnt = (rcd->piocnt / rcd->subctxt_cnt) + rcd 1030 drivers/infiniband/hw/qib/qib_file_ops.c (rcd->piocnt % rcd->subctxt_cnt); rcd 1031 drivers/infiniband/hw/qib/qib_file_ops.c piobufs = rcd->piobufs + rcd 1032 drivers/infiniband/hw/qib/qib_file_ops.c dd->palign * (rcd->piocnt - piocnt); rcd 1037 drivers/infiniband/hw/qib/qib_file_ops.c piocnt = rcd->piocnt / rcd->subctxt_cnt; rcd 1038 drivers/infiniband/hw/qib/qib_file_ops.c piobufs = rcd->piobufs + dd->palign * piocnt * slave; rcd 1044 drivers/infiniband/hw/qib/qib_file_ops.c ret = mmap_piobufs(vma, dd, rcd, piobufs, piocnt); rcd 1047 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_mmap_mem(vma, rcd, PAGE_SIZE, rcd 1050 drivers/infiniband/hw/qib/qib_file_ops.c else if (pgaddr == rcd->rcvegr_phys) rcd 1051 drivers/infiniband/hw/qib/qib_file_ops.c ret = mmap_rcvegrbufs(vma, rcd); rcd 1052 drivers/infiniband/hw/qib/qib_file_ops.c else if (pgaddr == (u64) rcd->rcvhdrq_phys) rcd 1058 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_mmap_mem(vma, rcd, rcd->rcvhdrq_size, rcd 1059 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvhdrq, 1, "rcvhdrq"); rcd 1060 drivers/infiniband/hw/qib/qib_file_ops.c else if (pgaddr == (u64) rcd->rcvhdrqtailaddr_phys) rcd 1062 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_mmap_mem(vma, rcd, PAGE_SIZE, rcd 1063 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvhdrtail_kvaddr, 0, rcd 1081 drivers/infiniband/hw/qib/qib_file_ops.c static __poll_t qib_poll_urgent(struct qib_ctxtdata *rcd, rcd 1085 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 1088 drivers/infiniband/hw/qib/qib_file_ops.c poll_wait(fp, &rcd->wait, pt); rcd 1091 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->urgent != rcd->urgent_poll) { rcd 1093 drivers/infiniband/hw/qib/qib_file_ops.c rcd->urgent_poll = rcd->urgent; rcd 1096 drivers/infiniband/hw/qib/qib_file_ops.c set_bit(QIB_CTXT_WAITING_URG, &rcd->flag); rcd 1103 drivers/infiniband/hw/qib/qib_file_ops.c static __poll_t qib_poll_next(struct qib_ctxtdata *rcd, rcd 1107 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 1110 drivers/infiniband/hw/qib/qib_file_ops.c poll_wait(fp, &rcd->wait, pt); rcd 1113 drivers/infiniband/hw/qib/qib_file_ops.c if (dd->f_hdrqempty(rcd)) { rcd 1114 drivers/infiniband/hw/qib/qib_file_ops.c set_bit(QIB_CTXT_WAITING_RCV, &rcd->flag); rcd 1115 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_INTRAVAIL_ENB, rcd->ctxt); rcd 1126 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd; rcd 1129 drivers/infiniband/hw/qib/qib_file_ops.c rcd = ctxt_fp(fp); rcd 1130 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd) rcd 1132 drivers/infiniband/hw/qib/qib_file_ops.c else if (rcd->poll_type == QIB_POLL_TYPE_URGENT) rcd 1133 drivers/infiniband/hw/qib/qib_file_ops.c pollflag = qib_poll_urgent(rcd, fp, pt); rcd 1134 drivers/infiniband/hw/qib/qib_file_ops.c else if (rcd->poll_type == QIB_POLL_TYPE_ANYRCV) rcd 1135 drivers/infiniband/hw/qib/qib_file_ops.c pollflag = qib_poll_next(rcd, fp, pt); rcd 1216 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd, rcd 1246 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subctxt_uregbase = vmalloc_user(PAGE_SIZE * num_subctxts); rcd 1247 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->subctxt_uregbase) { rcd 1254 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subctxt_rcvhdr_base = vmalloc_user(size); rcd 1255 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->subctxt_rcvhdr_base) { rcd 1260 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subctxt_rcvegrbuf = vmalloc_user(rcd->rcvegrbuf_chunks * rcd 1261 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvegrbuf_size * rcd 1263 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd->subctxt_rcvegrbuf) { rcd 1268 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subctxt_cnt = uinfo->spu_subctxt_cnt; rcd 1269 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subctxt_id = uinfo->spu_subctxt_id; rcd 1270 drivers/infiniband/hw/qib/qib_file_ops.c rcd->active_slaves = 1; rcd 1271 drivers/infiniband/hw/qib/qib_file_ops.c rcd->redirect_seq_cnt = 1; rcd 1272 drivers/infiniband/hw/qib/qib_file_ops.c set_bit(QIB_CTXT_MASTER_UNINIT, &rcd->flag); rcd 1276 drivers/infiniband/hw/qib/qib_file_ops.c vfree(rcd->subctxt_rcvhdr_base); rcd 1278 drivers/infiniband/hw/qib/qib_file_ops.c vfree(rcd->subctxt_uregbase); rcd 1279 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subctxt_uregbase = NULL; rcd 1289 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd; rcd 1300 drivers/infiniband/hw/qib/qib_file_ops.c rcd = qib_create_ctxtdata(ppd, ctxt, numa_id); rcd 1306 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd) rcd 1311 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd || !ptmp) { rcd 1317 drivers/infiniband/hw/qib/qib_file_ops.c rcd->userversion = uinfo->spu_userversion; rcd 1318 drivers/infiniband/hw/qib/qib_file_ops.c ret = init_subctxts(dd, rcd, uinfo); rcd 1321 drivers/infiniband/hw/qib/qib_file_ops.c rcd->tid_pg_list = ptmp; rcd 1322 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pid = current->pid; rcd 1323 drivers/infiniband/hw/qib/qib_file_ops.c init_waitqueue_head(&dd->rcd[ctxt]->wait); rcd 1324 drivers/infiniband/hw/qib/qib_file_ops.c strlcpy(rcd->comm, current->comm, sizeof(rcd->comm)); rcd 1325 drivers/infiniband/hw/qib/qib_file_ops.c ctxt_fp(fp) = rcd; rcd 1335 drivers/infiniband/hw/qib/qib_file_ops.c dd->rcd[ctxt] = NULL; rcd 1336 drivers/infiniband/hw/qib/qib_file_ops.c kfree(rcd); rcd 1367 drivers/infiniband/hw/qib/qib_file_ops.c for (ctxt = dd->first_user_ctxt; ctxt < dd->cfgctxts && dd->rcd[ctxt]; rcd 1443 drivers/infiniband/hw/qib/qib_file_ops.c if (dd->rcd[ctxt]) rcd 1490 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd = dd->rcd[i]; rcd 1493 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd || !rcd->cnt) rcd 1496 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->subctxt_id != uinfo->spu_subctxt_id) rcd 1499 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->subctxt_cnt != uinfo->spu_subctxt_cnt || rcd 1500 drivers/infiniband/hw/qib/qib_file_ops.c rcd->userversion != uinfo->spu_userversion || rcd 1501 drivers/infiniband/hw/qib/qib_file_ops.c rcd->cnt >= rcd->subctxt_cnt) { rcd 1505 drivers/infiniband/hw/qib/qib_file_ops.c ctxt_fp(fp) = rcd; rcd 1506 drivers/infiniband/hw/qib/qib_file_ops.c subctxt_fp(fp) = rcd->cnt++; rcd 1507 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subpid[subctxt_fp(fp)] = current->pid; rcd 1509 drivers/infiniband/hw/qib/qib_file_ops.c rcd->active_slaves |= 1 << subctxt_fp(fp); rcd 1565 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd = fd->rcd; rcd 1566 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 1572 drivers/infiniband/hw/qib/qib_file_ops.c rcd->ctxt, rcd 1653 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd = ctxt_fp(fp); rcd 1659 drivers/infiniband/hw/qib/qib_file_ops.c ret = wait_event_interruptible(rcd->wait, rcd 1660 drivers/infiniband/hw/qib/qib_file_ops.c !test_bit(QIB_CTXT_MASTER_UNINIT, &rcd->flag)); rcd 1664 drivers/infiniband/hw/qib/qib_file_ops.c dd = rcd->dd; rcd 1667 drivers/infiniband/hw/qib/qib_file_ops.c uctxt = rcd->ctxt - dd->first_user_ctxt; rcd 1669 drivers/infiniband/hw/qib/qib_file_ops.c rcd->piocnt = dd->pbufsctxt + 1; rcd 1670 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pio_base = rcd->piocnt * uctxt; rcd 1672 drivers/infiniband/hw/qib/qib_file_ops.c rcd->piocnt = dd->pbufsctxt; rcd 1673 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pio_base = rcd->piocnt * uctxt + rcd 1683 drivers/infiniband/hw/qib/qib_file_ops.c if ((rcd->pio_base + rcd->piocnt) > dd->piobcnt2k) { rcd 1684 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->pio_base >= dd->piobcnt2k) { rcd 1687 drivers/infiniband/hw/qib/qib_file_ops.c dd->unit, rcd->ctxt); rcd 1691 drivers/infiniband/hw/qib/qib_file_ops.c rcd->piocnt = dd->piobcnt2k - rcd->pio_base; rcd 1693 drivers/infiniband/hw/qib/qib_file_ops.c rcd->ctxt, rcd->piocnt); rcd 1696 drivers/infiniband/hw/qib/qib_file_ops.c rcd->piobufs = dd->pio2k_bufbase + rcd->pio_base * dd->palign; rcd 1697 drivers/infiniband/hw/qib/qib_file_ops.c qib_chg_pioavailkernel(dd, rcd->pio_base, rcd->piocnt, rcd 1698 drivers/infiniband/hw/qib/qib_file_ops.c TXCHK_CHG_TYPE_USER, rcd); rcd 1717 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_create_rcvhdrq(dd, rcd); rcd 1719 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_setup_eagerbufs(rcd); rcd 1723 drivers/infiniband/hw/qib/qib_file_ops.c rcd->tidcursor = 0; /* start at beginning after open */ rcd 1726 drivers/infiniband/hw/qib/qib_file_ops.c rcd->urgent = 0; rcd 1727 drivers/infiniband/hw/qib/qib_file_ops.c rcd->urgent_poll = 0; rcd 1740 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->rcvhdrtail_kvaddr) rcd 1741 drivers/infiniband/hw/qib/qib_file_ops.c qib_clear_rcvhdrtail(rcd); rcd 1743 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_CTXT_ENB | QIB_RCVCTRL_TIDFLOW_ENB, rcd 1744 drivers/infiniband/hw/qib/qib_file_ops.c rcd->ctxt); rcd 1747 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->subctxt_cnt) { rcd 1748 drivers/infiniband/hw/qib/qib_file_ops.c clear_bit(QIB_CTXT_MASTER_UNINIT, &rcd->flag); rcd 1749 drivers/infiniband/hw/qib/qib_file_ops.c wake_up(&rcd->wait); rcd 1754 drivers/infiniband/hw/qib/qib_file_ops.c qib_chg_pioavailkernel(dd, rcd->pio_base, rcd->piocnt, rcd 1755 drivers/infiniband/hw/qib/qib_file_ops.c TXCHK_CHG_TYPE_KERN, rcd); rcd 1767 drivers/infiniband/hw/qib/qib_file_ops.c static void unlock_expected_tids(struct qib_ctxtdata *rcd) rcd 1769 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_devdata *dd = rcd->dd; rcd 1770 drivers/infiniband/hw/qib/qib_file_ops.c int ctxt_tidbase = rcd->ctxt * dd->rcvtidcnt; rcd 1793 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd; rcd 1802 drivers/infiniband/hw/qib/qib_file_ops.c rcd = fd->rcd; rcd 1803 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd) { rcd 1808 drivers/infiniband/hw/qib/qib_file_ops.c dd = rcd->dd; rcd 1815 drivers/infiniband/hw/qib/qib_file_ops.c qib_user_sdma_queue_drain(rcd->ppd, fd->pq); rcd 1822 drivers/infiniband/hw/qib/qib_file_ops.c if (--rcd->cnt) { rcd 1828 drivers/infiniband/hw/qib/qib_file_ops.c rcd->active_slaves &= ~(1 << fd->subctxt); rcd 1829 drivers/infiniband/hw/qib/qib_file_ops.c rcd->subpid[fd->subctxt] = 0; rcd 1836 drivers/infiniband/hw/qib/qib_file_ops.c ctxt = rcd->ctxt; rcd 1837 drivers/infiniband/hw/qib/qib_file_ops.c dd->rcd[ctxt] = NULL; rcd 1838 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pid = 0; rcd 1841 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->rcvwait_to || rcd->piowait_to || rcd 1842 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvnowait || rcd->pionowait) { rcd 1843 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvwait_to = 0; rcd 1844 drivers/infiniband/hw/qib/qib_file_ops.c rcd->piowait_to = 0; rcd 1845 drivers/infiniband/hw/qib/qib_file_ops.c rcd->rcvnowait = 0; rcd 1846 drivers/infiniband/hw/qib/qib_file_ops.c rcd->pionowait = 0; rcd 1848 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->flag) rcd 1849 drivers/infiniband/hw/qib/qib_file_ops.c rcd->flag = 0; rcd 1853 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_CTXT_DIS | rcd 1857 drivers/infiniband/hw/qib/qib_file_ops.c qib_clean_part_key(rcd, dd); rcd 1858 drivers/infiniband/hw/qib/qib_file_ops.c qib_disarm_piobufs(dd, rcd->pio_base, rcd->piocnt); rcd 1859 drivers/infiniband/hw/qib/qib_file_ops.c qib_chg_pioavailkernel(dd, rcd->pio_base, rcd 1860 drivers/infiniband/hw/qib/qib_file_ops.c rcd->piocnt, TXCHK_CHG_TYPE_KERN, NULL); rcd 1862 drivers/infiniband/hw/qib/qib_file_ops.c dd->f_clear_tids(dd, rcd); rcd 1865 drivers/infiniband/hw/qib/qib_file_ops.c unlock_expected_tids(rcd); rcd 1871 drivers/infiniband/hw/qib/qib_file_ops.c qib_free_ctxtdata(dd, rcd); /* after releasing the mutex */ rcd 1883 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd = ctxt_fp(fp); rcd 1889 drivers/infiniband/hw/qib/qib_file_ops.c info.unit = rcd->dd->unit; rcd 1890 drivers/infiniband/hw/qib/qib_file_ops.c info.port = rcd->ppd->port; rcd 1891 drivers/infiniband/hw/qib/qib_file_ops.c info.ctxt = rcd->ctxt; rcd 1894 drivers/infiniband/hw/qib/qib_file_ops.c info.num_ctxts = rcd->dd->cfgctxts - rcd->dd->first_user_ctxt; rcd 1895 drivers/infiniband/hw/qib/qib_file_ops.c info.num_subctxts = rcd->subctxt_cnt; rcd 1941 drivers/infiniband/hw/qib/qib_file_ops.c static int disarm_req_delay(struct qib_ctxtdata *rcd) rcd 1945 drivers/infiniband/hw/qib/qib_file_ops.c if (!usable(rcd->ppd)) { rcd 1953 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->user_event_mask) { rcd 1959 drivers/infiniband/hw/qib/qib_file_ops.c &rcd->user_event_mask[0]); rcd 1960 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 1; i < rcd->subctxt_cnt; i++) rcd 1962 drivers/infiniband/hw/qib/qib_file_ops.c &rcd->user_event_mask[i]); rcd 1964 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 0; !usable(rcd->ppd) && i < 300; i++) rcd 1978 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd; rcd 1986 drivers/infiniband/hw/qib/qib_file_ops.c rcd = ppd->dd->rcd[ctxt]; rcd 1987 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd) rcd 1989 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd->user_event_mask) { rcd 1995 drivers/infiniband/hw/qib/qib_file_ops.c set_bit(evtbit, &rcd->user_event_mask[0]); rcd 1996 drivers/infiniband/hw/qib/qib_file_ops.c for (i = 1; i < rcd->subctxt_cnt; i++) rcd 1997 drivers/infiniband/hw/qib/qib_file_ops.c set_bit(evtbit, &rcd->user_event_mask[i]); rcd 2016 drivers/infiniband/hw/qib/qib_file_ops.c static int qib_user_event_ack(struct qib_ctxtdata *rcd, int subctxt, rcd 2025 drivers/infiniband/hw/qib/qib_file_ops.c (void)qib_disarm_piobufs_ifneeded(rcd); rcd 2026 drivers/infiniband/hw/qib/qib_file_ops.c ret = disarm_req_delay(rcd); rcd 2028 drivers/infiniband/hw/qib/qib_file_ops.c clear_bit(i, &rcd->user_event_mask[subctxt]); rcd 2037 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd; rcd 2151 drivers/infiniband/hw/qib/qib_file_ops.c rcd = ctxt_fp(fp); rcd 2152 drivers/infiniband/hw/qib/qib_file_ops.c if (!rcd && cmd.type != QIB_CMD_ASSIGN_CTXT) { rcd 2159 drivers/infiniband/hw/qib/qib_file_ops.c if (rcd) { rcd 2179 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_manage_rcvq(rcd, subctxt_fp(fp), cmd.cmd.recv_ctrl); rcd 2188 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_tid_update(rcd, fp, &cmd.cmd.tid_info); rcd 2192 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_tid_free(rcd, subctxt_fp(fp), &cmd.cmd.tid_info); rcd 2196 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_set_part_key(rcd, cmd.cmd.part_key); rcd 2200 drivers/infiniband/hw/qib/qib_file_ops.c (void)qib_disarm_piobufs_ifneeded(rcd); rcd 2201 drivers/infiniband/hw/qib/qib_file_ops.c ret = disarm_req_delay(rcd); rcd 2205 drivers/infiniband/hw/qib/qib_file_ops.c qib_force_pio_avail_update(rcd->dd); rcd 2209 drivers/infiniband/hw/qib/qib_file_ops.c rcd->poll_type = cmd.cmd.poll_type; rcd 2213 drivers/infiniband/hw/qib/qib_file_ops.c rcd->dd->f_set_armlaunch(rcd->dd, cmd.cmd.armlaunch_ctrl); rcd 2223 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_sdma_get_complete(rcd->ppd, rcd 2230 drivers/infiniband/hw/qib/qib_file_ops.c ret = qib_user_event_ack(rcd, subctxt_fp(fp), rcd 2245 drivers/infiniband/hw/qib/qib_file_ops.c struct qib_ctxtdata *rcd = ctxt_fp(iocb->ki_filp); rcd 2251 drivers/infiniband/hw/qib/qib_file_ops.c return qib_user_sdma_writev(rcd, pq, from->iov, from->nr_segs); rcd 1646 drivers/infiniband/hw/qib/qib_iba6120.c crcs += qib_kreceive(dd->rcd[i], rcd 1944 drivers/infiniband/hw/qib/qib_iba6120.c struct qib_ctxtdata *rcd) rcd 1951 drivers/infiniband/hw/qib/qib_iba6120.c if (!dd->kregbase || !rcd) rcd 1954 drivers/infiniband/hw/qib/qib_iba6120.c ctxt = rcd->ctxt; rcd 1970 drivers/infiniband/hw/qib/qib_iba6120.c rcd->rcvegr_tid_base * sizeof(*tidbase)); rcd 1972 drivers/infiniband/hw/qib/qib_iba6120.c for (i = 0; i < rcd->rcvegrcnt; i++) rcd 2017 drivers/infiniband/hw/qib/qib_iba6120.c static int qib_6120_get_base_info(struct qib_ctxtdata *rcd, rcd 2049 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_update_6120_usrhead(struct qib_ctxtdata *rcd, u64 hd, rcd 2053 drivers/infiniband/hw/qib/qib_iba6120.c qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); rcd 2054 drivers/infiniband/hw/qib/qib_iba6120.c qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); rcd 2057 drivers/infiniband/hw/qib/qib_iba6120.c static u32 qib_6120_hdrqempty(struct qib_ctxtdata *rcd) rcd 2061 drivers/infiniband/hw/qib/qib_iba6120.c head = qib_read_ureg32(rcd->dd, ur_rcvhdrhead, rcd->ctxt); rcd 2062 drivers/infiniband/hw/qib/qib_iba6120.c if (rcd->rcvhdrtail_kvaddr) rcd 2063 drivers/infiniband/hw/qib/qib_iba6120.c tail = qib_get_rcvhdrtail(rcd); rcd 2065 drivers/infiniband/hw/qib/qib_iba6120.c tail = qib_read_ureg32(rcd->dd, ur_rcvhdrtail, rcd->ctxt); rcd 2077 drivers/infiniband/hw/qib/qib_iba6120.c dd->rcd[0]->rcvhdrq_size, rcd 2122 drivers/infiniband/hw/qib/qib_iba6120.c dd->rcd[ctxt]->rcvhdrqtailaddr_phys); rcd 2124 drivers/infiniband/hw/qib/qib_iba6120.c dd->rcd[ctxt]->rcvhdrq_phys); rcd 2153 drivers/infiniband/hw/qib/qib_iba6120.c dd->rcd[ctxt]->head = val; rcd 3387 drivers/infiniband/hw/qib/qib_iba6120.c static void qib_6120_init_ctxt(struct qib_ctxtdata *rcd) rcd 3389 drivers/infiniband/hw/qib/qib_iba6120.c rcd->rcvegrcnt = rcd->dd->rcvhdrcnt; rcd 3390 drivers/infiniband/hw/qib/qib_iba6120.c rcd->rcvegr_tid_base = rcd->ctxt * rcd->rcvegrcnt; rcd 3394 drivers/infiniband/hw/qib/qib_iba6120.c u32 len, u32 avail, struct qib_ctxtdata *rcd) rcd 1978 drivers/infiniband/hw/qib/qib_iba7220.c qib_kreceive(dd->rcd[i], NULL, NULL); rcd 2191 drivers/infiniband/hw/qib/qib_iba7220.c struct qib_ctxtdata *rcd) rcd 2198 drivers/infiniband/hw/qib/qib_iba7220.c if (!dd->kregbase || !rcd) rcd 2201 drivers/infiniband/hw/qib/qib_iba7220.c ctxt = rcd->ctxt; rcd 2216 drivers/infiniband/hw/qib/qib_iba7220.c rcd->rcvegr_tid_base * sizeof(*tidbase)); rcd 2218 drivers/infiniband/hw/qib/qib_iba7220.c for (i = 0; i < rcd->rcvegrcnt; i++) rcd 2246 drivers/infiniband/hw/qib/qib_iba7220.c static int qib_7220_get_base_info(struct qib_ctxtdata *rcd, rcd 2252 drivers/infiniband/hw/qib/qib_iba7220.c if (rcd->dd->flags & QIB_USE_SPCL_TRIG) rcd 2701 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_update_7220_usrhead(struct qib_ctxtdata *rcd, u64 hd, rcd 2705 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); rcd 2706 drivers/infiniband/hw/qib/qib_iba7220.c qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); rcd 2709 drivers/infiniband/hw/qib/qib_iba7220.c static u32 qib_7220_hdrqempty(struct qib_ctxtdata *rcd) rcd 2713 drivers/infiniband/hw/qib/qib_iba7220.c head = qib_read_ureg32(rcd->dd, ur_rcvhdrhead, rcd->ctxt); rcd 2714 drivers/infiniband/hw/qib/qib_iba7220.c if (rcd->rcvhdrtail_kvaddr) rcd 2715 drivers/infiniband/hw/qib/qib_iba7220.c tail = qib_get_rcvhdrtail(rcd); rcd 2717 drivers/infiniband/hw/qib/qib_iba7220.c tail = qib_read_ureg32(rcd->dd, ur_rcvhdrtail, rcd->ctxt); rcd 2755 drivers/infiniband/hw/qib/qib_iba7220.c dd->rcd[ctxt]->rcvhdrqtailaddr_phys); rcd 2757 drivers/infiniband/hw/qib/qib_iba7220.c dd->rcd[ctxt]->rcvhdrq_phys); rcd 2758 drivers/infiniband/hw/qib/qib_iba7220.c dd->rcd[ctxt]->seq_cnt = 1; rcd 2784 drivers/infiniband/hw/qib/qib_iba7220.c dd->rcd[ctxt]->head = val; rcd 4348 drivers/infiniband/hw/qib/qib_iba7220.c static void qib_7220_init_ctxt(struct qib_ctxtdata *rcd) rcd 4350 drivers/infiniband/hw/qib/qib_iba7220.c if (!rcd->ctxt) { rcd 4351 drivers/infiniband/hw/qib/qib_iba7220.c rcd->rcvegrcnt = IBA7220_KRCVEGRCNT; rcd 4352 drivers/infiniband/hw/qib/qib_iba7220.c rcd->rcvegr_tid_base = 0; rcd 4354 drivers/infiniband/hw/qib/qib_iba7220.c rcd->rcvegrcnt = rcd->dd->cspec->rcvegrcnt; rcd 4355 drivers/infiniband/hw/qib/qib_iba7220.c rcd->rcvegr_tid_base = IBA7220_KRCVEGRCNT + rcd 4356 drivers/infiniband/hw/qib/qib_iba7220.c (rcd->ctxt - 1) * rcd->rcvegrcnt; rcd 4361 drivers/infiniband/hw/qib/qib_iba7220.c u32 len, u32 which, struct qib_ctxtdata *rcd) rcd 4373 drivers/infiniband/hw/qib/qib_iba7220.c if (dd->rcd[i] && dd->rcd[i]->subctxt_cnt && rcd 4374 drivers/infiniband/hw/qib/qib_iba7220.c ((dd->rcd[i]->piocnt / dd->rcd[i]->subctxt_cnt) - 1) rcd 4391 drivers/infiniband/hw/qib/qib_iba7220.c if (rcd && rcd->subctxt_cnt && ((rcd->piocnt rcd 4392 drivers/infiniband/hw/qib/qib_iba7220.c / rcd->subctxt_cnt) - 1) < dd->cspec->updthresh) { rcd 4393 drivers/infiniband/hw/qib/qib_iba7220.c dd->cspec->updthresh = (rcd->piocnt / rcd 4394 drivers/infiniband/hw/qib/qib_iba7220.c rcd->subctxt_cnt) - 1; rcd 71 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ctxtdata *rcd); rcd 2693 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_update_rhdrq_dca(struct qib_ctxtdata *rcd, int cpu) rcd 2695 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = rcd->dd; rcd 2700 drivers/infiniband/hw/qib/qib_iba7322.c if (cspec->rhdr_cpu[rcd->ctxt] != cpu) { rcd 2703 drivers/infiniband/hw/qib/qib_iba7322.c cspec->rhdr_cpu[rcd->ctxt] = cpu; rcd 2704 drivers/infiniband/hw/qib/qib_iba7322.c rmp = &dca_rcvhdr_reg_map[rcd->ctxt]; rcd 2709 drivers/infiniband/hw/qib/qib_iba7322.c "Ctxt %d cpu %d dca %llx\n", rcd->ctxt, cpu, rcd 2795 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ctxtdata *rcd = (struct qib_ctxtdata *)n->arg; rcd 2797 drivers/infiniband/hw/qib/qib_iba7322.c qib_update_rhdrq_dca(rcd, cpu); rcd 2812 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ctxtdata *rcd = (struct qib_ctxtdata *)n->arg; rcd 2814 drivers/infiniband/hw/qib/qib_iba7322.c dd = rcd->dd; rcd 3029 drivers/infiniband/hw/qib/qib_iba7322.c if (istat & INT_MASK_P(Err, 0) && dd->rcd[0]) rcd 3030 drivers/infiniband/hw/qib/qib_iba7322.c handle_7322_p_errors(dd->rcd[0]->ppd); rcd 3031 drivers/infiniband/hw/qib/qib_iba7322.c if (istat & INT_MASK_P(Err, 1) && dd->rcd[1]) rcd 3032 drivers/infiniband/hw/qib/qib_iba7322.c handle_7322_p_errors(dd->rcd[1]->ppd); rcd 3039 drivers/infiniband/hw/qib/qib_iba7322.c static void adjust_rcv_timeout(struct qib_ctxtdata *rcd, int npkts) rcd 3041 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = rcd->dd; rcd 3042 drivers/infiniband/hw/qib/qib_iba7322.c u32 timeout = dd->cspec->rcvavail_timeout[rcd->ctxt]; rcd 3055 drivers/infiniband/hw/qib/qib_iba7322.c dd->cspec->rcvavail_timeout[rcd->ctxt] = timeout; rcd 3056 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_kreg(dd, kr_rcvavailtimeout + rcd->ctxt, timeout); rcd 3133 drivers/infiniband/hw/qib/qib_iba7322.c if (dd->rcd[i]) rcd 3134 drivers/infiniband/hw/qib/qib_iba7322.c qib_kreceive(dd->rcd[i], NULL, &npkts); rcd 3161 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ctxtdata *rcd = data; rcd 3162 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_devdata *dd = rcd->dd; rcd 3178 drivers/infiniband/hw/qib/qib_iba7322.c (1ULL << QIB_I_RCVURG_LSB)) << rcd->ctxt); rcd 3180 drivers/infiniband/hw/qib/qib_iba7322.c qib_kreceive(rcd, NULL, &npkts); rcd 3470 drivers/infiniband/hw/qib/qib_iba7322.c arg = dd->rcd[ctxt]; rcd 3807 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ctxtdata *rcd) rcd 3814 drivers/infiniband/hw/qib/qib_iba7322.c if (!dd->kregbase || !rcd) rcd 3817 drivers/infiniband/hw/qib/qib_iba7322.c ctxt = rcd->ctxt; rcd 3832 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvegr_tid_base * sizeof(*tidbase)); rcd 3834 drivers/infiniband/hw/qib/qib_iba7322.c for (i = 0; i < rcd->rcvegrcnt; i++) rcd 3872 drivers/infiniband/hw/qib/qib_iba7322.c static int qib_7322_get_base_info(struct qib_ctxtdata *rcd, rcd 3878 drivers/infiniband/hw/qib/qib_iba7322.c if (rcd->dd->cspec->r1) rcd 3880 drivers/infiniband/hw/qib/qib_iba7322.c if (rcd->dd->flags & QIB_USE_SPCL_TRIG) rcd 4431 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_update_7322_usrhead(struct qib_ctxtdata *rcd, u64 hd, rcd 4439 drivers/infiniband/hw/qib/qib_iba7322.c adjust_rcv_timeout(rcd, npkts); rcd 4441 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); rcd 4442 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); rcd 4443 drivers/infiniband/hw/qib/qib_iba7322.c qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); rcd 4446 drivers/infiniband/hw/qib/qib_iba7322.c static u32 qib_7322_hdrqempty(struct qib_ctxtdata *rcd) rcd 4450 drivers/infiniband/hw/qib/qib_iba7322.c head = qib_read_ureg32(rcd->dd, ur_rcvhdrhead, rcd->ctxt); rcd 4451 drivers/infiniband/hw/qib/qib_iba7322.c if (rcd->rcvhdrtail_kvaddr) rcd 4452 drivers/infiniband/hw/qib/qib_iba7322.c tail = qib_get_rcvhdrtail(rcd); rcd 4454 drivers/infiniband/hw/qib/qib_iba7322.c tail = qib_read_ureg32(rcd->dd, ur_rcvhdrtail, rcd->ctxt); rcd 4485 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ctxtdata *rcd; rcd 4505 drivers/infiniband/hw/qib/qib_iba7322.c rcd = NULL; rcd 4508 drivers/infiniband/hw/qib/qib_iba7322.c rcd = dd->rcd[ctxt]; rcd 4510 drivers/infiniband/hw/qib/qib_iba7322.c if ((op & QIB_RCVCTRL_CTXT_ENB) && rcd) { rcd 4519 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvhdrqtailaddr_phys); rcd 4521 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvhdrq_phys); rcd 4522 drivers/infiniband/hw/qib/qib_iba7322.c rcd->seq_cnt = 1; rcd 4544 drivers/infiniband/hw/qib/qib_iba7322.c if ((op & QIB_RCVCTRL_CTXT_ENB) && dd->rcd[ctxt]) { rcd 4557 drivers/infiniband/hw/qib/qib_iba7322.c dd->rcd[ctxt]->head = val; rcd 4563 drivers/infiniband/hw/qib/qib_iba7322.c dd->rcd[ctxt] && dd->rhdrhead_intr_off) { rcd 4565 drivers/infiniband/hw/qib/qib_iba7322.c val = dd->rcd[ctxt]->head | dd->rhdrhead_intr_off; rcd 4792 drivers/infiniband/hw/qib/qib_iba7322.c for (i = 0; dd->rcd && i < dd->first_user_ctxt; i++) { rcd 4793 drivers/infiniband/hw/qib/qib_iba7322.c struct qib_ctxtdata *rcd = dd->rcd[i]; rcd 4795 drivers/infiniband/hw/qib/qib_iba7322.c if (!rcd || rcd->ppd != ppd) rcd 7007 drivers/infiniband/hw/qib/qib_iba7322.c static void qib_7322_init_ctxt(struct qib_ctxtdata *rcd) rcd 7009 drivers/infiniband/hw/qib/qib_iba7322.c if (rcd->ctxt < NUM_IB_PORTS) { rcd 7010 drivers/infiniband/hw/qib/qib_iba7322.c if (rcd->dd->num_pports > 1) { rcd 7011 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvegrcnt = KCTXT0_EGRCNT / 2; rcd 7012 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvegr_tid_base = rcd->ctxt ? rcd->rcvegrcnt : 0; rcd 7014 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvegrcnt = KCTXT0_EGRCNT; rcd 7015 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvegr_tid_base = 0; rcd 7018 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvegrcnt = rcd->dd->cspec->rcvegrcnt; rcd 7019 drivers/infiniband/hw/qib/qib_iba7322.c rcd->rcvegr_tid_base = KCTXT0_EGRCNT + rcd 7020 drivers/infiniband/hw/qib/qib_iba7322.c (rcd->ctxt - NUM_IB_PORTS) * rcd->rcvegrcnt; rcd 7026 drivers/infiniband/hw/qib/qib_iba7322.c u32 len, u32 which, struct qib_ctxtdata *rcd) rcd 7032 drivers/infiniband/hw/qib/qib_iba7322.c int wait = rcd != NULL; rcd 7105 drivers/infiniband/hw/qib/qib_iba7322.c if (dd->rcd[i] && dd->rcd[i]->subctxt_cnt && rcd 7106 drivers/infiniband/hw/qib/qib_iba7322.c ((dd->rcd[i]->piocnt / dd->rcd[i]->subctxt_cnt) - 1) rcd 7129 drivers/infiniband/hw/qib/qib_iba7322.c if (rcd && rcd->subctxt_cnt && ((rcd->piocnt rcd 7130 drivers/infiniband/hw/qib/qib_iba7322.c / rcd->subctxt_cnt) - 1) < dd->cspec->updthresh) { rcd 7131 drivers/infiniband/hw/qib/qib_iba7322.c dd->cspec->updthresh = (rcd->piocnt / rcd 7132 drivers/infiniband/hw/qib/qib_iba7322.c rcd->subctxt_cnt) - 1; rcd 7285 drivers/infiniband/hw/qib/qib_iba7322.c dd->rcd[i - ARRAY_SIZE(irq_table)])) rcd 134 drivers/infiniband/hw/qib/qib_init.c dd->rcd = kcalloc(dd->ctxtcnt, sizeof(*dd->rcd), GFP_KERNEL); rcd 135 drivers/infiniband/hw/qib/qib_init.c if (!dd->rcd) rcd 141 drivers/infiniband/hw/qib/qib_init.c struct qib_ctxtdata *rcd; rcd 148 drivers/infiniband/hw/qib/qib_init.c rcd = qib_create_ctxtdata(ppd, i, dd->assigned_node_id); rcd 149 drivers/infiniband/hw/qib/qib_init.c if (!rcd) { rcd 152 drivers/infiniband/hw/qib/qib_init.c kfree(dd->rcd); rcd 153 drivers/infiniband/hw/qib/qib_init.c dd->rcd = NULL; rcd 156 drivers/infiniband/hw/qib/qib_init.c rcd->pkeys[0] = QIB_DEFAULT_P_KEY; rcd 157 drivers/infiniband/hw/qib/qib_init.c rcd->seq_cnt = 1; rcd 169 drivers/infiniband/hw/qib/qib_init.c struct qib_ctxtdata *rcd; rcd 171 drivers/infiniband/hw/qib/qib_init.c rcd = kzalloc_node(sizeof(*rcd), GFP_KERNEL, node_id); rcd 172 drivers/infiniband/hw/qib/qib_init.c if (rcd) { rcd 173 drivers/infiniband/hw/qib/qib_init.c INIT_LIST_HEAD(&rcd->qp_wait_list); rcd 174 drivers/infiniband/hw/qib/qib_init.c rcd->node_id = node_id; rcd 175 drivers/infiniband/hw/qib/qib_init.c rcd->ppd = ppd; rcd 176 drivers/infiniband/hw/qib/qib_init.c rcd->dd = dd; rcd 177 drivers/infiniband/hw/qib/qib_init.c rcd->cnt = 1; rcd 178 drivers/infiniband/hw/qib/qib_init.c rcd->ctxt = ctxt; rcd 179 drivers/infiniband/hw/qib/qib_init.c dd->rcd[ctxt] = rcd; rcd 182 drivers/infiniband/hw/qib/qib_init.c rcd->opstats = kzalloc_node(sizeof(*rcd->opstats), rcd 184 drivers/infiniband/hw/qib/qib_init.c if (!rcd->opstats) { rcd 185 drivers/infiniband/hw/qib/qib_init.c kfree(rcd); rcd 192 drivers/infiniband/hw/qib/qib_init.c dd->f_init_ctxt(rcd); rcd 205 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf_size = 0x8000; rcd 206 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbufs_perchunk = rcd 207 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf_size / dd->rcvegrbufsize; rcd 208 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf_chunks = (rcd->rcvegrcnt + rcd 209 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbufs_perchunk - 1) / rcd 210 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbufs_perchunk; rcd 211 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbufs_perchunk_shift = rcd 212 drivers/infiniband/hw/qib/qib_init.c ilog2(rcd->rcvegrbufs_perchunk); rcd 214 drivers/infiniband/hw/qib/qib_init.c return rcd; rcd 486 drivers/infiniband/hw/qib/qib_init.c for (i = 0; dd->rcd && i < dd->first_user_ctxt; ++i) { rcd 487 drivers/infiniband/hw/qib/qib_init.c struct qib_ctxtdata *rcd = dd->rcd[i]; rcd 489 drivers/infiniband/hw/qib/qib_init.c if (rcd) rcd 490 drivers/infiniband/hw/qib/qib_init.c dd->f_rcvctrl(rcd->ppd, rcvmask, i); rcd 637 drivers/infiniband/hw/qib/qib_init.c struct qib_ctxtdata *rcd; rcd 667 drivers/infiniband/hw/qib/qib_init.c for (i = 0; dd->rcd && i < dd->first_user_ctxt; ++i) { rcd 674 drivers/infiniband/hw/qib/qib_init.c rcd = dd->rcd[i]; rcd 675 drivers/infiniband/hw/qib/qib_init.c if (!rcd) rcd 678 drivers/infiniband/hw/qib/qib_init.c lastfail = qib_create_rcvhdrq(dd, rcd); rcd 680 drivers/infiniband/hw/qib/qib_init.c lastfail = qib_setup_eagerbufs(rcd); rcd 905 drivers/infiniband/hw/qib/qib_init.c void qib_free_ctxtdata(struct qib_devdata *dd, struct qib_ctxtdata *rcd) rcd 907 drivers/infiniband/hw/qib/qib_init.c if (!rcd) rcd 910 drivers/infiniband/hw/qib/qib_init.c if (rcd->rcvhdrq) { rcd 911 drivers/infiniband/hw/qib/qib_init.c dma_free_coherent(&dd->pcidev->dev, rcd->rcvhdrq_size, rcd 912 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrq, rcd->rcvhdrq_phys); rcd 913 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrq = NULL; rcd 914 drivers/infiniband/hw/qib/qib_init.c if (rcd->rcvhdrtail_kvaddr) { rcd 916 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrtail_kvaddr, rcd 917 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrqtailaddr_phys); rcd 918 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrtail_kvaddr = NULL; rcd 921 drivers/infiniband/hw/qib/qib_init.c if (rcd->rcvegrbuf) { rcd 924 drivers/infiniband/hw/qib/qib_init.c for (e = 0; e < rcd->rcvegrbuf_chunks; e++) { rcd 925 drivers/infiniband/hw/qib/qib_init.c void *base = rcd->rcvegrbuf[e]; rcd 926 drivers/infiniband/hw/qib/qib_init.c size_t size = rcd->rcvegrbuf_size; rcd 929 drivers/infiniband/hw/qib/qib_init.c base, rcd->rcvegrbuf_phys[e]); rcd 931 drivers/infiniband/hw/qib/qib_init.c kfree(rcd->rcvegrbuf); rcd 932 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf = NULL; rcd 933 drivers/infiniband/hw/qib/qib_init.c kfree(rcd->rcvegrbuf_phys); rcd 934 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf_phys = NULL; rcd 935 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf_chunks = 0; rcd 938 drivers/infiniband/hw/qib/qib_init.c kfree(rcd->tid_pg_list); rcd 939 drivers/infiniband/hw/qib/qib_init.c vfree(rcd->user_event_mask); rcd 940 drivers/infiniband/hw/qib/qib_init.c vfree(rcd->subctxt_uregbase); rcd 941 drivers/infiniband/hw/qib/qib_init.c vfree(rcd->subctxt_rcvegrbuf); rcd 942 drivers/infiniband/hw/qib/qib_init.c vfree(rcd->subctxt_rcvhdr_base); rcd 944 drivers/infiniband/hw/qib/qib_init.c kfree(rcd->opstats); rcd 945 drivers/infiniband/hw/qib/qib_init.c rcd->opstats = NULL; rcd 947 drivers/infiniband/hw/qib/qib_init.c kfree(rcd); rcd 1359 drivers/infiniband/hw/qib/qib_init.c tmp = dd->rcd; rcd 1360 drivers/infiniband/hw/qib/qib_init.c dd->rcd = NULL; rcd 1363 drivers/infiniband/hw/qib/qib_init.c struct qib_ctxtdata *rcd = tmp[ctxt]; rcd 1366 drivers/infiniband/hw/qib/qib_init.c qib_free_ctxtdata(dd, rcd); rcd 1543 drivers/infiniband/hw/qib/qib_init.c int qib_create_rcvhdrq(struct qib_devdata *dd, struct qib_ctxtdata *rcd) rcd 1548 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvhdrq) { rcd 1554 drivers/infiniband/hw/qib/qib_init.c gfp_flags = (rcd->ctxt >= dd->first_user_ctxt) ? rcd 1558 drivers/infiniband/hw/qib/qib_init.c set_dev_node(&dd->pcidev->dev, rcd->node_id); rcd 1559 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrq = dma_alloc_coherent( rcd 1560 drivers/infiniband/hw/qib/qib_init.c &dd->pcidev->dev, amt, &rcd->rcvhdrq_phys, rcd 1564 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvhdrq) { rcd 1567 drivers/infiniband/hw/qib/qib_init.c amt, rcd->ctxt); rcd 1571 drivers/infiniband/hw/qib/qib_init.c if (rcd->ctxt >= dd->first_user_ctxt) { rcd 1572 drivers/infiniband/hw/qib/qib_init.c rcd->user_event_mask = vmalloc_user(PAGE_SIZE); rcd 1573 drivers/infiniband/hw/qib/qib_init.c if (!rcd->user_event_mask) rcd 1578 drivers/infiniband/hw/qib/qib_init.c set_dev_node(&dd->pcidev->dev, rcd->node_id); rcd 1579 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrtail_kvaddr = dma_alloc_coherent( rcd 1583 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvhdrtail_kvaddr) rcd 1585 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrqtailaddr_phys = phys_hdrqtail; rcd 1588 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrq_size = amt; rcd 1592 drivers/infiniband/hw/qib/qib_init.c memset(rcd->rcvhdrq, 0, rcd->rcvhdrq_size); rcd 1593 drivers/infiniband/hw/qib/qib_init.c if (rcd->rcvhdrtail_kvaddr) rcd 1594 drivers/infiniband/hw/qib/qib_init.c memset(rcd->rcvhdrtail_kvaddr, 0, PAGE_SIZE); rcd 1600 drivers/infiniband/hw/qib/qib_init.c rcd->ctxt); rcd 1601 drivers/infiniband/hw/qib/qib_init.c vfree(rcd->user_event_mask); rcd 1602 drivers/infiniband/hw/qib/qib_init.c rcd->user_event_mask = NULL; rcd 1604 drivers/infiniband/hw/qib/qib_init.c dma_free_coherent(&dd->pcidev->dev, amt, rcd->rcvhdrq, rcd 1605 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrq_phys); rcd 1606 drivers/infiniband/hw/qib/qib_init.c rcd->rcvhdrq = NULL; rcd 1620 drivers/infiniband/hw/qib/qib_init.c int qib_setup_eagerbufs(struct qib_ctxtdata *rcd) rcd 1622 drivers/infiniband/hw/qib/qib_init.c struct qib_devdata *dd = rcd->dd; rcd 1636 drivers/infiniband/hw/qib/qib_init.c egrcnt = rcd->rcvegrcnt; rcd 1637 drivers/infiniband/hw/qib/qib_init.c egroff = rcd->rcvegr_tid_base; rcd 1640 drivers/infiniband/hw/qib/qib_init.c chunk = rcd->rcvegrbuf_chunks; rcd 1641 drivers/infiniband/hw/qib/qib_init.c egrperchunk = rcd->rcvegrbufs_perchunk; rcd 1642 drivers/infiniband/hw/qib/qib_init.c size = rcd->rcvegrbuf_size; rcd 1643 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvegrbuf) { rcd 1644 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf = rcd 1645 drivers/infiniband/hw/qib/qib_init.c kcalloc_node(chunk, sizeof(rcd->rcvegrbuf[0]), rcd 1646 drivers/infiniband/hw/qib/qib_init.c GFP_KERNEL, rcd->node_id); rcd 1647 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvegrbuf) rcd 1650 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvegrbuf_phys) { rcd 1651 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf_phys = rcd 1653 drivers/infiniband/hw/qib/qib_init.c sizeof(rcd->rcvegrbuf_phys[0]), rcd 1654 drivers/infiniband/hw/qib/qib_init.c GFP_KERNEL, rcd->node_id); rcd 1655 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvegrbuf_phys) rcd 1658 drivers/infiniband/hw/qib/qib_init.c for (e = 0; e < rcd->rcvegrbuf_chunks; e++) { rcd 1659 drivers/infiniband/hw/qib/qib_init.c if (rcd->rcvegrbuf[e]) rcd 1663 drivers/infiniband/hw/qib/qib_init.c set_dev_node(&dd->pcidev->dev, rcd->node_id); rcd 1664 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf[e] = rcd 1666 drivers/infiniband/hw/qib/qib_init.c &rcd->rcvegrbuf_phys[e], rcd 1669 drivers/infiniband/hw/qib/qib_init.c if (!rcd->rcvegrbuf[e]) rcd 1673 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegr_phys = rcd->rcvegrbuf_phys[0]; rcd 1675 drivers/infiniband/hw/qib/qib_init.c for (e = chunk = 0; chunk < rcd->rcvegrbuf_chunks; chunk++) { rcd 1676 drivers/infiniband/hw/qib/qib_init.c dma_addr_t pa = rcd->rcvegrbuf_phys[chunk]; rcd 1680 drivers/infiniband/hw/qib/qib_init.c memset(rcd->rcvegrbuf[chunk], 0, size); rcd 1697 drivers/infiniband/hw/qib/qib_init.c for (e = 0; e < rcd->rcvegrbuf_chunks && rcd->rcvegrbuf[e]; e++) rcd 1699 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf[e], rcd->rcvegrbuf_phys[e]); rcd 1700 drivers/infiniband/hw/qib/qib_init.c kfree(rcd->rcvegrbuf_phys); rcd 1701 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf_phys = NULL; rcd 1703 drivers/infiniband/hw/qib/qib_init.c kfree(rcd->rcvegrbuf); rcd 1704 drivers/infiniband/hw/qib/qib_init.c rcd->rcvegrbuf = NULL; rcd 191 drivers/infiniband/hw/qib/qib_intr.c struct qib_ctxtdata *rcd; rcd 196 drivers/infiniband/hw/qib/qib_intr.c for (i = dd->first_user_ctxt; dd->rcd && i < dd->cfgctxts; i++) { rcd 199 drivers/infiniband/hw/qib/qib_intr.c rcd = dd->rcd[i]; rcd 200 drivers/infiniband/hw/qib/qib_intr.c if (!rcd || !rcd->cnt) rcd 203 drivers/infiniband/hw/qib/qib_intr.c if (test_and_clear_bit(QIB_CTXT_WAITING_RCV, &rcd->flag)) { rcd 204 drivers/infiniband/hw/qib/qib_intr.c wake_up_interruptible(&rcd->wait); rcd 205 drivers/infiniband/hw/qib/qib_intr.c dd->f_rcvctrl(rcd->ppd, QIB_RCVCTRL_INTRAVAIL_DIS, rcd 206 drivers/infiniband/hw/qib/qib_intr.c rcd->ctxt); rcd 208 drivers/infiniband/hw/qib/qib_intr.c &rcd->flag)) { rcd 209 drivers/infiniband/hw/qib/qib_intr.c rcd->urgent++; rcd 210 drivers/infiniband/hw/qib/qib_intr.c wake_up_interruptible(&rcd->wait); rcd 589 drivers/infiniband/hw/qib/qib_mad.c struct qib_ctxtdata *rcd = dd->rcd[ppd->hw_pidx]; rcd 591 drivers/infiniband/hw/qib/qib_mad.c memcpy(pkeys, rcd->pkeys, sizeof(rcd->pkeys)); rcd 991 drivers/infiniband/hw/qib/qib_mad.c struct qib_ctxtdata *rcd; rcd 1002 drivers/infiniband/hw/qib/qib_mad.c rcd = dd->rcd[ppd->hw_pidx]; rcd 1004 drivers/infiniband/hw/qib/qib_mad.c for (i = 0; i < ARRAY_SIZE(rcd->pkeys); i++) { rcd 1006 drivers/infiniband/hw/qib/qib_mad.c u16 okey = rcd->pkeys[i]; rcd 1024 drivers/infiniband/hw/qib/qib_mad.c rcd->pkeys[i] = key; rcd 1007 drivers/infiniband/hw/qib/qib_rc.c u64 val, struct qib_ctxtdata *rcd) rcd 1067 drivers/infiniband/hw/qib/qib_rc.c &rcd->qp_wait_list); rcd 1224 drivers/infiniband/hw/qib/qib_rc.c struct qib_ctxtdata *rcd) rcd 1247 drivers/infiniband/hw/qib/qib_rc.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 1273 drivers/infiniband/hw/qib/qib_rc.c struct qib_ctxtdata *rcd) rcd 1351 drivers/infiniband/hw/qib/qib_rc.c if (!do_rc_ack(qp, aeth, psn, opcode, val, rcd) || rcd 1405 drivers/infiniband/hw/qib/qib_rc.c if (!do_rc_ack(qp, aeth, psn, opcode, 0, rcd)) rcd 1450 drivers/infiniband/hw/qib/qib_rc.c OP(RDMA_READ_RESPONSE_LAST), 0, rcd); rcd 1459 drivers/infiniband/hw/qib/qib_rc.c rdma_seq_err(qp, ibp, psn, rcd); rcd 1496 drivers/infiniband/hw/qib/qib_rc.c struct qib_ctxtdata *rcd) rcd 1523 drivers/infiniband/hw/qib/qib_rc.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 1711 drivers/infiniband/hw/qib/qib_rc.c void qib_rc_rcv(struct qib_ctxtdata *rcd, struct ib_header *hdr, rcd 1714 drivers/infiniband/hw/qib/qib_rc.c struct qib_ibport *ibp = &rcd->ppd->ibport_data; rcd 1752 drivers/infiniband/hw/qib/qib_rc.c hdrsize, pmtu, rcd); rcd 1759 drivers/infiniband/hw/qib/qib_rc.c if (qib_rc_rcv_error(ohdr, data, qp, opcode, psn, diff, rcd)) rcd 2086 drivers/infiniband/hw/qib/qib_rc.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 2098 drivers/infiniband/hw/qib/qib_rc.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 2112 drivers/infiniband/hw/qib/qib_rc.c list_add_tail(&qp->rspwait, &rcd->qp_wait_list); rcd 80 drivers/infiniband/hw/qib/qib_tx.c int qib_disarm_piobufs_ifneeded(struct qib_ctxtdata *rcd) rcd 82 drivers/infiniband/hw/qib/qib_tx.c struct qib_devdata *dd = rcd->dd; rcd 87 drivers/infiniband/hw/qib/qib_tx.c last = rcd->pio_base + rcd->piocnt; rcd 93 drivers/infiniband/hw/qib/qib_tx.c if (rcd->user_event_mask) { rcd 98 drivers/infiniband/hw/qib/qib_tx.c clear_bit(_QIB_EVENT_DISARM_BUFS_BIT, &rcd->user_event_mask[0]); rcd 99 drivers/infiniband/hw/qib/qib_tx.c for (i = 1; i < rcd->subctxt_cnt; i++) rcd 101 drivers/infiniband/hw/qib/qib_tx.c &rcd->user_event_mask[i]); rcd 104 drivers/infiniband/hw/qib/qib_tx.c for (i = rcd->pio_base; i < last; i++) { rcd 107 drivers/infiniband/hw/qib/qib_tx.c dd->f_sendctrl(rcd->ppd, QIB_SENDCTRL_DISARM_BUF(i)); rcd 134 drivers/infiniband/hw/qib/qib_tx.c struct qib_ctxtdata *rcd; rcd 140 drivers/infiniband/hw/qib/qib_tx.c rcd = dd->rcd[ctxt]; rcd 141 drivers/infiniband/hw/qib/qib_tx.c if (!rcd || bufn < rcd->pio_base || rcd 142 drivers/infiniband/hw/qib/qib_tx.c bufn >= rcd->pio_base + rcd->piocnt) rcd 144 drivers/infiniband/hw/qib/qib_tx.c if (rcd->user_event_mask) { rcd 151 drivers/infiniband/hw/qib/qib_tx.c &rcd->user_event_mask[0]); rcd 152 drivers/infiniband/hw/qib/qib_tx.c for (i = 1; i < rcd->subctxt_cnt; i++) rcd 154 drivers/infiniband/hw/qib/qib_tx.c &rcd->user_event_mask[i]); rcd 382 drivers/infiniband/hw/qib/qib_tx.c unsigned len, u32 avail, struct qib_ctxtdata *rcd) rcd 441 drivers/infiniband/hw/qib/qib_tx.c dd->f_txchk_change(dd, ostart, len, avail, rcd); rcd 456 drivers/infiniband/hw/qib/qib_tx.c struct qib_ctxtdata *rcd; rcd 472 drivers/infiniband/hw/qib/qib_tx.c rcd = dd->rcd[ctxt]; rcd 473 drivers/infiniband/hw/qib/qib_tx.c if (rcd && rcd->ppd == ppd) { rcd 474 drivers/infiniband/hw/qib/qib_tx.c last = rcd->pio_base + rcd->piocnt; rcd 475 drivers/infiniband/hw/qib/qib_tx.c if (rcd->user_event_mask) { rcd 482 drivers/infiniband/hw/qib/qib_tx.c &rcd->user_event_mask[0]); rcd 483 drivers/infiniband/hw/qib/qib_tx.c for (i = 1; i < rcd->subctxt_cnt; i++) rcd 485 drivers/infiniband/hw/qib/qib_tx.c &rcd->user_event_mask[i]); rcd 487 drivers/infiniband/hw/qib/qib_tx.c i = rcd->pio_base; rcd 402 drivers/infiniband/hw/qib/qib_ud.c for (i = 0; i < ARRAY_SIZE(dd->rcd[ctxt]->pkeys); ++i) rcd 403 drivers/infiniband/hw/qib/qib_ud.c if ((dd->rcd[ctxt]->pkeys[i] & 0x7fff) == pkey) rcd 1373 drivers/infiniband/hw/qib/qib_user_sdma.c int qib_user_sdma_writev(struct qib_ctxtdata *rcd, rcd 1378 drivers/infiniband/hw/qib/qib_user_sdma.c struct qib_devdata *dd = rcd->dd; rcd 1379 drivers/infiniband/hw/qib/qib_user_sdma.c struct qib_pportdata *ppd = rcd->ppd; rcd 223 drivers/infiniband/hw/qib/qib_verbs.c static void qib_qp_rcv(struct qib_ctxtdata *rcd, struct ib_header *hdr, rcd 226 drivers/infiniband/hw/qib/qib_verbs.c struct qib_ibport *ibp = &rcd->ppd->ibport_data; rcd 247 drivers/infiniband/hw/qib/qib_verbs.c qib_rc_rcv(rcd, hdr, has_grh, data, tlen, qp); rcd 272 drivers/infiniband/hw/qib/qib_verbs.c void qib_ib_rcv(struct qib_ctxtdata *rcd, void *rhdr, void *data, u32 tlen) rcd 274 drivers/infiniband/hw/qib/qib_verbs.c struct qib_pportdata *ppd = rcd->ppd; rcd 316 drivers/infiniband/hw/qib/qib_verbs.c rcd->opstats->stats[opcode].n_bytes += tlen; rcd 317 drivers/infiniband/hw/qib/qib_verbs.c rcd->opstats->stats[opcode].n_packets++; rcd 334 drivers/infiniband/hw/qib/qib_verbs.c qib_qp_rcv(rcd, hdr, 1, data, tlen, p->qp); rcd 350 drivers/infiniband/hw/qib/qib_verbs.c qib_qp_rcv(rcd, hdr, lnh == QIB_LRH_GRH, data, tlen, qp); rcd 1366 drivers/infiniband/hw/qib/qib_verbs.c return ARRAY_SIZE(dd->rcd[0]->pkeys); rcd 1381 drivers/infiniband/hw/qib/qib_verbs.c if (!dd->rcd || index >= ARRAY_SIZE(dd->rcd[ctxt]->pkeys)) rcd 1384 drivers/infiniband/hw/qib/qib_verbs.c ret = dd->rcd[ctxt]->pkeys[index]; rcd 1616 drivers/infiniband/hw/qib/qib_verbs.c dd->rcd[ctxt]->pkeys); rcd 298 drivers/infiniband/hw/qib/qib_verbs.h void qib_rc_rcv(struct qib_ctxtdata *rcd, struct ib_header *hdr, rcd 34 drivers/media/rc/zx-irdec.c struct rc_dev *rcd; rcd 61 drivers/media/rc/zx-irdec.c rc_repeat(irdec->rcd); rcd 74 drivers/media/rc/zx-irdec.c rc_keydown(irdec->rcd, rc_proto, scancode, 0); rcd 85 drivers/media/rc/zx-irdec.c struct rc_dev *rcd; rcd 102 drivers/media/rc/zx-irdec.c rcd = devm_rc_allocate_device(dev, RC_DRIVER_SCANCODE); rcd 103 drivers/media/rc/zx-irdec.c if (!rcd) { rcd 108 drivers/media/rc/zx-irdec.c irdec->rcd = rcd; rcd 110 drivers/media/rc/zx-irdec.c rcd->priv = irdec; rcd 111 drivers/media/rc/zx-irdec.c rcd->input_phys = DRIVER_NAME "/input0"; rcd 112 drivers/media/rc/zx-irdec.c rcd->input_id.bustype = BUS_HOST; rcd 113 drivers/media/rc/zx-irdec.c rcd->map_name = RC_MAP_ZX_IRDEC; rcd 114 drivers/media/rc/zx-irdec.c rcd->allowed_protocols = RC_PROTO_BIT_NEC | RC_PROTO_BIT_NECX | rcd 116 drivers/media/rc/zx-irdec.c rcd->driver_name = DRIVER_NAME; rcd 117 drivers/media/rc/zx-irdec.c rcd->device_name = DRIVER_NAME; rcd 121 drivers/media/rc/zx-irdec.c ret = devm_rc_register_device(dev, rcd); rcd 1039 drivers/net/hyperv/netvsc.c const struct recv_comp_data *rcd rcd 1042 drivers/net/hyperv/netvsc.c msg.status = rcd->status; rcd 1044 drivers/net/hyperv/netvsc.c rcd->tid, VM_PKT_COMP, 0); rcd 1085 drivers/net/hyperv/netvsc.c struct recv_comp_data *rcd; rcd 1101 drivers/net/hyperv/netvsc.c rcd = mrc->slots + mrc->next; rcd 1102 drivers/net/hyperv/netvsc.c rcd->tid = tid; rcd 1103 drivers/net/hyperv/netvsc.c rcd->status = status; rcd 356 drivers/net/vmxnet3/vmxnet3_defs.h struct Vmxnet3_RxCompDesc rcd; rcd 290 drivers/net/vmxnet3/vmxnet3_drv.c # define vmxnet3_getRxComp(dstrcd, rcd, tmp) do { \ rcd 292 drivers/net/vmxnet3/vmxnet3_drv.c vmxnet3_RxCompToCPU((rcd), (tmp)); \ rcd 305 drivers/net/vmxnet3/vmxnet3_drv.c # define vmxnet3_getRxComp(dstrcd, rcd, tmp) (dstrcd) = (rcd) rcd 657 drivers/net/vmxnet3/vmxnet3_drv.c vmxnet3_append_frag(struct sk_buff *skb, struct Vmxnet3_RxCompDesc *rcd, rcd 666 drivers/net/vmxnet3/vmxnet3_drv.c skb_frag_size_set(frag, rcd->len); rcd 667 drivers/net/vmxnet3/vmxnet3_drv.c skb->data_len += rcd->len; rcd 1169 drivers/net/vmxnet3/vmxnet3_drv.c if (!gdesc->rcd.cnc && adapter->netdev->features & NETIF_F_RXCSUM) { rcd 1170 drivers/net/vmxnet3/vmxnet3_drv.c if (gdesc->rcd.v4 && rcd 1174 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp)); rcd 1175 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(gdesc->rcd.frg); rcd 1176 drivers/net/vmxnet3/vmxnet3_drv.c } else if (gdesc->rcd.v6 && (le32_to_cpu(gdesc->dword[3]) & rcd 1179 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp)); rcd 1180 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(gdesc->rcd.frg); rcd 1182 drivers/net/vmxnet3/vmxnet3_drv.c if (gdesc->rcd.csum) { rcd 1183 drivers/net/vmxnet3/vmxnet3_drv.c skb->csum = htons(gdesc->rcd.csum); rcd 1196 drivers/net/vmxnet3/vmxnet3_drv.c vmxnet3_rx_error(struct vmxnet3_rx_queue *rq, struct Vmxnet3_RxCompDesc *rcd, rcd 1200 drivers/net/vmxnet3/vmxnet3_drv.c if (!rcd->fcs) rcd 1235 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(gdesc->rcd.tcp == 0); rcd 1248 drivers/net/vmxnet3/vmxnet3_drv.c if (gdesc->rcd.v4) { rcd 1255 drivers/net/vmxnet3/vmxnet3_drv.c } else if (gdesc->rcd.v6) { rcd 1286 drivers/net/vmxnet3/vmxnet3_drv.c struct Vmxnet3_RxCompDesc *rcd; rcd 1293 drivers/net/vmxnet3/vmxnet3_drv.c vmxnet3_getRxComp(rcd, &rq->comp_ring.base[rq->comp_ring.next2proc].rcd, rcd 1295 drivers/net/vmxnet3/vmxnet3_drv.c while (rcd->gen == rq->comp_ring.gen) { rcd 1316 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(rcd->rqID != rq->qid && rcd->rqID != rq->qid2 && rcd 1317 drivers/net/vmxnet3/vmxnet3_drv.c rcd->rqID != rq->dataRingQid); rcd 1318 drivers/net/vmxnet3/vmxnet3_drv.c idx = rcd->rxdIdx; rcd 1319 drivers/net/vmxnet3/vmxnet3_drv.c ring_idx = VMXNET3_GET_RING_IDX(adapter, rcd->rqID); rcd 1328 drivers/net/vmxnet3/vmxnet3_drv.c if (unlikely(rcd->eop && rcd->err)) { rcd 1329 drivers/net/vmxnet3/vmxnet3_drv.c vmxnet3_rx_error(rq, rcd, ctx, adapter); rcd 1333 drivers/net/vmxnet3/vmxnet3_drv.c if (rcd->sop) { /* first buf of the pkt */ rcd 1338 drivers/net/vmxnet3/vmxnet3_drv.c (rcd->rqID != rq->qid && rcd 1339 drivers/net/vmxnet3/vmxnet3_drv.c rcd->rqID != rq->dataRingQid)); rcd 1344 drivers/net/vmxnet3/vmxnet3_drv.c if (unlikely(rcd->len == 0)) { rcd 1346 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(!(rcd->sop && rcd->eop)); rcd 1357 drivers/net/vmxnet3/vmxnet3_drv.c VMXNET3_RX_DATA_RING(adapter, rcd->rqID); rcd 1358 drivers/net/vmxnet3/vmxnet3_drv.c len = rxDataRingUsed ? rcd->len : rbi->len; rcd 1375 drivers/net/vmxnet3/vmxnet3_drv.c BUG_ON(rcd->len > rq->data_ring.desc_size); rcd 1378 drivers/net/vmxnet3/vmxnet3_drv.c sz = rcd->rxdIdx * rq->data_ring.desc_size; rcd 1380 drivers/net/vmxnet3/vmxnet3_drv.c &rq->data_ring.base[sz], rcd->len); rcd 1415 drivers/net/vmxnet3/vmxnet3_drv.c if (rcd->rssType != VMXNET3_RCD_RSS_TYPE_NONE && rcd 1418 drivers/net/vmxnet3/vmxnet3_drv.c le32_to_cpu(rcd->rssHash), rcd 1421 drivers/net/vmxnet3/vmxnet3_drv.c skb_put(ctx->skb, rcd->len); rcd 1424 drivers/net/vmxnet3/vmxnet3_drv.c rcd->type == VMXNET3_CDTYPE_RXCOMP_LRO) { rcd 1426 drivers/net/vmxnet3/vmxnet3_drv.c rcdlro = (struct Vmxnet3_RxCompDescExt *)rcd; rcd 1449 drivers/net/vmxnet3/vmxnet3_drv.c if (rcd->len) { rcd 1481 drivers/net/vmxnet3/vmxnet3_drv.c vmxnet3_append_frag(ctx->skb, rcd, rbi); rcd 1493 drivers/net/vmxnet3/vmxnet3_drv.c if (rcd->eop) { rcd 1498 drivers/net/vmxnet3/vmxnet3_drv.c (union Vmxnet3_GenericDesc *)rcd); rcd 1500 drivers/net/vmxnet3/vmxnet3_drv.c if (!rcd->tcp || rcd 1505 drivers/net/vmxnet3/vmxnet3_drv.c skb_shinfo(skb)->gso_type = rcd->v4 ? rcd 1513 drivers/net/vmxnet3/vmxnet3_drv.c (union Vmxnet3_GenericDesc *)rcd); rcd 1518 drivers/net/vmxnet3/vmxnet3_drv.c rcd->v4 ? SKB_GSO_TCPV4 : SKB_GSO_TCPV6; rcd 1529 drivers/net/vmxnet3/vmxnet3_drv.c if (unlikely(rcd->ts)) rcd 1530 drivers/net/vmxnet3/vmxnet3_drv.c __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rcd->tci); rcd 1571 drivers/net/vmxnet3/vmxnet3_drv.c vmxnet3_getRxComp(rcd, rcd 1572 drivers/net/vmxnet3/vmxnet3_drv.c &rq->comp_ring.base[rq->comp_ring.next2proc].rcd, &rxComp); rcd 161 drivers/scsi/sd.c int ct, rcd, wce, sp; rcd 188 drivers/scsi/sd.c rcd = ct & 0x01 ? 1 : 0; rcd 193 drivers/scsi/sd.c sdkp->RCD = rcd; rcd 206 drivers/scsi/sd.c buffer_data[2] |= wce << 2 | rcd; rcd 46 drivers/scsi/ufs/ufs-qcom.c static struct ufs_qcom_host *rcdev_to_ufs_host(struct reset_controller_dev *rcd) rcd 48 drivers/scsi/ufs/ufs-qcom.c return container_of(rcd, struct ufs_qcom_host, rcdev); rcd 405 drivers/tty/serial/xilinx_uartps.c unsigned int baud, u32 *rbdiv, u32 *rcd, int *div8) rcd 434 drivers/tty/serial/xilinx_uartps.c *rcd = cd;