[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2020-06-12 Thread Kristijan Žic 
I experience this issue on Ubuntu 20.04 $neofetch OS: Ubuntu 20.04 LTS x86_64 Kernel: 5.4.0-37-generic Uptime: 2 mins Packages: 2210 (dpkg), 36 (flatpak), 32 (snap) Shell: bash 5.0.16 Resolution: 1920x1200, 1680x1050 DE: GNOME WM: Mutter WM Theme: Adwaita Theme: Adwaita-dark [GTK2/3]

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-07-24 Thread Brad Figg
** Tags added: ubuntu-certified -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives Status in linux package in

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-07-08 Thread Kai-Heng Feng
No I think you did everything right. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives Status in linux package

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-07-05 Thread Michał Wadowski
I'm not familiar with kernel mailing list so I don't know why my patch was ignored. Maybe format of email was not proper, or I send wrong recipients. I also updated the patch, so I attach the latest version. ** Patch added: "0001-Fix-for-initialize-drives-not-capable-to-handle-maxi.patch"

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-06-23 Thread Michał Wadowski
Yes, I have sent the patch, but until today no one answered -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-06-23 Thread Kai-Heng Feng
Have you sent the patch upstream? -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives Status in linux package in

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-17 Thread Michał Wadowski
I tuned a little a previous patch ** Patch added: "0001-Fix-for-initialize-drives-not-capable-to-handle-maxi.patch" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+attachment/5264605/+files/0001-Fix-for-initialize-drives-not-capable-to-handle-maxi.patch -- You received this

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-16 Thread David Milburn
Yes, it may also be good to test on different configurations, the original patch fixed hotplug related problem where 6Gps drives connected back at lower speeds. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu.

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-16 Thread Michał Wadowski
There is patch to issue I described above ** Patch added: "0001-libata-Fix-for-initialize-drives-not-capable-to-hand.patch" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+attachment/5264201/+files/0001-libata-Fix-for-initialize-drives-not-capable-to-hand.patch -- You

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-16 Thread Michał Wadowski
Maybe this conversation should be moved to Linux linux-ide mailing list. There is some technical decisions to make and may it's better to consult it with other developers. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu.

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-16 Thread Michał Wadowski
Ok, I find out what happens. While standard SATA setup, chain of functions is called: ... -> ata_eh_recover -> ata_eh_reset. If SATA is not initialized, then hard reset is performed (function ata_do_reset() ). In both drivers I have, function ata_do_reset() returns 0, even if after this reset

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-15 Thread Michał Wadowski
No, my device doesn't work with 6Gbps. In kernel 4.14 if my drive was offline, function sata_down_spd_limit() cut down link->sata_spd_limit to 1, so it corresponds to 1.5Gbps, and was working. But it wasn't even try to set limit to 3Gbps. In my device, unfortunately mask and link->sata_spd_limit

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-15 Thread David Milburn
I not sure upstream will let us change the value of mask. Will you get the same result of you set sata_spd_limit? link->sata_spd_limit = 0x7 I believe that corresponds to 6Gbps but I don't see a #define we can use. Also, is the comment accurate? Before you started debugging did you see a hard

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-15 Thread Michał Wadowski
I think that I fixed second part of my issue. I modified patch 0001-libata-sata_down_spd_limit-should-record-link- speed-.patch ** Patch added: "0001-libata-sata_down_spd_limit-should-record-link-speed-.patch"

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-14 Thread Michał Wadowski
I can split my issue into two cases: 1. My HDD inside DVD enclosure is not discovered. Then I have to reset stata device 3 or 4 times by "echo "- - -" > /sys/class/scsi_host/host1/scan" command 2. After stata resets, function sata_down_spd_limit() is called. * In Linux 4.14 this function set

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-14 Thread Michał Wadowski
I forgot to say that even on Linux 4.14 I have to execute manually script while booting: echo "- - -" > /sys/class/scsi_host/host1/scan So, only after this reset sata my laptop can see external HDD. Since Linux 4.15 resetting has no effect. I am analyzing how libata setup is working, so I will

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-10 Thread David Milburn
Ok thanks, please look at this some more, I will try to get back with you soon. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-07 Thread Michał Wadowski
Unfortunately patch "0001-libata-sata_down_spd_limit-should-record-link- speed-.patch" don't work. Here is my dmesg dump with proposed debug info https://paste.ubuntu.com/p/vxTM3jdMv9/ I'm not familiar with libata and sata_down_spd_limit function, but "return -EINVAL;" spoils functionality for

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-05-07 Thread Michał Wadowski
Hi! I have similar issue as described in topic. I have two drives, one primary SSD and second HDD inside DVD enclosure. Both drives works fine until kernel version 4.15.0-rc4 (exact commit

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2019-01-22 Thread Joseph Salisbury
** Changed in: linux (Ubuntu Cosmic) Status: In Progress => Confirmed ** Changed in: linux (Ubuntu Bionic) Status: In Progress => Confirmed ** Changed in: linux (Ubuntu) Status: In Progress => Confirmed ** Changed in: linux (Ubuntu Cosmic) Assignee: Joseph Salisbury

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-09-11 Thread Joseph Salisbury
I built a test kernel with the patch from David posted in comment #21. The test kernel can be downloaded from: http://kernel.ubuntu.com/~jsalisbury/lp1783906 Can you test this kernel and see if it resolves this bug? Note about installing test kernels: • If the test kernel is prior to

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-09-06 Thread Ubuntu Foundations Team Bug Bot
** Tags added: patch -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives Status in linux package in Ubuntu: In

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-09-06 Thread David Milburn
Hi, May I ask for one more test? Looking at the code some more, I don't think I can just remove the return. The root of the problem is hard reset fails and sata_link_hardreset() is never able to reconfigure the speed. This patch sets link->sata_spd_limit before returning, I have been testing

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-30 Thread David Milburn
Hi, I think the fix is removing the "return" and letting the code fall through in sata_down_spd_limit(). Please give me some time to review the latest log, and I will need to reconfigure a couple of local systems and re-test with that change. Thanks. -- You received this bug notification

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-29 Thread danieru
Here's dmesg with #33~lp1783906DEBUGv2: https://paste.ubuntu.com/p/jK6zjKjtqc/ I expected this to have the bug and only print additional debug info, but it seems this fix the bug. The second drive (WDC) came up and I could mount it's partitions and read info from them. Just to make sure, I did

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-29 Thread Joseph Salisbury
I built a second test kernel with additional debug output as requested by David. This kernel also has the two lines removed request by David. Can you test this kernel and post your syslog or dmesg output? The test kernel can be downloaded from: http://kernel.ubuntu.com/~jsalisbury/lp1783906 --

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-29 Thread Joseph Salisbury
Thanks for the response, David! Correct the print for the mask came after those 2 lines of code. Here is the snippet: /* unconditionally mask off the highest bit */ bit = fls(mask) - 1; mask &= ~(1 << bit); /* Debug added for lp1783906: */ dump_stack();

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-29 Thread Joseph Salisbury
I'll build another test kernel with you're suggestions and ask @danieru to test. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-24 Thread David Milburn
Hi Joe, The original intent of the patch was not forcing a 6Gbs drive down to 1.5Gbs after hotplug. Noting, SSTATUS = 275 = 0x113 = 0001 0001 0011 That corresponds to ACTIVE PM STATE | GEN1 SPEED | DEVICE DETECTED spd = 1 (corresponds to 1.5Gbps) One question, the print for mask came after

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-24 Thread David Milburn
Ok, thanks, please let me look through the output. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives Status in

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-23 Thread danieru
Here's dmesg with 4.15.0-30-generic #33~lp1783906DEBUG running for 10 mins: https://paste.ubuntu.com/p/Qc9Kpb62ch/ -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-13 Thread Joseph Salisbury
I built a test kernel with debug output as requested by upstream. Can you test this kernel and post your syslog or dmesg output? The test kernel can be downloaded from: http://kernel.ubuntu.com/~jsalisbury/lp1783906 This kernel should exhibit the bug, but will write to syslog with output like:

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-08-10 Thread David Milburn
Hi Joe, Can we put some debug in sata_down_spd_limit() and see some of the values for spdlimit, sstatus, spd, mask, right before the change to not force the mask. Also, can we track the exact path of calling sata_down_spd_limit(). The the intent of the patch was not to force the speed down

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-07-30 Thread danieru
Your test kernel with commit 2dc0b46b5ea3 does indeed fix the issue with the WD HDD. Here's the dmesg with your test kernel: https://paste.ubuntu.com/p/745NscYFJh/ As you can see at the top i was using: "[0.00] Linux version 4.15.0-29-generic (root@kathleen) (gcc version 7.3.0 (Ubuntu

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-07-30 Thread Joseph Salisbury
Commit 2dc0b46b5ea3 in v4.15-rc4 looks like it could be related. I built a Bionic test kernel with this commit reverted. The test kernel can be downloaded from: http://kernel.ubuntu.com/~jsalisbury/lp1783906 Can you test this kernel and see if it resolves this bug? Thanks in advance! Note

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-07-30 Thread Joseph Salisbury
Thanks for the testing. I'll review the commits between -rc3 and -rc4. If nothing sticks out, I'll start a kernel bisect a build a test kernel. ** Also affects: linux (Ubuntu Cosmic) Importance: Medium Status: Confirmed ** Also affects: linux (Ubuntu Bionic) Importance: Undecided

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-07-27 Thread danieru
I went ahead and test this bug from linux 4.15rc1 and up to linux 4.15rc5. What i found is that linux 4.15rc3 is the last RC version where this bug doesn't occur, and linux 4.15rc4 is the first RC version where this bug occur. Here's the dmesg with linux 4.15rc3 and the WD HDD working:

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-07-27 Thread danieru
I first experienced this issue while testing the second beta of ubuntu 18.04, as i explained in the original bug report this issue doesn't happen if i use linux 4.14 I've installed linux 4.18rc6 as explained in the wiki, but the WD HDD still won't come up. Here's the dmesg with this kernel:

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-07-27 Thread Joseph Salisbury
Did this issue start happening after an update/upgrade? Was there a prior kernel version where you were not having this particular problem? Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.18

[Kernel-packages] [Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives

2018-07-26 Thread danieru
I forgot to mention the Western Digital hard drive has always been slow to actually show up, and I’ve always gotten those "COMRESET failed, link is slow to respond" messages since I bought it. And two details I forgot to mention about the hard drives: 1 The Toshiba hard drive that works is