- outputf("3c90x: Status (%hhX)", status);
- /** check error codes **/
- if (status & 0x02)
- {
- outputf("3c90x: Tx Reclaim Error (%hhX)", status);
- a3c90x_reset();
- } else if (status & 0x04) {
- outputf("3c90x: Tx Status Overflow (%hhX)", status);
- for (i=0; i<32; i++)
- _outb(0x00, INF_3C90X.IOAddr + regTxStatus_b);
- /** must re-enable after max collisions before re-issuing tx **/
- _issue_command(INF_3C90X.IOAddr, cmdTxEnable, 0);
- } else if (status & 0x08) {
- outputf("3c90x: Tx Max Collisions (%hhX)", status);
- /** must re-enable after max collisions before re-issuing tx **/
- _issue_command(INF_3C90X.IOAddr, cmdTxEnable, 0);
- } else if (status & 0x10) {
- outputf("3c90x: Tx Underrun (%hhX)", status);
- a3c90x_reset();
- } else if (status & 0x20) {
- outputf("3c90x: Tx Jabber (%hhX)", status);
- a3c90x_reset();
- } else if ((status & 0x80) != 0x80) {
- outputf("3c90x: Internal Error - Incomplete Transmission (%hhX)", status);
- a3c90x_reset();
- }
+ _issue_command(INF_3C90X.IOAddr, cmdStallCtl, 2 /* Stall download */);
+
+ /** Setup the DPD (download descriptor) **/
+ txdesc.next = 0;
+ len = 0;
+ n = 0;
+ oldpbuf = p;
+ for (; p; p = p->next)
+ {
+ txdesc.segments[n].addr = v2p(p->payload);
+ txdesc.segments[n].len = p->len | (p->next ? 0 : (1 << 31));
+ len += p->len;
+ pbuf_ref(p);
+ n++;