Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] esata hotplug not recognized no device node created
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Tue Sep 01, 2020 12:22 pm    Post subject: [solved] esata hotplug not recognized no device node created Reply with quote

I'm facing problems when powering up my external drives for backup.
For that i use an external bay (icybox/dock) where one can easily switch drives. I used the eSata connector for that to avoid the usb-bridge controller (which would limit drive size).
This worked well the past years. Since some days i no longer get the kernel event entries in dmesg which indicate a new drive is recognized and what was the assigned device node (e.g. /dev/sdh) if i power on the bay+drive.
So the kernel seems not to regonize them any more.

As this was happening with two different external bays and multiple drives i had the suspicion that the controller was not ok.
Interestingly if i have them powered on during boot they are recognized fine and ok till i power them off. After another power-up they are not picked up any more again.
Of course i don't want to reboot my server just to connect in my backup drives.

I now added a additional controller with eSata ports (ASM 1601) - no change - also works during boot but not if powered up during operation.
Furthermore i booted and older kernel (5.6.10 from may and 5.4.6 from dez 19) but also there no luck - also with 5.4.60 which i rebuild based of an old config from 5.3 line.

As everything is recognized fine in bios / when available during boot i'm curious what i can do to narrow it down?
Two controllers, three different eSata cables, multiple drives, two different bays and all was ok some weeks ago (not sure what changed or what could influence at that level)

Next i took the drive & bay and connected it to an sata port with a sata-esata cable on my workstation (which has no esata)
There i could see it detected after issuing
Quote:

echo 0 0 0 | tee /sys/class/scsi_host/host*/scan

This also does not help on the affected machine.

Also all SATA controllers are in AHCI mode
Quote:
lspci -k | grep SATA -A2

00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 06)
Subsystem: Micro-Star International Co., Ltd. [MSI] 5 Series/3400 Series Chipset 6 port SATA AHCI Controller
Kernel driver in use: ahci
02:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
Subsystem: ASMedia Technology Inc. ASM1062 Serial ATA Controller
Kernel driver in use: ahci
03:00.0 SATA controller: JMicron Technology Corp. JMB363 SATA/IDE Controller (rev 03)
Subsystem: Micro-Star International Co., Ltd. [MSI] JMB363 SATA/IDE Controller
Kernel driver in use: ahci
03:00.1 IDE interface: JMicron Technology Corp. JMB363 SATA/IDE Controller (rev 03)
Subsystem: Micro-Star International Co., Ltd. [MSI] JMB363 SATA/IDE Controller
Kernel driver in use: pata_jmicron


In my kernel (5.8.5 gentoo-sources) i have the following active for SATA and AHCI
Quote:

CONFIG_SATA_HOST=y
CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=y
CONFIG_SATA_MOBILE_LPM_POLICY=0


What could be checked? Any powermgt parameters, any specific hotplug enable parameter i'm not aware off?
Where there changes that might require that hotplug capable devices need to be marked somehow?


[edit 1]
after booting with active power on one external disk i did first part of a backup to a disk (ST3000DM001) umounted and suspended via hdparm. Powered off the bay replaced the disk and repowered it.
This time the change was recognized - it seems it still suspected the old disk somehow as there is this model number mismatch showing.
Quote:

