Lines Matching +full:frame +full:- +full:number

1 /* SPDX-License-Identifier: GPL-2.0 */
40 * enum tb_security_level - Thunderbolt security level
58 * struct tb - main thunderbolt bus structure
67 * @index: Linux assigned domain number
69 * @nboot_acl: Number of boot ACLs the domain supports
94 return (link - 1) / TB_LINKS_PER_PHY_PORT; in tb_phy_port_from_link()
98 * struct tb_property_dir - XDomain property directory
120 * struct tb_property - XDomain property
171 * struct tb_xdomain - Cross-domain (XDomain) connection
195 * @uuid_retries: Number of times left @remote_uuid is requested before
198 * @properties_retries: Number of times left to read properties
201 * @properties_changed_retries: Number of times left to send properties
211 * non-standard properties but they need hold @lock when doing so
258 mutex_lock(&tb->lock); in tb_xdomain_find_by_uuid_locked()
260 mutex_unlock(&tb->lock); in tb_xdomain_find_by_uuid_locked()
270 mutex_lock(&tb->lock); in tb_xdomain_find_by_route_locked()
272 mutex_unlock(&tb->lock); in tb_xdomain_find_by_route_locked()
280 get_device(&xd->dev); in tb_xdomain_get()
287 put_device(&xd->dev); in tb_xdomain_put()
292 return dev->type == &tb_xdomain_type; in tb_is_xdomain()
311 * tb_protocol_handler - Protocol specific handler
339 * struct tb_service - Thunderbolt service
365 get_device(&svc->dev); in tb_service_get()
372 put_device(&svc->dev); in tb_service_put()
377 return dev->type == &tb_service_type; in tb_is_service()
388 * tb_service_driver - Thunderbolt service driver
414 return dev_get_drvdata(&svc->dev); in tb_service_get_drvdata()
419 dev_set_drvdata(&svc->dev, data); in tb_service_set_drvdata()
424 return tb_to_xdomain(svc->dev.parent); in tb_service_parent()
428 * struct tb_nhi - thunderbolt native host interface
436 * @msix_ida: Used to allocate MSI-X vectors for rings
440 * MSI-X is used.
441 * @hop_count: Number of rings (end point hops) supported by NHI.
457 * struct tb_ring - thunderbolt TX or RX ring associated with a NHI
459 * nhi->lock.
471 * @irq: MSI-X irq number if the ring uses MSI-X. %0 otherwise.
472 * @vector: MSI-X vector number the ring uses (only set if @irq is > 0)
474 * @sof_mask: Bit mask used to detect start of frame PDF
475 * @eof_mask: Bit mask used to detect end of frame PDF
505 /* Configure the ring to be in frame mode */
512 * enum ring_desc_flags - Flags for DMA ring descriptor
514 * %RING_DESC_CRC_ERROR: In frame mode CRC check failed for the frame (Rx only)
530 * struct ring_frame - For use with ring_rx/ring_tx
531 * @buffer_phy: DMA mapped address of the frame
532 * @callback: Callback called when the frame is finished (optional)
533 * @list: Frame is linked to a queue using this
534 * @size: Size of the frame in bytes (%0 means %4096)
535 * @flags: Flags for the frame (see &enum ring_desc_flags)
536 * @eof: End of frame protocol defined field
537 * @sof: Start of frame protocol defined field
561 int __tb_ring_enqueue(struct tb_ring *ring, struct ring_frame *frame);
564 * tb_ring_rx() - enqueue a frame on an RX ring
565 * @ring: Ring to enqueue the frame
566 * @frame: Frame to enqueue
568 * @frame->buffer, @frame->buffer_phy have to be set. The buffer must
571 * @frame->callback will be invoked with @frame->size, @frame->flags,
572 * @frame->eof, @frame->sof set once the frame has been received.
575 * @frame->callback will be called with canceled set to true.
577 * Return: Returns %-ESHUTDOWN if ring_stop has been called. Zero otherwise.
579 static inline int tb_ring_rx(struct tb_ring *ring, struct ring_frame *frame) in tb_ring_rx() argument
581 WARN_ON(ring->is_tx); in tb_ring_rx()
582 return __tb_ring_enqueue(ring, frame); in tb_ring_rx()
586 * tb_ring_tx() - enqueue a frame on an TX ring
587 * @ring: Ring the enqueue the frame
588 * @frame: Frame to enqueue
590 * @frame->buffer, @frame->buffer_phy, @frame->size, @frame->eof and
591 * @frame->sof have to be set.
593 * @frame->callback will be invoked with once the frame has been transmitted.
595 * If ring_stop() is called after the packet has been enqueued @frame->callback
598 * Return: Returns %-ESHUTDOWN if ring_stop has been called. Zero otherwise.
600 static inline int tb_ring_tx(struct tb_ring *ring, struct ring_frame *frame) in tb_ring_tx() argument
602 WARN_ON(!ring->is_tx); in tb_ring_tx()
603 return __tb_ring_enqueue(ring, frame); in tb_ring_tx()
611 * tb_ring_dma_device() - Return device used for DMA mapping
619 return &ring->nhi->pdev->dev; in tb_ring_dma_device()