STRUCT FALCON_SPI_DEVICE(9)
β¨ NAME β¨
struct falcon_spi_device β okay bestie, this is literally a Falcon SPI (Serial Peripheral Interface) device π like, the whole lil' descriptor for one SPI chip hanging off the controller. We're in the Kernel API Manual today, so buckle up π
π¦ SYNOPSIS π¦
Here's the glow-up, the actual struct, no cap:
struct falcon_spi_device {
int device_id;
unsigned int size;
unsigned int addr_len;
unsigned int munge_address:1;
u8 erase_command;
unsigned int erase_size;
unsigned int block_size;
};
Seven fields. Every single one matters. Let's go π«Ά
π Members π
device_idβ the controller's own id for this device, iykyk. That's the controller's id for the device, fr fr.sizeβ the size, in bytes π plain and simple.addr_lenβ how many address bytes show up in the read/write commands. Count them, bestie.munge_addressβ a 1-bit flag asking: should addresses get munged? π Some devices with 9-bit addresses (the example the docs give is theAT25040AEEPROM) use bit 3 of the command byte as address bit A8, instead of doing a whole two-byte address situation. So if this flag is set, then commands should be munged in this way. Iconic little hack, honestly β¨erase_commandβ the erase command itself, or0if sector erase isn't needed. Zero means "not today" πerase_sizeβ erase sector size, in bytes. Erase commands affect sectors with this size and alignment. This must be a power of two. Not optional, bestie, the kernel will not be cute about it πblock_sizeβ write block size, in bytes. Write commands are limited to blocks with this size and alignment. Respect the blocks π§
π SEE ALSO π
Peep the kernel file ./drivers/net/ethernet/sfc/falcon/nic.h π and also go say hi to:
struct falcon_board_type(9)struct falcon_board(9)struct falcon_nic_data(9)
And that's the whole page, bestie! π This one lives in ./drivers/net/ethernet/sfc/falcon, dated October 2026, and it's filed under struct falcon_spi_device(9) β so when you need it again you know exactly where to look πβπ
π¦ 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