static int __init init_scsi (void)
{
int error;
Error = Scsi_init_queue ();
if (Error)
return error;
Error = SCSI_INIT_PROCFS ();
if (Error)
Goto Cleanup_queue;
Error = Scsi_init_devinfo ();
if (Error)
Goto CLEANUP_PROCFS;
Error = Scsi_init_hosts ();
if (Error)
Goto Cleanup_devlist;
Error = Scsi_init_sysctl ();
if (Error)
Goto cleanup_hosts;
Error = Scsi_sysfs_register ();
if (Error)
Goto Cleanup_sysctl;
Scsi_netlink_init ();
PRINTK (Kern_notice "SCSI Subsystem initialized\n");
return 0;
Cleanup_sysctl:
Scsi_exit_sysctl ();
Cleanup_hosts:
Scsi_exit_hosts ();
Cleanup_devlist:
Scsi_exit_devinfo ();
CLEANUP_PROCFS:
Scsi_exit_procfs ();
Cleanup_queue:
Scsi_exit_queue ();
PRINTK (kern_err "SCSI subsystem failed to initialize, error =%d\n",
-ERROR);
return error;
}
[0.260628] SCSI subsystem initialized
[0.260660] libata version 3.00 loaded.
Ata/libata-core.c
static int __init ata_init (void)
{
int RC;
Ata_parse_force_param ();
rc = Ata_sff_init ();
if (RC) {
Kfree (ATA_FORCE_TBL);
return RC;
}
Libata_transport_init ();
Ata_scsi_transport_template = Ata_attach_transport ();
if (!ata_scsi_transport_template) {
Ata_sff_exit ();
rc =-enomem;
Goto Err_out;
}
PRINTK (Kern_debug "libata version" Drv_version "loaded.\n");
return 0;
Err_out:
return RC;
}
Initialization of Linux-initiated SCSI and ATA