Lines Matching refs:etdev
91 void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD pMpRfd);
585 * @etdev: pointer to our adapter structure
587 void ConfigRxDmaRegs(struct et131x_adapter *etdev)
589 struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma;
590 struct rx_ring *rx_local = &etdev->rx_ring;
597 et131x_rx_dma_disable(etdev);
625 spin_lock_irqsave(&etdev->RcvLock, flags);
691 spin_unlock_irqrestore(&etdev->RcvLock, flags);
696 * @etdev: pointer to our adapter structure
698 void SetRxDmaTimer(struct et131x_adapter *etdev)
703 if ((etdev->linkspeed == TRUEPHY_SPEED_100MBPS) ||
704 (etdev->linkspeed == TRUEPHY_SPEED_10MBPS)) {
705 writel(0, &etdev->regs->rxdma.max_pkt_time);
706 writel(1, &etdev->regs->rxdma.num_pkt_done);
712 * @etdev: pointer to our adapter structure
714 void et131x_rx_dma_disable(struct et131x_adapter *etdev)
718 writel(0x00002001, &etdev->regs->rxdma.csr);
719 csr = readl(&etdev->regs->rxdma.csr);
722 csr = readl(&etdev->regs->rxdma.csr);
724 dev_err(&etdev->pdev->dev,
732 * @etdev: pointer to our adapter structure
734 void et131x_rx_dma_enable(struct et131x_adapter *etdev)
739 if (etdev->rx_ring.Fbr1BufferSize == 4096)
741 else if (etdev->rx_ring.Fbr1BufferSize == 8192)
743 else if (etdev->rx_ring.Fbr1BufferSize == 16384)
747 if (etdev->rx_ring.Fbr0BufferSize == 256)
749 else if (etdev->rx_ring.Fbr0BufferSize == 512)
751 else if (etdev->rx_ring.Fbr0BufferSize == 1024)
754 writel(csr, &etdev->regs->rxdma.csr);
756 csr = readl(&etdev->regs->rxdma.csr);
759 csr = readl(&etdev->regs->rxdma.csr);
761 dev_err(&etdev->pdev->dev,
770 * @etdev: pointer to our adapter
779 PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
781 struct rx_ring *rx_local = &etdev->rx_ring;
829 &etdev->regs->rxdma.psr_full_offset);
847 dev_err(&etdev->pdev->dev,
856 spin_lock_irqsave(&etdev->RcvLock, flags);
863 spin_unlock_irqrestore(&etdev->RcvLock, flags);
870 spin_unlock_irqrestore(&etdev->RcvLock, flags);
881 etdev->Stats.other_errors++;
886 if (etdev->ReplicaPhyLoopbk == 1) {
889 if (memcmp(&buf[6], &etdev->CurrentAddress[0],
893 etdev->ReplicaPhyLoopbkPF = 1;
908 if ((etdev->PacketFilter & ET131X_PACKET_TYPE_MULTICAST)
909 && !(etdev->PacketFilter & ET131X_PACKET_TYPE_PROMISCUOUS)
910 && !(etdev->PacketFilter & ET131X_PACKET_TYPE_ALL_MULTICAST)) {
919 i < etdev->MCAddressCount;
922 etdev->MCList[i][0]
924 etdev->MCList[i][1]
926 etdev->MCList[i][2]
928 etdev->MCList[i][3]
930 etdev->MCList[i][4]
932 etdev->MCList[i][5]) {
945 if (i == etdev->MCAddressCount)
950 etdev->Stats.multircv++;
952 etdev->Stats.brdcstrcv++;
959 etdev->Stats.unircv++;
970 dev_err(&etdev->pdev->dev,
975 etdev->net_stats.rx_bytes += rfd->PacketSize;
981 skb->dev = etdev->netdev;
982 skb->protocol = eth_type_trans(skb, etdev->netdev);
990 nic_return_rfd(etdev, rfd);
996 * @etdev: pointer to our adapter
1000 void et131x_reset_recv(struct et131x_adapter *etdev)
1002 WARN_ON(list_empty(&etdev->rx_ring.RecvList));
1008 * @etdev: pointer to our adapter
1012 void et131x_handle_recv_interrupt(struct et131x_adapter *etdev)
1020 if (list_empty(&etdev->rx_ring.RecvList)) {
1021 WARN_ON(etdev->rx_ring.nReadyRecv != 0);
1026 rfd = nic_rx_pkts(etdev);
1036 if (!etdev->PacketFilter ||
1037 !(etdev->Flags & fMP_ADAPTER_LINK_DETECTION) ||
1043 etdev->Stats.ipackets++;
1046 if (etdev->rx_ring.nReadyRecv < RFD_LOW_WATER_MARK) {
1047 dev_warn(&etdev->pdev->dev,
1054 etdev->rx_ring.UnfinishedReceives = true;
1056 &etdev->regs->global.watchdog_timer);
1059 etdev->rx_ring.UnfinishedReceives = false;
1082 * @etdev: pointer to our adapter
1085 void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
1087 struct rx_ring *rx_local = &etdev->rx_ring;
1088 struct rxdma_regs __iomem *rx_dma = &etdev->regs->rxdma;
1101 spin_lock_irqsave(&etdev->FbrLock, flags);
1139 spin_unlock_irqrestore(&etdev->FbrLock, flags);
1141 dev_err(&etdev->pdev->dev,
1148 spin_lock_irqsave(&etdev->RcvLock, flags);
1151 spin_unlock_irqrestore(&etdev->RcvLock, flags);