static int init_seeq(struct net_device *dev, struct sgiseeq_private *sp, struct sgiseeq_regs *sregs) { struct hpc3_ethregs *hregs = sp->hregs; int err; reset_hpc3_and_seeq(hregs, sregs); err = seeq_init_ring(dev); if (err) return err; /* Setup to field the proper interrupt types. */ if (sp->is_edlc) { sregs->tstat = TSTAT_INIT_EDLC; sregs->rw.wregs.control = sp->control; sregs->rw.wregs.frame_gap = 0; } else { sregs->tstat = TSTAT_INIT_SEEQ; } hregs->rx_ndptr = VIRT_TO_DMA(sp, sp->rx_desc); hregs->tx_ndptr = VIRT_TO_DMA(sp, sp->tx_desc); seeq_go(sp, hregs, sregs); return 0; }
static int init_seeq(struct net_device *dev, struct sgiseeq_private *sp, volatile struct sgiseeq_regs *sregs) { volatile struct hpc3_ethregs *hregs = sp->hregs; int err; reset_hpc3_and_seeq(hregs, sregs); err = seeq_init_ring(dev); if (err) return err; /* Setup to field the proper interrupt types. */ if (sp->is_edlc) { sregs->tstat = (TSTAT_INIT_EDLC); sregs->rw.wregs.control = sp->control; sregs->rw.wregs.frame_gap = 0; } else { sregs->tstat = (TSTAT_INIT_SEEQ); } hregs->rx_dconfig |= RDMACFG_INIT; hregs->rx_ndptr = PHYSADDR(&sp->srings.rx_desc[0]); hregs->tx_ndptr = PHYSADDR(&sp->srings.tx_desc[0]); seeq_go(sp, hregs, sregs); return 0; }