dc395x_init_one(9)
π dc395x_init_one(9) β the Kernel API Manual glow-up β¨
ok so picture this: we're in the dc395x SCSI driver, and this little function is the meet-cute between the kernel and one single adapter instance. it's giving "first day of school" energy, except the school is the PCI subsystem and the new kid is a SCSI card. she's the main character and this is her intro arc π
β¨ NAME β¨
dc395x_init_one β literally just: initialise one (1) single instance of the adapter. that's it. that's the whole job. no cap π
πΈ SYNOPSIS πΈ
int dc395x_init_one (struct pci_dev *dev , const struct pci_device_id *id );
π¦ ARGUMENTS π¦
devβ the PCI device we're supposed to initialize. this is the one, bestie. the actual card. the whole reason we're here π«Άidβ ok so this one looks like a pointer to the entry in our pci device table that was actually matched by the PCI subsystem. like the match that made this whole thing happen. it's giving "how we met" story π
π DESCRIPTION π
okay so here's the vibe: the PCI layer is gonna call this thing once for each instance of the adapter that it finds lurking in the system. so if you've got multiple cards, she gets multiple calls. no shortcuts, no "just do it once and call it a day" β one call per instance, periodt π
and the pci_dev structure? that's how we know which instance we're being called from. it's the caller ID, basically. you pick up and go "oh hey, it's you" β¨
returns 0 on success π β¦ or an error code (that's a negative one, hence the -ve notation) on failure π so yeah, check your return values, bestie, that's the whole game.
π SEE ALSO π
the kernel file ./drivers/scsi/dc395x.c has a whole friend group and honestly we gotta shout out every single one of them, so buckle up bestie, here's the roster π:
set_safe_settings(9)fix_settings(9)eeprom_index_to_delay(9)delay_to_eeprom_index(9)eeprom_override(9)dc395x_queue_command_lck(9)dc395x_handle_interrupt(9)device_alloc(9)adapter_add_device(9)adapter_remove_device(9)adapter_remove_and_free_device(9)adapter_remove_and_free_all_devices(9)dc395x_sdev_init(9)dc395x_sdev_destroy(9)trms1040_wait_30us(9)trms1040_write_cmd(9)trms1040_set_data(9)trms1040_write_all(9)trms1040_get_data(9)trms1040_read_all(9)check_eeprom(9)print_eeprom_settings(9)adapter_print_config(9)adapter_init_params(9)adapter_init_scsi_host(9)adapter_init_chip(9)adapter_init(9)adapter_uninit_chip(9)adapter_uninit(9)dc395x_remove_one(9)
like, that's a lot of cousins, but we love them all equally π§ and yeah β dc395x_remove_one(9) is the one who shows up at the end to say goodbye. iconic symmetry, honestly.
and that's the page!! mwah π this came from the ./drivers/scsi section, dated October 2026, and it's filed under dc395x_init_one(9) β go forth and initialise responsibly, bestie π
π¦ 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