Linux MultiMedia Card development
 help / color / mirror / Atom feed
* constant media change events - hardware or driver problem?
@ 2022-10-25 13:36 Andreas Radke
  2022-10-25 16:55 ` Adrian Hunter
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Radke @ 2022-10-25 13:36 UTC (permalink / raw)
  To: linux-mmc; +Cc: adrian.hunter, ulf.hansson

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

My Zotac Ci323 system with builtin sd-card reader keeps firing off
media change events" DISK_MEDIA_CHANGE=1". It may be a driver or
hardware problem and was detected by some systemd changes introduced
between v250 and v251. 
Please have a look at https://github.com/systemd/systemd/issues/25021.

I've already updated to latest Zotac bios 2K210510. There's
currently no related kernel module loaded due to blacklisting
sdhci_pci/sdhci/cqhci/mmc_core modules.

I can stop the mess when inserting an unneeded sd-card into the slot.

lspci -vvs 00:10.0
00:10.0 SD Host controller: Intel Corporation Atom/Celeron/Pentium
Processor x5-E8000/J3xxx/N3xxx Series MMC Controller (rev 21) (prog-if
01) Subsystem: ZOTAC International (MCO) Ltd. Device b301 Control: I/O-
Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR-
FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
>TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line
>Size: 64 bytes Interrupt: pin A routed to IRQ 11
	Region 0: Memory at 81516000 (32-bit, non-prefetchable)
[size=4K] Capabilities: [80] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold-) Status: D0 NoSoftRst+ PME-Enable-
DSel=0 DScale=0 PME- Kernel modules: sdhci_pci

Can you help me to find out if there's something wrong in the linux
kernel / maybe a driver or subsystem bug or if this a hardware issue?

Should I file some kernel bug?

-Andy
Arch linux

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: constant media change events - hardware or driver problem?
  2022-10-25 13:36 constant media change events - hardware or driver problem? Andreas Radke
@ 2022-10-25 16:55 ` Adrian Hunter
  2022-10-25 17:22   ` Andreas Radke
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2022-10-25 16:55 UTC (permalink / raw)
  To: Andreas Radke, linux-mmc; +Cc: ulf.hansson

On 25/10/22 16:36, Andreas Radke wrote:
> My Zotac Ci323 system with builtin sd-card reader keeps firing off
> media change events" DISK_MEDIA_CHANGE=1". It may be a driver or
> hardware problem and was detected by some systemd changes introduced
> between v250 and v251. 
> Please have a look at https://github.com/systemd/systemd/issues/25021.
> 
> I've already updated to latest Zotac bios 2K210510. There's
> currently no related kernel module loaded due to blacklisting
> sdhci_pci/sdhci/cqhci/mmc_core modules.
> 
> I can stop the mess when inserting an unneeded sd-card into the slot.
> 
> lspci -vvs 00:10.0
> 00:10.0 SD Host controller: Intel Corporation Atom/Celeron/Pentium
> Processor x5-E8000/J3xxx/N3xxx Series MMC Controller (rev 21) (prog-if
> 01) Subsystem: ZOTAC International (MCO) Ltd. Device b301 Control: I/O-
> Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR-
> FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
>> TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line
>> Size: 64 bytes Interrupt: pin A routed to IRQ 11
> 	Region 0: Memory at 81516000 (32-bit, non-prefetchable)
> [size=4K] Capabilities: [80] Power Management version 3
> 		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
> PME(D0+,D1-,D2-,D3hot+,D3cold-) Status: D0 NoSoftRst+ PME-Enable-
> DSel=0 DScale=0 PME- Kernel modules: sdhci_pci
> 
> Can you help me to find out if there's something wrong in the linux
> kernel / maybe a driver or subsystem bug or if this a hardware issue?
> 
> Should I file some kernel bug?

I may be misreading this, but the device causing the media change events seems to be:

/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1:1.0/host2/target2:0:0/2:0:0:0/block/sdb

and the driver is ums-realtek which is a USB Storage driver for "Realtek Card Reader support".

In that case it does not involve the kernel mmc subsystem at all.

As you listed above, there is an SD Host controller PCI device 00:10.0.
Is there a reason to think that it is also involved?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: constant media change events - hardware or driver problem?
  2022-10-25 16:55 ` Adrian Hunter
@ 2022-10-25 17:22   ` Andreas Radke
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Radke @ 2022-10-25 17:22 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: linux-mmc, ulf.hansson

[-- Attachment #1: Type: text/plain, Size: 5774 bytes --]

Am Tue, 25 Oct 2022 19:55:03 +0300
schrieb Adrian Hunter <adrian.hunter@intel.com>:

> On 25/10/22 16:36, Andreas Radke wrote:
>  [...]  
>  [...]  
>  [...]  
> 
> I may be misreading this, but the device causing the media change
> events seems to be:
> 
> /devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5.1/1-5.1:1.0/host2/target2:0:0/2:0:0:0/block/sdb
> 
> and the driver is ums-realtek which is a USB Storage driver for
> "Realtek Card Reader support".
> 
> In that case it does not involve the kernel mmc subsystem at all.
> 
> As you listed above, there is an SD Host controller PCI device
> 00:10.0. Is there a reason to think that it is also involved?
> 

lspci
00:00.0 Host bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register (rev 21)
00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21)
00:10.0 SD Host controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series MMC Controller (rev 21)
00:13.0 SATA controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SATA Controller (rev 21)
00:14.0 USB controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller (rev 21)
00:1a.0 Encryption controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine (rev 21)
00:1b.0 Audio device: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller (rev 21)
00:1c.0 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 (rev 21)
00:1c.1 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #2 (rev 21)
00:1c.2 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #3 (rev 21)
00:1c.3 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #4 (rev 21)
00:1f.0 ISA bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU (rev 21)
00:1f.3 SMBus: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller (rev 21)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
04:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)

I had assumed it's the 00:10.0 device behaving weird here. Maybe it's actually the Realtek one here:

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:07dc Intel Corp. Bluetooth wireless interface
Bus 001 Device 003: ID 0bda:0153 Realtek Semiconductor Corp. 3-in-1 (SD/SDHC/SDXC) Card Reader
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

No idea if they interact at all or how it works here. So the faulty device is only this one?

Bus 001 Device 003: ID 0bda:0153 Realtek Semiconductor Corp. 3-in-1 (SD/SDHC/SDXC) Card Reader
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x0153 3-in-1 (SD/SDHC/SDXC) Card Reader
  bcdDevice           57.13
  iManufacturer           1 Generic
  iProduct                2 USB2.0-CRW
  iSerial                 3 20120926571200000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0020
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 CARD READER
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      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
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


Is there anything I can do with some driver or module option of that usb device? 

-Andy

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-25 17:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-25 13:36 constant media change events - hardware or driver problem? Andreas Radke
2022-10-25 16:55 ` Adrian Hunter
2022-10-25 17:22   ` Andreas Radke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox