Re: [REGRESSION][BISECTED] Scheduling errors with the AMD FX 8300 CPU

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

 



Hey Niklas,

On 24/05/29 08:33pm, Niklas Cassel wrote:
> On Wed, May 29, 2024 at 03:02:45PM +0200, Tim Teichmann wrote:
> > Hello Niklas,
> > 
> > > ata3 (TOSHIBA HDWD110) appears to work correctly.
> > > 
> > > ata2 (Apacer AS340 120GB) results in command timeouts and
> > > "a change in device presence has been detected" being set in PxSERR.DIAG.X.
> > > 
> > > > >> [    2.964262] ata2.00: exception Emask 0x10 SAct 0x80 SErr 0x40d0002 action 0xe frozen
> > > > >> [    2.964274] ata2.00: irq_stat 0x00000040, connection status changed
> > > > >> [    2.964279] ata2: SError: { RecovComm PHYRdyChg CommWake 10B8B DevExch }
> > > > >> [    2.964288] ata2.00: failed command: READ FPDMA QUEUED
> > > > >> [    2.964291] ata2.00: cmd 60/08:38:80:ff:f1/00:00:0d:00:00/40 tag 7 ncq dma 4096 in
> > > > >>                         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x10 (ATA bus error)
> > > > >> [    2.964307] ata2.00: status: { DRDY }
> > > > >> [    2.964318] ata2: hard resetting link
> > > 
> > > 
> > > Could you please try the following patch (quirk):
> > > 
> > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> > > index c449d60d9bb9..24ebcad65b65 100644
> > > --- a/drivers/ata/libata-core.c
> > > +++ b/drivers/ata/libata-core.c
> > > @@ -4199,6 +4199,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
> > >                                                 ATA_HORKAGE_ZERO_AFTER_TRIM |
> > >                                                 ATA_HORKAGE_NOLPM },
> > >  
> > > +       /* Apacer models with LPM issues */
> > > +       { "Apacer AS340*",              NULL,   ATA_HORKAGE_NOLPM },
> > > +
> > >         /* These specific Samsung models/firmware-revs do not handle LPM well */
> > >         { "SAMSUNG MZMPC128HBFU-000MV", "CXM14M1Q", ATA_HORKAGE_NOLPM },
> > >         { "SAMSUNG SSD PM830 mSATA *",  "CXM13D1Q", ATA_HORKAGE_NOLPM },
> > > 
> > > 
> > > 
> > > Kind regards,
> > > Niklas
> > 
> > I've just tested the patch you've provided [0] and it works without
> > throwing ATA exceptions.
> > 
> > The full dmesg output is attached below.
> > 
> 
> Thank you Tim.
> 
> 
> I intend to send out a real patch for this,
> but before I do could you please run:
> 
> $ hdparm -I /dev/sdX
> 
> against both your SATA drives and paste the output.
> 
> (I just want to make sure that the device actually advertizes
> some kind of power management support.)
> 
> 
> Kind regards,
> Niklas

