Lines Matching +full:pci +full:- +full:sig
31 #include <linux/pci.h>
35 #include <linux/dma-mapping.h>
159 TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */
191 LSEN = 0x08000000, // TSO ? -- FR
224 RxDescCountMask = 0x7f000000, // multi-desc pkt when > 1 ? -- FR
329 { "SiS 190 PCI Fast Ethernet adapter" },
330 { "SiS 191 PCI Gigabit Ethernet adapter" },
339 MODULE_DEVICE_TABLE(pci, sis190_pci_tbl);
345 } debug = { -1 };
349 MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");
360 * Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
402 mdio_write(tp->mmio_addr, phy_id, reg, val); in __mdio_write()
409 return mdio_read(tp->mmio_addr, phy_id, reg); in __mdio_read()
458 desc->size |= cpu_to_le32(RingEnd); in sis190_mark_as_last_descriptor()
463 u32 eor = le32_to_cpu(desc->size) & RingEnd; in sis190_give_to_asic()
465 desc->PSize = 0x0; in sis190_give_to_asic()
466 desc->size = cpu_to_le32((rx_buf_sz & RX_BUF_MASK) | eor); in sis190_give_to_asic()
468 desc->status = cpu_to_le32(OWNbit | INTbit); in sis190_give_to_asic()
474 desc->addr = cpu_to_le32(mapping); in sis190_map_to_asic()
480 desc->PSize = 0x0; in sis190_make_unusable_by_asic()
481 desc->addr = cpu_to_le32(0xdeadbeef); in sis190_make_unusable_by_asic()
482 desc->size &= cpu_to_le32(RingEnd); in sis190_make_unusable_by_asic()
484 desc->status = 0x0; in sis190_make_unusable_by_asic()
490 u32 rx_buf_sz = tp->rx_buf_sz; in sis190_alloc_rx_skb()
494 skb = netdev_alloc_skb(tp->dev, rx_buf_sz); in sis190_alloc_rx_skb()
497 mapping = dma_map_single(&tp->pci_dev->dev, skb->data, tp->rx_buf_sz, in sis190_alloc_rx_skb()
499 if (dma_mapping_error(&tp->pci_dev->dev, mapping)) in sis190_alloc_rx_skb()
520 if (tp->Rx_skbuff[i]) in sis190_rx_fill()
523 tp->Rx_skbuff[i] = sis190_alloc_rx_skb(tp, tp->RxDescRing + i); in sis190_rx_fill()
525 if (!tp->Rx_skbuff[i]) in sis190_rx_fill()
528 return cur - start; in sis190_rx_fill()
541 skb = netdev_alloc_skb_ip_align(tp->dev, pkt_size); in sis190_try_rx_copy()
545 dma_sync_single_for_cpu(&tp->pci_dev->dev, addr, tp->rx_buf_sz, in sis190_try_rx_copy()
547 skb_copy_to_linear_data(skb, sk_buff[0]->data, pkt_size); in sis190_try_rx_copy()
562 stats->rx_crc_errors++; in sis190_rx_pkt_err()
564 stats->rx_over_errors++; in sis190_rx_pkt_err()
566 stats->rx_length_errors++; in sis190_rx_pkt_err()
568 stats->rx_frame_errors++; in sis190_rx_pkt_err()
570 stats->rx_errors++; in sis190_rx_pkt_err()
571 return -1; in sis190_rx_pkt_err()
577 struct net_device_stats *stats = &dev->stats; in sis190_rx_interrupt()
578 u32 rx_left, cur_rx = tp->cur_rx; in sis190_rx_interrupt()
581 rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; in sis190_rx_interrupt()
582 rx_left = sis190_rx_quota(rx_left, (u32) dev->quota); in sis190_rx_interrupt()
584 for (; rx_left > 0; rx_left--, cur_rx++) { in sis190_rx_interrupt()
586 struct RxDesc *desc = tp->RxDescRing + entry; in sis190_rx_interrupt()
589 if (le32_to_cpu(desc->status) & OWNbit) in sis190_rx_interrupt()
592 status = le32_to_cpu(desc->PSize); in sis190_rx_interrupt()
597 sis190_give_to_asic(desc, tp->rx_buf_sz); in sis190_rx_interrupt()
599 struct sk_buff *skb = tp->Rx_skbuff[entry]; in sis190_rx_interrupt()
600 dma_addr_t addr = le32_to_cpu(desc->addr); in sis190_rx_interrupt()
601 int pkt_size = (status & RxSizeMask) - 4; in sis190_rx_interrupt()
602 struct pci_dev *pdev = tp->pci_dev; in sis190_rx_interrupt()
604 if (unlikely(pkt_size > tp->rx_buf_sz)) { in sis190_rx_interrupt()
607 stats->rx_dropped++; in sis190_rx_interrupt()
608 stats->rx_length_errors++; in sis190_rx_interrupt()
609 sis190_give_to_asic(desc, tp->rx_buf_sz); in sis190_rx_interrupt()
615 dma_sync_single_for_device(&pdev->dev, addr, in sis190_rx_interrupt()
616 tp->rx_buf_sz, in sis190_rx_interrupt()
618 sis190_give_to_asic(desc, tp->rx_buf_sz); in sis190_rx_interrupt()
620 dma_unmap_single(&pdev->dev, addr, in sis190_rx_interrupt()
621 tp->rx_buf_sz, in sis190_rx_interrupt()
623 tp->Rx_skbuff[entry] = NULL; in sis190_rx_interrupt()
628 skb->protocol = eth_type_trans(skb, dev); in sis190_rx_interrupt()
632 stats->rx_packets++; in sis190_rx_interrupt()
633 stats->rx_bytes += pkt_size; in sis190_rx_interrupt()
635 stats->multicast++; in sis190_rx_interrupt()
638 count = cur_rx - tp->cur_rx; in sis190_rx_interrupt()
639 tp->cur_rx = cur_rx; in sis190_rx_interrupt()
641 delta = sis190_rx_fill(tp, dev, tp->dirty_rx, tp->cur_rx); in sis190_rx_interrupt()
644 tp->dirty_rx += delta; in sis190_rx_interrupt()
646 if ((tp->dirty_rx + NUM_RX_DESC) == tp->cur_rx) in sis190_rx_interrupt()
657 len = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len; in sis190_unmap_tx_skb()
659 dma_unmap_single(&pdev->dev, le32_to_cpu(desc->addr), len, in sis190_unmap_tx_skb()
673 stats->tx_window_errors++; in sis190_tx_pkt_err()
675 stats->tx_aborted_errors++; in sis190_tx_pkt_err()
677 stats->tx_fifo_errors++; in sis190_tx_pkt_err()
679 stats->tx_carrier_errors++; in sis190_tx_pkt_err()
681 stats->tx_errors++; in sis190_tx_pkt_err()
683 return -1; in sis190_tx_pkt_err()
689 struct net_device_stats *stats = &dev->stats; in sis190_tx_interrupt()
690 u32 pending, dirty_tx = tp->dirty_tx; in sis190_tx_interrupt()
698 pending = tp->cur_tx - dirty_tx; in sis190_tx_interrupt()
701 for (; pending; pending--, dirty_tx++) { in sis190_tx_interrupt()
703 struct TxDesc *txd = tp->TxDescRing + entry; in sis190_tx_interrupt()
704 u32 status = le32_to_cpu(txd->status); in sis190_tx_interrupt()
710 skb = tp->Tx_skbuff[entry]; in sis190_tx_interrupt()
713 stats->tx_packets++; in sis190_tx_interrupt()
714 stats->tx_bytes += skb->len; in sis190_tx_interrupt()
715 stats->collisions += ((status & ColCountMask) - 1); in sis190_tx_interrupt()
718 sis190_unmap_tx_skb(tp->pci_dev, skb, txd); in sis190_tx_interrupt()
719 tp->Tx_skbuff[entry] = NULL; in sis190_tx_interrupt()
723 if (tp->dirty_tx != dirty_tx) { in sis190_tx_interrupt()
724 tp->dirty_tx = dirty_tx; in sis190_tx_interrupt()
739 void __iomem *ioaddr = tp->mmio_addr; in sis190_irq()
761 del_timer(&tp->timer); in sis190_irq()
762 schedule_work(&tp->phy_task); in sis190_irq()
778 const int irq = tp->pci_dev->irq; in sis190_netpoll()
789 struct pci_dev *pdev = tp->pci_dev; in sis190_free_rx_skb()
791 dma_unmap_single(&pdev->dev, le32_to_cpu(desc->addr), tp->rx_buf_sz, in sis190_free_rx_skb()
803 if (!tp->Rx_skbuff[i]) in sis190_rx_clear()
805 sis190_free_rx_skb(tp, tp->Rx_skbuff + i, tp->RxDescRing + i); in sis190_rx_clear()
811 tp->dirty_tx = tp->dirty_rx = tp->cur_tx = tp->cur_rx = 0; in sis190_init_ring_indexes()
820 memset(tp->Tx_skbuff, 0x0, NUM_TX_DESC * sizeof(struct sk_buff *)); in sis190_init_ring()
821 memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *)); in sis190_init_ring()
826 sis190_mark_as_last_descriptor(tp->RxDescRing + NUM_RX_DESC - 1); in sis190_init_ring()
832 return -ENOMEM; in sis190_init_ring()
838 void __iomem *ioaddr = tp->mmio_addr; in sis190_set_rx_mode()
843 if (dev->flags & IFF_PROMISC) { in sis190_set_rx_mode()
849 (dev->flags & IFF_ALLMULTI)) { in sis190_set_rx_mode()
850 /* Too many to filter perfectly -- accept all multicasts. */ in sis190_set_rx_mode()
860 ether_crc(ETH_ALEN, ha->addr) & 0x3f; in sis190_set_rx_mode()
866 spin_lock_irqsave(&tp->lock, flags); in sis190_set_rx_mode()
872 spin_unlock_irqrestore(&tp->lock, flags); in sis190_set_rx_mode()
886 void __iomem *ioaddr = tp->mmio_addr; in sis190_hw_start()
890 SIS_W32(TxDescStartAddr, tp->tx_dma); in sis190_hw_start()
891 SIS_W32(RxDescStartAddr, tp->rx_dma); in sis190_hw_start()
920 struct net_device *dev = tp->dev; in sis190_phy_task()
921 void __iomem *ioaddr = tp->mmio_addr; in sis190_phy_task()
922 int phy_id = tp->mii_if.phy_id; in sis190_phy_task()
932 // FIXME: needlessly high ? -- FR 02/07/2005 in sis190_phy_task()
933 mod_timer(&tp->timer, jiffies + HZ/10); in sis190_phy_task()
938 if (!(val & BMSR_ANEGCOMPLETE) && tp->link_status != LNK_AUTONEG) { in sis190_phy_task()
940 netif_warn(tp, link, dev, "auto-negotiating...\n"); in sis190_phy_task()
941 tp->link_status = LNK_AUTONEG; in sis190_phy_task()
942 } else if ((val & BMSR_LSTATUS) && tp->link_status != LNK_ON) { in sis190_phy_task()
987 for (p = reg31; p->val; p++) { in sis190_phy_task()
988 if ((val & p->val) == p->val) in sis190_phy_task()
993 p->ctl |= SIS_R32(StationControl) & ~0x0f001c00; in sis190_phy_task()
995 if ((tp->features & F_HAS_RGMII) && in sis190_phy_task()
996 (tp->features & F_PHY_BCM5461)) { in sis190_phy_task()
1001 p->ctl |= 0x03000000; in sis190_phy_task()
1004 SIS_W32(StationControl, p->ctl); in sis190_phy_task()
1006 if (tp->features & F_HAS_RGMII) { in sis190_phy_task()
1011 tp->negotiated_lpa = p->val; in sis190_phy_task()
1013 netif_info(tp, link, dev, "link on %s mode\n", p->msg); in sis190_phy_task()
1015 tp->link_status = LNK_ON; in sis190_phy_task()
1016 } else if (!(val & BMSR_LSTATUS) && tp->link_status != LNK_AUTONEG) in sis190_phy_task()
1017 tp->link_status = LNK_OFF; in sis190_phy_task()
1018 mod_timer(&tp->timer, jiffies + SIS190_PHY_TIMEOUT); in sis190_phy_task()
1027 struct net_device *dev = tp->dev; in sis190_phy_timer()
1030 schedule_work(&tp->phy_task); in sis190_phy_timer()
1037 del_timer_sync(&tp->timer); in sis190_delete_timer()
1043 struct timer_list *timer = &tp->timer; in sis190_request_timer()
1046 timer->expires = jiffies + SIS190_PHY_TIMEOUT; in sis190_request_timer()
1053 unsigned int mtu = dev->mtu; in sis190_set_rxbufsize()
1055 tp->rx_buf_sz = (mtu > RX_BUF_SIZE) ? mtu + ETH_HLEN + 8 : RX_BUF_SIZE; in sis190_set_rxbufsize()
1056 /* RxDesc->size has a licence to kill the lower bits */ in sis190_set_rxbufsize()
1057 if (tp->rx_buf_sz & 0x07) { in sis190_set_rxbufsize()
1058 tp->rx_buf_sz += 8; in sis190_set_rxbufsize()
1059 tp->rx_buf_sz &= RX_BUF_MASK; in sis190_set_rxbufsize()
1066 struct pci_dev *pdev = tp->pci_dev; in sis190_open()
1067 int rc = -ENOMEM; in sis190_open()
1075 tp->TxDescRing = dma_alloc_coherent(&pdev->dev, TX_RING_BYTES, in sis190_open()
1076 &tp->tx_dma, GFP_KERNEL); in sis190_open()
1077 if (!tp->TxDescRing) in sis190_open()
1080 tp->RxDescRing = dma_alloc_coherent(&pdev->dev, RX_RING_BYTES, in sis190_open()
1081 &tp->rx_dma, GFP_KERNEL); in sis190_open()
1082 if (!tp->RxDescRing) in sis190_open()
1091 rc = request_irq(pdev->irq, sis190_irq, IRQF_SHARED, dev->name, dev); in sis190_open()
1103 dma_free_coherent(&pdev->dev, RX_RING_BYTES, tp->RxDescRing, in sis190_open()
1104 tp->rx_dma); in sis190_open()
1106 dma_free_coherent(&pdev->dev, TX_RING_BYTES, tp->TxDescRing, in sis190_open()
1107 tp->tx_dma); in sis190_open()
1116 struct sk_buff *skb = tp->Tx_skbuff[i]; in sis190_tx_clear()
1121 sis190_unmap_tx_skb(tp->pci_dev, skb, tp->TxDescRing + i); in sis190_tx_clear()
1122 tp->Tx_skbuff[i] = NULL; in sis190_tx_clear()
1125 tp->dev->stats.tx_dropped++; in sis190_tx_clear()
1127 tp->cur_tx = tp->dirty_tx = 0; in sis190_tx_clear()
1133 void __iomem *ioaddr = tp->mmio_addr; in sis190_down()
1141 spin_lock_irq(&tp->lock); in sis190_down()
1145 spin_unlock_irq(&tp->lock); in sis190_down()
1147 synchronize_irq(tp->pci_dev->irq); in sis190_down()
1163 struct pci_dev *pdev = tp->pci_dev; in sis190_close()
1167 free_irq(pdev->irq, dev); in sis190_close()
1169 dma_free_coherent(&pdev->dev, TX_RING_BYTES, tp->TxDescRing, in sis190_close()
1170 tp->tx_dma); in sis190_close()
1171 dma_free_coherent(&pdev->dev, RX_RING_BYTES, tp->RxDescRing, in sis190_close()
1172 tp->rx_dma); in sis190_close()
1174 tp->TxDescRing = NULL; in sis190_close()
1175 tp->RxDescRing = NULL; in sis190_close()
1184 void __iomem *ioaddr = tp->mmio_addr; in sis190_start_xmit()
1189 if (unlikely(skb->len < ETH_ZLEN)) { in sis190_start_xmit()
1191 dev->stats.tx_dropped++; in sis190_start_xmit()
1196 len = skb->len; in sis190_start_xmit()
1199 entry = tp->cur_tx % NUM_TX_DESC; in sis190_start_xmit()
1200 desc = tp->TxDescRing + entry; in sis190_start_xmit()
1202 if (unlikely(le32_to_cpu(desc->status) & OWNbit)) { in sis190_start_xmit()
1209 mapping = dma_map_single(&tp->pci_dev->dev, skb->data, len, in sis190_start_xmit()
1211 if (dma_mapping_error(&tp->pci_dev->dev, mapping)) { in sis190_start_xmit()
1213 "PCI mapping failed, dropping packet"); in sis190_start_xmit()
1217 tp->Tx_skbuff[entry] = skb; in sis190_start_xmit()
1219 desc->PSize = cpu_to_le32(len); in sis190_start_xmit()
1220 desc->addr = cpu_to_le32(mapping); in sis190_start_xmit()
1222 desc->size = cpu_to_le32(len); in sis190_start_xmit()
1223 if (entry == (NUM_TX_DESC - 1)) in sis190_start_xmit()
1224 desc->size |= cpu_to_le32(RingEnd); in sis190_start_xmit()
1228 desc->status = cpu_to_le32(OWNbit | INTbit | DEFbit | CRCbit | PADbit); in sis190_start_xmit()
1229 if (tp->negotiated_lpa & (LPA_1000HALF | LPA_100HALF | LPA_10HALF)) { in sis190_start_xmit()
1231 desc->status |= cpu_to_le32(COLEN | CRSEN | BKFEN); in sis190_start_xmit()
1232 if (tp->negotiated_lpa & (LPA_1000HALF | LPA_1000FULL)) in sis190_start_xmit()
1233 desc->status |= cpu_to_le32(EXTEN | BSTEN); /* gigabit HD */ in sis190_start_xmit()
1236 tp->cur_tx++; in sis190_start_xmit()
1242 dirty_tx = tp->dirty_tx; in sis190_start_xmit()
1243 if ((tp->cur_tx - NUM_TX_DESC) == dirty_tx) { in sis190_start_xmit()
1246 if (dirty_tx != tp->dirty_tx) in sis190_start_xmit()
1263 * sis190_default_phy - Select default PHY for sis190 mac.
1274 struct mii_if_info *mii_if = &tp->mii_if; in sis190_default_phy()
1275 void __iomem *ioaddr = tp->mmio_addr; in sis190_default_phy()
1280 list_for_each_entry(phy, &tp->first_phy, list) { in sis190_default_phy()
1281 status = mdio_read_latched(ioaddr, phy->phy_id, MII_BMSR); in sis190_default_phy()
1286 (phy->type != UNKNOWN)) { in sis190_default_phy()
1289 status = mdio_read(ioaddr, phy->phy_id, MII_BMCR); in sis190_default_phy()
1290 mdio_write(ioaddr, phy->phy_id, MII_BMCR, in sis190_default_phy()
1292 if (phy->type == HOME) in sis190_default_phy()
1294 else if (phy->type == LAN) in sis190_default_phy()
1305 phy_default = list_first_entry(&tp->first_phy, in sis190_default_phy()
1309 if (mii_if->phy_id != phy_default->phy_id) { in sis190_default_phy()
1310 mii_if->phy_id = phy_default->phy_id; in sis190_default_phy()
1313 pci_name(tp->pci_dev), mii_if->phy_id); in sis190_default_phy()
1316 status = mdio_read(ioaddr, mii_if->phy_id, MII_BMCR); in sis190_default_phy()
1319 mdio_write(ioaddr, mii_if->phy_id, MII_BMCR, status); in sis190_default_phy()
1320 status = mdio_read_latched(ioaddr, mii_if->phy_id, MII_BMSR); in sis190_default_phy()
1329 void __iomem *ioaddr = tp->mmio_addr; in sis190_init_phy()
1332 INIT_LIST_HEAD(&phy->list); in sis190_init_phy()
1333 phy->status = mii_status; in sis190_init_phy()
1334 phy->phy_id = phy_id; in sis190_init_phy()
1336 phy->id[0] = mdio_read(ioaddr, phy_id, MII_PHYSID1); in sis190_init_phy()
1337 phy->id[1] = mdio_read(ioaddr, phy_id, MII_PHYSID2); in sis190_init_phy()
1339 for (p = mii_chip_table; p->type; p++) { in sis190_init_phy()
1340 if ((p->id[0] == phy->id[0]) && in sis190_init_phy()
1341 (p->id[1] == (phy->id[1] & 0xfff0))) { in sis190_init_phy()
1346 if (p->id[1]) { in sis190_init_phy()
1347 phy->type = (p->type == MIX) ? in sis190_init_phy()
1349 LAN : HOME) : p->type; in sis190_init_phy()
1350 tp->features |= p->feature; in sis190_init_phy()
1353 pci_name(tp->pci_dev), p->name, phy_id); in sis190_init_phy()
1355 phy->type = UNKNOWN; in sis190_init_phy()
1358 pci_name(tp->pci_dev), in sis190_init_phy()
1359 phy->id[0], (phy->id[1] & 0xfff0), phy_id); in sis190_init_phy()
1365 if (tp->features & F_PHY_88E1111) { in sis190_mii_probe_88e1111_fixup()
1366 void __iomem *ioaddr = tp->mmio_addr; in sis190_mii_probe_88e1111_fixup()
1367 int phy_id = tp->mii_if.phy_id; in sis190_mii_probe_88e1111_fixup()
1373 p = (tp->features & F_HAS_RGMII) ? reg[0] : reg[1]; in sis190_mii_probe_88e1111_fixup()
1383 * sis190_mii_probe - Probe MII PHY for sis190
1393 struct mii_if_info *mii_if = &tp->mii_if; in sis190_mii_probe()
1394 void __iomem *ioaddr = tp->mmio_addr; in sis190_mii_probe()
1398 INIT_LIST_HEAD(&tp->first_phy); in sis190_mii_probe()
1412 sis190_free_phy(&tp->first_phy); in sis190_mii_probe()
1413 rc = -ENOMEM; in sis190_mii_probe()
1419 list_add(&tp->first_phy, &phy->list); in sis190_mii_probe()
1422 if (list_empty(&tp->first_phy)) { in sis190_mii_probe()
1425 pci_name(tp->pci_dev)); in sis190_mii_probe()
1426 rc = -EIO; in sis190_mii_probe()
1435 mii_if->dev = dev; in sis190_mii_probe()
1436 mii_if->mdio_read = __mdio_read; in sis190_mii_probe()
1437 mii_if->mdio_write = __mdio_write; in sis190_mii_probe()
1438 mii_if->phy_id_mask = PHY_ID_ANY; in sis190_mii_probe()
1439 mii_if->reg_num_mask = MII_REG_ANY; in sis190_mii_probe()
1448 sis190_free_phy(&tp->first_phy); in sis190_mii_remove()
1456 iounmap(tp->mmio_addr); in sis190_release_board()
1471 rc = -ENOMEM; in sis190_init_board()
1475 SET_NETDEV_DEV(dev, &pdev->dev); in sis190_init_board()
1478 tp->dev = dev; in sis190_init_board()
1479 tp->msg_enable = netif_msg_init(debug.msg_enable, SIS190_MSG_DEFAULT); in sis190_init_board()
1488 rc = -ENODEV; in sis190_init_board()
1498 pr_err("%s: invalid PCI region size(s)\n", in sis190_init_board()
1511 rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); in sis190_init_board()
1526 rc = -EIO; in sis190_init_board()
1530 tp->pci_dev = pdev; in sis190_init_board()
1531 tp->mmio_addr = ioaddr; in sis190_init_board()
1532 tp->link_status = LNK_OFF; in sis190_init_board()
1554 void __iomem *ioaddr = tp->mmio_addr; in sis190_tx_timeout()
1569 spin_lock_irq(&tp->lock); in sis190_tx_timeout()
1571 spin_unlock_irq(&tp->lock); in sis190_tx_timeout()
1581 tp->features |= (reg & 0x80) ? F_HAS_RGMII : 0; in sis190_set_rgmii()
1588 void __iomem *ioaddr = tp->mmio_addr; in sis190_get_mac_addr_from_eeprom()
1590 u16 sig; in sis190_get_mac_addr_from_eeprom() local
1597 sig = (u16) sis190_read_eeprom(ioaddr, EEPROMSignature); in sis190_get_mac_addr_from_eeprom()
1599 if ((sig == 0xffff) || (sig == 0x0000)) { in sis190_get_mac_addr_from_eeprom()
1602 pci_name(pdev), sig); in sis190_get_mac_addr_from_eeprom()
1603 return -EIO; in sis190_get_mac_addr_from_eeprom()
1620 * sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model
1621 * @pdev: PCI device
1626 * MAC address is read into @net_dev->dev_addr.
1651 return -EIO; in sis190_get_mac_addr_from_apc()
1680 * sis190_init_rxfilter - Initialize the Rx filter
1689 void __iomem *ioaddr = tp->mmio_addr; in sis190_init_rxfilter()
1697 * only and followed by RxMacAddr (6 bytes). Strange. -- FR in sis190_init_rxfilter()
1702 SIS_W8(RxMacAddr + i, dev->dev_addr[i]); in sis190_init_rxfilter()
1727 void __iomem *ioaddr = tp->mmio_addr; in sis190_set_speed_auto()
1728 int phy_id = tp->mii_if.phy_id; in sis190_set_speed_auto()
1731 netif_info(tp, link, dev, "Enabling Auto-negotiation\n"); in sis190_set_speed_auto()
1744 // Enable auto-negotiation and restart auto-negotiation. in sis190_set_speed_auto()
1754 mii_ethtool_get_link_ksettings(&tp->mii_if, cmd); in sis190_get_link_ksettings()
1764 return mii_ethtool_set_link_ksettings(&tp->mii_if, cmd); in sis190_set_link_ksettings()
1772 strscpy(info->driver, DRV_NAME, sizeof(info->driver)); in sis190_get_drvinfo()
1773 strscpy(info->version, DRV_VERSION, sizeof(info->version)); in sis190_get_drvinfo()
1774 strscpy(info->bus_info, pci_name(tp->pci_dev), in sis190_get_drvinfo()
1775 sizeof(info->bus_info)); in sis190_get_drvinfo()
1789 spin_lock_irqsave(&tp->lock, flags); in sis190_get_regs()
1790 memcpy_fromio(p, tp->mmio_addr, regs->len); in sis190_get_regs()
1791 spin_unlock_irqrestore(&tp->lock, flags); in sis190_get_regs()
1798 return mii_nway_restart(&tp->mii_if); in sis190_nway_reset()
1805 return tp->msg_enable; in sis190_get_msglevel()
1812 tp->msg_enable = value; in sis190_set_msglevel()
1831 return !netif_running(dev) ? -EINVAL : in sis190_ioctl()
1832 generic_mii_ioctl(&tp->mii_if, if_mii(ifr), cmd, NULL); in sis190_ioctl()
1883 ioaddr = tp->mmio_addr; in sis190_init_one()
1891 INIT_WORK(&tp->phy_task, sis190_phy_task); in sis190_init_one()
1893 dev->netdev_ops = &sis190_netdev_ops; in sis190_init_one()
1895 dev->ethtool_ops = &sis190_ethtool_ops; in sis190_init_one()
1896 dev->watchdog_timeo = SIS190_TX_TIMEOUT; in sis190_init_one()
1898 spin_lock_init(&tp->lock); in sis190_init_one()
1911 sis_chip_info[ent->driver_data].name, in sis190_init_one()
1912 ioaddr, pdev->irq, dev->dev_addr); in sis190_init_one()
1914 (tp->features & F_HAS_RGMII) ? "RGMII" : "GMII"); in sis190_init_one()
1936 cancel_work_sync(&tp->phy_task); in sis190_remove_one()