Bug 121671

Summary: LiteOn PCIe SSD stop (not) working.
Product: IO/Storage Reporter: dgerasimov
Component: Serial ATAAssignee: Tejun Heo (tj)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.19 and up Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg from working debian
journalctl -b working debian
dmesg not working debian
dmesq libata.force=noncq
liteon-max-sec-1024.patch
libata-LITE-ON-CX1-JB256-HP-needs-lower-max_sectors.patch

Description dgerasimov 2016-07-08 07:51:33 UTC
I recently got a HP Z Book 15 g2. That model has two disks, one of them (in my model) is a LiteOn PCIe SSD (Liteon CX1 JB256 HP). 
Current Debian (kernel version 3.16) is working OK with ssd disk, but if I try to install anything else, for example Mint 17.3 (kernel version 3.19)  or latest Ubuntu , ssd disk just disappear. I also tried to update kernel from working Debian , from kernel 3.16 up to the latest kernel from backports repo - same effect, ssd just stop working and disappear from fstab output.

Here some logs from Mint syslog and kern.log http://pastebin.com/uVXpAcEs , http://pastebin.com/bKuVMsJV.

Log when I try to format ssd disk from already installed on other disk Linux - http://pastebin.com/Mxp72tHA.
Comment 1 Tejun Heo 2016-07-12 19:08:54 UTC
Can you please attach full boot kernel message from debian? And if possible the kernel boot log from a non-working distribution? Also, does noncq kernel option help? If not, can you please post the kernel messages w/ the option specified?
Comment 2 dgerasimov 2016-07-13 09:10:53 UTC
Created attachment 223091 [details]
dmesg from working debian
Comment 3 dgerasimov 2016-07-13 09:11:44 UTC
Created attachment 223101 [details]
journalctl -b working debian
Comment 4 dgerasimov 2016-07-13 09:13:13 UTC
Created attachment 223111 [details]
dmesg not working debian

This is dmesg log after kernel update, from 3.16 to 4.6, debian
Comment 5 dgerasimov 2016-07-13 09:15:25 UTC
Created attachment 223121 [details]
dmesq libata.force=noncq

This is with kernel command libata.force=noncq, on updated Debian .
Comment 6 Tejun Heo 2016-07-13 17:33:34 UTC
Created attachment 223651 [details]
liteon-max-sec-1024.patch

Can you please verify whether the attached patch makes any difference? If the patch doesn't make any difference, can you please report the output of "cat /sys/block/sdX/queue/max_sectors_kb" where sdX is the LITEON device?

Thanks.
Comment 7 dgerasimov 2016-07-15 13:20:37 UTC
The LITEON SSD disk works with this patch. Thank You very much. Can you tell me, approximately in witch kernel version this will be fixed ?
Comment 8 Tejun Heo 2016-07-18 22:30:26 UTC
I'll tag the patch for the stable branch, so it should get backported to all applicable kernels.

Thanks.
Comment 9 Tejun Heo 2016-07-18 22:41:32 UTC
Created attachment 224241 [details]
libata-LITE-ON-CX1-JB256-HP-needs-lower-max_sectors.patch

Applying the patch to libata/for-4.7-fixes.

Thanks.