mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Make sure the last command byte makes it onto the wire.
This commit is contained in:
parent
0a1a279e93
commit
09dbf9afd3
1 changed files with 7 additions and 5 deletions
|
|
@ -347,14 +347,16 @@ gpib_ib_irq(struct upd7210 *u)
|
|||
|
||||
ib = u->ibfoo;
|
||||
|
||||
if ((u->rreg[ISR2] & IXR2_CO) && ib->cmdlen > 0) {
|
||||
if ((u->rreg[ISR2] & IXR2_CO) && ib->cmdbuf != NULL) {
|
||||
if (ib->cmdlen == 0) {
|
||||
wakeup(ib);
|
||||
ib->cmdbuf = NULL;
|
||||
write_reg(u, IMR2, 0);
|
||||
return (1);
|
||||
}
|
||||
write_reg(u, CDOR, *ib->cmdbuf);
|
||||
ib->cmdbuf++;
|
||||
ib->cmdlen--;
|
||||
if (ib->cmdlen == 0) {
|
||||
wakeup(ib);
|
||||
write_reg(u, IMR2, 0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
if ((u->rreg[ISR1] & IXR1_DO) && ib->dobuf != NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue