[ 2.339692] scsi 1:0:0:0: Direct-Access ATA WDC WD5000AAKX-0 1H19 PQ: 0 ANSI: 5
[ 2.340064] sd 1:0:0:0: Attached scsi generic sg1 type 0
drivers/scsi/scsi.c
static const char *const scsi_device_types[] = {
"Direct-Access ",
"Sequential-Access",
"Printer ",
"Processor ",
"WORM ",
"CD-ROM ",
"Scanner ",
"Optical Device ",
"Medium Changer ",
"Communications ",
"ASC IT8 ",
"ASC IT8 ",
"RAID ",
"Enclosure ",
"Direct-Access-RBC",
"Optical card ",
"Bridge controller",
"Object storage ",
"Automation/Drive ",
"Security Manager ",
"Direct-Access-ZBC",
};
drivers/scsi/sg.c
sdev_printk(KERN_NOTICE, scsidp, "Attached scsi generic sg%d "
"type %d\n", sdp->index, scsidp->type);
下面是usb键盘的初始化:
drivers/hid/usbhid.c/hid-core.c
#define DRIVER_DESC "USB HID core driver"
static int __init hid_init(void)
{
int retval = -ENOMEM;
retval = usbhid_quirks_init(quirks_param);
if (retval)
goto usbhid_quirks_init_fail;
retval = usb_register(&hid_driver);
if (retval)
goto usb_register_fail;
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n");
return 0;
usb_register_fail:
usbhid_quirks_exit();
usbhid_quirks_init_fail:
return retval;
}
[ 2.716759] usbcore: registered new interface driver usbhid
[ 2.716767] usbhid: USB HID core driver
[ 0.260628] SCSI subsystem initialized
/usr/src/linux-3.18.4/drivers/scsi$ grep -rn "SCSI subsystem initialized"
scsi.c:1402: printk(KERN_NOTICE "SCSI subsystem initialized\n");
匹配到二进制文件 scsi_mod.o
匹配到二进制文件 scsi.o
匹配到二进制文件 built-in.o