| .. | .. |
|---|
| 714 | 714 | * gather additional information that normally would |
|---|
| 715 | 715 | * come from the eeprom, like MAC Address |
|---|
| 716 | 716 | */ |
|---|
| 717 | | - adapter->has_eeprom = 0; |
|---|
| 717 | + adapter->has_eeprom = false; |
|---|
| 718 | 718 | return -EIO; |
|---|
| 719 | 719 | } |
|---|
| 720 | 720 | } |
|---|
| 721 | | - adapter->has_eeprom = 1; |
|---|
| 721 | + adapter->has_eeprom = true; |
|---|
| 722 | 722 | |
|---|
| 723 | 723 | /* Read the EEPROM for information regarding LED behavior. Refer to |
|---|
| 724 | 724 | * et131x_xcvr_init() for its use. |
|---|
| .. | .. |
|---|
| 950 | 950 | u32 hash2 = 0; |
|---|
| 951 | 951 | u32 hash3 = 0; |
|---|
| 952 | 952 | u32 hash4 = 0; |
|---|
| 953 | | - u32 pm_csr; |
|---|
| 954 | 953 | |
|---|
| 955 | 954 | /* If ET131X_PACKET_TYPE_MULTICAST is specified, then we provision |
|---|
| 956 | 955 | * the multi-cast LIST. If it is NOT specified, (and "ALL" is not |
|---|
| .. | .. |
|---|
| 984 | 983 | } |
|---|
| 985 | 984 | |
|---|
| 986 | 985 | /* Write out the new hash to the device */ |
|---|
| 987 | | - pm_csr = readl(&adapter->regs->global.pm_csr); |
|---|
| 988 | 986 | if (!et1310_in_phy_coma(adapter)) { |
|---|
| 989 | 987 | writel(hash1, &rxmac->multi_hash1); |
|---|
| 990 | 988 | writel(hash2, &rxmac->multi_hash2); |
|---|
| .. | .. |
|---|
| 999 | 997 | u32 uni_pf1; |
|---|
| 1000 | 998 | u32 uni_pf2; |
|---|
| 1001 | 999 | u32 uni_pf3; |
|---|
| 1002 | | - u32 pm_csr; |
|---|
| 1003 | 1000 | |
|---|
| 1004 | 1001 | /* Set up unicast packet filter reg 3 to be the first two octets of |
|---|
| 1005 | 1002 | * the MAC address for both address |
|---|
| .. | .. |
|---|
| 1025 | 1022 | (adapter->addr[4] << ET_RX_UNI_PF_ADDR1_5_SHIFT) | |
|---|
| 1026 | 1023 | adapter->addr[5]; |
|---|
| 1027 | 1024 | |
|---|
| 1028 | | - pm_csr = readl(&adapter->regs->global.pm_csr); |
|---|
| 1029 | 1025 | if (!et1310_in_phy_coma(adapter)) { |
|---|
| 1030 | 1026 | writel(uni_pf1, &rxmac->uni_pf_addr1); |
|---|
| 1031 | 1027 | writel(uni_pf2, &rxmac->uni_pf_addr2); |
|---|
| .. | .. |
|---|
| 2362 | 2358 | |
|---|
| 2363 | 2359 | /* Allocate memory for the TCB's (Transmit Control Block) */ |
|---|
| 2364 | 2360 | tx_ring->tcb_ring = kcalloc(NUM_TCB, sizeof(struct tcb), |
|---|
| 2365 | | - GFP_ATOMIC | GFP_DMA); |
|---|
| 2361 | + GFP_KERNEL | GFP_DMA); |
|---|
| 2366 | 2362 | if (!tx_ring->tcb_ring) |
|---|
| 2367 | 2363 | return -ENOMEM; |
|---|
| 2368 | 2364 | |
|---|
| .. | .. |
|---|
| 2426 | 2422 | u32 thiscopy, remainder; |
|---|
| 2427 | 2423 | struct sk_buff *skb = tcb->skb; |
|---|
| 2428 | 2424 | u32 nr_frags = skb_shinfo(skb)->nr_frags + 1; |
|---|
| 2429 | | - struct skb_frag_struct *frags = &skb_shinfo(skb)->frags[0]; |
|---|
| 2425 | + skb_frag_t *frags = &skb_shinfo(skb)->frags[0]; |
|---|
| 2430 | 2426 | struct phy_device *phydev = adapter->netdev->phydev; |
|---|
| 2431 | 2427 | dma_addr_t dma_addr; |
|---|
| 2432 | 2428 | struct tx_ring *tx_ring = &adapter->tx_ring; |
|---|
| .. | .. |
|---|
| 2488 | 2484 | frag++; |
|---|
| 2489 | 2485 | } |
|---|
| 2490 | 2486 | } else { |
|---|
| 2491 | | - desc[frag].len_vlan = frags[i - 1].size; |
|---|
| 2487 | + desc[frag].len_vlan = skb_frag_size(&frags[i - 1]); |
|---|
| 2492 | 2488 | dma_addr = skb_frag_dma_map(&adapter->pdev->dev, |
|---|
| 2493 | 2489 | &frags[i - 1], |
|---|
| 2494 | 2490 | 0, |
|---|
| 2495 | | - frags[i - 1].size, |
|---|
| 2491 | + desc[frag].len_vlan, |
|---|
| 2496 | 2492 | DMA_TO_DEVICE); |
|---|
| 2497 | 2493 | desc[frag].addr_lo = lower_32_bits(dma_addr); |
|---|
| 2498 | 2494 | desc[frag].addr_hi = upper_32_bits(dma_addr); |
|---|
| .. | .. |
|---|
| 2958 | 2954 | struct et131x_adapter *adapter = netdev_priv(netdev); |
|---|
| 2959 | 2955 | |
|---|
| 2960 | 2956 | strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver)); |
|---|
| 2961 | | - strlcpy(info->version, DRIVER_VERSION, sizeof(info->version)); |
|---|
| 2962 | 2957 | strlcpy(info->bus_info, pci_name(adapter->pdev), |
|---|
| 2963 | 2958 | sizeof(info->bus_info)); |
|---|
| 2964 | 2959 | } |
|---|
| .. | .. |
|---|
| 3258 | 3253 | return PTR_ERR(phydev); |
|---|
| 3259 | 3254 | } |
|---|
| 3260 | 3255 | |
|---|
| 3261 | | - phydev->supported &= (SUPPORTED_10baseT_Half | |
|---|
| 3262 | | - SUPPORTED_10baseT_Full | |
|---|
| 3263 | | - SUPPORTED_100baseT_Half | |
|---|
| 3264 | | - SUPPORTED_100baseT_Full | |
|---|
| 3265 | | - SUPPORTED_Autoneg | |
|---|
| 3266 | | - SUPPORTED_MII | |
|---|
| 3267 | | - SUPPORTED_TP); |
|---|
| 3256 | + phy_set_max_speed(phydev, SPEED_100); |
|---|
| 3268 | 3257 | |
|---|
| 3269 | 3258 | if (adapter->pdev->device != ET131X_PCI_DEVICE_ID_FAST) |
|---|
| 3270 | | - phydev->supported |= SUPPORTED_1000baseT_Half | |
|---|
| 3271 | | - SUPPORTED_1000baseT_Full; |
|---|
| 3259 | + phy_set_max_speed(phydev, SPEED_1000); |
|---|
| 3272 | 3260 | |
|---|
| 3273 | | - phydev->advertising = phydev->supported; |
|---|
| 3274 | 3261 | phydev->autoneg = AUTONEG_ENABLE; |
|---|
| 3275 | 3262 | |
|---|
| 3276 | 3263 | phy_attached_info(phydev); |
|---|
| .. | .. |
|---|
| 3452 | 3439 | * send a pause packet, otherwise just exit |
|---|
| 3453 | 3440 | */ |
|---|
| 3454 | 3441 | if (adapter->flow == FLOW_TXONLY || adapter->flow == FLOW_BOTH) { |
|---|
| 3455 | | - u32 pm_csr; |
|---|
| 3456 | | - |
|---|
| 3457 | 3442 | /* Tell the device to send a pause packet via the back |
|---|
| 3458 | 3443 | * pressure register (bp req and bp xon/xoff) |
|---|
| 3459 | 3444 | */ |
|---|
| 3460 | | - pm_csr = readl(&iomem->global.pm_csr); |
|---|
| 3461 | 3445 | if (!et1310_in_phy_coma(adapter)) |
|---|
| 3462 | 3446 | writel(3, &iomem->txmac.bp_ctrl); |
|---|
| 3463 | 3447 | } |
|---|
| .. | .. |
|---|
| 3659 | 3643 | return del_timer_sync(&adapter->error_timer); |
|---|
| 3660 | 3644 | } |
|---|
| 3661 | 3645 | |
|---|
| 3662 | | -static int et131x_ioctl(struct net_device *netdev, struct ifreq *reqbuf, |
|---|
| 3663 | | - int cmd) |
|---|
| 3664 | | -{ |
|---|
| 3665 | | - if (!netdev->phydev) |
|---|
| 3666 | | - return -EINVAL; |
|---|
| 3667 | | - |
|---|
| 3668 | | - return phy_mii_ioctl(netdev->phydev, reqbuf, cmd); |
|---|
| 3669 | | -} |
|---|
| 3670 | | - |
|---|
| 3671 | 3646 | /* et131x_set_packet_filter - Configures the Rx Packet filtering */ |
|---|
| 3672 | 3647 | static int et131x_set_packet_filter(struct et131x_adapter *adapter) |
|---|
| 3673 | 3648 | { |
|---|
| .. | .. |
|---|
| 3819 | 3794 | * specified by the 'tx_timeo" element in the net_device structure (see |
|---|
| 3820 | 3795 | * et131x_alloc_device() to see how this value is set). |
|---|
| 3821 | 3796 | */ |
|---|
| 3822 | | -static void et131x_tx_timeout(struct net_device *netdev) |
|---|
| 3797 | +static void et131x_tx_timeout(struct net_device *netdev, unsigned int txqueue) |
|---|
| 3823 | 3798 | { |
|---|
| 3824 | 3799 | struct et131x_adapter *adapter = netdev_priv(netdev); |
|---|
| 3825 | 3800 | struct tx_ring *tx_ring = &adapter->tx_ring; |
|---|
| .. | .. |
|---|
| 3907 | 3882 | .ndo_set_mac_address = eth_mac_addr, |
|---|
| 3908 | 3883 | .ndo_validate_addr = eth_validate_addr, |
|---|
| 3909 | 3884 | .ndo_get_stats = et131x_stats, |
|---|
| 3910 | | - .ndo_do_ioctl = et131x_ioctl, |
|---|
| 3885 | + .ndo_do_ioctl = phy_do_ioctl, |
|---|
| 3911 | 3886 | }; |
|---|
| 3912 | 3887 | |
|---|
| 3913 | 3888 | static int et131x_pci_setup(struct pci_dev *pdev, |
|---|