[ 1303.747281] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1303.748862] ata8.00: configured for UDMA/133
[ 1337.578270] ata8: SATA link down (SStatus 0 SControl 300)
[ 1350.057299] ata8: softreset failed (device not ready)
[ 1358.268484] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1358.268678] ata8.00: model number mismatch 'ST3000DM001-1CH166' != 'HGST HDN726060ALE614'
[ 1358.268680] ata8.00: revalidation failed (errno=-19)
[ 1364.084689] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1364.087478] ata8.00: model number mismatch 'ST3000DM001-1CH166' != 'HGST HDN726060ALE614'
[ 1364.087482] ata8.00: revalidation failed (errno=-19)
[ 1364.087484] ata8.00: disabled
[ 1369.716820] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1369.732524] ata8.00: ATA-9: HGST HDN726060ALE614, APGNW7JH, max UDMA/133
[ 1369.732528] ata8.00: 11721045168 sectors, multi 0: LBA48 NCQ (depth 32), AA
[ 1369.740322] ata8.00: configured for UDMA/133
[ 1369.742544] sd 7:0:0:0: rejecting I/O to offline device
[ 1369.742580] ata8.00: detaching (SCSI 7:0:0:0)
[ 1369.743047] sd 7:0:0:0: [sdf] Synchronizing SCSI cache
[ 1369.743324] sd 7:0:0:0: [sdf] Stopping disk
[ 1371.180793] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1373.583959] ata8.00: configured for UDMA/133
[ 1373.586405] scsi 7:0:0:0: Direct-Access ATA HGST HDN726060AL W7JH PQ: 0 ANSI: 5
[ 1373.586935] sd 7:0:0:0: Attached scsi generic sg6 type 0
[ 1373.587069] sd 7:0:0:0: [sdf] 11721045168 512-byte logical blocks: (6.00 TB/5.46 TiB)
[ 1373.587075] sd 7:0:0:0: [sdf] 4096-byte physical blocks
[ 1373.587114] sd 7:0:0:0: [sdf] Write Protect is off
[ 1373.587119] sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
[ 1373.587183] sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1373.649062] sd 7:0:0:0: [sdf] Attached SCSI disk


Then i did my backup to that disk without problems as well.
I again did umount, put disk to sleep and powered off the bay. Waited 2 min. Then swapped disk and powered on.
Now i see that disk is removed and shows ata8 being detached.
After that it does not pick up anything on that connection any more
Quote:

2599.672085] ata8: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2602.395455] ata8.00: configured for UDMA/133
[ 2650.311862] ata8: SATA link down (SStatus 0 SControl 300)
[ 2655.735768] ata8: SATA link down (SStatus 0 SControl 300)
[ 2661.368147] ata8: SATA link down (SStatus 0 SControl 300)
[ 2661.368158] ata8.00: disabled
[ 2661.368205] ata8.00: detaching (SCSI 7:0:0:0)
[ 2661.369011] sd 7:0:0:0: [sdf] Synchronizing SCSI cache
[ 2661.369045] sd 7:0:0:0: [sdf] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 2661.369047] sd 7:0:0:0: [sdf] Stopping disk
[ 2661.369056] sd 7:0:0:0: [sdf] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK


If i rescan again with
"echo 0 0 0 | tee /sys/class/scsi_host/host*/scan"
ata8 is not recognized.
Quote:

[ 3034.736534] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 3034.859621] ata1.00: configured for UDMA/100
[ 3035.504330] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3035.517568] ata2.00: configured for UDMA/133
[ 3035.824586] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3035.826588] ata3.00: supports DRM functions and may not be fully accessible
[ 3035.827059] ata3.00: NCQ Send/Recv Log not supported
[ 3035.827677] ata3.00: supports DRM functions and may not be fully accessible
[ 3035.828083] ata3.00: NCQ Send/Recv Log not supported
[ 3035.828571] ata3.00: configured for UDMA/133
[ 3036.144401] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3036.145643] ata4.00: configured for UDMA/133
[ 3036.456628] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3037.379898] ata5.00: configured for UDMA/133
[ 3037.688311] ata6: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 3037.691591] ata6.00: configured for UDMA/133
[ 3038.154029] ata10: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 3038.155287] ata10.00: configured for UDMA/133


Last edited by s|mon on Tue Sep 15, 2020 12:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Tue Sep 08, 2020 4:19 pm    Post subject: Reply with quote

Tested with another cable. No luck. When i plug in on the same bay the usb-cable the disk is recognized and a device node is created for it - but with esata no entry at all.
So it seems to be
- eSata connection works when available during boot till power off for more than some seconds.
- usb works but i can not use it due to the bridge chip being limited to 2TB drives.

I assume it is not a problem with udev as it would still expect at least some entry appearing in dmesg when plugged in, correct?
I'm not aware of any specific hotplug setting in bios - nor would i remember changing sth. like that but i'll double check.

What confuses me most is that it is with more then one drivebay and all are working during boot. Not sure if it can be that they all have the same failure only affecting sth. related to hotplug on different controllers.

Kernel command line is
Quote:
Command line: BOOT_IMAGE=/kernel-5.8.5 root=/dev/sdb2 ro scsi_mod.use_blk_mq=1

Which i see no hint on disabling of hotplug?

Any further advice - is there sth. related to kernel tracing one would advice to check (never done that). I would not mind replacing the bay - but given that two differnt bays are not working i fear it might not be the faulting piece.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46364
Location: 56N 3W

PostPosted: Tue Sep 08, 2020 4:31 pm    Post subject: Reply with quote

s|mon,

Does sys-apps/rescan-scsi-bus help?
It should not be needed because SATA is hotplug by design.
Some early SATA chipsets had broken hotplug support.

Does your USB bridge really have a 2TB limit?
To get past 137Mb, it must support 48 bit LBA, that's all that matters to the kernel.

2TiB is a DOS disk label limit.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Tue Sep 08, 2020 5:37 pm    Post subject: Reply with quote

Hi NeddySeagoon,

On rescan-scsi-bus: unfortunately not - just tested with it.
The weirdest thing is that i needed not to scan for the past years at all it just worked fine - which hinted to a hardware issue (after i reverted back to older kernels as well). But having tested now 2 different bays (and one very old) i got doubts.
I get another icybox to test in the next days to test one more.

Regarding the 2 TB limit: I'm not sure if it is 2 TB or what exactly. I just plugged in a 6 TB disk and the dmesg output states
Quote:
[Sep 8 19:31] usb 2-1.1: new high-speed USB device number 6 using ehci-pci
[ +0,079541] usb 2-1.1: New USB device found, idVendor=13fd, idProduct=1340, bcdDevice= 2.10
[ +0,000007] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000005] usb 2-1.1: Product: External
[ +0,000003] usb 2-1.1: Manufacturer: Generic
[ +0,000004] usb 2-1.1: SerialNumber: 4E414855414A585920202020
[ +0,000539] usb-storage 2-1.1:1.0: USB Mass Storage device detected
[ +0,000253] scsi host12: usb-storage 2-1.1:1.0
[ +1,037362] scsi 12:0:0:0: Direct-Access Generic External 2.10 PQ: 0 ANSI: 4
[ +0,000368] sd 12:0:0:0: Attached scsi generic sg6 type 0
[ +0,001350] sd 12:0:0:0: [sdf] 3131110576 512-byte logical blocks: (1.60 TB/1.46 TiB)


which is not matching. So there is some limit in that chip.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46364
Location: 56N 3W

PostPosted: Tue Sep 08, 2020 7:01 pm    Post subject: Reply with quote

s|mon,

That looks about right for the bottom 32 bits of the 48bit LBA count.
Without the top 16 bits,the block count wraps at 2TiB. 5.46TiB would be about right for a 6TB drive.
Its been around for a while. smartmontools got support for that USB bridge chip in April 2009.

Has the eSATA port got disabled in the BIOS ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Wed Sep 09, 2020 6:10 am    Post subject: Reply with quote

The eSata port in Bios is active and set to AHCI.

Also the additional controller card is shown before grub and if sth. is connected powered on, lists the devices.
Devices are recognized fine. After power off they of course are removed but with repowering not newly recognized no matter how long i wait.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4891
Location: Dallas area

PostPosted: Wed Sep 09, 2020 9:32 am    Post subject: Reply with quote

If you plug in your device to the esata port after you've booted, can you hear the drive spin up? Or is getting power at all. If the external case has it's own power supply make sure you're getting the right current, hdd's need both 5v and 12v IIRC or the drive won't spin up and be recognized.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Wed Sep 09, 2020 10:31 am    Post subject: Reply with quote

Power is ok and drive is spinning. Both trays have external power supplies and are spinning up.
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Sun Sep 13, 2020 3:05 pm    Post subject: works on old ubuntu boot disk Reply with quote

Got another external bay which did not change the situation. Same behaviour.
I got some usb stick with ubuntu 19.10 installation media on it.
If i boot from there hotplug works fine.


