ata: disk_ata_drive: SSD drive doesn't pass check for ata id validity
Hi!
Barebox refuses to deal with OCZ-VERTEX4 ssd sata drive, because:
ata1: ata id invalid
This error is triggered by the following piece of code :
static int ata_id_is_valid(const uint16_t *id)
{
if ((id[ATA_ID_FIELD_VALID] & 1) == 0) {
pr_debug("Drive's ID seems invalid\n");
return -EINVAL;
}
return 0;
}The "id" is a sector-sized block of bytes, received after issuing ATA_CMD_ID_ATA command.
If I remove this check, the drive works fine.
Can someone with better knowledge of ATA standard comment on this issue?
Regards,
Peter
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
+Cc Juergen
Quoted 17 lines · Peter Mamonov
Hi!
Barebox refuses to deal with OCZ-VERTEX4 ssd sata drive, because:
ata1: ata id invalidThis error is triggered by the following piece of code :
static int
ata_id_is_valid(const uint16_t *id){ if ((id[ATA_ID_FIELD_VALID] & 1) == 0) { pr_debug("Drive's ID seems invalid\n"); return -EINVAL; } return 0; }
Quoted 7 lines
The "id" is a sector-sized block of bytes, received after issuing
ATA_CMD_ID_ATAcommand.If I remove this check, the drive works fine.
Can someone with better knowledge of ATA standard comment on this issue?
Juergen, do you have an idea what this check is for? Neither U-Boot nor the Kernel seem to ever check for bit 0 in this field.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 21 lines · On Friday 30 October 2015 08:31:04 Sascha Hauer wrote:
Quoted 20 lines · Peter Mamonov
Hi!
Barebox refuses to deal with OCZ-VERTEX4 ssd sata drive, because:
ata1: ata id invalidThis error is triggered by the following piece of code :
static int
ata_id_is_valid(const uint16_t *id){ if ((id[ATA_ID_FIELD_VALID] & 1) == 0) { pr_debug("Drive's ID seems invalid\n"); return -EINVAL; } return 0; }The "id" is a sector-sized block of bytes, received after issuing
ATA_CMD_ID_ATAcommand.
Quoted 7 lines
Quoted 4 lines
If I remove this check, the drive works fine.
Can someone with better knowledge of ATA standard comment on this issue?
Juergen, do you have an idea what this check is for? Neither U-Boot nor the Kernel seem to ever check for bit 0 in this field.
Seems this bit was meaningful in earlier days: it marked the ID member in the structure returned by the disk as valid (=1) or invalid (=0). In the meantime it seems obsolete. The last occurrence I found is in the Linux kernel in file "drivers/block/mg_disk.c". All other code which checks this register content just check bits 1 and 2. I vote for removing this piece of code.
jbe
Signature · 7 lines
Pengutronix e.K. | Juergen Borleis | Industrial Linux Solutions | http://www.pengutronix.de/ | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 30 lines · On Fri, 30 Oct 2015 09:53:50 +0100 Juergen Borleis <[email protected]> wrote:
Quoted 21 lines · On Friday 30 October 2015 08:31:04 Sascha Hauer wrote:
Quoted 20 lines · Peter Mamonov
Hi!
Barebox refuses to deal with OCZ-VERTEX4 ssd sata drive, because:
ata1: ata id invalidThis error is triggered by the following piece of code :
static int
ata_id_is_valid(const uint16_t *id){ if ((id[ATA_ID_FIELD_VALID] & 1) == 0) { pr_debug("Drive's ID seems invalid\n"); return -EINVAL; } return 0; }The "id" is a sector-sized block of bytes, received after issuing
ATA_CMD_ID_ATAcommand.Quoted 7 lines
Quoted 4 lines
If I remove this check, the drive works fine.
Can someone with better knowledge of ATA standard comment on this issue?
Juergen, do you have an idea what this check is for? Neither U-Boot nor the Kernel seem to ever check for bit 0 in this field.
Quoted 6 lines
Seems this bit was meaningful in earlier days: it marked the ID member in the structure returned by the disk as valid (=1) or invalid (=0). In the meantime it seems obsolete. The last occurrence I found is in the Linux kernel in file "
drivers/block/mg_disk.c". All other code which checks this register content just check bits 1 and 2. I vote for removing this piece of code.
Thanks for clarification.
Quoted 3 lines
jbe
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox