refactor: send the command with retry and error detection
[lunaix-os.git] / lunaix-os / includes / hal / ahci / scsi.h
index 0635614abec7d7bfd696a929e5ee980a1aaa7076..a3cfe2f3457560f5165f06d1749a021db8800b2d 100644 (file)
@@ -14,6 +14,9 @@
 #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
 {
     uint8_t opcode;
 struct scsi_cdb12
 {
     uint8_t opcode;
@@ -59,4 +62,7 @@ scsi_write_buffer(struct hba_device* dev,
                   void* buffer,
                   uint32_t size);
 
                   void* buffer,
                   uint32_t size);
 
+void
+scsi_parse_capacity(struct hba_device* device, uint32_t* parameter);
+
 #endif /* __LUNAIX_ATAPI_H */
 #endif /* __LUNAIX_ATAPI_H */