scsi和光驱,硬盘,u盘都有关啊

[    2.313370] scsi 0:0:0:0: CD-ROM            PLDS     DVD-RW DS8A8SH   KL31 PQ: 0 ANSI: 5
[    2.337554] usb 4-1: New USB device found, idVendor=17ef, idProduct=602d
[    2.337566] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.337576] usb 4-1: Product: Lenovo Black Silk USB Keyboard
[    2.337584] usb 4-1: Manufacturer: Lenovo
[    2.339011] sr 0:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[    2.339019] cdrom: Uniform CD-ROM driver Revision: 3.20
[    2.339312] sr 0:0:0:0: Attached scsi CD-ROM sr0
[    2.339437] sr 0:0:0:0: Attached scsi generic sg0 type 5

[    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



你可能感兴趣的:(内核编译)