E.g. dmesg shows that when i power up the disk
Quote:
[Sep13 14:35] ata11: softreset failed (1st FIS failed)
[ +0.872012] ata11: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ +0.001237] ata11.00: ATA-9: ST3000DM001-1CH166, CC29, max UDMA/133
[ +0.000003] ata11.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 32), AA
[ +0.001090] ata11.00: configured for UDMA/133
[ +0.000229] scsi 10:0:0:0: Direct-Access ATA ST3000DM001-1CH1 CC29 PQ: 0 ANSI: 5
[ +0.000483] sd 10:0:0:0: [sdh] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[ +0.000004] sd 10:0:0:0: [sdh] 4096-byte physical blocks
[ +0.000033] sd 10:0:0:0: [sdh] Write Protect is off
[ +0.000005] sd 10:0:0:0: [sdh] Mode Sense: 00 3a 00 00
[ +0.000056] sd 10:0:0:0: [sdh] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ +0.004201] sd 10:0:0:0: Attached scsi generic sg10 type 0
[ +0.017744] sd 10:0:0:0: [sdh] Attached SCSI disk
[ +1.610974] ata10: softreset failed (device not ready)
[ +8.143986] ata10: SATA link up 6.0 Gbps (SStatus 133 SControl 300)


So i think it can exclude a hardware issue with high confidence for now.
Next guess would be kernel as it is already not showing entries in dmesg which would speak against userspace or udev if my knowledge is correct.
What would be odd (but not impossible) is that if i had some missconfiguration in my kernel.config which i applied to all kernel versions and which would only affect hotplug.

Any hints on kernel config or parameters that could influence such things - so only affecting hotplug but not regular detection or operation?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4891
Location: Dallas area

PostPosted: Sun Sep 13, 2020 4:03 pm    Post subject: Reply with quote

If ubuntu works, then see what the config looks like on that system.

What is the motherboard?

Edit to add: I suppose the chipset might have been altered with some type quirks applied in the kernel, if nothing else, might check it out, you'll need vendor/product id for searching kernel code.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Sun Sep 13, 2020 5:37 pm    Post subject: Reply with quote

Mainboard is a: MSI H57M-ED65 (and in addition i added for testing a controller with ASMEDIA ASM1061)

i tried to check config of ubuntu vs mine. Ubuntu config has of course a lot of modules whereas i usually compile things into directly.

Config=y from ubuntu for *ATA*
Quote:

CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_SOCK_CGROUP_DATA=y
CONFIG_SYSTEM_DATA_VERIFICATION=y
CONFIG_RELOCATABLE=y
CONFIG_ATARI_PARTITION=y
CONFIG_PADATA=y
CONFIG_MTD_DATAFLASH_OTP=y
CONFIG_SCSI_SAS_ATA=y
CONFIG_ATA=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_ACPI=y
CONFIG_SATA_ZPODD=y
CONFIG_SATA_PMP=y
CONFIG_ATA_SFF=y
CONFIG_ATA_BMDMA=y
CONFIG_ATA_PIIX=y
CONFIG_SATA_DWC_OLD_DMA=y
CONFIG_PATA_SIS=y
CONFIG_ATA_GENERIC=y
CONFIG_WILINK_PLATFORM_DATA=y
CONFIG_IPMI_PLAT_DATA=y


vs mine
Quote:
CONFIG_SYSTEM_DATA_VERIFICATION=y
CONFIG_RELOCATABLE=y
CONFIG_ATA=y
CONFIG_SATA_HOST=y
CONFIG_PATA_TIMINGS=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_FORCE=y
CONFIG_ATA_ACPI=y
CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=y
CONFIG_SATA_MOBILE_LPM_POLICY=0
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_ATA_SFF=y
CONFIG_ATA_BMDMA=y
CONFIG_ATA_PIIX=y
CONFIG_PATA_JMICRON=y
CONFIG_PATA_OLDPIIX=y
CONFIG_PATA_SCH=y
CONFIG_PATA_ACPI=y
CONFIG_ATA_GENERIC=y


and in addition loaded modules from ubuntu

