STRUCT SSH_PTL(9)
โจ NAME โจ
okay bestie, welcome to struct ssh_ptl(9) โ the SSH packet transport layer from the Kernel API Manual. This is the whole struct tour, and we're gonna hit every field like it's a group chat roll call. ๐
โจ
๐ธ SYNOPSIS ๐ธ
Here's the struct in all her glory, no edits, no cap:
struct ssh_ptl {
struct serdev_device *serdev;
unsigned long state;
struct {
spinlock_t lock;
struct list_head head;
} queue;
struct {
spinlock_t lock;
struct list_head head;
atomic_t count;
} pending;
struct {
atomic_t running;
struct task_struct *thread;
struct completion thread_cplt_tx;
struct completion thread_cplt_pkt;
struct wait_queue_head packet_wq;
} tx;
struct {
struct task_struct *thread;
struct wait_queue_head wq;
struct kfifo fifo;
struct sshp_buf buf;
struct {
u16 seqs[8];
u16 offset;
} blocked;
} rx;
struct {
spinlock_t lock;
ktime_t timeout;
ktime_t expires;
struct delayed_work reaper;
} rtx_timeout;
struct ssh_ptl_ops ops;
};
๐ซถ Members ๐ซถ
serdevโstruct serdev_device *: the serial device providing the underlying data transport. she's literally the plug. ๐stateโunsigned long: state(-flags) of the transport layer. ๐ฆqueueโ packet submission queue. ๐ฌqueue.lockโspinlock_t: lock for modifying the packet submission queue.queue.headโstruct list_head: list-head of the packet submission queue.
pendingโ set/list of pending packets. ๐๏ธpending.lockโspinlock_t: lock for modifying the pending set.pending.headโstruct list_head: list-head of the pending set/list.pending.countโatomic_t: number of currently pending packets.
txโ transmitter subsystem. ๐คtx.runningโatomic_t: flag indicating the (desired) transmitter thread state.tx.threadโstruct task_struct *: transmitter thread.tx.thread_cplt_txโstruct completion: completion for transmitter thread waiting on transfer.tx.thread_cplt_pktโstruct completion: completion for transmitter thread waiting on packets.tx.packet_wqโstruct wait_queue_head: waitqueue-head for packet transmit completion.
rxโ receiver subsystem. ๐ฅrx.threadโstruct task_struct *: receiver thread.rx.wqโstruct wait_queue_head: waitqueue-head for receiver thread.rx.fifoโstruct kfifo: buffer for receiving data/pushing data to receiver thread.rx.bufโstruct sshp_buf: buffer for evaluating data on receiver thread.rx.blockedโ list of recent/blocked sequence IDs to detect retransmission. ๐ซrx.blocked.seqsโu16 seqs[8]: array of blocked sequence IDs.rx.blocked.offsetโu16 offset: offset indicating where a new ID should be inserted.
rtx_timeoutโ retransmission timeout subsystem. โฐrtx_timeout.lockโspinlock_t: lock for modifying the retransmission timeout reaper.rtx_timeout.timeoutโktime_t: timeout interval for retransmission.rtx_timeout.expiresโktime_t: time specifying when the reaper work is next scheduled.rtx_timeout.reaperโstruct delayed_work: work performing timeout checks and subsequent actions.
opsโstruct ssh_ptl_ops: packet layer operations. ๐
๐ฎ SEE ALSO ๐ฎ
- Kernel file
./drivers/platform/surface/aggregator/ssh_packet_layer.h enum ssh_ptl_state_flags(9)struct ssh_ptl_ops(9)ssh_ptl_get_device(9)ssh_ptl_tx_wakeup_transfer(9)
and that's the whole vibe, bestie โ every member checked off, no cap. ๐ source/version: ./drivers/platform/surface/agg...; date: October 2026. struct ssh_ptl(9) signing off. ๐
๐
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms