STRUCT FW_CDEV_GET_INFO(9)
π STRUCT FW_CDEV_GET_INFO(9) π
okay bestie, welcome to struct fw_cdev_get_info β the general purpose information ioctl for FireWire character devices, and honestly? it's giving first-day-of-school energy. it's the manual page, the manual name is struct fw_cdev_get_info(9), and yes we're gonna get into it. π
β¨ SYNOPSIS β¨
so the struct itself is literally this, no cap, copy it exactly:
struct fw_cdev_get_info {
__u32 version;
__u32 rom_length;
__u64 rom;
__u64 bus_reset;
__u64 bus_reset_closure;
__u32 card;
};
πΈ Members πΈ
bestie these are the fields, and every single one matters, ok? π
versionβ so this one is just a running serial number, but plot twist: it's both an input parameter (the ABI version implemented by the client) and an output parameter (the ABI version implemented by the kernel). a client shall fill in the ABI version that the client was implemented for β this is necessary for forward compatibility. so yeah, don't skip it, it's important iykyk β¨rom_lengthβ ifromis non-zero, then up torom_lengthbytes of Configuration ROM get copied into that user space address. and in either case,rom_lengthis updated with the actual length of the Configuration ROM. so it comes back changed no matter what πromβ if non-zero, this is the address of a buffer to be filled by a copy of the device's Configuration ROM π¦bus_resetβ if non-zero, it's the address of a buffer to be filled by astruct fw_cdev_event_bus_resetwith the current state of the bus. important: this does not cause a bus reset to happen. it's just reading the vibe check, not starting drama πbus_reset_closureβ the value ofclosurein this and subsequent bus reset events πcardβ the index of the card this device belongs to π₯
π Description π
okay so the FW_CDEV_IOC_GET_INFO ioctl is usually the very first one a client performs right after it opened a /dev/fw* file. main character behavior honestly, it's the intro scene π«Ά
and as a side effect β yes, side effects, we love those β reception of FW_CDEV_EVENT_BUS_RESET events to be read by read(2) is started by this ioctl. so this one call is lowkey opening the door for the events to come through β
π SEE ALSO π
Kernel file ./include/uapi/linux/firewire-cdev.h 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_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_send_phy_packet(9), struct fw_cdev_receive_phy_packets(9)
and that's the whole page bestie, you ate that π this lil gem lives in ./include/uapi/linux, and it's dated October 2026 β so yeah, mark your calendar, this is struct fw_cdev_get_info(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