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
refactor: make pci device driver loading passive, pci bus scanner will not load them...
[lunaix-os.git]
/
lunaix-os
/
includes
/
hal
/
ahci
/
scsi.h
diff --git
a/lunaix-os/includes/hal/ahci/scsi.h
b/lunaix-os/includes/hal/ahci/scsi.h
index 6ba0fc2596df2b6eacdf349a2139bb7ad00f7ccf..5d8d2dbb5828fa390c2716d36d737b09a89b5543 100644
(file)
--- a/
lunaix-os/includes/hal/ahci/scsi.h
+++ b/
lunaix-os/includes/hal/ahci/scsi.h
@@
-14,49
+14,46
@@
#define SCSI_WRITE_BLOCKS_16 0x8a
#define SCSI_WRITE_BLOCKS_12 0xaa
#define SCSI_WRITE_BLOCKS_16 0x8a
#define SCSI_WRITE_BLOCKS_12 0xaa
+#define SCSI_CDB16 16
+#define SCSI_CDB12 12
+
struct scsi_cdb12
{
struct scsi_cdb12
{
- u
int
8_t opcode;
- u
int
8_t misc1;
- u
int
32_t lba_be;
- u
int
32_t length;
- u
int
8_t misc2;
- u
int
8_t ctrl;
+ u8_t opcode;
+ u8_t misc1;
+ u32_t lba_be;
+ u32_t length;
+ u8_t misc2;
+ u8_t ctrl;
} __attribute__((packed));
struct scsi_cdb16
{
} __attribute__((packed));
struct scsi_cdb16
{
- u
int
8_t opcode;
- u
int
8_t misc1;
- u
int
32_t lba_be_hi;
- u
int
32_t lba_be_lo;
- u
int
32_t length;
- u
int
8_t misc2;
- u
int
8_t ctrl;
+ u8_t opcode;
+ u8_t misc1;
+ u32_t lba_be_hi;
+ u32_t lba_be_lo;
+ u32_t length;
+ u8_t misc2;
+ u8_t ctrl;
} __attribute__((packed));
void
scsi_create_packet12(struct scsi_cdb12* cdb,
} __attribute__((packed));
void
scsi_create_packet12(struct scsi_cdb12* cdb,
- u
int
8_t opcode,
- u
int
32_t lba,
- u
int
32_t alloc_size);
+ u8_t opcode,
+ u32_t lba,
+ u32_t alloc_size);
void
scsi_create_packet16(struct scsi_cdb16* cdb,
void
scsi_create_packet16(struct scsi_cdb16* cdb,
- u
int
8_t opcode,
-
uint64
_t lba,
- u
int
32_t alloc_size);
+ u8_t opcode,
+
lba
_t lba,
+ u32_t alloc_size);
void
void
-scsi_read_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size);
+scsi_submit(struct hba_device* dev, struct blkio_req* io_req);
void
void
-scsi_write_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size);
+scsi_parse_capacity(struct hba_device* device, u32_t* parameter);
#endif /* __LUNAIX_ATAPI_H */
#endif /* __LUNAIX_ATAPI_H */