All of lore.kernel.org
 help / color / mirror / Atom feed
* How to set DPOFUA=0 ?
@ 2015-12-26  1:25 U.Mutlu
  2015-12-29 11:30 ` U.Mutlu
  2016-01-19 20:50 ` Dmitry Katsubo
  0 siblings, 2 replies; 6+ messages in thread
From: U.Mutlu @ 2015-12-26  1:25 UTC (permalink / raw)
  To: linux-scsi

Hi,
I have got 2 different submodels of the SSD Samsung 850 Evo 500 GB.
The first one has DPOFUA=0, the second one has DPOFUA=1 (see below).
That with DPOFUA=0 works fine, but the other with DPOFUA=1 doesn't work
after mounting; it reports errors and switches to read-only mount.

It seems Linux has a problem with DPOFUA=1, so then IMO best would be to
disable that feature of the device. So, how & where can DPOFUA be set to value 0 ?

Thx


############################################################################
# uname -a
Linux panther 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) 
x86_64 GNU/Linux

############################################################################
Dec 26 00:45:38 panther vmunix: [ 2337.193164] usb 4-1: new SuperSpeed USB 
device number 2 using xhci_hcd
Dec 26 00:45:38 panther vmunix: [ 2337.212852] usb 4-1: New USB device found, 
idVendor=357d, idProduct=7788
Dec 26 00:45:38 panther vmunix: [ 2337.212861] usb 4-1: New USB device 
strings: Mfr=1, Product=2, SerialNumber=3
Dec 26 00:45:38 panther vmunix: [ 2337.212866] usb 4-1: Product: USB to 
ATA/ATAPI Bridge
Dec 26 00:45:38 panther vmunix: [ 2337.212870] usb 4-1: Manufacturer: JMicron
Dec 26 00:45:38 panther vmunix: [ 2337.212874] usb 4-1: SerialNumber: 
321AE8171482926
Dec 26 00:45:38 panther vmunix: [ 2337.245338] usb-storage 4-1:1.0: USB Mass 
Storage device detected
Dec 26 00:45:38 panther vmunix: [ 2337.245591] scsi2 : usb-storage 4-1:1.0
Dec 26 00:45:38 panther vmunix: [ 2337.245770] usbcore: registered new 
interface driver usb-storage
Dec 26 00:45:39 panther vmunix: [ 2338.244729] scsi 2:0:0:0: Direct-Access 
Samsung SSD 850 EVO 500G 0114 PQ: 0 ANSI: 6
Dec 26 00:45:39 panther vmunix: [ 2338.245308] sd 2:0:0:0: Attached scsi 
generic sg2 type 0
Dec 26 00:45:39 panther vmunix: [ 2338.247115] sd 2:0:0:0: [sdb] Spinning up 
disk...
Dec 26 00:45:49 panther vmunix: [ 2339.251034] .........
Dec 26 00:45:52 panther vmunix: [ 2348.278894] ....ready
Dec 26 00:45:52 panther vmunix: [ 2351.288429] sd 2:0:0:0: [sdb] 976773168 
512-byte logical blocks: (500 GB/465 GiB)
Dec 26 00:45:52 panther vmunix: [ 2351.288953] sd 2:0:0:0: [sdb] Write Protect 
is off
Dec 26 00:45:52 panther vmunix: [ 2351.288959] sd 2:0:0:0: [sdb] Mode Sense: 
47 00 10 08
Dec 26 00:45:52 panther vmunix: [ 2351.289447] sd 2:0:0:0: [sdb] Write cache: 
enabled, read cache: enabled, supports DPO and FUA
Dec 26 00:45:52 panther vmunix: [ 2351.293763] sdb: sdb1 sdb2 sdb3
Dec 26 00:45:52 panther vmunix: [ 2351.295862] sd 2:0:0:0: [sdb] Attached SCSI 
disk
Dec 26 00:47:02 panther vmunix: [ 2421.091552] EXT4-fs (sdb1): mounted 
filesystem with ordered data mode. Opts: (null)
Dec 26 00:47:09 panther vmunix: [ 2428.394003] sd 2:0:0:0: [sdb] Invalid 
command failure
Dec 26 00:47:09 panther vmunix: [ 2428.394013] sd 2:0:0:0: [sdb]
Dec 26 00:47:09 panther vmunix: [ 2428.394017] Result: hostbyte=DID_OK 
driverbyte=DRIVER_SENSE
Dec 26 00:47:09 panther vmunix: [ 2428.394021] sd 2:0:0:0: [sdb]
Dec 26 00:47:09 panther vmunix: [ 2428.394024] Sense Key : Illegal Request 
[current]
Dec 26 00:47:09 panther vmunix: [ 2428.394030] sd 2:0:0:0: [sdb]
Dec 26 00:47:09 panther vmunix: [ 2428.394034] Add. Sense: Invalid field in cdb
Dec 26 00:47:09 panther vmunix: [ 2428.394038] sd 2:0:0:0: [sdb] CDB:
Dec 26 00:47:09 panther vmunix: [ 2428.394040] Write(10): 2a 08 02 04 08 20 00 
00 08 00
Dec 26 00:47:09 panther vmunix: [ 2428.394054] end_request: critical target 
error, dev sdb, sector 33818656
Dec 26 00:47:09 panther vmunix: [ 2428.394059] end_request: critical target 
error, dev sdb, sector 33818656
Dec 26 00:47:09 panther vmunix: [ 2428.394120] Aborting journal on device sdb1-8.
Dec 26 00:47:09 panther vmunix: [ 2428.471535] EXT4-fs error (device sdb1): 
ext4_journal_check_start:56: Detected aborted journal
Dec 26 00:47:09 panther vmunix: [ 2428.471547] EXT4-fs (sdb1): Remounting 
filesystem read-only


############################################################################
# sdparm -a --long /dev/sda
     /dev/sda: ATA       Samsung SSD 850   1B6Q
     Direct access device specific parameters: WP=0  DPOFUA=0
Read write error recovery [rw] mode page:
   AWRE        1  [cha: n, def:  1]  Automatic write reallocation enabled
   ARRE        0  [cha: n, def:  0]  Automatic read reallocation enabled
   TB          0  [cha: n, def:  0]  Transfer block
   RC          0  [cha: n, def:  0]  Read continuous
   EER         0  [cha: n, def:  0]  Enable early recovery
   PER         0  [cha: n, def:  0]  Post error
   DTE         0  [cha: n, def:  0]  Data terminate on error
   DCR         0  [cha: n, def:  0]  Disable correction
   RRC         0  [cha: n, def:  0]  Read retry count
   COR_S       0  [cha: n, def:  0]  Correction span (obsolete)
   HOC         0  [cha: n, def:  0]  Head offset count (obsolete)
   DSOC        0  [cha: n, def:  0]  Data strobe offset count (obsolete)
   LBPERE      0  [cha: n, def:  0]  Logical block provisioning error 
reporting enabled
   WRC         0  [cha: n, def:  0]  Write retry count
   RTL         0  [cha: n, def:  0]  Recovery time limit (ms)
Caching (SBC) [ca] mode page:
   IC          0  [cha: n, def:  0]  Initiator control
   ABPF        0  [cha: n, def:  0]  Abort pre-fetch
   CAP         0  [cha: n, def:  0]  Caching analysis permitted
   DISC        0  [cha: n, def:  0]  Discontinuity
   SIZE        0  [cha: n, def:  0]  Size enable
   WCE         1  [cha: y, def:  1]  Write cache enable
   MF          0  [cha: n, def:  0]  Multiplication factor
   RCD         0  [cha: n, def:  0]  Read cache disable
   DRRP        0  [cha: n, def:  0]  Demand read retention priority
   WRP         0  [cha: n, def:  0]  Write retention priority
   DPTL        0  [cha: n, def:  0]  Disable pre-fetch transfer length
   MIPF        0  [cha: n, def:  0]  Minimum pre-fetch
   MAPF        0  [cha: n, def:  0]  Maximum pre-fetch
   MAPFC       0  [cha: n, def:  0]  Maximum pre-fetch ceiling
   FSW         0  [cha: n, def:  0]  Force sequential write
   LBCSS       0  [cha: n, def:  0]  Logical block cache segment size
   DRA         0  [cha: n, def:  0]  Disable read ahead
   SYNC_PROG   0  [cha: n, def:  0]  Synchronous cache progress indication
   NV_DIS      0  [cha: n, def:  0]  Non-volatile cache disable
   NCS         0  [cha: n, def:  0]  Number of cache segments
   CSS         0  [cha: n, def:  0]  Cache segment size
Control [co] mode page:
   TST         0  [cha: n, def:  0]  Task set type
   TMF_ONLY    0  [cha: n, def:  0]  Task management functions only
   DPICZ       0  [cha: n, def:  0]  Disable protection information check if 
protect field zero
   D_SENSE     0  [cha: n, def:  0]  Descriptor format sense data
   GLTSD       1  [cha: n, def:  1]  Global logging target save disable
   RLEC        0  [cha: n, def:  0]  Report log exception condition
   QAM         0  [cha: n, def:  0]  Queue algorithm modifier
   NUAR        0  [cha: n, def:  0]  No unit attention on release
   QERR        0  [cha: n, def:  0]  Queue error management
   RAC         0  [cha: n, def:  0]  Report a check
   UA_INTLCK   0  [cha: n, def:  0]  Unit attention interlocks control
   SWP         0  [cha: n, def:  0]  Software write protect
   ATO         0  [cha: n, def:  0]  Application tag owner
   TAS         0  [cha: n, def:  0]  Task aborted status
   ATMPE       0  [cha: n, def:  0]  Application tag mode page enabled
   RWWP        0  [cha: n, def:  0]  Reject write without protection
   AUTOLOAD    0  [cha: n, def:  0]  Autoload mode
   BTP        -1  [cha: n, def: -1]  Busy timeout period (100us)
   ESTCT      30  [cha: n, def: 30]  Extended self test completion time (sec)


############################################################################
# sdparm -a --long /dev/sdb
     /dev/sdb: Samsung   SSD 850 EVO 500G  0114
     Direct access device specific parameters: WP=0  DPOFUA=1
Caching (SBC) [ca] mode page:
   IC          0  [cha: n, def:  0, sav:  0]  Initiator control
   ABPF        0  [cha: n, def:  0, sav:  0]  Abort pre-fetch
   CAP         0  [cha: n, def:  0, sav:  0]  Caching analysis permitted
   DISC        1  [cha: n, def:  1, sav:  1]  Discontinuity
   SIZE        0  [cha: n, def:  0, sav:  0]  Size enable
   WCE         1  [cha: n, def:  1, sav:  1]  Write cache enable
   MF          0  [cha: n, def:  0, sav:  0]  Multiplication factor
   RCD         0  [cha: n, def:  0, sav:  0]  Read cache disable
   DRRP        0  [cha: n, def:  0, sav:  0]  Demand read retention priority
   WRP         0  [cha: n, def:  0, sav:  0]  Write retention priority
   DPTL       -1  [cha: n, def: -1, sav: -1]  Disable pre-fetch transfer length
   MIPF        0  [cha: n, def:  0, sav:  0]  Minimum pre-fetch
   MAPF       -1  [cha: n, def: -1, sav: -1]  Maximum pre-fetch
   MAPFC      -1  [cha: n, def: -1, sav: -1]  Maximum pre-fetch ceiling
   FSW         0  [cha: n, def:  0, sav:  0]  Force sequential write
   LBCSS       0  [cha: n, def:  0, sav:  0]  Logical block cache segment size
   DRA         0  [cha: n, def:  0, sav:  0]  Disable read ahead
   SYNC_PROG   0  [cha: n, def:  0, sav:  0]  Synchronous cache progress 
indication
   NV_DIS      0  [cha: n, def:  0, sav:  0]  Non-volatile cache disable
   NCS       255  [cha: n, def:255, sav:255]  Number of cache segments
   CSS         0  [cha: n, def:  0, sav:  0]  Cache segment size
Power condition [po] mode page:
   PM_BG       0  [cha: n, def:  0, sav:  0]  Power management, background 
functions, precedence
   STANDBY_Y   0  [cha: n, def:  0, sav:  0]  Standby_y timer enable
   IDLE_C      0  [cha: n, def:  0, sav:  0]  Idle_c timer enable
   IDLE_B      0  [cha: n, def:  0, sav:  0]  Idle_b timer enable
   IDLE        0  [cha: n, def:  0, sav:  0]  Idle_a timer enable
   STANDBY     0  [cha: y, def:  1, sav:  0]  Standby_z timer enable
   ICT         0  [cha: n, def:  0, sav:  0]  Idle_a condition timer (100 ms)
   SCT         0  [cha: y, def:18000, sav:  0]  Standby_z condition timer (100 ms)
   IBCT        0  [cha: n, def:  0, sav:  0]  Idle_b condition timer (100 ms)
   ICCT        0  [cha: n, def:  0, sav:  0]  Idle_c condition timer (100 ms)
   SYCT        0  [cha: n, def:  0, sav:  0]  Standby_y condition timer (100 ms)
   CCF_IDLE    0  [cha: n, def:  0, sav:  0]  check condition on transition 
from idle
   CCF_STAND   0  [cha: n, def:  0, sav:  0]  check condition on transition 
from standby
   CCF_STOPP   0  [cha: n, def:  0, sav:  0]  check condition on transition 
from stopped

############################################################################


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

* Re: How to set DPOFUA=0 ?
  2015-12-26  1:25 How to set DPOFUA=0 ? U.Mutlu
@ 2015-12-29 11:30 ` U.Mutlu
  2015-12-29 11:43   ` Julian Calaby
  2016-01-19 20:50 ` Dmitry Katsubo
  1 sibling, 1 reply; 6+ messages in thread
From: U.Mutlu @ 2015-12-29 11:30 UTC (permalink / raw)
  To: linux-scsi

Solved:

By installing a the latest kernel and headers from Debian backports solved the 
problem:

apt-get -t jessie-backports install linux-image-amd64 linux-headers-amd64

Info about backports configuration:
http://backports.debian.org/Instructions/

# uname -a
Linux panther 4.2.0-0.bpo.1-amd64 #1 SMP Debian 4.2.6-3~bpo8+2 (2015-12-14) 
x86_64 GNU/Linux

After this nigtmare-ish experience I would suggest the debian maintainers
to trash the default jessie kernel 3.16 and replace it with the above
4.2 kernel; otherwise unexperienced users will wonder why their new SSD etc.
isn't working in debian/ubuntu & co., as happened to me... :-(



U.Mutlu wrote on 12/26/2015 02:25 AM:
> Hi,
> I have got 2 different submodels of the SSD Samsung 850 Evo 500 GB.
> The first one has DPOFUA=0, the second one has DPOFUA=1 (see below).
> That with DPOFUA=0 works fine, but the other with DPOFUA=1 doesn't work
> after mounting; it reports errors and switches to read-only mount.
>
> It seems Linux has a problem with DPOFUA=1, so then IMO best would be to
> disable that feature of the device. So, how & where can DPOFUA be set to value
> 0 ?
>
> Thx
>
>
> ############################################################################
> # uname -a
> Linux panther 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14)
> x86_64 GNU/Linux
>
> ############################################################################
> Dec 26 00:45:38 panther vmunix: [ 2337.193164] usb 4-1: new SuperSpeed USB
> device number 2 using xhci_hcd
> Dec 26 00:45:38 panther vmunix: [ 2337.212852] usb 4-1: New USB device found,
> idVendor=357d, idProduct=7788
> Dec 26 00:45:38 panther vmunix: [ 2337.212861] usb 4-1: New USB device
> strings: Mfr=1, Product=2, SerialNumber=3
> Dec 26 00:45:38 panther vmunix: [ 2337.212866] usb 4-1: Product: USB to
> ATA/ATAPI Bridge
> Dec 26 00:45:38 panther vmunix: [ 2337.212870] usb 4-1: Manufacturer: JMicron
> Dec 26 00:45:38 panther vmunix: [ 2337.212874] usb 4-1: SerialNumber:
> 321AE8171482926
> Dec 26 00:45:38 panther vmunix: [ 2337.245338] usb-storage 4-1:1.0: USB Mass
> Storage device detected
> Dec 26 00:45:38 panther vmunix: [ 2337.245591] scsi2 : usb-storage 4-1:1.0
> Dec 26 00:45:38 panther vmunix: [ 2337.245770] usbcore: registered new
> interface driver usb-storage
> Dec 26 00:45:39 panther vmunix: [ 2338.244729] scsi 2:0:0:0: Direct-Access
> Samsung SSD 850 EVO 500G 0114 PQ: 0 ANSI: 6
> Dec 26 00:45:39 panther vmunix: [ 2338.245308] sd 2:0:0:0: Attached scsi
> generic sg2 type 0
> Dec 26 00:45:39 panther vmunix: [ 2338.247115] sd 2:0:0:0: [sdb] Spinning up
> disk...
> Dec 26 00:45:49 panther vmunix: [ 2339.251034] .........
> Dec 26 00:45:52 panther vmunix: [ 2348.278894] ....ready
> Dec 26 00:45:52 panther vmunix: [ 2351.288429] sd 2:0:0:0: [sdb] 976773168
> 512-byte logical blocks: (500 GB/465 GiB)
> Dec 26 00:45:52 panther vmunix: [ 2351.288953] sd 2:0:0:0: [sdb] Write Protect
> is off
> Dec 26 00:45:52 panther vmunix: [ 2351.288959] sd 2:0:0:0: [sdb] Mode Sense:
> 47 00 10 08
> Dec 26 00:45:52 panther vmunix: [ 2351.289447] sd 2:0:0:0: [sdb] Write cache:
> enabled, read cache: enabled, supports DPO and FUA
> Dec 26 00:45:52 panther vmunix: [ 2351.293763] sdb: sdb1 sdb2 sdb3
> Dec 26 00:45:52 panther vmunix: [ 2351.295862] sd 2:0:0:0: [sdb] Attached SCSI
> disk
> Dec 26 00:47:02 panther vmunix: [ 2421.091552] EXT4-fs (sdb1): mounted
> filesystem with ordered data mode. Opts: (null)
> Dec 26 00:47:09 panther vmunix: [ 2428.394003] sd 2:0:0:0: [sdb] Invalid
> command failure
> Dec 26 00:47:09 panther vmunix: [ 2428.394013] sd 2:0:0:0: [sdb]
> Dec 26 00:47:09 panther vmunix: [ 2428.394017] Result: hostbyte=DID_OK
> driverbyte=DRIVER_SENSE
> Dec 26 00:47:09 panther vmunix: [ 2428.394021] sd 2:0:0:0: [sdb]
> Dec 26 00:47:09 panther vmunix: [ 2428.394024] Sense Key : Illegal Request
> [current]
> Dec 26 00:47:09 panther vmunix: [ 2428.394030] sd 2:0:0:0: [sdb]
> Dec 26 00:47:09 panther vmunix: [ 2428.394034] Add. Sense: Invalid field in cdb
> Dec 26 00:47:09 panther vmunix: [ 2428.394038] sd 2:0:0:0: [sdb] CDB:
> Dec 26 00:47:09 panther vmunix: [ 2428.394040] Write(10): 2a 08 02 04 08 20 00
> 00 08 00
> Dec 26 00:47:09 panther vmunix: [ 2428.394054] end_request: critical target
> error, dev sdb, sector 33818656
> Dec 26 00:47:09 panther vmunix: [ 2428.394059] end_request: critical target
> error, dev sdb, sector 33818656
> Dec 26 00:47:09 panther vmunix: [ 2428.394120] Aborting journal on device sdb1-8.
> Dec 26 00:47:09 panther vmunix: [ 2428.471535] EXT4-fs error (device sdb1):
> ext4_journal_check_start:56: Detected aborted journal
> Dec 26 00:47:09 panther vmunix: [ 2428.471547] EXT4-fs (sdb1): Remounting
> filesystem read-only
>
>
> ############################################################################
> # sdparm -a --long /dev/sda
>      /dev/sda: ATA       Samsung SSD 850   1B6Q
>      Direct access device specific parameters: WP=0  DPOFUA=0
> Read write error recovery [rw] mode page:
>    AWRE        1  [cha: n, def:  1]  Automatic write reallocation enabled
>    ARRE        0  [cha: n, def:  0]  Automatic read reallocation enabled
>    TB          0  [cha: n, def:  0]  Transfer block
>    RC          0  [cha: n, def:  0]  Read continuous
>    EER         0  [cha: n, def:  0]  Enable early recovery
>    PER         0  [cha: n, def:  0]  Post error
>    DTE         0  [cha: n, def:  0]  Data terminate on error
>    DCR         0  [cha: n, def:  0]  Disable correction
>    RRC         0  [cha: n, def:  0]  Read retry count
>    COR_S       0  [cha: n, def:  0]  Correction span (obsolete)
>    HOC         0  [cha: n, def:  0]  Head offset count (obsolete)
>    DSOC        0  [cha: n, def:  0]  Data strobe offset count (obsolete)
>    LBPERE      0  [cha: n, def:  0]  Logical block provisioning error
> reporting enabled
>    WRC         0  [cha: n, def:  0]  Write retry count
>    RTL         0  [cha: n, def:  0]  Recovery time limit (ms)
> Caching (SBC) [ca] mode page:
>    IC          0  [cha: n, def:  0]  Initiator control
>    ABPF        0  [cha: n, def:  0]  Abort pre-fetch
>    CAP         0  [cha: n, def:  0]  Caching analysis permitted
>    DISC        0  [cha: n, def:  0]  Discontinuity
>    SIZE        0  [cha: n, def:  0]  Size enable
>    WCE         1  [cha: y, def:  1]  Write cache enable
>    MF          0  [cha: n, def:  0]  Multiplication factor
>    RCD         0  [cha: n, def:  0]  Read cache disable
>    DRRP        0  [cha: n, def:  0]  Demand read retention priority
>    WRP         0  [cha: n, def:  0]  Write retention priority
>    DPTL        0  [cha: n, def:  0]  Disable pre-fetch transfer length
>    MIPF        0  [cha: n, def:  0]  Minimum pre-fetch
>    MAPF        0  [cha: n, def:  0]  Maximum pre-fetch
>    MAPFC       0  [cha: n, def:  0]  Maximum pre-fetch ceiling
>    FSW         0  [cha: n, def:  0]  Force sequential write
>    LBCSS       0  [cha: n, def:  0]  Logical block cache segment size
>    DRA         0  [cha: n, def:  0]  Disable read ahead
>    SYNC_PROG   0  [cha: n, def:  0]  Synchronous cache progress indication
>    NV_DIS      0  [cha: n, def:  0]  Non-volatile cache disable
>    NCS         0  [cha: n, def:  0]  Number of cache segments
>    CSS         0  [cha: n, def:  0]  Cache segment size
> Control [co] mode page:
>    TST         0  [cha: n, def:  0]  Task set type
>    TMF_ONLY    0  [cha: n, def:  0]  Task management functions only
>    DPICZ       0  [cha: n, def:  0]  Disable protection information check if
> protect field zero
>    D_SENSE     0  [cha: n, def:  0]  Descriptor format sense data
>    GLTSD       1  [cha: n, def:  1]  Global logging target save disable
>    RLEC        0  [cha: n, def:  0]  Report log exception condition
>    QAM         0  [cha: n, def:  0]  Queue algorithm modifier
>    NUAR        0  [cha: n, def:  0]  No unit attention on release
>    QERR        0  [cha: n, def:  0]  Queue error management
>    RAC         0  [cha: n, def:  0]  Report a check
>    UA_INTLCK   0  [cha: n, def:  0]  Unit attention interlocks control
>    SWP         0  [cha: n, def:  0]  Software write protect
>    ATO         0  [cha: n, def:  0]  Application tag owner
>    TAS         0  [cha: n, def:  0]  Task aborted status
>    ATMPE       0  [cha: n, def:  0]  Application tag mode page enabled
>    RWWP        0  [cha: n, def:  0]  Reject write without protection
>    AUTOLOAD    0  [cha: n, def:  0]  Autoload mode
>    BTP        -1  [cha: n, def: -1]  Busy timeout period (100us)
>    ESTCT      30  [cha: n, def: 30]  Extended self test completion time (sec)
>
>
> ############################################################################
> # sdparm -a --long /dev/sdb
>      /dev/sdb: Samsung   SSD 850 EVO 500G  0114
>      Direct access device specific parameters: WP=0  DPOFUA=1
> Caching (SBC) [ca] mode page:
>    IC          0  [cha: n, def:  0, sav:  0]  Initiator control
>    ABPF        0  [cha: n, def:  0, sav:  0]  Abort pre-fetch
>    CAP         0  [cha: n, def:  0, sav:  0]  Caching analysis permitted
>    DISC        1  [cha: n, def:  1, sav:  1]  Discontinuity
>    SIZE        0  [cha: n, def:  0, sav:  0]  Size enable
>    WCE         1  [cha: n, def:  1, sav:  1]  Write cache enable
>    MF          0  [cha: n, def:  0, sav:  0]  Multiplication factor
>    RCD         0  [cha: n, def:  0, sav:  0]  Read cache disable
>    DRRP        0  [cha: n, def:  0, sav:  0]  Demand read retention priority
>    WRP         0  [cha: n, def:  0, sav:  0]  Write retention priority
>    DPTL       -1  [cha: n, def: -1, sav: -1]  Disable pre-fetch transfer length
>    MIPF        0  [cha: n, def:  0, sav:  0]  Minimum pre-fetch
>    MAPF       -1  [cha: n, def: -1, sav: -1]  Maximum pre-fetch
>    MAPFC      -1  [cha: n, def: -1, sav: -1]  Maximum pre-fetch ceiling
>    FSW         0  [cha: n, def:  0, sav:  0]  Force sequential write
>    LBCSS       0  [cha: n, def:  0, sav:  0]  Logical block cache segment size
>    DRA         0  [cha: n, def:  0, sav:  0]  Disable read ahead
>    SYNC_PROG   0  [cha: n, def:  0, sav:  0]  Synchronous cache progress
> indication
>    NV_DIS      0  [cha: n, def:  0, sav:  0]  Non-volatile cache disable
>    NCS       255  [cha: n, def:255, sav:255]  Number of cache segments
>    CSS         0  [cha: n, def:  0, sav:  0]  Cache segment size
> Power condition [po] mode page:
>    PM_BG       0  [cha: n, def:  0, sav:  0]  Power management, background
> functions, precedence
>    STANDBY_Y   0  [cha: n, def:  0, sav:  0]  Standby_y timer enable
>    IDLE_C      0  [cha: n, def:  0, sav:  0]  Idle_c timer enable
>    IDLE_B      0  [cha: n, def:  0, sav:  0]  Idle_b timer enable
>    IDLE        0  [cha: n, def:  0, sav:  0]  Idle_a timer enable
>    STANDBY     0  [cha: y, def:  1, sav:  0]  Standby_z timer enable
>    ICT         0  [cha: n, def:  0, sav:  0]  Idle_a condition timer (100 ms)
>    SCT         0  [cha: y, def:18000, sav:  0]  Standby_z condition timer (100
> ms)
>    IBCT        0  [cha: n, def:  0, sav:  0]  Idle_b condition timer (100 ms)
>    ICCT        0  [cha: n, def:  0, sav:  0]  Idle_c condition timer (100 ms)
>    SYCT        0  [cha: n, def:  0, sav:  0]  Standby_y condition timer (100 ms)
>    CCF_IDLE    0  [cha: n, def:  0, sav:  0]  check condition on transition
> from idle
>    CCF_STAND   0  [cha: n, def:  0, sav:  0]  check condition on transition
> from standby
>    CCF_STOPP   0  [cha: n, def:  0, sav:  0]  check condition on transition
> from stopped
>
> ############################################################################
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



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

* Re: How to set DPOFUA=0 ?
  2015-12-29 11:30 ` U.Mutlu
@ 2015-12-29 11:43   ` Julian Calaby
  2015-12-29 18:04     ` U.Mutlu
  0 siblings, 1 reply; 6+ messages in thread
From: Julian Calaby @ 2015-12-29 11:43 UTC (permalink / raw)
  To: U.Mutlu; +Cc: linux-scsi

Hi,

On Tue, Dec 29, 2015 at 10:30 PM, U.Mutlu <for-gmane@mutluit.com> wrote:
> After this nigtmare-ish experience I would suggest the debian maintainers
> to trash the default jessie kernel 3.16 and replace it with the above
> 4.2 kernel; otherwise unexperienced users will wonder why their new SSD etc.
> isn't working in debian/ubuntu & co., as happened to me... :-(

Have you reported this as a bug against Jessie's kernel package?

I don't believe the Debian kernel maintainers read this mailing list.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

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

* Re: How to set DPOFUA=0 ?
  2015-12-29 11:43   ` Julian Calaby
@ 2015-12-29 18:04     ` U.Mutlu
  0 siblings, 0 replies; 6+ messages in thread
From: U.Mutlu @ 2015-12-29 18:04 UTC (permalink / raw)
  To: linux-scsi

Julian Calaby wrote on 12/29/2015 12:43 PM:
> Hi,
>
> On Tue, Dec 29, 2015 at 10:30 PM, U.Mutlu <for-gmane@mutluit.com> wrote:
>> After this nigtmare-ish experience I would suggest the debian maintainers
>> to trash the default jessie kernel 3.16 and replace it with the above
>> 4.2 kernel; otherwise unexperienced users will wonder why their new SSD etc.
>> isn't working in debian/ubuntu & co., as happened to me... :-(
>
> Have you reported this as a bug against Jessie's kernel package?

I wasn't sure if that really was a bug, so I just first asked for
info/confirmation here, and later also in their mailing list ( 
debian-kernel@lists.debian.org ) as it first seemed to be a SCSI and/or USB issue.
Then I tried a newer kernel and the problem was gone.
Yes, I informed the other list too about the solution.




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

* Re: How to set DPOFUA=0 ?
  2015-12-26  1:25 How to set DPOFUA=0 ? U.Mutlu
  2015-12-29 11:30 ` U.Mutlu
@ 2016-01-19 20:50 ` Dmitry Katsubo
  2016-01-19 22:10   ` Dmitry Katsubo
  1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Katsubo @ 2016-01-19 20:50 UTC (permalink / raw)
  To: U.Mutlu; +Cc: linux-scsi

On 2015-12-26 02:25, U.Mutlu wrote:
> Hi,
> I have got 2 different submodels of the SSD Samsung 850 Evo 500 GB.
> The first one has DPOFUA=0, the second one has DPOFUA=1 (see below).
> That with DPOFUA=0 works fine, but the other with DPOFUA=1 doesn't work
> after mounting; it reports errors and switches to read-only mount.
> 
> It seems Linux has a problem with DPOFUA=1, so then IMO best would be to
> disable that feature of the device. So, how & where can DPOFUA be set to value 0 ?
> 
> Thx

I think the issue is related to one I have reported earlier in another
maillist [1]. The issue was with JMicron USB-to-SATA bridge that
incorrectly reported that it supports FUA, while in fact it does not.

[1] http://thread.gmane.org/gmane.linux.usb.general/133281

You need to find or add a section to drivers/usb/storage/unusual_devs.h
which e.g. reads as follows (replace 0x???? with bcdDevice value from
lsusb output):

UNUSUAL_DEV(  0x357d, 0x7788, 0x????, 0x????,
		"JMicron",
		"USB to ATA/ATAPI Bridge",
		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
		US_FL_BROKEN_FUA ),

Recompile the kernel, reboot & enjoy :)

> ############################################################################
> # uname -a
> Linux panther 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) x86_64 GNU/Linux
> 
> ############################################################################
> Dec 26 00:45:38 panther vmunix: [ 2337.193164] usb 4-1: new SuperSpeed USB device number 2 using xhci_hcd
> Dec 26 00:45:38 panther vmunix: [ 2337.212852] usb 4-1: New USB device found, idVendor=357d, idProduct=7788
> Dec 26 00:45:38 panther vmunix: [ 2337.212861] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> Dec 26 00:45:38 panther vmunix: [ 2337.212866] usb 4-1: Product: USB to ATA/ATAPI Bridge
> Dec 26 00:45:38 panther vmunix: [ 2337.212870] usb 4-1: Manufacturer: JMicron
> Dec 26 00:45:38 panther vmunix: [ 2337.212874] usb 4-1: SerialNumber: 321AE8171482926
> Dec 26 00:45:38 panther vmunix: [ 2337.245338] usb-storage 4-1:1.0: USB Mass Storage device detected
> Dec 26 00:45:38 panther vmunix: [ 2337.245591] scsi2 : usb-storage 4-1:1.0
> Dec 26 00:45:38 panther vmunix: [ 2337.245770] usbcore: registered new interface driver usb-storage
> Dec 26 00:45:39 panther vmunix: [ 2338.244729] scsi 2:0:0:0: Direct-Access Samsung SSD 850 EVO 500G 0114 PQ: 0 ANSI: 6
> Dec 26 00:45:39 panther vmunix: [ 2338.245308] sd 2:0:0:0: Attached scsi generic sg2 type 0
> Dec 26 00:45:39 panther vmunix: [ 2338.247115] sd 2:0:0:0: [sdb] Spinning up disk...
> Dec 26 00:45:49 panther vmunix: [ 2339.251034] .........
> Dec 26 00:45:52 panther vmunix: [ 2348.278894] ....ready
> Dec 26 00:45:52 panther vmunix: [ 2351.288429] sd 2:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)
> Dec 26 00:45:52 panther vmunix: [ 2351.288953] sd 2:0:0:0: [sdb] Write Protect is off
> Dec 26 00:45:52 panther vmunix: [ 2351.288959] sd 2:0:0:0: [sdb] Mode Sense: 47 00 10 08
> Dec 26 00:45:52 panther vmunix: [ 2351.289447] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
> Dec 26 00:45:52 panther vmunix: [ 2351.293763] sdb: sdb1 sdb2 sdb3
> Dec 26 00:45:52 panther vmunix: [ 2351.295862] sd 2:0:0:0: [sdb] Attached SCSI disk
> Dec 26 00:47:02 panther vmunix: [ 2421.091552] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
> Dec 26 00:47:09 panther vmunix: [ 2428.394003] sd 2:0:0:0: [sdb] Invalid command failure
> Dec 26 00:47:09 panther vmunix: [ 2428.394013] sd 2:0:0:0: [sdb]
> Dec 26 00:47:09 panther vmunix: [ 2428.394017] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
> Dec 26 00:47:09 panther vmunix: [ 2428.394021] sd 2:0:0:0: [sdb]
> Dec 26 00:47:09 panther vmunix: [ 2428.394024] Sense Key : Illegal Request [current]
> Dec 26 00:47:09 panther vmunix: [ 2428.394030] sd 2:0:0:0: [sdb]
> Dec 26 00:47:09 panther vmunix: [ 2428.394034] Add. Sense: Invalid field in cdb
> Dec 26 00:47:09 panther vmunix: [ 2428.394038] sd 2:0:0:0: [sdb] CDB:
> Dec 26 00:47:09 panther vmunix: [ 2428.394040] Write(10): 2a 08 02 04 08 20 00 00 08 00
> Dec 26 00:47:09 panther vmunix: [ 2428.394054] end_request: critical target error, dev sdb, sector 33818656
> Dec 26 00:47:09 panther vmunix: [ 2428.394059] end_request: critical target error, dev sdb, sector 33818656
> Dec 26 00:47:09 panther vmunix: [ 2428.394120] Aborting journal on device sdb1-8.
> Dec 26 00:47:09 panther vmunix: [ 2428.471535] EXT4-fs error (device sdb1): ext4_journal_check_start:56: Detected aborted journal
> Dec 26 00:47:09 panther vmunix: [ 2428.471547] EXT4-fs (sdb1): Remounting filesystem read-only
> 
> 
> ############################################################################
> # sdparm -a --long /dev/sda
>     /dev/sda: ATA       Samsung SSD 850   1B6Q
>     Direct access device specific parameters: WP=0  DPOFUA=0
> Read write error recovery [rw] mode page:
>   AWRE        1  [cha: n, def:  1]  Automatic write reallocation enabled
>   ARRE        0  [cha: n, def:  0]  Automatic read reallocation enabled
>   TB          0  [cha: n, def:  0]  Transfer block
>   RC          0  [cha: n, def:  0]  Read continuous
>   EER         0  [cha: n, def:  0]  Enable early recovery
>   PER         0  [cha: n, def:  0]  Post error
>   DTE         0  [cha: n, def:  0]  Data terminate on error
>   DCR         0  [cha: n, def:  0]  Disable correction
>   RRC         0  [cha: n, def:  0]  Read retry count
>   COR_S       0  [cha: n, def:  0]  Correction span (obsolete)
>   HOC         0  [cha: n, def:  0]  Head offset count (obsolete)
>   DSOC        0  [cha: n, def:  0]  Data strobe offset count (obsolete)
>   LBPERE      0  [cha: n, def:  0]  Logical block provisioning error reporting enabled
>   WRC         0  [cha: n, def:  0]  Write retry count
>   RTL         0  [cha: n, def:  0]  Recovery time limit (ms)
> Caching (SBC) [ca] mode page:
>   IC          0  [cha: n, def:  0]  Initiator control
>   ABPF        0  [cha: n, def:  0]  Abort pre-fetch
>   CAP         0  [cha: n, def:  0]  Caching analysis permitted
>   DISC        0  [cha: n, def:  0]  Discontinuity
>   SIZE        0  [cha: n, def:  0]  Size enable
>   WCE         1  [cha: y, def:  1]  Write cache enable
>   MF          0  [cha: n, def:  0]  Multiplication factor
>   RCD         0  [cha: n, def:  0]  Read cache disable
>   DRRP        0  [cha: n, def:  0]  Demand read retention priority
>   WRP         0  [cha: n, def:  0]  Write retention priority
>   DPTL        0  [cha: n, def:  0]  Disable pre-fetch transfer length
>   MIPF        0  [cha: n, def:  0]  Minimum pre-fetch
>   MAPF        0  [cha: n, def:  0]  Maximum pre-fetch
>   MAPFC       0  [cha: n, def:  0]  Maximum pre-fetch ceiling
>   FSW         0  [cha: n, def:  0]  Force sequential write
>   LBCSS       0  [cha: n, def:  0]  Logical block cache segment size
>   DRA         0  [cha: n, def:  0]  Disable read ahead
>   SYNC_PROG   0  [cha: n, def:  0]  Synchronous cache progress indication
>   NV_DIS      0  [cha: n, def:  0]  Non-volatile cache disable
>   NCS         0  [cha: n, def:  0]  Number of cache segments
>   CSS         0  [cha: n, def:  0]  Cache segment size
> Control [co] mode page:
>   TST         0  [cha: n, def:  0]  Task set type
>   TMF_ONLY    0  [cha: n, def:  0]  Task management functions only
>   DPICZ       0  [cha: n, def:  0]  Disable protection information check if protect field zero
>   D_SENSE     0  [cha: n, def:  0]  Descriptor format sense data
>   GLTSD       1  [cha: n, def:  1]  Global logging target save disable
>   RLEC        0  [cha: n, def:  0]  Report log exception condition
>   QAM         0  [cha: n, def:  0]  Queue algorithm modifier
>   NUAR        0  [cha: n, def:  0]  No unit attention on release
>   QERR        0  [cha: n, def:  0]  Queue error management
>   RAC         0  [cha: n, def:  0]  Report a check
>   UA_INTLCK   0  [cha: n, def:  0]  Unit attention interlocks control
>   SWP         0  [cha: n, def:  0]  Software write protect
>   ATO         0  [cha: n, def:  0]  Application tag owner
>   TAS         0  [cha: n, def:  0]  Task aborted status
>   ATMPE       0  [cha: n, def:  0]  Application tag mode page enabled
>   RWWP        0  [cha: n, def:  0]  Reject write without protection
>   AUTOLOAD    0  [cha: n, def:  0]  Autoload mode
>   BTP        -1  [cha: n, def: -1]  Busy timeout period (100us)
>   ESTCT      30  [cha: n, def: 30]  Extended self test completion time (sec)
> 
> 
> ############################################################################
> # sdparm -a --long /dev/sdb
>     /dev/sdb: Samsung   SSD 850 EVO 500G  0114
>     Direct access device specific parameters: WP=0  DPOFUA=1
> Caching (SBC) [ca] mode page:
>   IC          0  [cha: n, def:  0, sav:  0]  Initiator control
>   ABPF        0  [cha: n, def:  0, sav:  0]  Abort pre-fetch
>   CAP         0  [cha: n, def:  0, sav:  0]  Caching analysis permitted
>   DISC        1  [cha: n, def:  1, sav:  1]  Discontinuity
>   SIZE        0  [cha: n, def:  0, sav:  0]  Size enable
>   WCE         1  [cha: n, def:  1, sav:  1]  Write cache enable
>   MF          0  [cha: n, def:  0, sav:  0]  Multiplication factor
>   RCD         0  [cha: n, def:  0, sav:  0]  Read cache disable
>   DRRP        0  [cha: n, def:  0, sav:  0]  Demand read retention priority
>   WRP         0  [cha: n, def:  0, sav:  0]  Write retention priority
>   DPTL       -1  [cha: n, def: -1, sav: -1]  Disable pre-fetch transfer length
>   MIPF        0  [cha: n, def:  0, sav:  0]  Minimum pre-fetch
>   MAPF       -1  [cha: n, def: -1, sav: -1]  Maximum pre-fetch
>   MAPFC      -1  [cha: n, def: -1, sav: -1]  Maximum pre-fetch ceiling
>   FSW         0  [cha: n, def:  0, sav:  0]  Force sequential write
>   LBCSS       0  [cha: n, def:  0, sav:  0]  Logical block cache segment size
>   DRA         0  [cha: n, def:  0, sav:  0]  Disable read ahead
>   SYNC_PROG   0  [cha: n, def:  0, sav:  0]  Synchronous cache progress indication
>   NV_DIS      0  [cha: n, def:  0, sav:  0]  Non-volatile cache disable
>   NCS       255  [cha: n, def:255, sav:255]  Number of cache segments
>   CSS         0  [cha: n, def:  0, sav:  0]  Cache segment size
> Power condition [po] mode page:
>   PM_BG       0  [cha: n, def:  0, sav:  0]  Power management, background functions, precedence
>   STANDBY_Y   0  [cha: n, def:  0, sav:  0]  Standby_y timer enable
>   IDLE_C      0  [cha: n, def:  0, sav:  0]  Idle_c timer enable
>   IDLE_B      0  [cha: n, def:  0, sav:  0]  Idle_b timer enable
>   IDLE        0  [cha: n, def:  0, sav:  0]  Idle_a timer enable
>   STANDBY     0  [cha: y, def:  1, sav:  0]  Standby_z timer enable
>   ICT         0  [cha: n, def:  0, sav:  0]  Idle_a condition timer (100 ms)
>   SCT         0  [cha: y, def:18000, sav:  0]  Standby_z condition timer (100 ms)
>   IBCT        0  [cha: n, def:  0, sav:  0]  Idle_b condition timer (100 ms)
>   ICCT        0  [cha: n, def:  0, sav:  0]  Idle_c condition timer (100 ms)
>   SYCT        0  [cha: n, def:  0, sav:  0]  Standby_y condition timer (100 ms)
>   CCF_IDLE    0  [cha: n, def:  0, sav:  0]  check condition on transition from idle
>   CCF_STAND   0  [cha: n, def:  0, sav:  0]  check condition on transition from standby
>   CCF_STOPP   0  [cha: n, def:  0, sav:  0]  check condition on transition from stopped
> 
> ############################################################################


-- 
With best regards,
Dmitry

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

* Re: How to set DPOFUA=0 ?
  2016-01-19 20:50 ` Dmitry Katsubo
@ 2016-01-19 22:10   ` Dmitry Katsubo
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Katsubo @ 2016-01-19 22:10 UTC (permalink / raw)
  To: U.Mutlu; +Cc: linux-scsi

> Solved:
> 
> By installing a the latest kernel and headers from Debian backports solved the 
> problem:
> 
> apt-get -t jessie-backports install linux-image-amd64 linux-headers-amd64
> 
> Info about backports configuration:
> http://backports.debian.org/Instructions/
> 
> # uname -a
> Linux panther 4.2.0-0.bpo.1-amd64 #1 SMP Debian 4.2.6-3~bpo8+2 (2015-12-14) 
> x86_64 GNU/Linux
> 
> After this nigtmare-ish experience I would suggest the debian maintainers
> to trash the default jessie kernel 3.16 and replace it with the above
> 4.2 kernel; otherwise unexperienced users will wonder why their new SSD etc.
> isn't working in debian/ubuntu & co., as happened to me... :-(

I have missed that your message. Solved? Amazing, because the patch I had in
mind was not applied to 4.2.6. Also the device you are reporting has different
productId. I think that in newer kernels (4.x) another driver is used (UAS),
which has already given device logged as "special", see

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/storage/unusual_uas.h#n145

/* Reported-by: Takeo Nakayama <javhera@gmx.com> */
UNUSUAL_DEV(0x357d, 0x7788, 0x0000, 0x9999,
		"JMicron",
		"JMS566",
		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
		US_FL_NO_REPORT_OPCODES),

However it does not have US_FL_BROKEN_FUA flag set. Mystery.

-- 
With best regards,
Dmitry

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

end of thread, other threads:[~2016-01-19 22:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-26  1:25 How to set DPOFUA=0 ? U.Mutlu
2015-12-29 11:30 ` U.Mutlu
2015-12-29 11:43   ` Julian Calaby
2015-12-29 18:04     ` U.Mutlu
2016-01-19 20:50 ` Dmitry Katsubo
2016-01-19 22:10   ` Dmitry Katsubo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.