Lines Matching refs:frame
52 * struct thunderbolt_ip_frame_header - Header for each Thunderbolt frame
53 * @frame_size: size of the data with the frame
55 * @frame_id: ID of the frame to match frames to specific packet
58 * Each data frame passed to the high-speed DMA ring has this header. If
138 struct ring_frame frame;
172 * @rx_hdr: Copy of the currently processed Rx frame. Used when a
331 return tf->frame.size ? : TBNET_FRAME_SIZE;
358 trace_tbnet_free_frame(i, tf->page, tf->frame.buffer_phy, dir);
360 if (tf->frame.buffer_phy)
361 dma_unmap_page(dma_dev, tf->frame.buffer_phy, size,
514 * ThunderboltIP frame (4kB) and the additional room for
530 tf->frame.buffer_phy = dma_addr;
536 tb_ring_rx(ring->ring, &tf->frame);
561 tf->frame.size = 0;
563 dma_sync_single_for_cpu(dma_dev, tf->frame.buffer_phy,
569 static void tbnet_tx_callback(struct tb_ring *ring, struct ring_frame *frame,
572 struct tbnet_frame *tf = container_of(frame, typeof(*tf), frame);
608 tf->frame.buffer_phy = dma_addr;
609 tf->frame.callback = tbnet_tx_callback;
610 tf->frame.sof = TBIP_PDF_FRAME_START;
611 tf->frame.eof = TBIP_PDF_FRAME_END;
737 if (tf->frame.flags & RING_DESC_CRC_ERROR) {
740 } else if (tf->frame.flags & RING_DESC_BUFFER_OVERRUN) {
762 /* In case we're in the middle of packet, validate the frame
766 /* Check the frame count fits the count field */
772 /* Check the frame identifiers are incremented correctly,
789 /* Start of packet, validate the frame header */
813 struct ring_frame *frame;
828 frame = tb_ring_poll(net->rx_ring.ring);
829 if (!frame)
832 dma_unmap_page(dma_dev, frame->buffer_phy,
835 tf = container_of(frame, typeof(*tf), frame);
1005 * total frame count and sync the frames for DMA.
1013 frames[i]->frame.buffer_phy,
1066 /* First frame was headers, rest of the frames contain data.
1067 * Calculate checksum over each frame.
1087 dma_sync_single_for_device(dma_dev, frames[i]->frame.buffer_phy,
1134 /* If overall packet is bigger than the frame data size */
1145 * full frame size then break and go to
1146 * next frame
1189 frames[frame_index]->frame.size = data_len + sizeof(*hdr);
1191 /* In case the remaining data_len is smaller than a frame */
1219 tb_ring_tx(net->tx_ring.ring, &frames[i]->frame);
1318 * frames (maximum payload size of each frame is 4084 bytes) and