[BUG] ata: disk_ata_drive: SSD drive doesn't pass check for ata id validity

Sascha Hauer s.hauer at pengutronix.de
Fri Oct 30 00:31:04 PDT 2015


+Cc Juergen

On Thu, Oct 29, 2015 at 04:04:09PM +0300, Peter Mamonov wrote:
> 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?

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


-- 
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 |



More information about the barebox mailing list