Skip to content

Commit

Permalink
Minor changes and corrections for CHSC and QETH
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Shorter committed Jan 16, 2013
1 parent 586fca1 commit df2dc4a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 54 deletions.
8 changes: 5 additions & 3 deletions chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,11 @@ CHSC_RSP6 *chsc_rsp6 = (CHSC_RSP6 *)(chsc_rsp+1);
memcpy(chsc_rsp6->chpid, dev->pmcw.chpid, 8);
for(n = 0; n < 7; n++)
{
cun = dev->fla[n];
cun &= 0xFFF0;
STORE_HW(chsc_rsp6->cun[n], cun);
if(dev->pmcw.pim & (0x80 >> n))
{
cun = ((dev->devnum & 0x00F0) << 4) | dev->pmcw.chpid[n];
STORE_HW(chsc_rsp6->cun[n], cun);
}
}
}
}
Expand Down
77 changes: 52 additions & 25 deletions chsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ typedef struct _CHSC_REQ1 { /* Reset Control Unit */
} CHSC_REQ1;


typedef struct _CHSC_REQ2 { /* Store Channel Path Descri */
typedef struct _CHSC_REQ2 { /* Store Channel Path Description */
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ BYTE flags;
Expand All @@ -97,7 +97,7 @@ typedef struct _CHSC_REQ2 { /* Store Channel Path Descri */
} CHSC_REQ2;


typedef struct _CHSC_REQ4 {
typedef struct _CHSC_REQ4 { /* Store Subchannel Description Data */
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ HWORD ssidfmt;
Expand All @@ -110,7 +110,7 @@ typedef struct _CHSC_REQ4 {
} CHSC_REQ4;


typedef struct _CHSC_REQ6 {
typedef struct _CHSC_REQ6 { /* Store Subchannel Control-Unit Data */
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ HWORD ssidfmt;
Expand All @@ -125,24 +125,32 @@ typedef struct _CHSC_REQ6 {
} CHSC_REQ6;


typedef struct _CHSC_REQ12 {
typedef struct _CHSC_REQC {
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ FWORD unknown4[3];
} CHSC_REQC;


typedef struct _CHSC_REQ10 { /* Store Channel-Subsystem Characteristics */
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ FWORD resv[3];
} CHSC_REQ12;
} CHSC_REQ10;

//?? typedef struct _CHSC_REQ12 {
//?? /*000*/ HWORD length; /* Offset to response field */
//?? /*002*/ HWORD req; /* Request code */
//?? /*004*/ BYTE flags;
//?? #define CHSC_CI_FLAGS_M 0x40
//?? #define CHSC_CI_FLAGS_FMT 0x0F
//?? /*005*/ BYTE cssid;
//?? /*006*/ BYTE ssid;
//?? #define CHSC_CI_SSID_MASK 0x03
//?? /*007*/ BYTE resv007;
//?? /*008*/ DBLWRD resv008;
//?? } CHSC_REQ12;

typedef struct _CHSC_REQ12 { /* Store Configuration Information */
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ BYTE flags;
#define CHSC_REQ12_FLAGS_M 0x20
#define CHSC_REQ12_FLAGS_FMT 0x0F
/*005*/ BYTE cssid;
/*006*/ BYTE ssid;
#define CHSC_REQ12_SSID_MASK 0x03
/*007*/ BYTE resv007;
/*008*/ DBLWRD resv008;
} CHSC_REQ12;


typedef struct _CHSC_REQ21 {
Expand Down Expand Up @@ -175,13 +183,33 @@ typedef struct _CHSC_REQ24 {
/*004*/ HWORD ssidfmt;
#define CHSC_REQ24_SSID 0x0030
#define CHSC_REQ24_FMT 0x000f
/*006*/ HWORD first_sch;
/*006*/ HWORD first_sch; /* First subchannel number */
/*008*/ HWORD resv1;
/*00A*/ HWORD last_sch;
/*00A*/ HWORD last_sch; /* Last subchannel number */
/*00C*/ FWORD resv2;
} CHSC_REQ24;


typedef struct _CHSC_REQ26 {
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ HWORD unknown4;
/*006*/ HWORD first_cun; /* First control unit number */
/*008*/ HWORD unknown8;
/*00A*/ HWORD last_cun; /* Last control unit number */
/*00C*/ FWORD unknownc;
} CHSC_REQ26;


typedef struct _CHSC_REQ30 {
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
/*004*/ BYTE unknown4;
/*005*/ BYTE unknown5[3];
/*008*/ FWORD unknown8[6];
} CHSC_REQ30;


typedef struct _CHSC_REQ31 { /* Enable Facility Request */
/*000*/ HWORD length; /* Offset to response field */
/*002*/ HWORD req; /* Request code */
Expand Down Expand Up @@ -314,13 +342,14 @@ typedef struct _CHSC_RSP12 {
/*014*/ FWORD rse; /* Remaining Subchannel Elements */
/*018*/ FWORD rcue; /* Remaining Control-Unit Elements */
/*01C*/ FWORD rsce; /* Remaining Shared-Cluster Elements */
/*020*/ FWORD resv3[2];
/*020*/ FWORD unknown1[2];
/*028*/ FWORD cct[16]; /* Current-Configuration Token */
/*068*/ FWORD tct[16]; /* Target-Configuration Token */
/*0A8*/ FWORD resv4;
/*0AC*/ HWORD pnv; /* Partition-Names Valid mask */
/*0AE*/ HWORD resv5;
/*0B0*/ DBLWRD pn[16]; /* Partition Names */
/*130*/ FWORD unknown2[488];
} CHSC_RSP12;

//?? typedef struct _CHSC_RSP12 {
Expand All @@ -337,8 +366,7 @@ typedef struct _CHSC_RSP12 {


typedef struct _CHSC_RSP24 {
/*000*/ BYTE flags;
/* flags for st qdio sch data */
/*000*/ BYTE flags; /* flags for st qdio sch data */
#define CHSC_FLAG_QDIO_CAPABILITY 0x80
#define CHSC_FLAG_VALIDITY 0x40
/*001*/ BYTE resv1;
Expand All @@ -361,8 +389,7 @@ typedef struct _CHSC_RSP24 {
/*00B*/ BYTE ocnt;
/*00C*/ BYTE resv3;
/*00D*/ BYTE mbccnt;
/*00E*/ HWORD qdioac2;
/* qdio adapter-characteristics-2 flag */
/*00E*/ HWORD qdioac2; /* qdio adapter-characteristics-2 flag */
#define QETH_SNIFF_AVAIL 0x0008 /* Promisc mode avail */
#define QETH_AC2_DATA_DIV_AVAILABLE 0x0010
#define QETH_AC2_DATA_DIV_ENABLED 0x0002
Expand All @@ -378,7 +405,7 @@ typedef struct _CHSC_RSP24 {


typedef struct _CHSC_RSP31 {
/*000*/ FWORD resv1;
/*000*/ FWORD unknown;
} CHSC_RSP31;


Expand Down
1 change: 1 addition & 0 deletions mpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ typedef struct _MPC_IEAR {
#define IDX_RSP_FLAGS_NOPORTREQ 0x80
/*00C*/ FWORD token; /* Issues rm_r token */
/*010*/ HWORD flevel; /* Funtion level */
#define IDX_RSP_FLEVEL_0201 0x0201
/*012*/ FWORD uclevel; /* Microcode level */
} MPC_IEAR;

Expand Down
28 changes: 2 additions & 26 deletions qeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ U16 reqtype;
{
iear->resp = IDX_RSP_RESP_OK;
iear->flags = IDX_RSP_FLAGS_NOPORTREQ;
STORE_HW(iear->flevel, 0x0201);
STORE_HW(iear->flevel, IDX_RSP_FLEVEL_0201);
STORE_FW(iear->token, ODTOKEN);

dev->qdio.idxstate = MPC_IDX_STATE_ACTIVE;
Expand All @@ -993,7 +993,7 @@ U16 reqtype;
{
iear->resp = IDX_RSP_RESP_OK;
iear->flags = IDX_RSP_FLAGS_NOPORTREQ;
STORE_HW(iear->flevel, 0x0201);
STORE_HW(iear->flevel, IDX_RSP_FLEVEL_0201);
STORE_FW(iear->token, ODTOKEN);

dev->qdio.idxstate = MPC_IDX_STATE_ACTIVE;
Expand Down Expand Up @@ -2149,12 +2149,6 @@ int num; /* Number of bytes to move */
int accerr;
int i;

//! /* Display various information, maybe */
//! if( grp->debug )
//! {
//! mpc_display_description( dev, "*** Establish Queues entry ***" );
//! }

dev->qdio.i_qcnt = qdr->iqdcnt < QDIO_MAXQ ? qdr->iqdcnt : QDIO_MAXQ;
dev->qdio.o_qcnt = qdr->oqdcnt < QDIO_MAXQ ? qdr->oqdcnt : QDIO_MAXQ;

Expand Down Expand Up @@ -2222,12 +2216,6 @@ int num; /* Number of bytes to move */
*unitstat = CSW_CE | CSW_DE | CSW_UC;
}

//! /* Display various information, maybe */
//! if( grp->debug )
//! {
//! mpc_display_description( dev, "*** Establish Queues exit ***" );
//! }

break;
}

Expand All @@ -2240,12 +2228,6 @@ int num; /* Number of bytes to move */
fd_set readset;
int rc;

//! /* Display various information, maybe */
//! if( grp->debug )
//! {
//! mpc_display_description( dev, "*** Activate Queues entry ***" );
//! }

dev->qdio.i_qmask = dev->qdio.o_qmask = 0;

FD_ZERO( &readset );
Expand Down Expand Up @@ -2318,12 +2300,6 @@ int num; /* Number of bytes to move */
/* Return unit status */
*unitstat = CSW_CE | CSW_DE;

//! /* Display various information, maybe */
//! if( grp->debug )
//! {
//! mpc_display_description( dev, "*** Activate Queues exit ***" );
//! }

break;
}

Expand Down

0 comments on commit df2dc4a

Please sign in to comment.