Removed a lot of useless #include's from a lot of files and reworked the SCSI #include's a bit to resolve the problem of scsi.h being a mess.

This commit is contained in:
OBattler
2018-10-02 22:54:28 +02:00
parent 512afda373
commit 647d78e4c2
63 changed files with 444 additions and 599 deletions

View File

@@ -11,7 +11,7 @@
* of SCSI Host Adapters made by Mylex.
* These controllers were designed for various buses.
*
* Version: @(#)scsi_x54x.h 1.0.7 2018/04/06
* Version: @(#)scsi_x54x.h 1.0.8 2018/10/02
*
* Authors: TheCollector1995, <mariogplayer@gmail.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -118,6 +118,18 @@
#define INTR_MBIF 0x01 /* MBI full */
#pragma pack(push,1)
typedef struct {
uint8_t hi;
uint8_t mid;
uint8_t lo;
} addr24;
#pragma pack(pop)
#define ADDR_TO_U32(x) (((x).hi<<16)|((x).mid<<8)|((x).lo&0xFF))
#define U32_TO_ADDR(a,x) do {(a).hi=(x)>>16;(a).mid=(x)>>8;(a).lo=(x)&0xFF;}while(0)
/* Structure for the INQUIRE_SETUP_INFORMATION reply. */
#pragma pack(push,1)
typedef struct {
@@ -491,6 +503,29 @@ typedef struct
(p->u.lba.lba2<<8) | p->u.lba.lba3)
/*
*
* Scatter/Gather Segment List Definitions
*
* Adapter limits
*/
#define MAX_SG_DESCRIPTORS 32 /* Always make the array 32 elements long, if less are used, that's not an issue. */
#pragma pack(push,1)
typedef struct {
uint32_t Segment;
uint32_t SegmentPointer;
} SGE32;
#pragma pack(pop)
#pragma pack(push,1)
typedef struct {
addr24 Segment;
addr24 SegmentPointer;
} SGE;
#pragma pack(pop)
extern void x54x_reset_ctrl(x54x_t *dev, uint8_t Reset);
extern void x54x_buf_alloc(uint8_t id, int length);
extern void x54x_buf_free(uint8_t id);