Quote:
Module Size Used by
zfs 3604480 6
zunicode 331776 1 zfs
zavl 16384 1 zfs
icp 286720 1 zfs
zlua 147456 1 zfs
zcommon 86016 1 zfs
znvpair 81920 2 zfs,zcommon
spl 122880 5 zfs,icp,znvpair,zcommon,zavl
snd_hda_codec_hdmi 61440 1
snd_hda_codec_realtek 114688 1
snd_hda_codec_generic 81920 1 snd_hda_codec_realtek
ledtrig_audio 16384 2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_intel 49152 2
snd_hda_codec 131072 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core 90112 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep 20480 1 snd_hda_codec
snd_pcm 106496 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
intel_powerclamp 20480 0
coretemp 20480 0
kvm_intel 278528 0
snd_seq_midi 20480 0
snd_seq_midi_event 16384 1 snd_seq_midi
kvm 643072 1 kvm_intel
irqbypass 16384 1 kvm
snd_rawmidi 36864 1 snd_seq_midi
intel_cstate 20480 0
input_leds 16384 0
serio_raw 20480 0
snd_seq 69632 2 snd_seq_midi,snd_seq_midi_event
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer 36864 2 snd_seq,snd_pcm
snd 86016 15 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
mei_me 40960 0
soundcore 16384 1 snd
mei 110592 1 mei_me
mac_hid 16384 0
sch_fq_codel 20480 2
parport_pc 40960 0
ppdev 24576 0
lp 20480 0
parport 53248 3 parport_pc,lp,ppdev
ip_tables 32768 0
x_tables 40960 1 ip_tables
autofs4 45056 2
overlay 114688 1
nls_utf8 16384 1
isofs 49152 1
dm_mirror 24576 0
dm_region_hash 20480 1 dm_mirror
dm_log 20480 2 dm_region_hash,dm_mirror
pata_acpi 16384 0
hid_generic 16384 0
usbhid 57344 0
hid 126976 2 usbhid,hid_generic
uas 24576 0
usb_storage 77824 3 uas
crct10dif_pclmul 16384 1
crc32_pclmul 16384 0
ghash_clmulni_intel 16384 0
i915 1945600 10
aesni_intel 372736 0
video 49152 1 i915
i2c_algo_bit 16384 1 i915
gpio_ich 16384 0
drm_kms_helper 184320 1 i915
aes_x86_64 20480 1 aesni_intel
crypto_simd 16384 1 aesni_intel
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
cryptd 24576 2 crypto_simd,ghash_clmulni_intel
fb_sys_fops 16384 1 drm_kms_helper
glue_helper 16384 1 aesni_intel
psmouse 155648 0
mxm_wmi 16384 0
firewire_ohci 40960 0
drm 491520 5 drm_kms_helper,i915
i2c_i801 32768 0
lpc_ich 24576 0
r8169 81920 0
firewire_core 65536 1 firewire_ohci
ahci 40960 1
crc_itu_t 16384 1 firewire_core
realtek 20480 1
libahci 32768 1 ahci
pata_jmicron 16384 0
wmi 32768 1 mxm_wmi



from where i do not make out an obvious candidate - will need to wait for a quiet day for testing a new kernel.

Regarding the hint to search for vendor ID quirks i have two questions:
1. Would i find these IDs in the lspci output (e.g. in my top post).
2. And then start with grep on kernel source filtered by quirks or how would one start there (just a rough guide as i have never searched much besides existing diffs on kernel sources)

Thanks!
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4891
Location: Dallas area

PostPosted: Sun Sep 13, 2020 5:45 pm    Post subject: Reply with quote

lspci -nnk will give you the product/vendor id

It will look something like this
Code:
05:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)
   Subsystem: ASUSTeK Computer Inc. I211 Gigabit Network Connection [1043:85f0]
   Kernel driver in use: igb
   Kernel modules: igb


The 8086:1539 is the vendor/product id, or at least that's what you'd search for.
Me, I'd search on the vendor id first (8086) and then if found look to see if the product id (1539) shows.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46364
Location: 56N 3W

PostPosted: Sun Sep 13, 2020 9:14 pm    Post subject: Reply with quote

s|mon,

Building on Anon-E-mooses example, put
Code:
8086:1539 pci linux
into google.
Hopefully, one of the top hits is Linux Kernel Driver DataBase on cateee.net

The vendor and device ID work with USB too, so you need to tell google if you want USB or PCI results.

Once you have the symbol name, use the search in menuconfig.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Mon Sep 14, 2020 7:15 am    Post subject: Reply with quote

lspci for SATA would be

