/openbmc/linux/drivers/infiniband/hw/hfi1/ |
H A D | driver.c | 208 struct hfi1_packet *packet) in rcv_hdrerr() argument 210 struct ib_header *rhdr = packet->hdr; in rcv_hdrerr() 211 u32 rte = rhf_rcv_type_err(packet->rhf); in rcv_hdrerr() 218 if ((packet->rhf & RHF_DC_ERR) && in rcv_hdrerr() 222 if (packet->rhf & RHF_ICRC_ERR) in rcv_hdrerr() 225 if (packet->etype == RHF_RCV_TYPE_BYPASS) { in rcv_hdrerr() 232 packet->ohdr = &rhdr->u.oth; in rcv_hdrerr() 234 packet->ohdr = &rhdr->u.l.oth; in rcv_hdrerr() 235 packet->grh = &rhdr->u.l.grh; in rcv_hdrerr() 241 if (packet->rhf & RHF_TID_ERR) { in rcv_hdrerr() [all …]
|
/openbmc/linux/tools/perf/util/intel-pt-decoder/ |
H A D | intel-pt-pkt-decoder.c | 78 struct intel_pt_pkt *packet) in intel_pt_get_long_tnt() argument 94 packet->type = INTEL_PT_TNT; in intel_pt_get_long_tnt() 95 packet->count = count; in intel_pt_get_long_tnt() 96 packet->payload = payload << 1; in intel_pt_get_long_tnt() 101 struct intel_pt_pkt *packet) in intel_pt_get_pip() argument 108 packet->type = INTEL_PT_PIP; in intel_pt_get_pip() 110 packet->payload = payload; in intel_pt_get_pip() 115 static int intel_pt_get_tracestop(struct intel_pt_pkt *packet) in intel_pt_get_tracestop() argument 117 packet->type = INTEL_PT_TRACESTOP; in intel_pt_get_tracestop() 122 struct intel_pt_pkt *packet) in intel_pt_get_cbr() argument [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/amdkfd/ |
H A D | kfd_packet_manager_vi.c | 45 struct pm4_mes_map_process *packet; in pm_map_process_vi() local 47 packet = (struct pm4_mes_map_process *)buffer; in pm_map_process_vi() 51 packet->header.u32All = pm_build_pm4_header(IT_MAP_PROCESS, in pm_map_process_vi() 53 packet->bitfields2.diq_enable = (qpd->is_debug) ? 1 : 0; in pm_map_process_vi() 54 packet->bitfields2.process_quantum = 10; in pm_map_process_vi() 55 packet->bitfields2.pasid = qpd->pqm->process->pasid; in pm_map_process_vi() 56 packet->bitfields3.page_table_base = qpd->page_table_base; in pm_map_process_vi() 57 packet->bitfields10.gds_size = qpd->gds_size; in pm_map_process_vi() 58 packet->bitfields10.num_gws = qpd->num_gws; in pm_map_process_vi() 59 packet->bitfields10.num_oac = qpd->num_oac; in pm_map_process_vi() [all …]
|
H A D | kfd_packet_manager_v9.c | 35 struct pm4_mes_map_process *packet; in pm_map_process_v9() local 41 packet = (struct pm4_mes_map_process *)buffer; in pm_map_process_v9() 43 packet->header.u32All = pm_build_pm4_header(IT_MAP_PROCESS, in pm_map_process_v9() 45 packet->bitfields2.diq_enable = (qpd->is_debug) ? 1 : 0; in pm_map_process_v9() 46 packet->bitfields2.process_quantum = 10; in pm_map_process_v9() 47 packet->bitfields2.pasid = qpd->pqm->process->pasid; in pm_map_process_v9() 48 packet->bitfields14.gds_size = qpd->gds_size & 0x3F; in pm_map_process_v9() 49 packet->bitfields14.gds_size_hi = (qpd->gds_size >> 6) & 0xF; in pm_map_process_v9() 50 packet->bitfields14.num_gws = (qpd->mapped_gws_queue) ? qpd->num_gws : 0; in pm_map_process_v9() 51 packet->bitfields14.num_oac = qpd->num_oac; in pm_map_process_v9() [all …]
|
/openbmc/linux/net/sctp/ |
H A D | output.c | 45 static enum sctp_xmit __sctp_packet_append_chunk(struct sctp_packet *packet, 47 static enum sctp_xmit sctp_packet_can_append_data(struct sctp_packet *packet, 49 static void sctp_packet_append_data(struct sctp_packet *packet, 51 static enum sctp_xmit sctp_packet_will_fit(struct sctp_packet *packet, 55 static void sctp_packet_reset(struct sctp_packet *packet) in sctp_packet_reset() argument 60 packet->size = packet->overhead; in sctp_packet_reset() 62 packet->has_cookie_echo = 0; in sctp_packet_reset() 63 packet->has_sack = 0; in sctp_packet_reset() 64 packet->has_data = 0; in sctp_packet_reset() 65 packet->has_auth = 0; in sctp_packet_reset() [all …]
|
/openbmc/linux/tools/perf/util/arm-spe-decoder/ |
H A D | arm-spe-pkt-decoder.c | 62 struct arm_spe_pkt *packet) in arm_spe_get_payload() argument 72 case 1: packet->payload = *(uint8_t *)buf; break; in arm_spe_get_payload() 73 case 2: packet->payload = le16_to_cpu(*(uint16_t *)buf); break; in arm_spe_get_payload() 74 case 4: packet->payload = le32_to_cpu(*(uint32_t *)buf); break; in arm_spe_get_payload() 75 case 8: packet->payload = le64_to_cpu(*(uint64_t *)buf); break; in arm_spe_get_payload() 82 static int arm_spe_get_pad(struct arm_spe_pkt *packet) in arm_spe_get_pad() argument 84 packet->type = ARM_SPE_PAD; in arm_spe_get_pad() 89 struct arm_spe_pkt *packet) in arm_spe_get_alignment() argument 96 packet->type = ARM_SPE_PAD; in arm_spe_get_alignment() 100 static int arm_spe_get_end(struct arm_spe_pkt *packet) in arm_spe_get_end() argument [all …]
|
/openbmc/linux/drivers/net/wireless/ath/ath6kl/ |
H A D | htc_mbox.c | 359 static void ath6kl_htc_tx_prep_pkt(struct htc_packet *packet, u8 flags, in ath6kl_htc_tx_prep_pkt() argument 364 packet->buf -= HTC_HDR_LENGTH; in ath6kl_htc_tx_prep_pkt() 365 hdr = (struct htc_frame_hdr *)packet->buf; in ath6kl_htc_tx_prep_pkt() 368 put_unaligned((u16)packet->act_len, &hdr->payld_len); in ath6kl_htc_tx_prep_pkt() 370 hdr->eid = packet->endpoint; in ath6kl_htc_tx_prep_pkt() 386 struct htc_packet *packet = NULL; in htc_get_control_buf() local 398 packet = list_first_entry(buf_list, struct htc_packet, list); in htc_get_control_buf() 399 list_del(&packet->list); in htc_get_control_buf() 403 packet->buf = packet->buf_start + HTC_HDR_LENGTH; in htc_get_control_buf() 405 return packet; in htc_get_control_buf() [all …]
|
H A D | htc_pipe.c | 25 struct htc_packet *packet); 29 static inline void restore_tx_packet(struct htc_packet *packet) in restore_tx_packet() argument 31 if (packet->info.tx.flags & HTC_FLAGS_TX_FIXUP_NETBUF) { in restore_tx_packet() 32 skb_pull(packet->skb, sizeof(struct htc_frame_hdr)); in restore_tx_packet() 33 packet->info.tx.flags &= ~HTC_FLAGS_TX_FIXUP_NETBUF; in restore_tx_packet() 40 struct htc_packet *packet; in do_send_completion() local 65 packet = list_first_entry(queue_to_indicate, in do_send_completion() 68 list_del(&packet->list); in do_send_completion() 71 __func__, ep->eid, packet); in do_send_completion() 72 ep->ep_cb.tx_complete(ep->target, packet); in do_send_completion() [all …]
|
/openbmc/linux/drivers/platform/surface/aggregator/ |
H A D | ssh_packet_layer.c | 329 static bool __ssh_ptl_should_drop_ack_packet(struct ssh_packet *packet) in __ssh_ptl_should_drop_ack_packet() argument 334 trace_ssam_ei_tx_drop_ack_packet(packet); in __ssh_ptl_should_drop_ack_packet() 335 ptl_info(packet->ptl, "packet error injection: dropping ACK packet %p\n", in __ssh_ptl_should_drop_ack_packet() 336 packet); in __ssh_ptl_should_drop_ack_packet() 341 static bool __ssh_ptl_should_drop_nak_packet(struct ssh_packet *packet) in __ssh_ptl_should_drop_nak_packet() argument 346 trace_ssam_ei_tx_drop_nak_packet(packet); in __ssh_ptl_should_drop_nak_packet() 347 ptl_info(packet->ptl, "packet error injection: dropping NAK packet %p\n", in __ssh_ptl_should_drop_nak_packet() 348 packet); in __ssh_ptl_should_drop_nak_packet() 353 static bool __ssh_ptl_should_drop_dsq_packet(struct ssh_packet *packet) in __ssh_ptl_should_drop_dsq_packet() argument 358 trace_ssam_ei_tx_drop_dsq_packet(packet); in __ssh_ptl_should_drop_dsq_packet() [all …]
|
/openbmc/qemu/net/ |
H A D | queue.c | 83 NetPacket *packet, *next; in qemu_del_net_queue() local 85 QTAILQ_FOREACH_SAFE(packet, &queue->packets, entry, next) { in qemu_del_net_queue() 86 QTAILQ_REMOVE(&queue->packets, packet, entry); in qemu_del_net_queue() 87 g_free(packet); in qemu_del_net_queue() 100 NetPacket *packet; in qemu_net_queue_append() local 105 packet = g_malloc(sizeof(NetPacket) + size); in qemu_net_queue_append() 106 packet->sender = sender; in qemu_net_queue_append() 107 packet->flags = flags; in qemu_net_queue_append() 108 packet->size = size; in qemu_net_queue_append() 109 packet->sent_cb = sent_cb; in qemu_net_queue_append() [all …]
|
/openbmc/linux/drivers/media/test-drivers/vivid/ |
H A D | vivid-vbi-gen.c | 176 static void vivid_vbi_gen_set_time_of_day(u8 *packet) in vivid_vbi_gen_set_time_of_day() argument 182 packet[0] = calc_parity(0x07); in vivid_vbi_gen_set_time_of_day() 183 packet[1] = calc_parity(0x01); in vivid_vbi_gen_set_time_of_day() 184 packet[2] = calc_parity(0x40 | tm.tm_min); in vivid_vbi_gen_set_time_of_day() 185 packet[3] = calc_parity(0x40 | tm.tm_hour); in vivid_vbi_gen_set_time_of_day() 186 packet[4] = calc_parity(0x40 | tm.tm_mday); in vivid_vbi_gen_set_time_of_day() 189 packet[4] = calc_parity(0x60 | tm.tm_mday); in vivid_vbi_gen_set_time_of_day() 190 packet[5] = calc_parity(0x40 | (1 + tm.tm_mon)); in vivid_vbi_gen_set_time_of_day() 191 packet[6] = calc_parity(0x40 | (1 + tm.tm_wday)); in vivid_vbi_gen_set_time_of_day() 192 packet[7] = calc_parity(0x40 | ((tm.tm_year - 90) & 0x3f)); in vivid_vbi_gen_set_time_of_day() [all …]
|
/openbmc/qemu/hw/usb/ |
H A D | pcap.c | 103 static void do_usb_pcap_header(FILE *fp, struct usbmon_packet *packet) in do_usb_pcap_header() argument 109 packet->ts_sec = tv.tv_sec; in do_usb_pcap_header() 110 packet->ts_usec = tv.tv_usec; in do_usb_pcap_header() 112 header.ts_sec = packet->ts_sec; in do_usb_pcap_header() 113 header.ts_usec = packet->ts_usec; in do_usb_pcap_header() 114 header.incl_len = packet->len_cap; in do_usb_pcap_header() 115 header.orig_len = packet->length + sizeof(*packet); in do_usb_pcap_header() 117 fwrite(packet, sizeof(*packet), 1, fp); in do_usb_pcap_header() 124 struct usbmon_packet packet = { in do_usb_pcap_ctrl() local 140 memcpy(packet.s.setup, dev->setup_buf, 8); in do_usb_pcap_ctrl() [all …]
|
/openbmc/u-boot/net/ |
H A D | fastboot.c | 55 uchar *packet; in fastboot_udp_send_info() local 66 packet = net_tx_packet + net_eth_hdr_size() + IP_UDP_HDR_SIZE; in fastboot_udp_send_info() 67 packet_base = packet; in fastboot_udp_send_info() 70 memcpy(packet, &response_header, sizeof(response_header)); in fastboot_udp_send_info() 71 packet += sizeof(response_header); in fastboot_udp_send_info() 74 memcpy(packet, response, strlen(response)); in fastboot_udp_send_info() 75 packet += strlen(response); in fastboot_udp_send_info() 77 len = packet - packet_base; in fastboot_udp_send_info() 122 uchar *packet; in fastboot_send() local 137 packet = net_tx_packet + net_eth_hdr_size() + IP_UDP_HDR_SIZE; in fastboot_send() [all …]
|
/openbmc/linux/drivers/usb/misc/sisusbvga/ |
H A D | sisusbvga.c | 513 struct sisusb_packet *packet) in sisusb_send_packet() argument 520 packet->data = 0; in sisusb_send_packet() 528 SISUSB_CORRECT_ENDIANNESS_PACKET(packet); in sisusb_send_packet() 532 (char *)packet, NULL, 0, &bytes_transferred, 0, 0); in sisusb_send_packet() 542 packet->data = le32_to_cpu(tmp); in sisusb_send_packet() 549 struct sisusb_packet *packet, unsigned int tflags) in sisusb_send_bridge_packet() argument 556 packet->data = 0; in sisusb_send_bridge_packet() 564 SISUSB_CORRECT_ENDIANNESS_PACKET(packet); in sisusb_send_bridge_packet() 568 (char *)packet, NULL, 0, &bytes_transferred, tflags, 0); in sisusb_send_bridge_packet() 578 packet->data = le32_to_cpu(tmp); in sisusb_send_bridge_packet() [all …]
|
/openbmc/linux/drivers/tty/hvc/ |
H A D | hvsi.c | 145 static inline int len_packet(const uint8_t *packet) in len_packet() argument 147 return (int)((struct hvsi_header *)packet)->len; in len_packet() 150 static inline int is_header(const uint8_t *packet) in is_header() argument 152 struct hvsi_header *header = (struct hvsi_header *)packet; in is_header() 156 static inline int got_packet(const struct hvsi_struct *hp, uint8_t *packet) in got_packet() argument 158 if (hp->inbuf_end < packet + sizeof(struct hvsi_header)) in got_packet() 161 if (hp->inbuf_end < (packet + len_packet(packet))) in got_packet() 181 #define dbg_dump_packet(packet) dump_packet(packet) argument 184 #define dbg_dump_packet(packet) do { } while (0) argument 206 static void dump_packet(uint8_t *packet) in dump_packet() argument [all …]
|
/openbmc/linux/drivers/input/mouse/ |
H A D | elantech.c | 267 psmouse->pktsize, psmouse->packet); in elantech_packet_dump() 324 unsigned char *packet = psmouse->packet; in elantech_report_absolute_v1() local 332 fingers = ((packet[1] & 0x80) >> 7) + in elantech_report_absolute_v1() 333 ((packet[1] & 0x30) >> 4); in elantech_report_absolute_v1() 339 fingers = (packet[0] & 0xc0) >> 6; in elantech_report_absolute_v1() 361 ((packet[1] & 0x0c) << 6) | packet[2]); in elantech_report_absolute_v1() 363 etd->y_max - (((packet[1] & 0x03) << 8) | packet[3])); in elantech_report_absolute_v1() 370 psmouse_report_standard_buttons(dev, packet[0]); in elantech_report_absolute_v1() 375 input_report_key(dev, BTN_FORWARD, packet[0] & 0x40); in elantech_report_absolute_v1() 377 input_report_key(dev, BTN_BACK, packet[0] & 0x80); in elantech_report_absolute_v1() [all …]
|
H A D | lifebook.c | 137 u8 *packet = psmouse->packet; in lifebook_process_byte() local 138 bool relative_packet = packet[0] & 0x08; in lifebook_process_byte() 146 return (packet[0] & 0xf8) == 0x00 ? in lifebook_process_byte() 151 return ((packet[2] & 0x30) << 2) == (packet[2] & 0xc0) ? in lifebook_process_byte() 154 return (packet[3] & 0xf8) == 0xc0 ? in lifebook_process_byte() 157 return (packet[4] & 0xc0) == (packet[2] & 0xc0) ? in lifebook_process_byte() 160 if (((packet[5] & 0x30) << 2) != (packet[5] & 0xc0)) in lifebook_process_byte() 162 if ((packet[5] & 0xc0) != (packet[1] & 0xc0)) in lifebook_process_byte() 175 ((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f)); in lifebook_process_byte() 177 4096 - (((packet[4] & 0x3f) << 6) | (packet[5] & 0x3f))); in lifebook_process_byte() [all …]
|
H A D | touchkit_ps2.c | 36 #define TOUCHKIT_GET_TOUCHED(packet) (((packet)[0]) & 0x01) argument 37 #define TOUCHKIT_GET_X(packet) (((packet)[1] << 7) | (packet)[2]) argument 38 #define TOUCHKIT_GET_Y(packet) (((packet)[3] << 7) | (packet)[4]) argument 42 unsigned char *packet = psmouse->packet; in touchkit_ps2_process_byte() local 48 input_report_abs(dev, ABS_X, TOUCHKIT_GET_X(packet)); in touchkit_ps2_process_byte() 49 input_report_abs(dev, ABS_Y, TOUCHKIT_GET_Y(packet)); in touchkit_ps2_process_byte() 50 input_report_key(dev, BTN_TOUCH, TOUCHKIT_GET_TOUCHED(packet)); in touchkit_ps2_process_byte()
|
/openbmc/linux/drivers/infiniband/core/ |
H A D | user_mad.c | 187 struct ib_umad_packet *packet, bool is_recv_mad) in queue_packet() argument 197 for (packet->mad.hdr.id = 0; in queue_packet() 198 packet->mad.hdr.id < IB_UMAD_MAX_AGENTS; in queue_packet() 199 packet->mad.hdr.id++) in queue_packet() 200 if (agent == __get_agent(file, packet->mad.hdr.id)) { in queue_packet() 201 list_add_tail(&packet->list, &file->recv_list); in queue_packet() 214 struct ib_umad_packet *packet) in dequeue_send() argument 217 list_del(&packet->list); in dequeue_send() 225 struct ib_umad_packet *packet = send_wc->send_buf->context[0]; in send_handler() local 227 dequeue_send(file, packet); in send_handler() [all …]
|
/openbmc/linux/drivers/tty/ipwireless/ |
H A D | hardware.c | 459 static void do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) in do_send_packet() argument 462 unsigned short data_left = packet->length - packet->offset; in do_send_packet() 467 (packet->fragment_count == 0) in do_send_packet() 478 pkt.hdr_first.protocol = packet->protocol; in do_send_packet() 479 pkt.hdr_first.address = packet->dest_addr; in do_send_packet() 483 if (packet->fragment_count == 0) { in do_send_packet() 485 pkt.hdr_first.length_lsb = (unsigned char) packet->length; in do_send_packet() 487 (unsigned char) (packet->length >> 8); in do_send_packet() 491 ((unsigned char *) packet) + sizeof(struct ipw_tx_packet) + in do_send_packet() 492 packet->offset, fragment_data_len); in do_send_packet() [all …]
|
/openbmc/phosphor-net-ipmid/ |
H A D | message_parsers.cpp | 140 std::vector<uint8_t> packet(sizeof(SessionHeader_t)); in flatten() local 143 auto header = reinterpret_cast<SessionHeader_t*>(packet.data()); in flatten() 156 packet.insert(packet.end(), outMessage->payload.begin(), in flatten() 160 packet.resize(packet.size() + sizeof(SessionTrailer_t)); in flatten() 162 reinterpret_cast<SessionTrailer_t*>(packet.data() + packet.size()); in flatten() 165 return packet; in flatten() 251 std::vector<uint8_t> packet(sizeof(SessionHeader_t)); in flatten() local 253 SessionHeader_t* header = reinterpret_cast<SessionHeader_t*>(packet.data()); in flatten() 264 internal::addSequenceNumber(packet, session); in flatten() 277 packet.insert(packet.end(), cipherPayload.begin(), cipherPayload.end()); in flatten() [all …]
|
/openbmc/phosphor-net-ipmid/test/ |
H A D | cipher.cpp | 21 std::vector<uint8_t> packet = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; in TEST() local 32 auto response = algoPtr->generateIntegrityData(packet); in TEST() 56 size_t length = packet.size() - message::parser::RMCP_SESSION_HEADER_SIZE; in TEST() 59 packet.data() + message::parser::RMCP_SESSION_HEADER_SIZE, length, in TEST() 82 std::vector<uint8_t> packet = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; in TEST() local 104 size_t length = packet.size() - message::parser::RMCP_SESSION_HEADER_SIZE; in TEST() 107 packet.data() + message::parser::RMCP_SESSION_HEADER_SIZE, length, in TEST() 118 auto packetSize = packet.size(); in TEST() 119 packet.insert(packet.end(), output.begin(), output.end()); in TEST() 122 auto integrityIter = packet.cbegin(); in TEST() [all …]
|
/openbmc/linux/tools/perf/arch/x86/tests/ |
H A D | intel-pt-test.c | 29 struct intel_pt_pkt packet; member 189 static int dump_packet(const struct intel_pt_pkt *packet, const u8 *bytes, int len) in dump_packet() argument 199 ret = intel_pt_pkt_desc(packet, desc, INTEL_PT_PKT_DESC_MAX); in dump_packet() 213 dump_packet(&d->packet, d->bytes, d->len); in decoding_failed() 216 static int fail(const struct test_data *d, struct intel_pt_pkt *packet, int len, in fail() argument 225 if (packet->type != d->packet.type) in fail() 227 d->packet.type, packet->type); in fail() 229 if (packet->count != d->packet.count) in fail() 231 d->packet.count, packet->count); in fail() 233 if (packet->payload != d->packet.payload) in fail() [all …]
|
/openbmc/linux/drivers/net/wireless/broadcom/b43legacy/ |
H A D | pio.c | 43 const u8 *packet, in tx_get_next_word() argument 54 source = packet; in tx_get_next_word() 65 const u8 *packet, in tx_data() argument 72 data = tx_get_next_word(txhdr, packet, in tx_data() 80 data = tx_get_next_word(txhdr, packet, in tx_data() 85 tx_octet(queue, packet[octets - in tx_data() 104 struct b43legacy_pio_txpacket *packet) in generate_cookie() argument 128 packetindex = pio_txpacket_getindex(packet); in generate_cookie() 138 struct b43legacy_pio_txpacket **packet) in parse_cookie() argument 163 *packet = &(queue->tx_packets_cache[packetindex]); in parse_cookie() [all …]
|
/openbmc/linux/drivers/input/joystick/ |
H A D | fsia6b.c | 57 struct ibus_packet packet; member 70 fsia6b->packet.ibuf = (data << 8) | ((fsia6b->packet.ibuf >> 8) & 0xFF); in fsia6b_serio_irq() 72 switch (fsia6b->packet.state) { in fsia6b_serio_irq() 74 if (fsia6b->packet.ibuf == 0x4020) in fsia6b_serio_irq() 75 fsia6b->packet.state = COLLECT; in fsia6b_serio_irq() 79 fsia6b->packet.state = PROCESS; in fsia6b_serio_irq() 83 fsia6b->packet.channel[fsia6b->packet.offset] = in fsia6b_serio_irq() 84 fsia6b->packet.ibuf; in fsia6b_serio_irq() 85 fsia6b->packet.offset++; in fsia6b_serio_irq() 87 if (fsia6b->packet.offset == IBUS_SERVO_COUNT) { in fsia6b_serio_irq() [all …]
|