1
0
Fork 0
forked from len0rd/rockbox

ata: Parameterize the SMART query, add support to primary ATA driver

There are numerous sub-commands, this makes it possible to call the others.

Also in this patch is the ability for the "default" ATA driver to
query smart data too

Change-Id: Ie3aaf9e0b2d7a5d25d09dea34e4f10ee29047e1b
This commit is contained in:
Solomon Peachy 2025-09-16 09:48:56 -04:00
parent e09829a71d
commit c307fd5525
5 changed files with 56 additions and 13 deletions

View file

@ -83,6 +83,8 @@ struct ata_smart_attribute {
/* 6-15: Reserved for future use */
#define ATTRIBUTE_FLAGS_OTHER(x) ((x) & 0xffc0)
#define ATA_SMART_READ_DATA 0xD0
struct ata_smart_values
{
unsigned short int revnumber;
@ -226,7 +228,7 @@ int ata_get_dma_mode(void);
#ifdef HAVE_ATA_SMART
/* Returns current S.M.A.R.T. data */
int ata_read_smart(struct ata_smart_values*);
int ata_read_smart(struct ata_smart_values*, uint8_t cmd);
#endif
#ifdef BOOTLOADER