Lines Matching refs:frame
48 * struct thunderbolt_ip_frame_header - Header for each Thunderbolt frame
49 * @frame_size: size of the data with the frame
51 * @frame_id: ID of the frame to match frames to specific packet
54 * Each data frame passed to the high-speed DMA ring has this header. If
134 struct ring_frame frame;
168 * @rx_hdr: Copy of the currently processed Rx frame. Used when a
318 return tf->frame.size ? : TBNET_FRAME_SIZE;
345 if (tf->frame.buffer_phy)
346 dma_unmap_page(dma_dev, tf->frame.buffer_phy, size,
481 * ThunderboltIP frame (4kB) and the additional room for
497 tf->frame.buffer_phy = dma_addr;
500 tb_ring_rx(ring->ring, &tf->frame);
525 tf->frame.size = 0;
527 dma_sync_single_for_cpu(dma_dev, tf->frame.buffer_phy,
533 static void tbnet_tx_callback(struct tb_ring *ring, struct ring_frame *frame,
536 struct tbnet_frame *tf = container_of(frame, typeof(*tf), frame);
572 tf->frame.buffer_phy = dma_addr;
573 tf->frame.callback = tbnet_tx_callback;
574 tf->frame.sof = TBIP_PDF_FRAME_START;
575 tf->frame.eof = TBIP_PDF_FRAME_END;
675 if (tf->frame.flags & RING_DESC_CRC_ERROR) {
678 } else if (tf->frame.flags & RING_DESC_BUFFER_OVERRUN) {
700 /* In case we're in the middle of packet, validate the frame
704 /* Check the frame count fits the count field */
710 /* Check the frame identifiers are incremented correctly,
727 /* Start of packet, validate the frame header */
751 struct ring_frame *frame;
766 frame = tb_ring_poll(net->rx_ring.ring);
767 if (!frame)
770 dma_unmap_page(dma_dev, frame->buffer_phy,
773 tf = container_of(frame, typeof(*tf), frame);
916 * total frame count and sync the frames for DMA.
922 frames[i]->frame.buffer_phy,
975 /* First frame was headers, rest of the frames contain data.
976 * Calculate checksum over each frame.
994 dma_sync_single_for_device(dma_dev, frames[i]->frame.buffer_phy,
1039 /* If overall packet is bigger than the frame data size */
1050 * full frame size then break and go to
1051 * next frame
1094 frames[frame_index]->frame.size = data_len + sizeof(*hdr);
1096 /* In case the remaining data_len is smaller than a frame */
1124 tb_ring_tx(net->tx_ring.ring, &frames[i]->frame);
1220 * frames (maximum payload size of each frame is 4084 bytes) and