Lines Matching refs:ax_local
39 static int ax88796c_soft_reset(struct ax88796c_device *ax_local) in ax88796c_soft_reset() argument
44 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_soft_reset()
46 AX_WRITE(&ax_local->ax_spi, PSR_RESET, P0_PSR); in ax88796c_soft_reset()
47 AX_WRITE(&ax_local->ax_spi, PSR_RESET_CLR, P0_PSR); in ax88796c_soft_reset()
52 &ax_local->ax_spi, P0_PSR); in ax88796c_soft_reset()
56 temp = AX_READ(&ax_local->ax_spi, P4_SPICR); in ax88796c_soft_reset()
57 if (ax_local->priv_flags & AX_CAP_COMP) { in ax88796c_soft_reset()
58 AX_WRITE(&ax_local->ax_spi, in ax88796c_soft_reset()
60 ax_local->ax_spi.comp = 1; in ax88796c_soft_reset()
62 AX_WRITE(&ax_local->ax_spi, in ax88796c_soft_reset()
64 ax_local->ax_spi.comp = 0; in ax88796c_soft_reset()
70 static int ax88796c_reload_eeprom(struct ax88796c_device *ax_local) in ax88796c_reload_eeprom() argument
74 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_reload_eeprom()
76 AX_WRITE(&ax_local->ax_spi, EECR_RELOAD, P3_EECR); in ax88796c_reload_eeprom()
81 &ax_local->ax_spi, P0_PSR); in ax88796c_reload_eeprom()
83 dev_err(&ax_local->spi->dev, in ax88796c_reload_eeprom()
93 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_set_hw_multicast() local
97 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_set_hw_multicast()
99 memset(ax_local->multi_filter, 0, AX_MCAST_FILTER_SIZE); in ax88796c_set_hw_multicast()
116 ax_local->multi_filter[crc_bits >> 29] |= in ax88796c_set_hw_multicast()
121 AX_WRITE(&ax_local->ax_spi, in ax88796c_set_hw_multicast()
122 ((ax_local->multi_filter[i * 2 + 1] << 8) | in ax88796c_set_hw_multicast()
123 ax_local->multi_filter[i * 2]), P3_MFAR(i)); in ax88796c_set_hw_multicast()
127 AX_WRITE(&ax_local->ax_spi, rx_ctl, P2_RXCR); in ax88796c_set_hw_multicast()
132 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_set_mac_addr() local
134 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_set_mac_addr()
136 AX_WRITE(&ax_local->ax_spi, ((u16)(ndev->dev_addr[4] << 8) | in ax88796c_set_mac_addr()
138 AX_WRITE(&ax_local->ax_spi, ((u16)(ndev->dev_addr[2] << 8) | in ax88796c_set_mac_addr()
140 AX_WRITE(&ax_local->ax_spi, ((u16)(ndev->dev_addr[0] << 8) | in ax88796c_set_mac_addr()
146 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_load_mac_addr() local
150 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_load_mac_addr()
153 if (!platform_get_ethdev_address(&ax_local->spi->dev, ndev) && in ax88796c_load_mac_addr()
155 if (netif_msg_probe(ax_local)) in ax88796c_load_mac_addr()
156 dev_info(&ax_local->spi->dev, in ax88796c_load_mac_addr()
162 temp = AX_READ(&ax_local->ax_spi, P3_MACASR0); in ax88796c_load_mac_addr()
166 temp = AX_READ(&ax_local->ax_spi, P3_MACASR1); in ax88796c_load_mac_addr()
170 temp = AX_READ(&ax_local->ax_spi, P3_MACASR2); in ax88796c_load_mac_addr()
176 if (netif_msg_probe(ax_local)) in ax88796c_load_mac_addr()
177 dev_info(&ax_local->spi->dev, in ax88796c_load_mac_addr()
183 if (netif_msg_probe(ax_local)) in ax88796c_load_mac_addr()
184 dev_info(&ax_local->spi->dev, "Use random MAC address\n"); in ax88796c_load_mac_addr()
222 ax88796c_check_free_pages(struct ax88796c_device *ax_local, u8 need_pages) in ax88796c_check_free_pages() argument
227 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_check_free_pages()
229 free_pages = AX_READ(&ax_local->ax_spi, P0_TFBFCR) & TX_FREEBUF_MASK; in ax88796c_check_free_pages()
232 tmp = AX_READ(&ax_local->ax_spi, P0_TFBFCR) in ax88796c_check_free_pages()
234 AX_WRITE(&ax_local->ax_spi, tmp | TFBFCR_TX_PAGE_SET | in ax88796c_check_free_pages()
246 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_tx_fixup() local
247 u8 spi_len = ax_local->ax_spi.comp ? 1 : 4; in ax88796c_tx_fixup()
263 if (ax88796c_check_free_pages(ax_local, need_pages) != 0) in ax88796c_tx_fixup()
269 seq_num = ++ax_local->seq_num & 0x1F; in ax88796c_tx_fixup()
304 if (netif_msg_pktdata(ax_local)) { in ax88796c_tx_fixup()
333 static int ax88796c_hard_xmit(struct ax88796c_device *ax_local) in ax88796c_hard_xmit() argument
340 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_hard_xmit()
342 stats = this_cpu_ptr(ax_local->stats); in ax88796c_hard_xmit()
343 tx_skb = ax88796c_tx_fixup(ax_local->ndev, &ax_local->tx_wait_q); in ax88796c_hard_xmit()
346 this_cpu_inc(ax_local->stats->tx_dropped); in ax88796c_hard_xmit()
351 AX_WRITE(&ax_local->ax_spi, in ax88796c_hard_xmit()
354 axspi_write_txq(&ax_local->ax_spi, tx_skb->data, tx_skb->len); in ax88796c_hard_xmit()
356 if (((AX_READ(&ax_local->ax_spi, P0_TSNR) & TXNR_TXB_IDLE) == 0) || in ax88796c_hard_xmit()
357 ((ISR_TXERR & AX_READ(&ax_local->ax_spi, P0_ISR)) != 0)) { in ax88796c_hard_xmit()
359 AX_WRITE(&ax_local->ax_spi, ISR_TXERR, P0_ISR); in ax88796c_hard_xmit()
361 this_cpu_inc(ax_local->stats->tx_dropped); in ax88796c_hard_xmit()
364 netif_err(ax_local, tx_err, ax_local->ndev, in ax88796c_hard_xmit()
368 AX_WRITE(&ax_local->ax_spi, TXNR_TXB_REINIT | in ax88796c_hard_xmit()
369 AX_READ(&ax_local->ax_spi, P0_TSNR), P0_TSNR); in ax88796c_hard_xmit()
370 ax_local->seq_num = 0; in ax88796c_hard_xmit()
387 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_start_xmit() local
389 skb_queue_tail(&ax_local->tx_wait_q, skb); in ax88796c_start_xmit()
390 if (skb_queue_len(&ax_local->tx_wait_q) > TX_QUEUE_HIGH_WATER) in ax88796c_start_xmit()
393 set_bit(EVENT_TX, &ax_local->flags); in ax88796c_start_xmit()
394 schedule_work(&ax_local->ax_work); in ax88796c_start_xmit()
400 ax88796c_skb_return(struct ax88796c_device *ax_local, in ax88796c_skb_return() argument
403 struct net_device *ndev = ax_local->ndev; in ax88796c_skb_return()
408 stats = this_cpu_ptr(ax_local->stats); in ax88796c_skb_return()
431 skb->protocol = eth_type_trans(skb, ax_local->ndev); in ax88796c_skb_return()
433 netif_info(ax_local, rx_status, ndev, "< rx, len %zu, type 0x%x\n", in ax88796c_skb_return()
438 netif_info(ax_local, rx_err, ndev, in ax88796c_skb_return()
443 ax88796c_rx_fixup(struct ax88796c_device *ax_local, struct sk_buff *rx_skb) in ax88796c_rx_fixup() argument
446 struct net_device *ndev = ax_local->ndev; in ax88796c_rx_fixup()
455 netif_err(ax_local, rx_err, ndev, "Header error\n"); in ax88796c_rx_fixup()
457 this_cpu_inc(ax_local->stats->rx_frame_errors); in ax88796c_rx_fixup()
464 netif_err(ax_local, rx_err, ndev, "CRC or MII error\n"); in ax88796c_rx_fixup()
466 this_cpu_inc(ax_local->stats->rx_crc_errors); in ax88796c_rx_fixup()
472 if (netif_msg_pktdata(ax_local)) { in ax88796c_rx_fixup()
491 ax88796c_skb_return(ax_local, rx_skb, rxhdr); in ax88796c_rx_fixup()
496 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_receive() local
502 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_receive()
505 AX_WRITE(&ax_local->ax_spi, AX_READ(&ax_local->ax_spi, P0_RTWCR) in ax88796c_receive()
508 pkt_cnt = AX_READ(&ax_local->ax_spi, P0_RXBCR2) & RXBCR2_PKT_MASK; in ax88796c_receive()
512 pkt_len = AX_READ(&ax_local->ax_spi, P0_RCPHR) & 0x7FF; in ax88796c_receive()
518 AX_WRITE(&ax_local->ax_spi, RXBCR1_RXB_DISCARD, P0_RXBCR1); in ax88796c_receive()
519 this_cpu_inc(ax_local->stats->rx_dropped); in ax88796c_receive()
524 AX_WRITE(&ax_local->ax_spi, RXBCR1_RXB_START | w_count, P0_RXBCR1); in ax88796c_receive()
526 axspi_read_rxq(&ax_local->ax_spi, in ax88796c_receive()
530 if ((AX_READ(&ax_local->ax_spi, P0_RXBCR2) & RXBCR2_RXB_IDLE) == 0) { in ax88796c_receive()
532 netif_err(ax_local, rx_err, ndev, in ax88796c_receive()
534 AX_WRITE(&ax_local->ax_spi, RXBCR2_RXB_REINIT, P0_RXBCR2); in ax88796c_receive()
541 AX_WRITE(&ax_local->ax_spi, ISR_RXPKT, P0_ISR); in ax88796c_receive()
543 ax88796c_rx_fixup(ax_local, skb); in ax88796c_receive()
548 static int ax88796c_process_isr(struct ax88796c_device *ax_local) in ax88796c_process_isr() argument
550 struct net_device *ndev = ax_local->ndev; in ax88796c_process_isr()
554 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_process_isr()
556 isr = AX_READ(&ax_local->ax_spi, P0_ISR); in ax88796c_process_isr()
557 AX_WRITE(&ax_local->ax_spi, isr, P0_ISR); in ax88796c_process_isr()
559 netif_dbg(ax_local, intr, ndev, " ISR 0x%04x\n", isr); in ax88796c_process_isr()
562 netif_dbg(ax_local, intr, ndev, " TXERR interrupt\n"); in ax88796c_process_isr()
563 AX_WRITE(&ax_local->ax_spi, TXNR_TXB_REINIT, P0_TSNR); in ax88796c_process_isr()
564 ax_local->seq_num = 0x1f; in ax88796c_process_isr()
568 netif_dbg(ax_local, intr, ndev, " TXPAGES interrupt\n"); in ax88796c_process_isr()
569 set_bit(EVENT_TX, &ax_local->flags); in ax88796c_process_isr()
573 netif_dbg(ax_local, intr, ndev, " Link change interrupt\n"); in ax88796c_process_isr()
574 phy_mac_interrupt(ax_local->ndev->phydev); in ax88796c_process_isr()
578 netif_dbg(ax_local, intr, ndev, " RX interrupt\n"); in ax88796c_process_isr()
579 todo = ax88796c_receive(ax_local->ndev); in ax88796c_process_isr()
587 struct ax88796c_device *ax_local; in ax88796c_interrupt() local
595 ax_local = to_ax88796c_device(ndev); in ax88796c_interrupt()
599 netif_dbg(ax_local, intr, ndev, "Interrupt occurred\n"); in ax88796c_interrupt()
601 set_bit(EVENT_INTR, &ax_local->flags); in ax88796c_interrupt()
602 schedule_work(&ax_local->ax_work); in ax88796c_interrupt()
609 struct ax88796c_device *ax_local = in ax88796c_work() local
612 mutex_lock(&ax_local->spi_lock); in ax88796c_work()
614 if (test_bit(EVENT_SET_MULTI, &ax_local->flags)) { in ax88796c_work()
615 ax88796c_set_hw_multicast(ax_local->ndev); in ax88796c_work()
616 clear_bit(EVENT_SET_MULTI, &ax_local->flags); in ax88796c_work()
619 if (test_bit(EVENT_INTR, &ax_local->flags)) { in ax88796c_work()
620 AX_WRITE(&ax_local->ax_spi, IMR_MASKALL, P0_IMR); in ax88796c_work()
622 while (ax88796c_process_isr(ax_local)) in ax88796c_work()
625 clear_bit(EVENT_INTR, &ax_local->flags); in ax88796c_work()
627 AX_WRITE(&ax_local->ax_spi, IMR_DEFAULT, P0_IMR); in ax88796c_work()
629 enable_irq(ax_local->ndev->irq); in ax88796c_work()
632 if (test_bit(EVENT_TX, &ax_local->flags)) { in ax88796c_work()
633 while (skb_queue_len(&ax_local->tx_wait_q)) { in ax88796c_work()
634 if (!ax88796c_hard_xmit(ax_local)) in ax88796c_work()
638 clear_bit(EVENT_TX, &ax_local->flags); in ax88796c_work()
640 if (netif_queue_stopped(ax_local->ndev) && in ax88796c_work()
641 (skb_queue_len(&ax_local->tx_wait_q) < TX_QUEUE_LOW_WATER)) in ax88796c_work()
642 netif_wake_queue(ax_local->ndev); in ax88796c_work()
645 mutex_unlock(&ax_local->spi_lock); in ax88796c_work()
651 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_get_stats64() local
662 s = per_cpu_ptr(ax_local->stats, cpu); in ax88796c_get_stats64()
689 static void ax88796c_set_mac(struct ax88796c_device *ax_local) in ax88796c_set_mac() argument
693 maccr = (ax_local->link) ? MACCR_RXEN : 0; in ax88796c_set_mac()
695 switch (ax_local->speed) { in ax88796c_set_mac()
706 switch (ax_local->duplex) { in ax88796c_set_mac()
717 if (ax_local->flowctrl & AX_FC_ANEG && in ax88796c_set_mac()
718 ax_local->phydev->autoneg) { in ax88796c_set_mac()
719 maccr |= ax_local->pause ? MACCR_RXFC_ENABLE : 0; in ax88796c_set_mac()
720 maccr |= !ax_local->pause != !ax_local->asym_pause ? in ax88796c_set_mac()
723 maccr |= (ax_local->flowctrl & AX_FC_RX) ? MACCR_RXFC_ENABLE : 0; in ax88796c_set_mac()
724 maccr |= (ax_local->flowctrl & AX_FC_TX) ? MACCR_TXFC_ENABLE : 0; in ax88796c_set_mac()
727 mutex_lock(&ax_local->spi_lock); in ax88796c_set_mac()
729 maccr |= AX_READ(&ax_local->ax_spi, P0_MACCR) & in ax88796c_set_mac()
732 AX_WRITE(&ax_local->ax_spi, maccr, P0_MACCR); in ax88796c_set_mac()
734 mutex_unlock(&ax_local->spi_lock); in ax88796c_set_mac()
739 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_handle_link_change() local
743 if (phydev->link && (ax_local->speed != phydev->speed || in ax88796c_handle_link_change()
744 ax_local->duplex != phydev->duplex || in ax88796c_handle_link_change()
745 ax_local->pause != phydev->pause || in ax88796c_handle_link_change()
746 ax_local->asym_pause != phydev->asym_pause)) { in ax88796c_handle_link_change()
747 ax_local->speed = phydev->speed; in ax88796c_handle_link_change()
748 ax_local->duplex = phydev->duplex; in ax88796c_handle_link_change()
749 ax_local->pause = phydev->pause; in ax88796c_handle_link_change()
750 ax_local->asym_pause = phydev->asym_pause; in ax88796c_handle_link_change()
754 if (phydev->link != ax_local->link) { in ax88796c_handle_link_change()
756 ax_local->speed = SPEED_UNKNOWN; in ax88796c_handle_link_change()
757 ax_local->duplex = DUPLEX_UNKNOWN; in ax88796c_handle_link_change()
760 ax_local->link = phydev->link; in ax88796c_handle_link_change()
765 ax88796c_set_mac(ax_local); in ax88796c_handle_link_change()
771 static void ax88796c_set_csums(struct ax88796c_device *ax_local) in ax88796c_set_csums() argument
773 struct net_device *ndev = ax_local->ndev; in ax88796c_set_csums()
775 lockdep_assert_held(&ax_local->spi_lock); in ax88796c_set_csums()
778 AX_WRITE(&ax_local->ax_spi, COERCR0_DEFAULT, P4_COERCR0); in ax88796c_set_csums()
779 AX_WRITE(&ax_local->ax_spi, COERCR1_DEFAULT, P4_COERCR1); in ax88796c_set_csums()
781 AX_WRITE(&ax_local->ax_spi, 0, P4_COERCR0); in ax88796c_set_csums()
782 AX_WRITE(&ax_local->ax_spi, 0, P4_COERCR1); in ax88796c_set_csums()
786 AX_WRITE(&ax_local->ax_spi, COETCR0_DEFAULT, P4_COETCR0); in ax88796c_set_csums()
787 AX_WRITE(&ax_local->ax_spi, COETCR1_TXPPPE, P4_COETCR1); in ax88796c_set_csums()
789 AX_WRITE(&ax_local->ax_spi, 0, P4_COETCR0); in ax88796c_set_csums()
790 AX_WRITE(&ax_local->ax_spi, 0, P4_COETCR1); in ax88796c_set_csums()
797 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_open() local
811 mutex_lock(&ax_local->spi_lock); in ax88796c_open()
813 ret = ax88796c_soft_reset(ax_local); in ax88796c_open()
816 mutex_unlock(&ax_local->spi_lock); in ax88796c_open()
819 ax_local->seq_num = 0x1f; in ax88796c_open()
822 ax88796c_set_csums(ax_local); in ax88796c_open()
825 t = AX_READ(&ax_local->ax_spi, P1_RXBSPCR); in ax88796c_open()
827 AX_WRITE(&ax_local->ax_spi, t, P1_RXBSPCR); in ax88796c_open()
830 AX_WRITE(&ax_local->ax_spi, RPPER_RXEN, P1_RPPER); in ax88796c_open()
832 t = AX_READ(&ax_local->ax_spi, P0_FER); in ax88796c_open()
834 AX_WRITE(&ax_local->ax_spi, t, P0_FER); in ax88796c_open()
837 AX_WRITE(&ax_local->ax_spi, in ax88796c_open()
840 AX_WRITE(&ax_local->ax_spi, in ax88796c_open()
841 (AX_READ(&ax_local->ax_spi, P2_LCR1) & LCR_LED2_MASK) | in ax88796c_open()
845 AX_WRITE(&ax_local->ax_spi, PCR_PHYID(AX88796C_PHY_ID), P2_PCR); in ax88796c_open()
848 AX_WRITE(&ax_local->ax_spi, IMR_DEFAULT, P0_IMR); in ax88796c_open()
850 mutex_unlock(&ax_local->spi_lock); in ax88796c_open()
853 phy_support_asym_pause(ax_local->phydev); in ax88796c_open()
856 ax_local->phydev->advertising) || in ax88796c_open()
858 ax_local->phydev->advertising)) in ax88796c_open()
862 ax_local->phydev->advertising) ? AX_FC_RX : 0; in ax88796c_open()
864 ax_local->phydev->advertising) != in ax88796c_open()
866 ax_local->phydev->advertising)) ? AX_FC_TX : 0; in ax88796c_open()
867 ax_local->flowctrl = fc; in ax88796c_open()
869 phy_start(ax_local->ndev->phydev); in ax88796c_open()
873 spi_message_init(&ax_local->ax_spi.rx_msg); in ax88796c_open()
881 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_close() local
890 mutex_lock(&ax_local->spi_lock); in ax88796c_close()
898 netif_dbg(ax_local, ifdown, ndev, "clearing bits\n"); in ax88796c_close()
899 clear_bit(EVENT_SET_MULTI, &ax_local->flags); in ax88796c_close()
900 clear_bit(EVENT_INTR, &ax_local->flags); in ax88796c_close()
901 clear_bit(EVENT_TX, &ax_local->flags); in ax88796c_close()
904 AX_WRITE(&ax_local->ax_spi, IMR_MASKALL, P0_IMR); in ax88796c_close()
905 __skb_queue_purge(&ax_local->tx_wait_q); in ax88796c_close()
906 ax88796c_soft_reset(ax_local); in ax88796c_close()
908 mutex_unlock(&ax_local->spi_lock); in ax88796c_close()
910 cancel_work_sync(&ax_local->ax_work); in ax88796c_close()
920 struct ax88796c_device *ax_local = to_ax88796c_device(ndev); in ax88796c_set_features() local
929 ax88796c_set_csums(ax_local); in ax88796c_set_features()
944 static int ax88796c_hard_reset(struct ax88796c_device *ax_local) in ax88796c_hard_reset() argument
946 struct device *dev = (struct device *)&ax_local->spi->dev; in ax88796c_hard_reset()
969 struct ax88796c_device *ax_local; in ax88796c_probe() local
974 ndev = devm_alloc_etherdev(&spi->dev, sizeof(*ax_local)); in ax88796c_probe()
980 ax_local = to_ax88796c_device(ndev); in ax88796c_probe()
982 dev_set_drvdata(&spi->dev, ax_local); in ax88796c_probe()
983 ax_local->spi = spi; in ax88796c_probe()
984 ax_local->ax_spi.spi = spi; in ax88796c_probe()
986 ax_local->stats = in ax88796c_probe()
989 if (!ax_local->stats) in ax88796c_probe()
992 ax_local->ndev = ndev; in ax88796c_probe()
993 ax_local->priv_flags |= comp ? AX_CAP_COMP : 0; in ax88796c_probe()
994 ax_local->msg_enable = msg_enable; in ax88796c_probe()
995 mutex_init(&ax_local->spi_lock); in ax88796c_probe()
997 ax_local->mdiobus = devm_mdiobus_alloc(&spi->dev); in ax88796c_probe()
998 if (!ax_local->mdiobus) in ax88796c_probe()
1001 ax_local->mdiobus->priv = ax_local; in ax88796c_probe()
1002 ax_local->mdiobus->read = ax88796c_mdio_read; in ax88796c_probe()
1003 ax_local->mdiobus->write = ax88796c_mdio_write; in ax88796c_probe()
1004 ax_local->mdiobus->name = "ax88976c-mdiobus"; in ax88796c_probe()
1005 ax_local->mdiobus->phy_mask = (u32)~BIT(AX88796C_PHY_ID); in ax88796c_probe()
1006 ax_local->mdiobus->parent = &spi->dev; in ax88796c_probe()
1008 snprintf(ax_local->mdiobus->id, MII_BUS_ID_SIZE, in ax88796c_probe()
1011 ret = devm_mdiobus_register(&spi->dev, ax_local->mdiobus); in ax88796c_probe()
1017 if (netif_msg_probe(ax_local)) { in ax88796c_probe()
1020 ax_local->priv_flags & AX_CAP_COMP ? "ON" : "OFF"); in ax88796c_probe()
1031 mutex_lock(&ax_local->spi_lock); in ax88796c_probe()
1034 ax88796c_hard_reset(ax_local); in ax88796c_probe()
1037 ret = ax88796c_soft_reset(ax_local); in ax88796c_probe()
1040 mutex_unlock(&ax_local->spi_lock); in ax88796c_probe()
1044 temp = AX_READ(&ax_local->ax_spi, P2_CRIR); in ax88796c_probe()
1048 mutex_unlock(&ax_local->spi_lock); in ax88796c_probe()
1053 ax88796c_reload_eeprom(ax_local); in ax88796c_probe()
1057 if (netif_msg_probe(ax_local)) in ax88796c_probe()
1066 AX_WRITE(&ax_local->ax_spi, (AX_READ(&ax_local->ax_spi, P0_PSCR) in ax88796c_probe()
1069 mutex_unlock(&ax_local->spi_lock); in ax88796c_probe()
1071 INIT_WORK(&ax_local->ax_work, ax88796c_work); in ax88796c_probe()
1073 skb_queue_head_init(&ax_local->tx_wait_q); in ax88796c_probe()
1076 ax_local->mdiobus->id, AX88796C_PHY_ID); in ax88796c_probe()
1077 ax_local->phydev = phy_connect(ax_local->ndev, phy_id, in ax88796c_probe()
1080 if (IS_ERR(ax_local->phydev)) { in ax88796c_probe()
1081 ret = PTR_ERR(ax_local->phydev); in ax88796c_probe()
1084 ax_local->phydev->irq = PHY_POLL; in ax88796c_probe()
1092 netif_info(ax_local, probe, ndev, "%s %s registered\n", in ax88796c_probe()
1095 phy_attached_info(ax_local->phydev); in ax88796c_probe()
1100 phy_disconnect(ax_local->phydev); in ax88796c_probe()
1107 struct ax88796c_device *ax_local = dev_get_drvdata(&spi->dev); in ax88796c_remove() local
1108 struct net_device *ndev = ax_local->ndev; in ax88796c_remove()
1112 netif_info(ax_local, probe, ndev, "removing network device %s %s\n", in ax88796c_remove()