Code:
00:1f.2 SATA controller [0106]: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller [8086:3b22] (rev 06)
        Subsystem: Micro-Star International Co., Ltd. [MSI] 5 Series/3400 Series Chipset 6 port SATA AHCI Controller [1462:7587]
        Kernel driver in use: ahci
02:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01)
        Subsystem: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:1060]
        Kernel driver in use: ahci
03:00.0 SATA controller [0106]: JMicron Technology Corp. JMB363 SATA/IDE Controller [197b:2363] (rev 03)
        Subsystem: Micro-Star International Co., Ltd. [MSI] JMB363 SATA/IDE Controller [1462:7587]
        Kernel driver in use: ahci


That would be the following for "197b:2363 pci linux" for my onboard eSata which results in
https://cateee.net/lkddb/web-lkddb/BLK_DEV_JMICRON.html - which is in the deprecated ATA part - gave it a try to test but did not make a difference.
https://cateee.net/lkddb/web-lkddb/PATA_JMICRON.html - was already activated.

For the intel and asm ones i only find the generic sata support https://cateee.net/lkddb/web-lkddb/SATA_AHCI.html
Quote:
vendor: 1b21 ("ASMedia Technology Inc."), device: 0612 ("ASM1062 Serial ATA Controller")
vendor: 8086 ("Intel Corporation"), device: 3b22 ("5 Series/3400 Series Chipset 6 port SATA AHCI Controller")


As devices attached are working i guess the config to enable support in general is ok. Question would be how to search for quirks - which are not bound to one chip (as both the JMB and the ASM are affected).

Being not sure where to start that with kernel code i guess i'll try to take a vanilla kernel from the same series as used in the old ubuntu with my config and/or with the generic ubuntu config once and test that.
Thanks for the support so far. I am still quite confused on what the cause can be. So thanks for any further hints.

Code tags added to preserve formatting -- NeddySeagoon
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4891
Location: Dallas area

PostPosted: Mon Sep 14, 2020 10:01 am    Post subject: Reply with quote

If there is code to handle quirks, the file name will usually reflect this.

Code:
$ find /usr/src/linux/ -print|grep -i quirks
/usr/src/linux/arch/arm/mach-davinci/pdata-quirks.c
/usr/src/linux/arch/arm/mach-omap2/pdata-quirks.c
/usr/src/linux/arch/x86/kernel/early-quirks.c
/usr/src/linux/arch/x86/kernel/platform-quirks.c
/usr/src/linux/arch/x86/kernel/quirks.c
/usr/src/linux/arch/x86/platform/efi/quirks.c
/usr/src/linux/drivers/gpu/drm/drm_panel_orientation_quirks.c
/usr/src/linux/drivers/gpu/drm/i915/display/intel_quirks.c
/usr/src/linux/drivers/gpu/drm/i915/display/intel_quirks.h
/usr/src/linux/drivers/hid/hid-quirks.c
/usr/src/linux/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c
/usr/src/linux/drivers/iommu/amd/quirks.c
/usr/src/linux/drivers/mmc/core/quirks.h
/usr/src/linux/drivers/pci/quirks.c
/usr/src/linux/drivers/pnp/quirks.c
/usr/src/linux/drivers/scsi/ufs/ufs_quirks.h
/usr/src/linux/drivers/usb/core/quirks.c
/usr/src/linux/drivers/usb/host/pci-quirks.c
/usr/src/linux/drivers/usb/host/pci-quirks.h
/usr/src/linux/drivers/xen/xen-pciback/conf_space_quirks.c
/usr/src/linux/drivers/xen/xen-pciback/conf_space_quirks.h
/usr/src/linux/include/linux/usb/quirks.h
/usr/src/linux/include/config/drm/panel/orientation/quirks.h
/usr/src/linux/include/config/pci/quirks.h
/usr/src/linux/sound/soc/intel/common/soc-intel-quirks.h
/usr/src/linux/sound/usb/mixer_quirks.c
/usr/src/linux/sound/usb/mixer_quirks.h
/usr/src/linux/sound/usb/quirks-table.h
/usr/src/linux/sound/usb/quirks.c
/usr/src/linux/sound/usb/quirks.h