this is the output for both of my SATA drives (of course using the same
kernel version I've used in the previous reply [0]):


/dev/sda:

ATA device, with non-removable media
	Model Number:       Apacer AS340 120GB                      
	Serial Number:      270E0788096C03674465
	Firmware Revision:  AP612PE0
	Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
	Supported: 11 10 9 8 7 6 5 
	Likely used: 11
Configuration:
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:    16514064
	LBA    user addressable sectors:   234441648
	LBA48  user addressable sectors:   234441648
	Logical  Sector size:                   512 bytes
	Physical Sector size:                   512 bytes
	Logical Sector-0 offset:                  0 bytes
	device size with M = 1024*1024:      114473 MBytes
	device size with M = 1000*1000:      120034 MBytes (120 GB)
	cache/buffer size  = unknown
	Form Factor: 2.5 inch
	Nominal Media Rotation Rate: Solid State Device
Capabilities:
	LBA, IORDY(can be disabled)
	Queue depth: 32
	Standby timer values: spec'd by Standard, no device specific minimum
	R/W multiple sector transfer: Max = 16	Current = 16
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
	    Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	    Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   	SMART feature set
	   	Security Mode feature set
	  *	Power Management feature set
	  *	Write cache
	  *	Look-ahead
	  *	Host Protected Area feature set
	  *	WRITE_BUFFER command
	  *	READ_BUFFER command
	  *	NOP cmd
	  *	DOWNLOAD_MICROCODE
	   	SET_MAX security extension
	  *	48-bit Address feature set
	  *	Device Configuration Overlay feature set
	  *	Mandatory FLUSH_CACHE
	  *	FLUSH_CACHE_EXT
	  *	SMART error logging
	  *	SMART self-test
	  *	General Purpose Logging feature set
	  *	WRITE_{DMA|MULTIPLE}_FUA_EXT
	  *	64-bit World wide name
	  *	WRITE_UNCORRECTABLE_EXT command
	  *	{READ,WRITE}_DMA_EXT_GPL commands
	  *	Segmented DOWNLOAD_MICROCODE
	  *	Gen1 signaling speed (1.5Gb/s)
	  *	Gen2 signaling speed (3.0Gb/s)
	  *	Gen3 signaling speed (6.0Gb/s)
	  *	Native Command Queueing (NCQ)
	  *	Phy event counters
	  *	READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
	  *	DMA Setup Auto-Activate optimization
	   	Device-initiated interface power management
	  *	Software settings preservation
	  *	DOWNLOAD MICROCODE DMA command
	  *	SET MAX SETPASSWORD/UNLOCK DMA commands
	  *	WRITE BUFFER DMA command
	  *	READ BUFFER DMA command
	  *	DEVICE CONFIGURATION SET/IDENTIFY DMA commands
	  *	Data Set Management TRIM supported (limit 8 blocks)
Security: 
	Master password revision code = 65534
		supported
	not	enabled
	not	locked
	not	frozen
	not	expired: security count
		supported: enhanced erase
	20min for SECURITY ERASE UNIT. 60min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 0000000000000000
	NAA		: 0
	IEEE OUI	: 000000
	Unique ID	: 000000000
Checksum: correct


/dev/sdb:

ATA device, with non-removable media
	Model Number:       TOSHIBA HDWD110                         
	Serial Number:      48L9BJMFS
	Firmware Revision:  MS2OA8J0
	Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0; Revision: ATA8-AST T13 Project D1697 Revision 0b
Standards:
	Used: unknown (minor revision code 0x0029) 
	Supported: 8 7 6 5 
	Likely used: 8
Configuration:
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:    16514064
	LBA    user addressable sectors:   268435455
	LBA48  user addressable sectors:  1953525168
	Logical  Sector size:                   512 bytes
	Physical Sector size:                  4096 bytes
	Logical Sector-0 offset:                  0 bytes
	device size with M = 1024*1024:      953869 MBytes
	device size with M = 1000*1000:     1000204 MBytes (1000 GB)
	cache/buffer size  = unknown
	Form Factor: 3.5 inch
	Nominal Media Rotation Rate: 7200
Capabilities:
	LBA, IORDY(can be disabled)
	Queue depth: 32
	Standby timer values: spec'd by Standard, no device specific minimum
	R/W multiple sector transfer: Max = 16	Current = 16
	Advanced power management level: disabled
	DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
	    Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
	    Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
	   	SMART feature set
	   	Security Mode feature set
	  *	Power Management feature set
	  *	Write cache
	  *	Look-ahead
	  *	Host Protected Area feature set
	  *	WRITE_BUFFER command
	  *	READ_BUFFER command
	  *	NOP cmd
	  *	DOWNLOAD_MICROCODE
	   	Advanced Power Management feature set
	   	Power-Up In Standby feature set
	  *	SET_FEATURES required to spinup after power up
	   	SET_MAX security extension
	  *	48-bit Address feature set
	  *	Device Configuration Overlay feature set
	  *	Mandatory FLUSH_CACHE
	  *	FLUSH_CACHE_EXT
	  *	SMART error logging
	  *	SMART self-test
	   	Media Card Pass-Through
	  *	General Purpose Logging feature set
	  *	WRITE_{DMA|MULTIPLE}_FUA_EXT
	  *	64-bit World wide name
	  *	URG for READ_STREAM[_DMA]_EXT
	  *	URG for WRITE_STREAM[_DMA]_EXT
	  *	WRITE_UNCORRECTABLE_EXT command
	  *	{READ,WRITE}_DMA_EXT_GPL commands
	  *	Segmented DOWNLOAD_MICROCODE
	  *	unknown 119[7]
	  *	Gen1 signaling speed (1.5Gb/s)
	  *	Gen2 signaling speed (3.0Gb/s)
	  *	Gen3 signaling speed (6.0Gb/s)
	  *	Native Command Queueing (NCQ)
	  *	Host-initiated interface power management
	  *	Phy event counters
	  *	NCQ priority information
	   	Non-Zero buffer offsets in DMA Setup FIS
	  *	DMA Setup Auto-Activate optimization
	  *	Device-initiated interface power management
	   	In-order data delivery
	  *	Software settings preservation
	  *	SMART Command Transport (SCT) feature set
	  *	SCT Write Same (AC2)
	  *	SCT Error Recovery Control (AC3)
	  *	SCT Features Control (AC4)
	  *	SCT Data Tables (AC5)
Security: 
	Master password revision code = 65534
		supported
	not	enabled
	not	locked
	not	frozen
	not	expired: security count
	not	supported: enhanced erase
	160min for SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000039fd6d25a26
	NAA		: 5
	IEEE OUI	: 000039
	Unique ID	: fd6d25a26
Checksum: correct

For my untrained eyes, it looks like both drives advertise power
management support.

Thank you,
Tim

[0]: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/56#note_188819

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux