Lines Matching refs:data

149 	struct tsi108_prv_data *data = netdev_priv(dev);  in dump_eth_one()  local
155 TSI_READ(TSI108_EC_INTMASK), data->phy_ok, in dump_eth_one()
156 data->link_up, data->speed, data->duplex); in dump_eth_one()
159 data->txhead, data->txtail, data->txfree, in dump_eth_one()
166 data->rxhead, data->rxtail, data->rxfree, in dump_eth_one()
169 TSI_READ(TSI108_EC_RXERR), data->rxpending); in dump_eth_one()
180 static int tsi108_read_mii(struct tsi108_prv_data *data, int reg) in tsi108_read_mii() argument
185 (data->phy << TSI108_MAC_MII_ADDR_PHY) | in tsi108_read_mii()
202 static void tsi108_write_mii(struct tsi108_prv_data *data, in tsi108_write_mii() argument
207 (data->phy << TSI108_MAC_MII_ADDR_PHY) | in tsi108_write_mii()
220 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_mdio_read() local
221 return tsi108_read_mii(data, reg); in tsi108_mdio_read()
226 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_mdio_write() local
227 tsi108_write_mii(data, reg, val); in tsi108_mdio_write()
230 static inline void tsi108_write_tbi(struct tsi108_prv_data *data, in tsi108_write_tbi() argument
273 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_check_phy() local
281 if (!data->phy_ok) in tsi108_check_phy()
284 duplex = mii_check_media(&data->mii_if, netif_msg_link(data), data->init_media); in tsi108_check_phy()
285 data->init_media = 0; in tsi108_check_phy()
289 speed = mii_speed(&data->mii_if); in tsi108_check_phy()
291 if ((speed != data->speed) || duplex) { in tsi108_check_phy()
306 data->speed = speed; in tsi108_check_phy()
308 if (data->mii_if.full_duplex) { in tsi108_check_phy()
311 data->duplex = 2; in tsi108_check_phy()
315 data->duplex = 1; in tsi108_check_phy()
322 if (data->link_up == 0) { in tsi108_check_phy()
328 spin_lock(&data->txlock); in tsi108_check_phy()
329 if (is_valid_ether_addr(dev->dev_addr) && data->txfree) in tsi108_check_phy()
332 data->link_up = 1; in tsi108_check_phy()
333 spin_unlock(&data->txlock); in tsi108_check_phy()
336 if (data->link_up == 1) { in tsi108_check_phy()
338 data->link_up = 0; in tsi108_check_phy()
360 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_stat_carry() local
364 spin_lock_irqsave(&data->misclock, flags); in tsi108_stat_carry()
373 TSI108_STAT_RXBYTES_CARRY, &data->stats.rx_bytes); in tsi108_stat_carry()
377 &data->stats.rx_packets); in tsi108_stat_carry()
380 TSI108_STAT_RXFCS_CARRY, &data->rx_fcs); in tsi108_stat_carry()
384 &data->stats.multicast); in tsi108_stat_carry()
388 &data->stats.rx_frame_errors); in tsi108_stat_carry()
392 &data->stats.rx_length_errors); in tsi108_stat_carry()
395 TSI108_STAT_RXRUNT_CARRY, &data->rx_underruns); in tsi108_stat_carry()
398 TSI108_STAT_RXJUMBO_CARRY, &data->rx_overruns); in tsi108_stat_carry()
401 TSI108_STAT_RXFRAG_CARRY, &data->rx_short_fcs); in tsi108_stat_carry()
404 TSI108_STAT_RXJABBER_CARRY, &data->rx_long_fcs); in tsi108_stat_carry()
408 &data->stats.rx_missed_errors); in tsi108_stat_carry()
411 TSI108_STAT_TXBYTES_CARRY, &data->stats.tx_bytes); in tsi108_stat_carry()
415 &data->stats.tx_packets); in tsi108_stat_carry()
419 &data->stats.tx_aborted_errors); in tsi108_stat_carry()
422 TSI108_STAT_TXEXCOL_CARRY, &data->tx_coll_abort); in tsi108_stat_carry()
426 &data->stats.collisions); in tsi108_stat_carry()
430 &data->tx_pause_drop); in tsi108_stat_carry()
432 spin_unlock_irqrestore(&data->misclock, flags); in tsi108_stat_carry()
439 tsi108_read_stat(struct tsi108_prv_data * data, int reg, int carry_bit, in tsi108_read_stat() argument
471 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_get_stats() local
472 spin_lock_irq(&data->misclock); in tsi108_get_stats()
474 data->tmpstats.rx_packets = in tsi108_get_stats()
475 tsi108_read_stat(data, TSI108_STAT_RXPKTS, in tsi108_get_stats()
477 TSI108_STAT_RXPKTS_CARRY, &data->stats.rx_packets); in tsi108_get_stats()
479 data->tmpstats.tx_packets = in tsi108_get_stats()
480 tsi108_read_stat(data, TSI108_STAT_TXPKTS, in tsi108_get_stats()
482 TSI108_STAT_TXPKTS_CARRY, &data->stats.tx_packets); in tsi108_get_stats()
484 data->tmpstats.rx_bytes = in tsi108_get_stats()
485 tsi108_read_stat(data, TSI108_STAT_RXBYTES, in tsi108_get_stats()
487 TSI108_STAT_RXBYTES_CARRY, &data->stats.rx_bytes); in tsi108_get_stats()
489 data->tmpstats.tx_bytes = in tsi108_get_stats()
490 tsi108_read_stat(data, TSI108_STAT_TXBYTES, in tsi108_get_stats()
492 TSI108_STAT_TXBYTES_CARRY, &data->stats.tx_bytes); in tsi108_get_stats()
494 data->tmpstats.multicast = in tsi108_get_stats()
495 tsi108_read_stat(data, TSI108_STAT_RXMCAST, in tsi108_get_stats()
497 TSI108_STAT_RXMCAST_CARRY, &data->stats.multicast); in tsi108_get_stats()
499 excol = tsi108_read_stat(data, TSI108_STAT_TXEXCOL, in tsi108_get_stats()
502 &data->tx_coll_abort); in tsi108_get_stats()
504 data->tmpstats.collisions = in tsi108_get_stats()
505 tsi108_read_stat(data, TSI108_STAT_TXTCOL, in tsi108_get_stats()
507 TSI108_STAT_TXTCOL_CARRY, &data->stats.collisions); in tsi108_get_stats()
509 data->tmpstats.collisions += excol; in tsi108_get_stats()
511 data->tmpstats.rx_length_errors = in tsi108_get_stats()
512 tsi108_read_stat(data, TSI108_STAT_RXLENGTH, in tsi108_get_stats()
515 &data->stats.rx_length_errors); in tsi108_get_stats()
517 data->tmpstats.rx_length_errors += in tsi108_get_stats()
518 tsi108_read_stat(data, TSI108_STAT_RXRUNT, in tsi108_get_stats()
520 TSI108_STAT_RXRUNT_CARRY, &data->rx_underruns); in tsi108_get_stats()
522 data->tmpstats.rx_length_errors += in tsi108_get_stats()
523 tsi108_read_stat(data, TSI108_STAT_RXJUMBO, in tsi108_get_stats()
525 TSI108_STAT_RXJUMBO_CARRY, &data->rx_overruns); in tsi108_get_stats()
527 data->tmpstats.rx_frame_errors = in tsi108_get_stats()
528 tsi108_read_stat(data, TSI108_STAT_RXALIGN, in tsi108_get_stats()
531 &data->stats.rx_frame_errors); in tsi108_get_stats()
533 data->tmpstats.rx_frame_errors += in tsi108_get_stats()
534 tsi108_read_stat(data, TSI108_STAT_RXFCS, in tsi108_get_stats()
536 &data->rx_fcs); in tsi108_get_stats()
538 data->tmpstats.rx_frame_errors += in tsi108_get_stats()
539 tsi108_read_stat(data, TSI108_STAT_RXFRAG, in tsi108_get_stats()
541 TSI108_STAT_RXFRAG_CARRY, &data->rx_short_fcs); in tsi108_get_stats()
543 data->tmpstats.rx_missed_errors = in tsi108_get_stats()
544 tsi108_read_stat(data, TSI108_STAT_RXDROP, in tsi108_get_stats()
547 &data->stats.rx_missed_errors); in tsi108_get_stats()
550 data->tmpstats.rx_fifo_errors = data->stats.rx_fifo_errors; in tsi108_get_stats()
551 data->tmpstats.rx_crc_errors = data->stats.rx_crc_errors; in tsi108_get_stats()
553 data->tmpstats.tx_aborted_errors = in tsi108_get_stats()
554 tsi108_read_stat(data, TSI108_STAT_TXEXDEF, in tsi108_get_stats()
557 &data->stats.tx_aborted_errors); in tsi108_get_stats()
559 data->tmpstats.tx_aborted_errors += in tsi108_get_stats()
560 tsi108_read_stat(data, TSI108_STAT_TXPAUSEDROP, in tsi108_get_stats()
563 &data->tx_pause_drop); in tsi108_get_stats()
565 data->tmpstats.tx_aborted_errors += excol; in tsi108_get_stats()
567 data->tmpstats.tx_errors = data->tmpstats.tx_aborted_errors; in tsi108_get_stats()
568 data->tmpstats.rx_errors = data->tmpstats.rx_length_errors + in tsi108_get_stats()
569 data->tmpstats.rx_crc_errors + in tsi108_get_stats()
570 data->tmpstats.rx_frame_errors + in tsi108_get_stats()
571 data->tmpstats.rx_fifo_errors + data->tmpstats.rx_missed_errors; in tsi108_get_stats()
573 spin_unlock_irq(&data->misclock); in tsi108_get_stats()
574 return &data->tmpstats; in tsi108_get_stats()
577 static void tsi108_restart_rx(struct tsi108_prv_data * data, struct net_device *dev) in tsi108_restart_rx() argument
586 static void tsi108_restart_tx(struct tsi108_prv_data * data) in tsi108_restart_tx() argument
600 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_complete_tx() local
605 while (!data->txfree || data->txhead != data->txtail) { in tsi108_complete_tx()
606 tx = data->txtail; in tsi108_complete_tx()
608 if (data->txring[tx].misc & TSI108_TX_OWN) in tsi108_complete_tx()
611 skb = data->txskbs[tx]; in tsi108_complete_tx()
613 if (!(data->txring[tx].misc & TSI108_TX_OK)) in tsi108_complete_tx()
615 dev->name, data->txring[tx].misc); in tsi108_complete_tx()
617 data->txtail = (data->txtail + 1) % TSI108_TXRING_LEN; in tsi108_complete_tx()
618 data->txfree++; in tsi108_complete_tx()
620 if (data->txring[tx].misc & TSI108_TX_EOF) { in tsi108_complete_tx()
627 if (is_valid_ether_addr(dev->dev_addr) && data->link_up) in tsi108_complete_tx()
634 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_send_packet() local
638 if (!data->phy_ok && net_ratelimit()) in tsi108_send_packet()
641 if (!data->link_up) { in tsi108_send_packet()
648 if (data->txfree < MAX_SKB_FRAGS + 1) { in tsi108_send_packet()
657 if (data->txfree - frags < MAX_SKB_FRAGS + 1) { in tsi108_send_packet()
661 spin_lock_irq(&data->txlock); in tsi108_send_packet()
665 int tx = data->txhead; in tsi108_send_packet()
678 ((TSI108_TXRING_LEN - data->txfree) >= TSI108_TX_INT_FREQ)) in tsi108_send_packet()
681 data->txskbs[tx] = skb; in tsi108_send_packet()
684 data->txring[tx].buf0 = dma_map_single(&data->pdev->dev, in tsi108_send_packet()
685 skb->data, skb_headlen(skb), in tsi108_send_packet()
687 data->txring[tx].len = skb_headlen(skb); in tsi108_send_packet()
692 data->txring[tx].buf0 = in tsi108_send_packet()
693 skb_frag_dma_map(&data->pdev->dev, frag, in tsi108_send_packet()
696 data->txring[tx].len = skb_frag_size(frag); in tsi108_send_packet()
702 if (netif_msg_pktdata(data)) { in tsi108_send_packet()
707 printk(" %2.2x", skb->data[i]); in tsi108_send_packet()
710 data->txring[tx].misc = misc | TSI108_TX_OWN; in tsi108_send_packet()
712 data->txhead = (data->txhead + 1) % TSI108_TXRING_LEN; in tsi108_send_packet()
713 data->txfree--; in tsi108_send_packet()
723 tsi108_restart_tx(data); in tsi108_send_packet()
725 spin_unlock_irq(&data->txlock); in tsi108_send_packet()
731 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_complete_rx() local
734 while (data->rxfree && done != budget) { in tsi108_complete_rx()
735 int rx = data->rxtail; in tsi108_complete_rx()
738 if (data->rxring[rx].misc & TSI108_RX_OWN) in tsi108_complete_rx()
741 skb = data->rxskbs[rx]; in tsi108_complete_rx()
742 data->rxtail = (data->rxtail + 1) % TSI108_RXRING_LEN; in tsi108_complete_rx()
743 data->rxfree--; in tsi108_complete_rx()
746 if (data->rxring[rx].misc & TSI108_RX_BAD) { in tsi108_complete_rx()
747 spin_lock_irq(&data->misclock); in tsi108_complete_rx()
749 if (data->rxring[rx].misc & TSI108_RX_CRC) in tsi108_complete_rx()
750 data->stats.rx_crc_errors++; in tsi108_complete_rx()
751 if (data->rxring[rx].misc & TSI108_RX_OVER) in tsi108_complete_rx()
752 data->stats.rx_fifo_errors++; in tsi108_complete_rx()
754 spin_unlock_irq(&data->misclock); in tsi108_complete_rx()
759 if (netif_msg_pktdata(data)) { in tsi108_complete_rx()
762 dev->name, data->rxring[rx].len); in tsi108_complete_rx()
763 for (i = 0; i < data->rxring[rx].len; i++) in tsi108_complete_rx()
764 printk(" %2.2x", skb->data[i]); in tsi108_complete_rx()
768 skb_put(skb, data->rxring[rx].len); in tsi108_complete_rx()
778 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_refill_rx() local
781 while (data->rxfree != TSI108_RXRING_LEN && done != budget) { in tsi108_refill_rx()
782 int rx = data->rxhead; in tsi108_refill_rx()
786 data->rxskbs[rx] = skb; in tsi108_refill_rx()
790 data->rxring[rx].buf0 = dma_map_single(&data->pdev->dev, in tsi108_refill_rx()
791 skb->data, TSI108_RX_SKB_SIZE, in tsi108_refill_rx()
799 data->rxring[rx].blen = TSI108_RX_SKB_SIZE; in tsi108_refill_rx()
800 data->rxring[rx].misc = TSI108_RX_OWN | TSI108_RX_INT; in tsi108_refill_rx()
802 data->rxhead = (data->rxhead + 1) % TSI108_RXRING_LEN; in tsi108_refill_rx()
803 data->rxfree++; in tsi108_refill_rx()
809 tsi108_restart_rx(data, dev); in tsi108_refill_rx()
816 struct tsi108_prv_data *data = container_of(napi, struct tsi108_prv_data, napi); in tsi108_poll() local
817 struct net_device *dev = data->dev; in tsi108_poll()
828 if (data->rxpending || (estat & TSI108_EC_RXESTAT_Q0_DESCINT)) in tsi108_poll()
843 if (data->rxfree < TSI108_RXRING_LEN) in tsi108_poll()
857 tsi108_restart_rx(data, dev); in tsi108_poll()
862 spin_lock_irq(&data->misclock); in tsi108_poll()
863 data->stats.rx_fifo_errors++; in tsi108_poll()
864 spin_unlock_irq(&data->misclock); in tsi108_poll()
868 data->rxpending = 0; in tsi108_poll()
879 data->rxpending = 1; in tsi108_poll()
887 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_rx_int() local
900 if (napi_schedule_prep(&data->napi)) { in tsi108_rx_int()
911 __napi_schedule(&data->napi); in tsi108_rx_int()
951 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_check_rxring() local
958 if (netif_running(dev) && data->rxfree < TSI108_RXRING_LEN / 4) in tsi108_check_rxring()
964 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_tx_int() local
979 spin_lock(&data->txlock); in tsi108_tx_int()
981 spin_unlock(&data->txlock); in tsi108_tx_int()
989 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_irq() local
1021 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_stop_ethernet() local
1042 static void tsi108_reset_ether(struct tsi108_prv_data * data) in tsi108_reset_ether() argument
1078 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_get_mac() local
1092 if (0x8 == data->phy) in tsi108_get_mac()
1127 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_set_mac() local
1141 spin_lock_irq(&data->misclock); in tsi108_set_mac()
1144 spin_lock(&data->txlock); in tsi108_set_mac()
1146 if (data->txfree && data->link_up) in tsi108_set_mac()
1149 spin_unlock(&data->txlock); in tsi108_set_mac()
1150 spin_unlock_irq(&data->misclock); in tsi108_set_mac()
1157 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_set_rx_mode() local
1173 memset(data->mc_hash, 0, sizeof(data->mc_hash)); in tsi108_set_rx_mode()
1180 __set_bit(hash, &data->mc_hash[0]); in tsi108_set_rx_mode()
1193 data->mc_hash[i]); in tsi108_set_rx_mode()
1203 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_init_phy() local
1210 tsi108_write_mii(data, MII_BMCR, BMCR_RESET); in tsi108_init_phy()
1212 if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET)) in tsi108_init_phy()
1219 if (data->phy_type == TSI108_PHY_BCM54XX) { in tsi108_init_phy()
1220 tsi108_write_mii(data, 0x09, 0x0300); in tsi108_init_phy()
1221 tsi108_write_mii(data, 0x10, 0x1020); in tsi108_init_phy()
1222 tsi108_write_mii(data, 0x1c, 0x8c00); in tsi108_init_phy()
1225 tsi108_write_mii(data, in tsi108_init_phy()
1228 while (tsi108_read_mii(data, MII_BMCR) & BMCR_ANRESTART) in tsi108_init_phy()
1236 tsi108_write_tbi(data, 0x11, 0x30); in tsi108_init_phy()
1242 data->link_up = 0; in tsi108_init_phy()
1244 while (!((phyval = tsi108_read_mii(data, MII_BMSR)) & in tsi108_init_phy()
1254 data->mii_if.supports_gmii = mii_check_gmii_support(&data->mii_if); in tsi108_init_phy()
1256 data->phy_ok = 1; in tsi108_init_phy()
1257 data->init_media = 1; in tsi108_init_phy()
1263 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_kill_phy() local
1267 tsi108_write_mii(data, MII_BMCR, BMCR_PDOWN); in tsi108_kill_phy()
1268 data->phy_ok = 0; in tsi108_kill_phy()
1275 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_open() local
1279 i = request_irq(data->irq_num, tsi108_irq, 0, dev->name, dev); in tsi108_open()
1282 data->id, data->irq_num); in tsi108_open()
1285 dev->irq = data->irq_num; in tsi108_open()
1288 data->id, dev->irq, dev->name); in tsi108_open()
1291 data->rxring = dma_alloc_coherent(&data->pdev->dev, rxring_size, in tsi108_open()
1292 &data->rxdma, GFP_KERNEL); in tsi108_open()
1293 if (!data->rxring) { in tsi108_open()
1294 free_irq(data->irq_num, dev); in tsi108_open()
1298 data->txring = dma_alloc_coherent(&data->pdev->dev, txring_size, in tsi108_open()
1299 &data->txdma, GFP_KERNEL); in tsi108_open()
1300 if (!data->txring) { in tsi108_open()
1301 free_irq(data->irq_num, dev); in tsi108_open()
1302 dma_free_coherent(&data->pdev->dev, rxring_size, data->rxring, in tsi108_open()
1303 data->rxdma); in tsi108_open()
1308 data->rxring[i].next0 = data->rxdma + (i + 1) * sizeof(rx_desc); in tsi108_open()
1309 data->rxring[i].blen = TSI108_RXBUF_SIZE; in tsi108_open()
1310 data->rxring[i].vlan = 0; in tsi108_open()
1313 data->rxring[TSI108_RXRING_LEN - 1].next0 = data->rxdma; in tsi108_open()
1315 data->rxtail = 0; in tsi108_open()
1316 data->rxhead = 0; in tsi108_open()
1330 data->rxhead = i; in tsi108_open()
1334 data->rxskbs[i] = skb; in tsi108_open()
1335 data->rxring[i].buf0 = virt_to_phys(data->rxskbs[i]->data); in tsi108_open()
1336 data->rxring[i].misc = TSI108_RX_OWN | TSI108_RX_INT; in tsi108_open()
1339 data->rxfree = i; in tsi108_open()
1340 TSI_WRITE(TSI108_EC_RXQ_PTRLOW, data->rxdma); in tsi108_open()
1343 data->txring[i].next0 = data->txdma + (i + 1) * sizeof(tx_desc); in tsi108_open()
1344 data->txring[i].misc = 0; in tsi108_open()
1347 data->txring[TSI108_TXRING_LEN - 1].next0 = data->txdma; in tsi108_open()
1348 data->txtail = 0; in tsi108_open()
1349 data->txhead = 0; in tsi108_open()
1350 data->txfree = TSI108_TXRING_LEN; in tsi108_open()
1351 TSI_WRITE(TSI108_EC_TXQ_PTRLOW, data->txdma); in tsi108_open()
1354 napi_enable(&data->napi); in tsi108_open()
1356 timer_setup(&data->timer, tsi108_timed_checker, 0); in tsi108_open()
1357 mod_timer(&data->timer, jiffies + 1); in tsi108_open()
1359 tsi108_restart_rx(data, dev); in tsi108_open()
1377 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_close() local
1380 napi_disable(&data->napi); in tsi108_close()
1382 del_timer_sync(&data->timer); in tsi108_close()
1391 while (!data->txfree || data->txhead != data->txtail) { in tsi108_close()
1392 int tx = data->txtail; in tsi108_close()
1394 skb = data->txskbs[tx]; in tsi108_close()
1395 data->txtail = (data->txtail + 1) % TSI108_TXRING_LEN; in tsi108_close()
1396 data->txfree++; in tsi108_close()
1400 free_irq(data->irq_num, dev); in tsi108_close()
1404 while (data->rxfree) { in tsi108_close()
1405 int rx = data->rxtail; in tsi108_close()
1408 skb = data->rxskbs[rx]; in tsi108_close()
1409 data->rxtail = (data->rxtail + 1) % TSI108_RXRING_LEN; in tsi108_close()
1410 data->rxfree--; in tsi108_close()
1414 dma_free_coherent(&data->pdev->dev, in tsi108_close()
1416 data->rxring, data->rxdma); in tsi108_close()
1417 dma_free_coherent(&data->pdev->dev, in tsi108_close()
1419 data->txring, data->txdma); in tsi108_close()
1426 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_init_mac() local
1488 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_get_link_ksettings() local
1491 spin_lock_irqsave(&data->txlock, flags); in tsi108_get_link_ksettings()
1492 mii_ethtool_get_link_ksettings(&data->mii_if, cmd); in tsi108_get_link_ksettings()
1493 spin_unlock_irqrestore(&data->txlock, flags); in tsi108_get_link_ksettings()
1501 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_set_link_ksettings() local
1505 spin_lock_irqsave(&data->txlock, flags); in tsi108_set_link_ksettings()
1506 rc = mii_ethtool_set_link_ksettings(&data->mii_if, cmd); in tsi108_set_link_ksettings()
1507 spin_unlock_irqrestore(&data->txlock, flags); in tsi108_set_link_ksettings()
1514 struct tsi108_prv_data *data = netdev_priv(dev); in tsi108_do_ioctl() local
1517 return generic_mii_ioctl(&data->mii_if, if_mii(rq), cmd, NULL); in tsi108_do_ioctl()
1541 struct tsi108_prv_data *data = NULL; in tsi108_init_one() local
1560 data = netdev_priv(dev); in tsi108_init_one()
1561 data->dev = dev; in tsi108_init_one()
1562 data->pdev = pdev; in tsi108_init_one()
1568 data->regs = ioremap(einfo->regs, 0x400); in tsi108_init_one()
1569 if (NULL == data->regs) { in tsi108_init_one()
1574 data->phyregs = ioremap(einfo->phyregs, 0x400); in tsi108_init_one()
1575 if (NULL == data->phyregs) { in tsi108_init_one()
1580 data->mii_if.dev = dev; in tsi108_init_one()
1581 data->mii_if.mdio_read = tsi108_mdio_read; in tsi108_init_one()
1582 data->mii_if.mdio_write = tsi108_mdio_write; in tsi108_init_one()
1583 data->mii_if.phy_id = einfo->phy; in tsi108_init_one()
1584 data->mii_if.phy_id_mask = 0x1f; in tsi108_init_one()
1585 data->mii_if.reg_num_mask = 0x1f; in tsi108_init_one()
1587 data->phy = einfo->phy; in tsi108_init_one()
1588 data->phy_type = einfo->phy_type; in tsi108_init_one()
1589 data->irq_num = einfo->irq_num; in tsi108_init_one()
1590 data->id = pdev->id; in tsi108_init_one()
1591 netif_napi_add(dev, &data->napi, tsi108_poll); in tsi108_init_one()
1605 spin_lock_init(&data->txlock); in tsi108_init_one()
1606 spin_lock_init(&data->misclock); in tsi108_init_one()
1608 tsi108_reset_ether(data); in tsi108_init_one()
1629 data->msg_enable = DEBUG; in tsi108_init_one()
1636 iounmap(data->phyregs); in tsi108_init_one()
1639 iounmap(data->regs); in tsi108_init_one()
1655 struct tsi108_prv_data *data = from_timer(data, t, timer); in tsi108_timed_checker() local
1656 struct net_device *dev = data->dev; in tsi108_timed_checker()
1660 mod_timer(&data->timer, jiffies + CHECK_PHY_INTERVAL); in tsi108_timed_checker()