STRUCT FW_CDEV_SEND_PHY_PACKET(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct fw_cdev_send_phy_packet(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ β€” yes, that's the manual name, we're in the big-kid kernel docs now, and this particular page is all about one lil struct that yeets a PHY packet across your FireWire card. slay. let's get into it πŸŽ€


✨ NAME ✨

struct fw_cdev_send_phy_packet β€” send a PHY packet πŸ’Œ


🌸 SYNOPSIS 🌸

struct fw_cdev_send_phy_packet {
    __u64 closure;
    __u32 data[2];
    __u32 generation;
 };

lowkey iconic struct, ngl. look at her. 🫢


πŸ¦‹ Members πŸ¦‹

  • closure β€” gets passed right back to you in userspace inside the PHY-packet-sent event. it's giving "return to sender" but make it kernel πŸ’…
  • data β€” the first and second quadlet of the PHY packet. two quadlets, one field, we love a bundle πŸŽ€
  • generation β€” the bus generation where the packet is valid ⭐

πŸ’– Description πŸ’–

so the FW_CDEV_IOC_SEND_PHY_PACKET ioctl sends a PHY packet to all the nodes on the same card as this device. like, everyone on the bus gets it, no gatekeeping πŸ’€

after transmission, either FW_CDEV_EVENT_PHY_PACKET_SENT event or FW_CDEV_EVENT_PHY_PACKET_SENT event is generated. yes. that's literally what the page says. both of them. same name. i'm not fighting the docs, i'm just reporting the news πŸ™ˆ

the payload data shall be specified in host byte order. and β€” okay, quoting the page directly here because this is a whole mood β€” usually, data needs to be the bitwise inverse of data. yes bestie, the field and itself. that's what it says. VersaPHY packets are an exception to this rule, so don't @ me if you're doing VersaPHY things 🌈

⚠️ heads up: the ioctl is only permitted on device files which represent a local node. no local node, no packet. that's the vibe check and you did not pass it 😭

πŸ”₯ SEE ALSO πŸ”₯

the kernel file that started it all: ./include/uapi/linux/firewire-cdev.h β€” and like, the entire friend group 🫢

  • struct fw_cdev_event_common(9)
  • struct fw_cdev_event_bus_reset(9)
  • struct fw_cdev_event_response(9)
  • struct fw_cdev_event_response2(9)
  • struct fw_cdev_event_request(9)
  • struct fw_cdev_event_request2(9)
  • struct fw_cdev_event_request3(9)
  • struct fw_cdev_event_iso_interrupt(9)
  • struct fw_cdev_event_iso_interrupt_mc(9)
  • struct fw_cdev_event_iso_resource(9)
  • struct fw_cdev_event_phy_packet(9)
  • struct fw_cdev_event_phy_packet2(9)
  • union fw_cdev_event(9)
  • struct fw_cdev_get_info(9)
  • struct fw_cdev_send_request(9)
  • struct fw_cdev_send_response(9)
  • struct fw_cdev_allocate(9)
  • struct fw_cdev_deallocate(9)
  • struct fw_cdev_initiate_bus_reset(9)
  • struct fw_cdev_add_descriptor(9)
  • struct fw_cdev_remove_descriptor(9)
  • struct fw_cdev_create_iso_context(9)
  • struct fw_cdev_set_iso_channels(9)
  • struct fw_cdev_iso_packet(9)
  • struct fw_cdev_queue_iso(9)
  • struct fw_cdev_start_iso(9)
  • struct fw_cdev_stop_iso(9)
  • struct fw_cdev_flush_iso(9)
  • struct fw_cdev_get_cycle_timer(9)
  • struct fw_cdev_get_cycle_timer2(9)
  • struct fw_cdev_allocate_iso_resource(9)
  • struct fw_cdev_send_stream_packet(9)
  • struct fw_cdev_receive_phy_packets(9)

and that's the whole page, bestie β€” you ate that πŸ’…

this lil masterpiece lives at ./include/uapi/linux, dated October 2026, and it's filed under struct fw_cd...d_phy_packet(9) (the title got a little truncated on the way in, we still love her πŸŽ€). mwah, go send some PHY packets πŸ¦‹βœ¨πŸ’œ

πŸ“¦ where this page comes from