[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+attachment/5275252/+files/0001-Fix-for-initialize-drives-not-capable-to-handle-maxi.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
Yes, I have sent the patch, but until today no one answered -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 device is not working (like my second drive HDD). There is no sata_down_spd_limit() calls at all. After hard reset second device is not working, and there is no tries to recover that. At first time, or every time when I physically hotplug device, or I call "echo "- - -" > /sys/class/scsi_host/host1/scan", then chain of functions are called: ata_eh_recover -> ata_eh_schedule_probe, and variable trials is increasing. After a few hotplugs, when trials > ATA_EH_PROBE_TRIALS, then sata_down_spd_limit(link, 1) is called and it cuts down SATA bandwidth. After bandwidth limiting, hard reset is performed and then device is working. I think it's wrong behavior when it's try to limit the bandwidth ony after many hotpluging and hard resets. It could try in one ata_eh_recover() call. For my own, I changed a little code of ata_eh_reset() to check if the device is online after reset: rc = ata_do_reset(link, reset, classes, deadline, true); if( ata_link_offline(link) ) rc = -EPIPE; At the bottom of ata_eh_reset(), if rc == -EPIPE, then sata_down_spd_limit() is called and after that. This completely fixes my problem with not working drive. I don't have to manually reconnect device to be working. Only issue is some delay performed before next reset (schedule_timeout_uninterruptible function). Maybe this conversation should be moved to Linux linux-ide mailing list, t -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 is set to INT_MAX, so next bitwise operations doesn't make any sense, because mask is far out of range valid values. Setting link->sata_spd_limit = 0x7 doesn't work (my device is not 6Gbps capable). In patch I cut mask to be not greater than 0x7, not just 0x7. Actually after masking, kernel tries to connect with 3Gbps (mask 0x3) and it succeed. About comment and hard reset. I get your patch and modified it leaving commit message and comment in code untouched. I don't investigate this topic enough. I have to check how working __sata_set_spd_needed() and sata_link_hardreset() functions. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+attachment/5263913/+files/0001-libata-sata_down_spd_limit-should-record-link-speed-.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 up link->sata_spd_limit from value 4294967295 to value 1. After this set up, HDD is discovered and works fine. * Since patch 4.15.0-rc4 value of link->sata_spd_limit is not changed, so HDD is not working at all. Some debug information: Inside function sata_down_spd_limit() is called ata_sstatus_online() and it returns 0 that means link is offline. Value of "link->sata_spd" and "spd" is 0, value of "link->sata_spd_limit" is 4294967295 and value of "bit" is 31. After statement "mask &= ~(1 << bit);" mask is set to 2147483647 Because "spd" is 0, then statement "if (spd > 1)" is not pass and "else return -EINVAL;" is called. Patch "else link->sata_spd_limit = mask;" doesn't work, because mask is 2147483647 and it seems to not be valid value (I think it should be 1, 2, or 4). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 try to fix this issue later. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1524215] Re: Lenovo B50-70 inverted internal microphone
I can confirm that bug still exists in Linux Kernel 5.1.0. I created patch to fix this issue. ** Patch added: "fix_for_lenovo_b50-70_inverted_internal_microphone_bug.patch" https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1524215/+attachment/5262687/+files/fix_for_lenovo_b50-70_inverted_internal_microphone_bug.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1524215 Title: Lenovo B50-70 inverted internal microphone To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1524215/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 me. I tried also "return 0;" instead of "return -EINVAL", but it didn't work either. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1783906] Re: Linux 4.15 and onwards fails to initialize some hard drives
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 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a83cb7e6ada140f8b932c223511f1063c4150870) Removing added "return -EINVAL;" in sata_down_spd_limit function fixes the problem. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1783906 Title: Linux 4.15 and onwards fails to initialize some hard drives To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1783906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs