-/* $OpenBSD: xd.c,v 1.62 2014/07/11 16:35:40 jsg Exp $ */
+/* $OpenBSD: xd.c,v 1.63 2015/01/12 21:31:06 miod Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
iopb->headno =
(iorq->blockno / iorq->xd->nhead) %
iorq->xd->nhead;
- iopb->sectno = iorq->blockno % XDFM_BPS;
+ iopb->sectno = iorq->blockno % iorq->xd->nsect;
iopb->daddr = (u_long) iorq->dbuf - DVMA_BASE;
XDC_HWAIT(xdcsc, rqno);
xdc_start(xdcsc, 1); /* resubmit */
/* second to last acyl */
i = iorq->xd->sectpercyl - 1 - i; /* follow bad144
* standard */
- iopb->headno = i / iorq->xd->nhead;
- iopb->sectno = i % iorq->xd->nhead;
+ iopb->headno = i % iorq->xd->nhead;
+ iopb->sectno = i / iorq->xd->nhead;
XDC_HWAIT(xdcsc, rqno);
xdc_start(xdcsc, 1); /* resubmit */
return (XD_ERR_AOK); /* recovered! */
-/* $OpenBSD: xy.c,v 1.59 2014/07/11 16:35:40 jsg Exp $ */
+/* $OpenBSD: xy.c,v 1.60 2015/01/12 21:31:06 miod Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
iopb->head =
(iorq->blockno / iorq->xy->nhead) %
iorq->xy->nhead;
- iopb->sect = iorq->blockno % XYFM_BPS;
+ iopb->sect = iorq->blockno % iorq->xy->nsect;
addr = (u_long) iorq->dbuf - DVMA_BASE;
iopb->dataa = (addr & 0xffff);
iopb->datar = ((addr & 0xff0000) >> 16);
- /* will resubit at end */
+ /* will resubmit at end */
continue;
}
}
/* second to last acyl */
i = iorq->xy->sectpercyl - 1 - i; /* follow bad144
* standard */
- iopb->head = i / iorq->xy->nhead;
- iopb->sect = i % iorq->xy->nhead;
+ iopb->head = i % iorq->xy->nhead;
+ iopb->sect = i / iorq->xy->nhead;
/* will resubmit when we come out of remove_iorq */
return (XY_ERR_AOK); /* recovered! */
}