为什么插入 SD 卡读卡器时 Linux 会加载红外驱动程序?

为什么插入 SD 卡读卡器时 Linux 会加载红外驱动程序?

我有一个Modecom CR-202读卡器。内部是 Realtek (VID=0bda,PID=0161)。

这个硬件和 IR 有什么关系?看看 dmesg 输出的中间部分。

[Fri May 31 12:25:09 2013] -  usb 4-5: new high-speed USB device number 2 using ehci_hcd
[Fri May 31 12:25:09 2013] -  usb 4-5: New USB device found, idVendor=0bda, idProduct=0161
[Fri May 31 12:25:09 2013] -  usb 4-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Fri May 31 12:25:09 2013] -  usb 4-5: Product: USB2.0-CRW
[Fri May 31 12:25:09 2013] -  usb 4-5: Manufacturer: Generic
[Fri May 31 12:25:09 2013] -  usb 4-5: SerialNumber: 20070818000000000
[Fri May 31 12:25:09 2013] -  Initializing USB Mass Storage driver...
[Fri May 31 12:25:09 2013] -  scsi6 : usb-storage 4-5:1.1
[Fri May 31 12:25:09 2013] -  usbcore: registered new interface driver usb-storage
[Fri May 31 12:25:09 2013] -  USB Mass Storage support registered.
[Fri May 31 12:25:09 2013] -  usbcore: registered new interface driver mceusb
[Fri May 31 12:25:09 2013] -  IR NEC protocol handler initialized
[Fri May 31 12:25:09 2013] -  IR RC5(x) protocol handler initialized
[Fri May 31 12:25:09 2013] -  IR RC6 protocol handler initialized
[Fri May 31 12:25:09 2013] -  IR JVC protocol handler initialized
[Fri May 31 12:25:09 2013] -  IR Sony protocol handler initialized
[Fri May 31 12:25:09 2013] -  IR MCE Keyboard/mouse protocol handler initialized
[Fri May 31 12:25:09 2013] -  lirc_dev: IR Remote Control driver registered, major 249 
[Fri May 31 12:25:09 2013] -  IR LIRC bridge handler initialized
[Fri May 31 12:25:10 2013] -  scsi 6:0:0:0: Direct-Access     Generic- Compact Flash    1.00 PQ: 0 ANSI: 0 CCS
[Fri May 31 12:25:10 2013] -  scsi 6:0:0:1: Direct-Access     Generic- SM/xD-Picture    1.00 PQ: 0 ANSI: 0 CCS
[Fri May 31 12:25:10 2013] -  scsi 6:0:0:2: Direct-Access     Generic- SD/MMC           1.00 PQ: 0 ANSI: 0 CCS
[Fri May 31 12:25:10 2013] -  scsi 6:0:0:3: Direct-Access     Generic- MS/MS-Pro        1.00 PQ: 0 ANSI: 0 CCS
[Fri May 31 12:25:10 2013] -  sd 6:0:0:0: Attached scsi generic sg2 type 0
[Fri May 31 12:25:10 2013] -  sd 6:0:0:1: Attached scsi generic sg3 type 0
[Fri May 31 12:25:10 2013] -  sd 6:0:0:2: Attached scsi generic sg4 type 0
[Fri May 31 12:25:10 2013] -  sd 6:0:0:3: Attached scsi generic sg5 type 0
[Fri May 31 12:25:11 2013] -  sd 6:0:0:0: [sdc] Attached SCSI removable disk
[Fri May 31 12:25:11 2013] -  sd 6:0:0:3: [sdf] Attached SCSI removable disk
[Fri May 31 12:25:11 2013] -  sd 6:0:0:1: [sdd] Attached SCSI removable disk
[Fri May 31 12:25:11 2013] -  sd 6:0:0:2: [sde] Attached SCSI removable disk

答案1

显然,至少有一些由 USB ID 标识的设备0bda:0161具有红外接口。例如,此邮件列表发布指的是一些“带有 MCE 遥控器、前置 USB 和 sd/cf/sim 读卡器的 realtek 智能卡读卡器”,在输出中显示lsusb -vv为:

Bus 001 Device 005: ID 0bda:0161 Realtek Semiconductor Corp. Mass Storage Device
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x0161 Mass Storage Device
  bcdDevice           61.10
  iManufacturer           1 Generic
  iProduct                2 USB2.0-CRW
  iSerial                 3 20070818000000000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          139
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          4 CARD READER
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass        11 Chip/SmartCard
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              6 Smart Card Reader Interface
      ChipCard Interface Descriptor:
        bLength                54
        bDescriptorType        33
        bcdCCID              1.10  (Warning: Only accurate for version 1.0)
        nMaxSlotIndex           0
        bVoltageSupport         7  5.0V 3.0V 1.8V 
        dwProtocols             3  T=0 T=1
        dwDefaultClock       3750
        dwMaxiumumClock      7500
        bNumClockSupported      0
        dwDataRate          10080 bps
        dwMaxDataRate      312500 bps
        bNumDataRatesSupp.      0
        dwMaxIFSD             254
        dwSyncProtocols  00000000 
        dwMechanical     00000000 
        dwFeatures       00010030
          Auto clock change
          Auto baud rate change
          TPDU level exchange
        dwMaxCCIDMsgLen       271
        bClassGetResponse      00
        bClassEnvelope         00
        wlcdLayout           none
        bPINSupport             0 
        bMaxCCIDBusySlots       1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              5 Bulk-In, Bulk-Out, Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              7 eHome Infrared Receiver   
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x07  EP 7 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

该设备上有三个接口:智能卡读卡器(用于SIM卡)、大容量存储器(用于闪存卡)和“eHome红外接收器”。

您的设备可能使用相同的芯片,但制造商未连接红外部分。

相关内容