mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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:
parent
e09829a71d
commit
c307fd5525
5 changed files with 56 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue