Lines Matching refs:ks
55 #define to_ks8851_par(ks) container_of((ks), struct ks8851_net_par, ks8851) argument
64 static void ks8851_lock_par(struct ks8851_net *ks, unsigned long *flags) in ks8851_lock_par() argument
66 struct ks8851_net_par *ksp = to_ks8851_par(ks); in ks8851_lock_par()
78 static void ks8851_unlock_par(struct ks8851_net *ks, unsigned long *flags) in ks8851_unlock_par() argument
80 struct ks8851_net_par *ksp = to_ks8851_par(ks); in ks8851_unlock_par()
93 static int ks_check_endian(struct ks8851_net *ks) in ks_check_endian() argument
95 struct ks8851_net_par *ksp = to_ks8851_par(ks); in ks_check_endian()
124 netdev_err(ks->netdev, "incorrect EESK endian strap setting\n"); in ks_check_endian()
137 static void ks8851_wrreg16_par(struct ks8851_net *ks, unsigned int reg, in ks8851_wrreg16_par() argument
140 struct ks8851_net_par *ksp = to_ks8851_par(ks); in ks8851_wrreg16_par()
154 static unsigned int ks8851_rdreg16_par(struct ks8851_net *ks, unsigned int reg) in ks8851_rdreg16_par() argument
156 struct ks8851_net_par *ksp = to_ks8851_par(ks); in ks8851_rdreg16_par()
172 static void ks8851_rdfifo_par(struct ks8851_net *ks, u8 *buff, unsigned int len) in ks8851_rdfifo_par() argument
174 struct ks8851_net_par *ksp = to_ks8851_par(ks); in ks8851_rdfifo_par()
176 netif_dbg(ks, rx_status, ks->netdev, in ks8851_rdfifo_par()
193 static void ks8851_wrfifo_par(struct ks8851_net *ks, struct sk_buff *txp, in ks8851_wrfifo_par() argument
196 struct ks8851_net_par *ksp = to_ks8851_par(ks); in ks8851_wrfifo_par()
200 netif_dbg(ks, tx_queued, ks->netdev, "%s: skb %p, %d@%p, irq %d\n", in ks8851_wrfifo_par()
203 fid = ks->fid++; in ks8851_wrfifo_par()
220 static void ks8851_rx_skb_par(struct ks8851_net *ks, struct sk_buff *skb) in ks8851_rx_skb_par() argument
225 static unsigned int ks8851_rdreg16_par_txqcr(struct ks8851_net *ks) in ks8851_rdreg16_par_txqcr() argument
227 return ks8851_rdreg16_par(ks, KS_TXQCR); in ks8851_rdreg16_par_txqcr()
246 struct ks8851_net *ks = netdev_priv(dev); in ks8851_start_xmit_par() local
253 netif_dbg(ks, tx_queued, ks->netdev, in ks8851_start_xmit_par()
256 ks8851_lock_par(ks, &flags); in ks8851_start_xmit_par()
258 txmir = ks8851_rdreg16_par(ks, KS_TXMIR) & 0x1fff; in ks8851_start_xmit_par()
261 ks8851_wrreg16_par(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_SDA); in ks8851_start_xmit_par()
262 ks8851_wrfifo_par(ks, skb, false); in ks8851_start_xmit_par()
263 ks8851_wrreg16_par(ks, KS_RXQCR, ks->rc_rxqcr); in ks8851_start_xmit_par()
264 ks8851_wrreg16_par(ks, KS_TXQCR, TXQCR_METFE); in ks8851_start_xmit_par()
266 err = readx_poll_timeout_atomic(ks8851_rdreg16_par_txqcr, ks, in ks8851_start_xmit_par()
272 ks8851_done_tx(ks, skb); in ks8851_start_xmit_par()
277 ks8851_unlock_par(ks, &flags); in ks8851_start_xmit_par()
287 struct ks8851_net *ks; in ks8851_probe_par() local
294 ks = netdev_priv(netdev); in ks8851_probe_par()
296 ks->lock = ks8851_lock_par; in ks8851_probe_par()
297 ks->unlock = ks8851_unlock_par; in ks8851_probe_par()
298 ks->rdreg16 = ks8851_rdreg16_par; in ks8851_probe_par()
299 ks->wrreg16 = ks8851_wrreg16_par; in ks8851_probe_par()
300 ks->rdfifo = ks8851_rdfifo_par; in ks8851_probe_par()
301 ks->wrfifo = ks8851_wrfifo_par; in ks8851_probe_par()
302 ks->start_xmit = ks8851_start_xmit_par; in ks8851_probe_par()
303 ks->rx_skb = ks8851_rx_skb_par; in ks8851_probe_par()
308 ks->rc_ier = STD_IRQ; in ks8851_probe_par()
310 ksp = to_ks8851_par(ks); in ks8851_probe_par()
321 ret = ks_check_endian(ks); in ks8851_probe_par()