[smartmontools-support] Samsung HD502IJ new firmware causes i/o error while querying Device Statistics log

Viktor Štujber viktor.stujber at gmail.com
Sat Apr 12 23:53:20 CEST 2025


I've had a while to think about this issue and look around for 
additional info. I'm not very familiar with hdd hardware and firmware, 
but a likely scenario is that Samsung over the 3 years of this product's 
lifetime made subtle tweaks to the pcb and flash storage, and made the 
corresponding firmware adjustments, on top of generic fixes and 
improvements. Its version was gradually incremented but no official 
updates were released or could even be released - each version was 
tailored to the pcb that was being manufactured at that time. The 
Dell-branded hotfix release was an oddity and there are several 
possibilities as to how its pcb compatibility may have been addressed 
(which I won't go into here).

A counter-scenario would go similar to the above, except that all 
changes to the firmware were generic and there is no pcb backwards 
compatibility issue, it's just that the devstat gplog addition was left 
in a half-assed unfinished state before the model was discontinued. 
Which one of these two scenarios is the real one could be determined if 
someone with a high baseline firmware version ran smartctl -x.

Ulimately it was my inexperience that made me overestimate the 
sophistication of the hdd firmware development process and potentially 
applied firmware to a pcb it wasn't designed for even though the model 
id and versioning format matched. Or maybe I didn't. The test mentioned 
above would also inform if a drivedb entry would even be warranted. At 
this point I only know that I seem to have no way of preventing -x from 
triggering the error with the currently available commandline options, 
but since the error is transient, it doesn't really need a workaround.

On 12. 4. 2025 19:08, Christian Franke wrote:
> Viktor Štujber wrote:
>> Alright. I guess only dissecting the firmware could show if those 
>> 'badly formed scsi parameters' could even be satisfied. Aside from 
>> that, I was thinking of at least working around the firmware bug so 
>> that basic functionality isn't affected.
>>
>> I saw that drivedb is able to target specific firmware versions and 
>> already has a bunch of -F quirks. Funnily enough, three of the six 
>> are for 'samsung' and my particular drive is also samsung.
>
> These options are very old, the last one 'samsung3' was added 2007.
>
>
>> I also saw documentation for -F nologdir and tried it out, and it 
>> doesn't look like it does precisely what it says it does... it only 
>> stops output of the GP log directory, but it still goes through every 
>> available GP and S log anyway. 
>
> If -F nologdir is specified, a log directory which indicates support 
> for 'standard' logs (Error, Self-Test, Device Statistics) is assumed. 
> It was added for early Intel SSDs which stopped working after a log 
> directory read command.
>
>
>> I guess if this was ever meant to be addressed, I would rewrite this 
>> quirk to actually apply comprehensively and to allow specifying an 
>> optional list of log addresses to exclude (0x00 causing all the other 
>> logs to be skipped as well, which the docs say is supposed to be this 
>> quirk's intended effect.)
>
> Was never needed, except for the mentioned Intel SSDs. Feel free to 
> create a ticket or GH issue/PR with detailed suggestions.
>


More information about the Smartmontools-support mailing list