git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix dependency check logic cause config always disabled
[lunaix-os.git]
/
lunaix-os
/
includes
/
hal
/
ahci
/
sata.h
diff --git
a/lunaix-os/includes/hal/ahci/sata.h
b/lunaix-os/includes/hal/ahci/sata.h
index dc934482c4e4799d95e95a56f3732f5f4c8ba46b..0edb5a3d6a7d4cf946e2fcc685222b5b1e060add 100644
(file)
--- a/
lunaix-os/includes/hal/ahci/sata.h
+++ b/
lunaix-os/includes/hal/ahci/sata.h
@@
-1,7
+1,7
@@
#ifndef __LUNAIX_SATA_H
#define __LUNAIX_SATA_H
#ifndef __LUNAIX_SATA_H
#define __LUNAIX_SATA_H
-#include <
stdint
.h>
+#include <
hal/ahci/hba
.h>
#define SATA_REG_FIS_D2H 0x34
#define SATA_REG_FIS_H2D 0x27
#define SATA_REG_FIS_D2H 0x34
#define SATA_REG_FIS_H2D 0x27
@@
-20,49
+20,42
@@
struct sata_fis_head
{
struct sata_fis_head
{
- u
int
8_t type;
- u
int
8_t options;
- u
int
8_t status_cmd;
- u
int
8_t feat_err;
+ u8_t type;
+ u8_t options;
+ u8_t status_cmd;
+ u8_t feat_err;
} __HBA_PACKED__;
struct sata_reg_fis
{
struct sata_fis_head head;
} __HBA_PACKED__;
struct sata_reg_fis
{
struct sata_fis_head head;
- u
int
8_t lba0, lba8, lba16;
- u
int
8_t dev;
- u
int
8_t lba24, lba32, lba40;
- u
int
8_t feature;
+ u8_t lba0, lba8, lba16;
+ u8_t dev;
+ u8_t lba24, lba32, lba40;
+ u8_t feature;
- u
int
16_t count;
+ u16_t count;
- u
int
8_t reserved[6];
+ u8_t reserved[6];
} __HBA_PACKED__;
struct sata_data_fis
{
struct sata_fis_head head;
} __HBA_PACKED__;
struct sata_data_fis
{
struct sata_fis_head head;
- u
int
8_t data[0];
+ u8_t data[0];
} __HBA_PACKED__;
void
sata_create_fis(struct sata_reg_fis* cmd_fis,
} __HBA_PACKED__;
void
sata_create_fis(struct sata_reg_fis* cmd_fis,
- u
int
8_t command,
-
uint64
_t lba,
- u
int
16_t sector_count);
+ u8_t command,
+
lba
_t lba,
+ u16_t sector_count);
-int
-sata_read_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size);
-
-int
-sata_write_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size);
+void
+sata_submit(struct hba_device* dev, struct blkio_req* io_req);
+void
+sata_read_error(struct hba_port* port);
#endif /* __LUNAIX_SATA_H */
#endif /* __LUNAIX_SATA_H */