Lines 1-6
Link Here
|
1 |
--- PDP11/pdp11_rq.c.orig 2016-12-01 22:43:42 UTC |
1 |
--- PDP11/pdp11_rq.c.orig 2024-02-15 23:20:23 UTC |
2 |
+++ PDP11/pdp11_rq.c |
2 |
+++ PDP11/pdp11_rq.c |
3 |
@@ -1352,7 +1352,7 @@ UNIT *uptr; |
3 |
@@ -1600,7 +1600,7 @@ UNIT *uptr; |
4 |
DEVICE *dptr = rq_devmap[cp->cnum]; |
4 |
DEVICE *dptr = rq_devmap[cp->cnum]; |
5 |
|
5 |
|
6 |
tpkt = 0; /* set no mtch */ |
6 |
tpkt = 0; /* set no mtch */ |
Lines 9-107
Link Here
|
9 |
if (uptr->cpkt && /* curr pkt? */ |
9 |
if (uptr->cpkt && /* curr pkt? */ |
10 |
(GETP32 (uptr->cpkt, CMD_REFL) == ref)) { /* match ref? */ |
10 |
(GETP32 (uptr->cpkt, CMD_REFL) == ref)) { /* match ref? */ |
11 |
tpkt = uptr->cpkt; /* save match */ |
11 |
tpkt = uptr->cpkt; /* save match */ |
12 |
@@ -1365,8 +1365,8 @@ if (uptr = rq_getucb (cp, lu)) { |
12 |
@@ -1613,8 +1613,8 @@ if (uptr = rq_getucb (cp, lu)) { |
13 |
tpkt = uptr->pktq; /* save match */ |
13 |
tpkt = uptr->pktq; /* save match */ |
14 |
uptr->pktq = cp->pak[tpkt].link; /* unlink */ |
14 |
uptr->pktq = cp->pak[tpkt].link; /* unlink */ |
15 |
} |
15 |
} |
16 |
- else if (prv = uptr->pktq) { /* srch pkt q */ |
16 |
- else if (prv = uptr->pktq) { /* srch pkt q */ |
17 |
- while (tpkt = cp->pak[prv].link) { /* walk list */ |
17 |
- while (tpkt = cp->pak[prv].link) { /* walk list */ |
18 |
+ else if ((prv = uptr->pktq)) { /* srch pkt q */ |
18 |
+ else if ((prv = uptr->pktq)) { /* srch pkt q */ |
19 |
+ while ((tpkt = cp->pak[prv].link)) { /* walk list */ |
19 |
+ while ((tpkt = cp->pak[prv].link)) { /* walk list */ |
20 |
if (GETP32 (tpkt, RSP_REFL) == ref) { /* match? unlink */ |
20 |
if (GETP32 (tpkt, RSP_REFL) == ref) { /* match? unlink */ |
21 |
cp->pak[prv].link = cp->pak[tpkt].link; |
21 |
cp->pak[prv].link = cp->pak[tpkt].link; |
22 |
break; |
22 |
break; |
23 |
@@ -1393,7 +1393,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
23 |
@@ -1642,7 +1642,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
24 |
uint32 sts; |
24 |
uint32 sts; |
25 |
UNIT *uptr; |
25 |
UNIT *uptr; |
26 |
|
26 |
|
27 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
27 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
28 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
28 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
29 |
if (q && uptr->cpkt) { /* need to queue? */ |
29 |
if (q && uptr->cpkt) { /* need to queue? */ |
30 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
30 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
31 |
return OK; |
31 |
return OK; |
32 |
@@ -1447,7 +1447,7 @@ if (cp->pak[pkt].d[CMD_MOD] & MD_NXU) { |
32 |
@@ -1696,7 +1696,7 @@ if (cp->pak[pkt].d[CMD_MOD] & MD_NXU) { |
33 |
cp->pak[pkt].d[RSP_UN] = lu; |
33 |
cp->pak[pkt].d[RSP_UN] = lu; |
34 |
} |
34 |
} |
35 |
} |
35 |
} |
36 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
36 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
37 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
37 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
38 |
if ((uptr->flags & UNIT_ATT) == 0) /* not attached? */ |
38 |
if ((uptr->flags & UNIT_ATT) == 0) /* not attached? */ |
39 |
sts = ST_OFL | SB_OFL_NV; /* offl no vol */ |
39 |
sts = ST_OFL | SB_OFL_NV; /* offl no vol */ |
40 |
else if (uptr->flags & UNIT_ONL) /* online */ |
40 |
else if (uptr->flags & UNIT_ONL) /* online */ |
41 |
@@ -1482,7 +1482,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
41 |
@@ -1731,7 +1731,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
42 |
uint32 sts; |
42 |
uint32 sts; |
43 |
UNIT *uptr; |
43 |
UNIT *uptr; |
44 |
|
44 |
|
45 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
45 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
46 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
46 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
47 |
if (q && uptr->cpkt) { /* need to queue? */ |
47 |
if (q && uptr->cpkt) { /* need to queue? */ |
48 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
48 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
49 |
return OK; |
49 |
return OK; |
50 |
@@ -1520,7 +1520,7 @@ else { |
50 |
@@ -1769,7 +1769,7 @@ else { |
51 |
cmd = GETP (pkt, CMD_OPC, OPC); /* get opcode */ |
51 |
cmd = GETP (pkt, CMD_OPC, OPC); /* get opcode */ |
52 |
cp->cflgs = (cp->cflgs & CF_RPL) | /* hack ctrl flgs */ |
52 |
cp->cflgs = (cp->cflgs & CF_RPL) | /* hack ctrl flgs */ |
53 |
cp->pak[pkt].d[SCC_CFL]; |
53 |
cp->pak[pkt].d[SCC_CFL]; |
54 |
- if (cp->htmo = cp->pak[pkt].d[SCC_TMO]) /* set timeout */ |
54 |
- if (cp->htmo = cp->pak[pkt].d[SCC_TMO]) /* set timeout */ |
55 |
+ if ((cp->htmo = cp->pak[pkt].d[SCC_TMO])) /* set timeout */ |
55 |
+ if ((cp->htmo = cp->pak[pkt].d[SCC_TMO])) /* set timeout */ |
56 |
cp->htmo = cp->htmo + 2; /* if nz, round up */ |
56 |
cp->htmo = cp->htmo + 2; /* if nz, round up */ |
57 |
cp->pak[pkt].d[SCC_CFL] = cp->cflgs; /* return flags */ |
57 |
cp->pak[pkt].d[SCC_CFL] = cp->cflgs; /* return flags */ |
58 |
cp->pak[pkt].d[SCC_TMO] = RQ_DCTMO; /* ctrl timeout */ |
58 |
cp->pak[pkt].d[SCC_TMO] = RQ_DCTMO; /* ctrl timeout */ |
59 |
@@ -1547,7 +1547,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
59 |
@@ -1796,7 +1796,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
60 |
uint32 sts; |
60 |
uint32 sts; |
61 |
UNIT *uptr; |
61 |
UNIT *uptr; |
62 |
|
62 |
|
63 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
63 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
64 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
64 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
65 |
if (q && uptr->cpkt) { /* need to queue? */ |
65 |
if (q && uptr->cpkt) { /* need to queue? */ |
66 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
66 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
67 |
return OK; |
67 |
return OK; |
68 |
@@ -1576,7 +1576,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
68 |
@@ -1825,7 +1825,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
69 |
uint32 sts; |
69 |
uint32 sts; |
70 |
UNIT *uptr; |
70 |
UNIT *uptr; |
71 |
|
71 |
|
72 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
72 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
73 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
73 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
74 |
if (q && uptr->cpkt) { /* need to queue? */ |
74 |
if (q && uptr->cpkt) { /* need to queue? */ |
75 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
75 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
76 |
return OK; |
76 |
return OK; |
77 |
@@ -1610,7 +1610,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
77 |
@@ -1859,7 +1859,7 @@ uint32 cmd = GETP (pkt, CMD_OPC, OPC); |
78 |
uint32 sts; |
78 |
uint32 sts; |
79 |
UNIT *uptr; |
79 |
UNIT *uptr; |
80 |
|
80 |
|
81 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
81 |
-if (uptr = rq_getucb (cp, lu)) { /* unit exist? */ |
82 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
82 |
+if ((uptr = rq_getucb (cp, lu))) { /* unit exist? */ |
83 |
if (q && uptr->cpkt) { /* need to queue? */ |
83 |
if (q && uptr->cpkt) { /* need to queue? */ |
84 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
84 |
rq_enqt (cp, &uptr->pktq, pkt); /* do later */ |
85 |
return OK; |
85 |
return OK; |
86 |
@@ -1725,7 +1725,7 @@ if (cmd == OP_ERS) { |
86 |
@@ -1974,7 +1974,7 @@ if (cmd == OP_ERS) { |
87 |
|
87 |
|
88 |
else if (cmd == OP_WR) { /* write? */ |
88 |
else if (cmd == OP_WR) { /* write? */ |
89 |
t = Map_ReadW (ba, tbc, rqxb); /* fetch buffer */ |
89 |
t = Map_ReadW (ba, tbc, rqxb); /* fetch buffer */ |
90 |
- if (abc = tbc - t) { /* any xfer? */ |
90 |
- if (abc = tbc - t) { /* any xfer? */ |
91 |
+ if ((abc = tbc - t)) { /* any xfer? */ |
91 |
+ if ((abc = tbc - t)) { /* any xfer? */ |
92 |
wwc = ((abc + (RQ_NUMBY - 1)) & ~(RQ_NUMBY - 1)) >> 1; |
92 |
wwc = ((abc + (RQ_NUMBY - 1)) & ~(RQ_NUMBY - 1)) >> 1; |
93 |
for (i = (abc >> 1); i < wwc; i++) |
93 |
for (i = (abc >> 1); i < wwc; i++) |
94 |
rqxb[i] = 0; |
94 |
rqxb[i] = 0; |
95 |
@@ -1752,7 +1752,7 @@ else { |
95 |
@@ -2001,7 +2001,7 @@ else { |
96 |
err = ferror (uptr->fileref); |
96 |
err = ferror (uptr->fileref); |
97 |
} |
97 |
} |
98 |
if ((cmd == OP_RD) && !err) { /* read? */ |
98 |
if ((cmd == OP_RD) && !err) { /* read? */ |
99 |
- if (t = Map_WriteW (ba, tbc, rqxb)) { /* store, nxm? */ |
99 |
- if (t = Map_WriteW (ba, tbc, rqxb)) { /* store, nxm? */ |
100 |
+ if ((t = Map_WriteW (ba, tbc, rqxb))) { /* store, nxm? */ |
100 |
+ if ((t = Map_WriteW (ba, tbc, rqxb))) { /* store, nxm? */ |
101 |
PUTP32 (pkt, RW_WBCL, bc - (tbc - t)); /* adj bc */ |
101 |
PUTP32 (pkt, RW_WBCL, bc - (tbc - t)); /* adj bc */ |
102 |
PUTP32 (pkt, RW_WBAL, ba + (tbc - t)); /* adj ba */ |
102 |
PUTP32 (pkt, RW_WBAL, ba + (tbc - t)); /* adj ba */ |
103 |
if (rq_hbe (cp, uptr)) /* post err log */ |
103 |
if (rq_hbe (cp, uptr)) /* post err log */ |
104 |
@@ -2586,11 +2586,11 @@ if ((uptr->flags & UNIT_ONL) == 0) { |
104 |
@@ -2834,11 +2834,11 @@ if ((uptr->flags & UNIT_ONL) == 0) { |
105 |
if (uptr->cpkt) { |
105 |
if (uptr->cpkt) { |
106 |
fprintf (st, "Unit %d current ", u); |
106 |
fprintf (st, "Unit %d current ", u); |
107 |
rq_show_pkt (st, cp, uptr->cpkt); |
107 |
rq_show_pkt (st, cp, uptr->cpkt); |
Lines 115-121
Link Here
|
115 |
} |
115 |
} |
116 |
} |
116 |
} |
117 |
else fprintf (st, "Unit %d queues are empty\n", u); |
117 |
else fprintf (st, "Unit %d queues are empty\n", u); |
118 |
@@ -2617,7 +2617,7 @@ if (val & RQ_SH_RI) { |
118 |
@@ -2865,7 +2865,7 @@ if (val & RQ_SH_RI) { |
119 |
rq_show_ring (st, &cp->rq); |
119 |
rq_show_ring (st, &cp->rq); |
120 |
} |
120 |
} |
121 |
if (val & RQ_SH_FR) { |
121 |
if (val & RQ_SH_FR) { |
Lines 124-130
Link Here
|
124 |
for (i = 0; pkt != 0; i++, pkt = cp->pak[pkt].link) { |
124 |
for (i = 0; pkt != 0; i++, pkt = cp->pak[pkt].link) { |
125 |
if (i == 0) |
125 |
if (i == 0) |
126 |
fprintf (st, "Free queue = %d", pkt); |
126 |
fprintf (st, "Free queue = %d", pkt); |
127 |
@@ -2630,11 +2630,11 @@ if (val & RQ_SH_FR) { |
127 |
@@ -2878,11 +2878,11 @@ if (val & RQ_SH_FR) { |
128 |
else fprintf (st, "Free queue is empty\n"); |
128 |
else fprintf (st, "Free queue is empty\n"); |
129 |
} |
129 |
} |
130 |
if (val & RQ_SH_RS) { |
130 |
if (val & RQ_SH_RS) { |