• Home
  • Raw
  • Download

Lines Matching refs:ks

167 static void ks8851_wrreg16(struct ks8851_net *ks, unsigned reg, unsigned val)  in ks8851_wrreg16()  argument
169 struct spi_transfer *xfer = &ks->spi_xfer1; in ks8851_wrreg16()
170 struct spi_message *msg = &ks->spi_msg1; in ks8851_wrreg16()
181 ret = spi_sync(ks->spidev, msg); in ks8851_wrreg16()
183 netdev_err(ks->netdev, "spi_sync() failed\n"); in ks8851_wrreg16()
194 static void ks8851_wrreg8(struct ks8851_net *ks, unsigned reg, unsigned val) in ks8851_wrreg8() argument
196 struct spi_transfer *xfer = &ks->spi_xfer1; in ks8851_wrreg8()
197 struct spi_message *msg = &ks->spi_msg1; in ks8851_wrreg8()
211 ret = spi_sync(ks->spidev, msg); in ks8851_wrreg8()
213 netdev_err(ks->netdev, "spi_sync() failed\n"); in ks8851_wrreg8()
230 static inline bool ks8851_rx_1msg(struct ks8851_net *ks) in ks8851_rx_1msg() argument
245 static void ks8851_rdreg(struct ks8851_net *ks, unsigned op, in ks8851_rdreg() argument
250 __le16 *txb = (__le16 *)ks->txd; in ks8851_rdreg()
251 u8 *trx = ks->rxd; in ks8851_rdreg()
256 if (ks8851_rx_1msg(ks)) { in ks8851_rdreg()
257 msg = &ks->spi_msg1; in ks8851_rdreg()
258 xfer = &ks->spi_xfer1; in ks8851_rdreg()
264 msg = &ks->spi_msg2; in ks8851_rdreg()
265 xfer = ks->spi_xfer2; in ks8851_rdreg()
277 ret = spi_sync(ks->spidev, msg); in ks8851_rdreg()
279 netdev_err(ks->netdev, "read: spi_sync() failed\n"); in ks8851_rdreg()
280 else if (ks8851_rx_1msg(ks)) in ks8851_rdreg()
293 static unsigned ks8851_rdreg8(struct ks8851_net *ks, unsigned reg) in ks8851_rdreg8() argument
297 ks8851_rdreg(ks, MK_OP(1 << (reg & 3), reg), rxb, 1); in ks8851_rdreg8()
308 static unsigned ks8851_rdreg16(struct ks8851_net *ks, unsigned reg) in ks8851_rdreg16() argument
312 ks8851_rdreg(ks, MK_OP(reg & 2 ? 0xC : 0x3, reg), (u8 *)&rx, 2); in ks8851_rdreg16()
325 static unsigned ks8851_rdreg32(struct ks8851_net *ks, unsigned reg) in ks8851_rdreg32() argument
331 ks8851_rdreg(ks, MK_OP(0xf, reg), (u8 *)&rx, 4); in ks8851_rdreg32()
348 static void ks8851_soft_reset(struct ks8851_net *ks, unsigned op) in ks8851_soft_reset() argument
350 ks8851_wrreg16(ks, KS_GRR, op); in ks8851_soft_reset()
352 ks8851_wrreg16(ks, KS_GRR, 0); in ks8851_soft_reset()
363 static void ks8851_set_powermode(struct ks8851_net *ks, unsigned pwrmode) in ks8851_set_powermode() argument
367 netif_dbg(ks, hw, ks->netdev, "setting power mode %d\n", pwrmode); in ks8851_set_powermode()
369 pmecr = ks8851_rdreg16(ks, KS_PMECR); in ks8851_set_powermode()
373 ks8851_wrreg16(ks, KS_PMECR, pmecr); in ks8851_set_powermode()
387 struct ks8851_net *ks = netdev_priv(dev); in ks8851_write_mac_addr() local
390 mutex_lock(&ks->lock); in ks8851_write_mac_addr()
396 ks8851_set_powermode(ks, PMECR_PM_NORMAL); in ks8851_write_mac_addr()
398 ks8851_wrreg8(ks, KS_MAR(i), dev->dev_addr[i]); in ks8851_write_mac_addr()
400 ks8851_set_powermode(ks, PMECR_PM_SOFTDOWN); in ks8851_write_mac_addr()
402 mutex_unlock(&ks->lock); in ks8851_write_mac_addr()
415 struct ks8851_net *ks = netdev_priv(dev); in ks8851_read_mac_addr() local
418 mutex_lock(&ks->lock); in ks8851_read_mac_addr()
421 dev->dev_addr[i] = ks8851_rdreg8(ks, KS_MAR(i)); in ks8851_read_mac_addr()
423 mutex_unlock(&ks->lock); in ks8851_read_mac_addr()
435 static void ks8851_init_mac(struct ks8851_net *ks) in ks8851_init_mac() argument
437 struct net_device *dev = ks->netdev; in ks8851_init_mac()
440 if (ks->rc_ccr & CCR_EEPROM) { in ks8851_init_mac()
445 netdev_err(ks->netdev, "invalid mac address read %pM\n", in ks8851_init_mac()
462 static void ks8851_rdfifo(struct ks8851_net *ks, u8 *buff, unsigned len) in ks8851_rdfifo() argument
464 struct spi_transfer *xfer = ks->spi_xfer2; in ks8851_rdfifo()
465 struct spi_message *msg = &ks->spi_msg2; in ks8851_rdfifo()
469 netif_dbg(ks, rx_status, ks->netdev, in ks8851_rdfifo()
484 ret = spi_sync(ks->spidev, msg); in ks8851_rdfifo()
486 netdev_err(ks->netdev, "%s: spi_sync() failed\n", __func__); in ks8851_rdfifo()
496 static void ks8851_dbg_dumpkkt(struct ks8851_net *ks, u8 *rxpkt) in ks8851_dbg_dumpkkt() argument
498 netdev_dbg(ks->netdev, in ks8851_dbg_dumpkkt()
513 static void ks8851_rx_pkts(struct ks8851_net *ks) in ks8851_rx_pkts() argument
522 rxfc = ks8851_rdreg8(ks, KS_RXFC); in ks8851_rx_pkts()
524 netif_dbg(ks, rx_status, ks->netdev, in ks8851_rx_pkts()
538 rxh = ks8851_rdreg32(ks, KS_RXFHSR); in ks8851_rx_pkts()
542 netif_dbg(ks, rx_status, ks->netdev, in ks8851_rx_pkts()
548 ks8851_wrreg16(ks, KS_RXFDPR, RXFDPR_RXFPAI | 0x00); in ks8851_rx_pkts()
551 ks8851_wrreg16(ks, KS_RXQCR, in ks8851_rx_pkts()
552 ks->rc_rxqcr | RXQCR_SDA | RXQCR_ADRFE); in ks8851_rx_pkts()
559 skb = netdev_alloc_skb_ip_align(ks->netdev, rxalign); in ks8851_rx_pkts()
570 ks8851_rdfifo(ks, rxpkt, rxalign + 8); in ks8851_rx_pkts()
572 if (netif_msg_pktdata(ks)) in ks8851_rx_pkts()
573 ks8851_dbg_dumpkkt(ks, rxpkt); in ks8851_rx_pkts()
575 skb->protocol = eth_type_trans(skb, ks->netdev); in ks8851_rx_pkts()
578 ks->netdev->stats.rx_packets++; in ks8851_rx_pkts()
579 ks->netdev->stats.rx_bytes += rxlen; in ks8851_rx_pkts()
583 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr); in ks8851_rx_pkts()
601 struct ks8851_net *ks = _ks; in ks8851_irq() local
605 mutex_lock(&ks->lock); in ks8851_irq()
607 status = ks8851_rdreg16(ks, KS_ISR); in ks8851_irq()
609 netif_dbg(ks, intr, ks->netdev, in ks8851_irq()
616 u16 pmecr = ks8851_rdreg16(ks, KS_PMECR); in ks8851_irq()
618 ks8851_wrreg16(ks, KS_PMECR, pmecr | PMECR_WKEVT_LINK); in ks8851_irq()
633 ks->tx_space = ks8851_rdreg16(ks, KS_TXMIR); in ks8851_irq()
635 netif_dbg(ks, intr, ks->netdev, in ks8851_irq()
636 "%s: txspace %d\n", __func__, ks->tx_space); in ks8851_irq()
643 dev_err(&ks->spidev->dev, "%s: spi bus error\n", __func__); in ks8851_irq()
647 ks8851_wrreg16(ks, KS_ISR, handled); in ks8851_irq()
655 ks8851_rx_pkts(ks); in ks8851_irq()
662 struct ks8851_rxctrl *rxc = &ks->rxctrl; in ks8851_irq()
665 ks8851_wrreg16(ks, KS_MAHTR0, rxc->mchash[0]); in ks8851_irq()
666 ks8851_wrreg16(ks, KS_MAHTR1, rxc->mchash[1]); in ks8851_irq()
667 ks8851_wrreg16(ks, KS_MAHTR2, rxc->mchash[2]); in ks8851_irq()
668 ks8851_wrreg16(ks, KS_MAHTR3, rxc->mchash[3]); in ks8851_irq()
670 ks8851_wrreg16(ks, KS_RXCR2, rxc->rxcr2); in ks8851_irq()
671 ks8851_wrreg16(ks, KS_RXCR1, rxc->rxcr1); in ks8851_irq()
674 mutex_unlock(&ks->lock); in ks8851_irq()
677 mii_check_link(&ks->mii); in ks8851_irq()
680 netif_wake_queue(ks->netdev); in ks8851_irq()
708 static void ks8851_wrpkt(struct ks8851_net *ks, struct sk_buff *txp, bool irq) in ks8851_wrpkt() argument
710 struct spi_transfer *xfer = ks->spi_xfer2; in ks8851_wrpkt()
711 struct spi_message *msg = &ks->spi_msg2; in ks8851_wrpkt()
715 netif_dbg(ks, tx_queued, ks->netdev, "%s: skb %p, %d@%p, irq %d\n", in ks8851_wrpkt()
718 fid = ks->fid++; in ks8851_wrpkt()
725 ks->txh.txb[1] = KS_SPIOP_TXFIFO; in ks8851_wrpkt()
726 ks->txh.txw[1] = cpu_to_le16(fid); in ks8851_wrpkt()
727 ks->txh.txw[2] = cpu_to_le16(txp->len); in ks8851_wrpkt()
729 xfer->tx_buf = &ks->txh.txb[1]; in ks8851_wrpkt()
738 ret = spi_sync(ks->spidev, msg); in ks8851_wrpkt()
740 netdev_err(ks->netdev, "%s: spi_sync() failed\n", __func__); in ks8851_wrpkt()
748 static void ks8851_done_tx(struct ks8851_net *ks, struct sk_buff *txb) in ks8851_done_tx() argument
750 struct net_device *dev = ks->netdev; in ks8851_done_tx()
767 struct ks8851_net *ks = container_of(work, struct ks8851_net, tx_work); in ks8851_tx_work() local
769 bool last = skb_queue_empty(&ks->txq); in ks8851_tx_work()
771 mutex_lock(&ks->lock); in ks8851_tx_work()
774 txb = skb_dequeue(&ks->txq); in ks8851_tx_work()
775 last = skb_queue_empty(&ks->txq); in ks8851_tx_work()
778 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_SDA); in ks8851_tx_work()
779 ks8851_wrpkt(ks, txb, last); in ks8851_tx_work()
780 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr); in ks8851_tx_work()
781 ks8851_wrreg16(ks, KS_TXQCR, TXQCR_METFE); in ks8851_tx_work()
783 ks8851_done_tx(ks, txb); in ks8851_tx_work()
787 mutex_unlock(&ks->lock); in ks8851_tx_work()
799 struct ks8851_net *ks = netdev_priv(dev); in ks8851_net_open() local
803 mutex_lock(&ks->lock); in ks8851_net_open()
805 netif_dbg(ks, ifup, ks->netdev, "opening\n"); in ks8851_net_open()
808 ks8851_set_powermode(ks, PMECR_PM_NORMAL); in ks8851_net_open()
812 ks8851_soft_reset(ks, GRR_QMU); in ks8851_net_open()
816 ks8851_wrreg16(ks, KS_TXCR, (TXCR_TXE | /* enable transmit process */ in ks8851_net_open()
822 ks8851_wrreg16(ks, KS_TXFDPR, TXFDPR_TXFPAI); in ks8851_net_open()
826 ks8851_wrreg16(ks, KS_RXCR1, (RXCR1_RXPAFMA | /* from mac filter */ in ks8851_net_open()
833 ks8851_wrreg16(ks, KS_RXCR2, RXCR2_SRDBL_FRAME); in ks8851_net_open()
836 ks8851_wrreg16(ks, KS_RXDTTR, 1000); /* 1ms after first frame to IRQ */ in ks8851_net_open()
837 ks8851_wrreg16(ks, KS_RXDBCTR, 4096); /* >4Kbytes in buffer to IRQ */ in ks8851_net_open()
838 ks8851_wrreg16(ks, KS_RXFCTR, 10); /* 10 frames to IRQ */ in ks8851_net_open()
840 ks->rc_rxqcr = (RXQCR_RXFCTE | /* IRQ on frame count exceeded */ in ks8851_net_open()
844 ks8851_wrreg16(ks, KS_RXQCR, ks->rc_rxqcr); in ks8851_net_open()
855 ks->rc_ier = STD_IRQ; in ks8851_net_open()
856 ks8851_wrreg16(ks, KS_ISR, STD_IRQ); in ks8851_net_open()
857 ks8851_wrreg16(ks, KS_IER, STD_IRQ); in ks8851_net_open()
859 netif_start_queue(ks->netdev); in ks8851_net_open()
861 netif_dbg(ks, ifup, ks->netdev, "network device up\n"); in ks8851_net_open()
863 mutex_unlock(&ks->lock); in ks8851_net_open()
877 struct ks8851_net *ks = netdev_priv(dev); in ks8851_net_stop() local
879 netif_info(ks, ifdown, dev, "shutting down\n"); in ks8851_net_stop()
883 mutex_lock(&ks->lock); in ks8851_net_stop()
885 ks8851_wrreg16(ks, KS_IER, 0x0000); in ks8851_net_stop()
886 ks8851_wrreg16(ks, KS_ISR, 0xffff); in ks8851_net_stop()
887 mutex_unlock(&ks->lock); in ks8851_net_stop()
890 flush_work(&ks->tx_work); in ks8851_net_stop()
891 flush_work(&ks->rxctrl_work); in ks8851_net_stop()
893 mutex_lock(&ks->lock); in ks8851_net_stop()
895 ks8851_wrreg16(ks, KS_RXCR1, 0x0000); in ks8851_net_stop()
898 ks8851_wrreg16(ks, KS_TXCR, 0x0000); in ks8851_net_stop()
901 ks8851_set_powermode(ks, PMECR_PM_SOFTDOWN); in ks8851_net_stop()
902 mutex_unlock(&ks->lock); in ks8851_net_stop()
905 while (!skb_queue_empty(&ks->txq)) { in ks8851_net_stop()
906 struct sk_buff *txb = skb_dequeue(&ks->txq); in ks8851_net_stop()
908 netif_dbg(ks, ifdown, ks->netdev, in ks8851_net_stop()
933 struct ks8851_net *ks = netdev_priv(dev); in ks8851_start_xmit() local
937 netif_dbg(ks, tx_queued, ks->netdev, in ks8851_start_xmit()
940 spin_lock(&ks->statelock); in ks8851_start_xmit()
942 if (needed > ks->tx_space) { in ks8851_start_xmit()
946 ks->tx_space -= needed; in ks8851_start_xmit()
947 skb_queue_tail(&ks->txq, skb); in ks8851_start_xmit()
950 spin_unlock(&ks->statelock); in ks8851_start_xmit()
951 schedule_work(&ks->tx_work); in ks8851_start_xmit()
971 struct ks8851_net *ks = container_of(work, struct ks8851_net, rxctrl_work); in ks8851_rxctrl_work() local
973 mutex_lock(&ks->lock); in ks8851_rxctrl_work()
976 ks8851_wrreg16(ks, KS_RXCR1, 0x00); in ks8851_rxctrl_work()
978 mutex_unlock(&ks->lock); in ks8851_rxctrl_work()
983 struct ks8851_net *ks = netdev_priv(dev); in ks8851_set_rx_mode() local
1025 spin_lock(&ks->statelock); in ks8851_set_rx_mode()
1027 if (memcmp(&rxctrl, &ks->rxctrl, sizeof(rxctrl)) != 0) { in ks8851_set_rx_mode()
1028 memcpy(&ks->rxctrl, &rxctrl, sizeof(ks->rxctrl)); in ks8851_set_rx_mode()
1029 schedule_work(&ks->rxctrl_work); in ks8851_set_rx_mode()
1032 spin_unlock(&ks->statelock); in ks8851_set_rx_mode()
1051 struct ks8851_net *ks = netdev_priv(dev); in ks8851_net_ioctl() local
1056 return generic_mii_ioctl(&ks->mii, if_mii(req), cmd, NULL); in ks8851_net_ioctl()
1082 struct ks8851_net *ks = netdev_priv(dev); in ks8851_get_msglevel() local
1083 return ks->msg_enable; in ks8851_get_msglevel()
1088 struct ks8851_net *ks = netdev_priv(dev); in ks8851_set_msglevel() local
1089 ks->msg_enable = to; in ks8851_set_msglevel()
1094 struct ks8851_net *ks = netdev_priv(dev); in ks8851_get_settings() local
1095 return mii_ethtool_gset(&ks->mii, cmd); in ks8851_get_settings()
1100 struct ks8851_net *ks = netdev_priv(dev); in ks8851_set_settings() local
1101 return mii_ethtool_sset(&ks->mii, cmd); in ks8851_set_settings()
1106 struct ks8851_net *ks = netdev_priv(dev); in ks8851_get_link() local
1107 return mii_link_ok(&ks->mii); in ks8851_get_link()
1112 struct ks8851_net *ks = netdev_priv(dev); in ks8851_nway_reset() local
1113 return mii_nway_restart(&ks->mii); in ks8851_nway_reset()
1120 struct ks8851_net *ks = ee->data; in ks8851_eeprom_regread() local
1123 val = ks8851_rdreg16(ks, KS_EEPCR); in ks8851_eeprom_regread()
1132 struct ks8851_net *ks = ee->data; in ks8851_eeprom_regwrite() local
1144 ks8851_wrreg16(ks, KS_EEPCR, val); in ks8851_eeprom_regwrite()
1154 static int ks8851_eeprom_claim(struct ks8851_net *ks) in ks8851_eeprom_claim() argument
1156 if (!(ks->rc_ccr & CCR_EEPROM)) in ks8851_eeprom_claim()
1159 mutex_lock(&ks->lock); in ks8851_eeprom_claim()
1162 ks8851_wrreg16(ks, KS_EEPCR, EEPCR_EESA | EEPCR_EECS); in ks8851_eeprom_claim()
1172 static void ks8851_eeprom_release(struct ks8851_net *ks) in ks8851_eeprom_release() argument
1174 unsigned val = ks8851_rdreg16(ks, KS_EEPCR); in ks8851_eeprom_release()
1176 ks8851_wrreg16(ks, KS_EEPCR, val & ~EEPCR_EESA); in ks8851_eeprom_release()
1177 mutex_unlock(&ks->lock); in ks8851_eeprom_release()
1185 struct ks8851_net *ks = netdev_priv(dev); in ks8851_set_eeprom() local
1197 if (ks8851_eeprom_claim(ks)) in ks8851_set_eeprom()
1200 eeprom_93cx6_wren(&ks->eeprom, true); in ks8851_set_eeprom()
1205 eeprom_93cx6_read(&ks->eeprom, offset/2, &tmp); in ks8851_set_eeprom()
1215 eeprom_93cx6_write(&ks->eeprom, offset/2, tmp); in ks8851_set_eeprom()
1216 eeprom_93cx6_wren(&ks->eeprom, false); in ks8851_set_eeprom()
1218 ks8851_eeprom_release(ks); in ks8851_set_eeprom()
1226 struct ks8851_net *ks = netdev_priv(dev); in ks8851_get_eeprom() local
1234 if (ks8851_eeprom_claim(ks)) in ks8851_get_eeprom()
1239 eeprom_93cx6_multiread(&ks->eeprom, offset/2, (__le16 *)data, len/2); in ks8851_get_eeprom()
1240 ks8851_eeprom_release(ks); in ks8851_get_eeprom()
1247 struct ks8851_net *ks = netdev_priv(dev); in ks8851_get_eeprom_len() local
1250 return ks->rc_ccr & CCR_EEPROM ? 128 : 0; in ks8851_get_eeprom_len()
1313 struct ks8851_net *ks = netdev_priv(dev); in ks8851_phy_read() local
1321 mutex_lock(&ks->lock); in ks8851_phy_read()
1322 result = ks8851_rdreg16(ks, ksreg); in ks8851_phy_read()
1323 mutex_unlock(&ks->lock); in ks8851_phy_read()
1331 struct ks8851_net *ks = netdev_priv(dev); in ks8851_phy_write() local
1336 mutex_lock(&ks->lock); in ks8851_phy_write()
1337 ks8851_wrreg16(ks, ksreg, value); in ks8851_phy_write()
1338 mutex_unlock(&ks->lock); in ks8851_phy_write()
1348 static int ks8851_read_selftest(struct ks8851_net *ks) in ks8851_read_selftest() argument
1354 rd = ks8851_rdreg16(ks, KS_MBIR); in ks8851_read_selftest()
1357 netdev_warn(ks->netdev, "Memory selftest not finished\n"); in ks8851_read_selftest()
1362 netdev_err(ks->netdev, "TX memory selftest fail\n"); in ks8851_read_selftest()
1367 netdev_err(ks->netdev, "RX memory selftest fail\n"); in ks8851_read_selftest()
1380 struct ks8851_net *ks = dev_get_drvdata(dev); in ks8851_suspend() local
1381 struct net_device *netdev = ks->netdev; in ks8851_suspend()
1393 struct ks8851_net *ks = dev_get_drvdata(dev); in ks8851_resume() local
1394 struct net_device *netdev = ks->netdev; in ks8851_resume()
1410 struct ks8851_net *ks; in ks8851_probe() local
1421 ks = netdev_priv(ndev); in ks8851_probe()
1423 ks->netdev = ndev; in ks8851_probe()
1424 ks->spidev = spi; in ks8851_probe()
1425 ks->tx_space = 6144; in ks8851_probe()
1434 ks->gpio = gpio; in ks8851_probe()
1444 ks->vdd_io = devm_regulator_get(&spi->dev, "vdd-io"); in ks8851_probe()
1445 if (IS_ERR(ks->vdd_io)) { in ks8851_probe()
1446 ret = PTR_ERR(ks->vdd_io); in ks8851_probe()
1450 ret = regulator_enable(ks->vdd_io); in ks8851_probe()
1457 ks->vdd_reg = devm_regulator_get(&spi->dev, "vdd"); in ks8851_probe()
1458 if (IS_ERR(ks->vdd_reg)) { in ks8851_probe()
1459 ret = PTR_ERR(ks->vdd_reg); in ks8851_probe()
1463 ret = regulator_enable(ks->vdd_reg); in ks8851_probe()
1475 mutex_init(&ks->lock); in ks8851_probe()
1476 spin_lock_init(&ks->statelock); in ks8851_probe()
1478 INIT_WORK(&ks->tx_work, ks8851_tx_work); in ks8851_probe()
1479 INIT_WORK(&ks->rxctrl_work, ks8851_rxctrl_work); in ks8851_probe()
1483 spi_message_init(&ks->spi_msg1); in ks8851_probe()
1484 spi_message_add_tail(&ks->spi_xfer1, &ks->spi_msg1); in ks8851_probe()
1486 spi_message_init(&ks->spi_msg2); in ks8851_probe()
1487 spi_message_add_tail(&ks->spi_xfer2[0], &ks->spi_msg2); in ks8851_probe()
1488 spi_message_add_tail(&ks->spi_xfer2[1], &ks->spi_msg2); in ks8851_probe()
1492 ks->eeprom.data = ks; in ks8851_probe()
1493 ks->eeprom.width = PCI_EEPROM_WIDTH_93C46; in ks8851_probe()
1494 ks->eeprom.register_read = ks8851_eeprom_regread; in ks8851_probe()
1495 ks->eeprom.register_write = ks8851_eeprom_regwrite; in ks8851_probe()
1498 ks->mii.dev = ndev; in ks8851_probe()
1499 ks->mii.phy_id = 1, in ks8851_probe()
1500 ks->mii.phy_id_mask = 1; in ks8851_probe()
1501 ks->mii.reg_num_mask = 0xf; in ks8851_probe()
1502 ks->mii.mdio_read = ks8851_phy_read; in ks8851_probe()
1503 ks->mii.mdio_write = ks8851_phy_write; in ks8851_probe()
1508 ks->msg_enable = netif_msg_init(msg_enable, (NETIF_MSG_DRV | in ks8851_probe()
1512 skb_queue_head_init(&ks->txq); in ks8851_probe()
1517 spi_set_drvdata(spi, ks); in ks8851_probe()
1524 ks8851_soft_reset(ks, GRR_GSR); in ks8851_probe()
1527 cider = ks8851_rdreg16(ks, KS_CIDER); in ks8851_probe()
1535 ks->rc_ccr = ks8851_rdreg16(ks, KS_CCR); in ks8851_probe()
1537 if (ks->rc_ccr & CCR_EEPROM) in ks8851_probe()
1538 ks->eeprom_size = 128; in ks8851_probe()
1540 ks->eeprom_size = 0; in ks8851_probe()
1542 ks8851_read_selftest(ks); in ks8851_probe()
1543 ks8851_init_mac(ks); in ks8851_probe()
1547 ndev->name, ks); in ks8851_probe()
1561 ks->rc_ccr & CCR_EEPROM ? "has" : "no"); in ks8851_probe()
1567 free_irq(ndev->irq, ks); in ks8851_probe()
1573 regulator_disable(ks->vdd_reg); in ks8851_probe()
1575 regulator_disable(ks->vdd_io); in ks8851_probe()