STRUCT SSH_PTL(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ 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 ๐Ÿ”ฎ


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