I would imagine that ubuntu (that works) is probably doing some type of reset on the esata port, so that unplug/plug works properly.
You might check and see if there are some udev rules on ubuntu that aren't in gentoo.
_________________
PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie & modified) amd64-no-multilib, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46364
Location: 56N 3W

PostPosted: Mon Sep 14, 2020 10:15 am    Post subject: Reply with quote

s|mon,

Which chipset is the eSATA port attched to?

dmesg will tell.
On Gentoo, connect a HDD and boot that way, so we cas see that HDD come up.
On Ubuntu, connect the HDD once its booted.
We need all of dmesg on a pastebin. Comparing the two might be useful too.

For a wild guess
Try AHCI PLATFORM SUPPORT and PORT MULTIPLIER support. OK, that's two guesses :)
That's from memory, so the kernel symbol names won't be right.

You usually get quirks for free, there is nothing to configure.

-- edit --

Reading between the lines.
Code:
03:00.0 SATA controller [0106]: JMicron Technology Corp. JMB363 SATA/IDE Controller [197b:2363] (rev 03)
        Subsystem: Micro-Star International Co., Ltd. [MSI] JMB363 SATA/IDE Controller [1462:7587]
        Kernel driver in use: ahci

The ahci driver looks wrong.
PATA_JMICRON should drive the PATA and SATA parts of that chip.
Which driver does Ubuntu use there?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Mon Sep 14, 2020 12:58 pm    Post subject: Reply with quote

Hi, here the two dmesg outputs:

dmesg ubuntu - after two esata devices are powered up

gentoo-kernel-5.8.5 - with both esata device powered since boot
[edit: added 2nd dmesg without legacy ata see remark below]
gentoo-kernel-5-8-5 - with both esata devices powered and no legacy ata


ST3000DM001-1CH1 is on the esata port of the asm chip.
HGST HDN726060AL is connected to the onboard chip (JMB363 with AHCI)

Both guesses where already set:
Quote:
CONFIG_SATA_AHCI_PLATFORM=y
CONFIG_SATA_PMP=y


regarding your assumption of PATA vs AHCI - there is also a IDE interface for the JMB363 active - need to see if that is using the same driver in ubuntu
Quote:
03:00.0 SATA controller [0106]: JMicron Technology Corp. JMB363 SATA/IDE Controller [197b:2363] (rev 03)
Subsystem: Micro-Star International Co., Ltd. [MSI] JMB363 SATA/IDE Controller [1462:7587]
Kernel driver in use: ahci
03:00.1 IDE interface [0101]: JMicron Technology Corp. JMB363 SATA/IDE Controller [197b:2363] (rev 03)
Subsystem: Micro-Star International Co., Ltd. [MSI] JMB363 SATA/IDE Controller [1462:7587]
Kernel driver in use: JMicron IDE
Kernel modules: ide_pci_generic


i always thought that ahci would be correct for sata devices and IDE would be only for the IDE ports i still have on that board (e.g. optical drives connected).

I now see two obvious differences regarding jmicron - i need to check if this due to me reactivating legacy for BLK_DEV_JMICRON during testing earlier today or what you hinted that it should use pata_jmicron (which is also yes in my kernel - so i guess i need to be sure it is also used?)

Quote:
ubuntu
[ 0.917763] scsi host0: pata_jmicron
[ 0.918662] scsi host1: pata_jmicron

Quote:
gentoo
[ 0.832473] jmicron 0000:03:00.1: IDE controller (0x197b:0x2363 rev 0x03)
[ 0.832562] jmicron 0000:03:00.1: 100% native mode on irq 17


[edit: tested again without legacy ata - now also gentoo uses pata_jmicron (see 3rd pastebin)]
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 157
Location: Bayern [de]

PostPosted: Tue Sep 15, 2020 12:32 pm    Post subject: Solved - power management on SATA prevents hotplug Reply with quote

I found the reason: SATA power management was active due to powertop settings which prevents hotplug to work for eSata or i guess sata in general.

Tested now with disabling all sata related toggles in powertop and once with boot without powertop settings to be called - in both cases all drives/bays where recogniced immediately.

I'm not sure which exact toggle is causing the problem (pm for controller or link power management or sth else) - will need some time to check that.

Thanks again to everyone for their ideas and suggestions. It really helped me going with the investigations.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum