Re: How to set DPOFUA=0 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux