Re: [PATCH v3] scsi: core: Add 'serial' sysfs attribute for SCSI/SATA
From: Martin K. Petersen
Date: Tue Mar 10 2026 - 22:06:35 EST
On Mon, 09 Feb 2026 13:21:51 -0800, Igor Pylypiv wrote:
> Add a 'serial' sysfs attribute for SCSI and SATA devices. This attribute
> exposes the Unit Serial Number, which is derived from the Device
> Identification Vital Product Data (VPD) page 0x80.
>
> Whitespace is stripped from the retrieved serial number to handle
> the different alignment (right-aligned for SCSI, potentially
> left-aligned for SATA). As noted in SAT-5 10.5.3, "Although SPC-5 defines
> the PRODUCT SERIAL NUMBER field as right-aligned, ACS-5 does not require
> its SERIAL NUMBER field to be right-aligned. Therefore, right-alignment
> of the PRODUCT SERIAL NUMBER field for the translation is not assured."
>
> [...]
Applied to 7.1/scsi-queue, thanks!
[1/1] scsi: core: Add 'serial' sysfs attribute for SCSI/SATA
https://git.kernel.org/mkp/scsi/c/94c125bafa00
--
Martin K. Petersen