Changeset 18783
- Timestamp:
- 03/19/12 23:52:30 (14 months ago)
- Location:
- src/linux/universal/linux-3.3
- Files:
-
- 6 edited
-
arch/powerpc/platforms/85xx/rb1000.c (modified) (1 diff)
-
arch/powerpc/sysdev/rb_aux.c (modified) (1 diff)
-
drivers/net/ethernet/atheros/atl1c/atl1c/atl1c.h (modified) (1 diff)
-
drivers/net/ethernet/atheros/atl1c/atl1c/atl1c_ethtool.c (modified) (1 diff)
-
drivers/net/ethernet/atheros/atl1c/atl1c/atl1c_main.c (modified) (6 diffs)
-
lib/pci_iomap.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/linux/universal/linux-3.3/arch/powerpc/platforms/85xx/rb1000.c
r18778 r18783 133 133 134 134 mpic = mpic_alloc(np, r.start, 135 MPIC_ PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,135 MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 136 136 1, 0, " OpenPIC "); 137 137 -
src/linux/universal/linux-3.3/arch/powerpc/sysdev/rb_aux.c
r18778 r18783 194 194 195 195 mpic = mpic_alloc(np, r.start, 196 MPIC_ PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,196 MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, 197 197 4, 0, " OpenPIC "); 198 198 for (i = 0; i < 80; i += 4) { -
src/linux/universal/linux-3.3/drivers/net/ethernet/atheros/atl1c/atl1c/atl1c.h
r18778 r18783 76 76 #define MAX_JUMBO_FRAME_SIZE (9*1024) 77 77 #define MAX_TX_OFFLOAD_THRESH (9*1024) 78 #define MAX_TSO_FRAME_SIZE (7*1024) 78 79 79 80 #define AT_MAX_RECEIVE_QUEUE 4 -
src/linux/universal/linux-3.3/drivers/net/ethernet/atheros/atl1c/atl1c/atl1c_ethtool.c
r18778 r18783 236 236 .get_eeprom_len = atl1c_get_eeprom_len, 237 237 .get_eeprom = atl1c_get_eeprom, 238 .get_tx_csum = atl1c_get_tx_csum,239 .get_sg = ethtool_op_get_sg,240 .set_sg = ethtool_op_set_sg,241 238 }; 242 239 -
src/linux/universal/linux-3.3/drivers/net/ethernet/atheros/atl1c/atl1c/atl1c_main.c
r18778 r18783 395 395 } 396 396 397 static void atl1c_vlan_rx_register(struct net_device *netdev, 398 struct vlan_group *grp) 397 static void __atl1c_vlan_mode(netdev_features_t features, u32 *mac_ctrl_data) 398 { 399 if (features & NETIF_F_HW_VLAN_RX) { 400 /* enable VLAN tag insert/strip */ 401 *mac_ctrl_data |= MAC_CTRL_RMV_VLAN; 402 } else { 403 /* disable VLAN tag insert/strip */ 404 *mac_ctrl_data &= ~MAC_CTRL_RMV_VLAN; 405 } 406 } 407 408 static void atl1c_vlan_mode(struct net_device *netdev, 409 netdev_features_t features) 399 410 { 400 411 struct atl1c_adapter *adapter = netdev_priv(netdev); … … 403 414 404 415 if (netif_msg_pktdata(adapter)) 405 dev_dbg(&pdev->dev, "atl1c_vlan_ rx_register\n");416 dev_dbg(&pdev->dev, "atl1c_vlan_mode\n"); 406 417 407 418 atl1c_irq_disable(adapter); 408 409 adapter->vlgrp = grp;410 419 AT_READ_REG(&adapter->hw, REG_MAC_CTRL, &mac_ctrl_data); 411 412 if (grp) { 413 /* enable VLAN tag insert/strip */ 414 mac_ctrl_data |= MAC_CTRL_RMV_VLAN; 415 } else { 416 /* disable VLAN tag insert/strip */ 417 mac_ctrl_data &= ~MAC_CTRL_RMV_VLAN; 418 } 419 420 __atl1c_vlan_mode(features, &mac_ctrl_data); 420 421 AT_WRITE_REG(&adapter->hw, REG_MAC_CTRL, mac_ctrl_data); 421 422 atl1c_irq_enable(adapter); … … 427 428 428 429 if (netif_msg_pktdata(adapter)) 429 dev_dbg(&pdev->dev, "atl1c_restore_vlan !");430 atl1c_vlan_ rx_register(adapter->netdev, adapter->vlgrp);430 dev_dbg(&pdev->dev, "atl1c_restore_vlan\n"); 431 atl1c_vlan_mode(adapter->netdev, adapter->netdev->features); 431 432 } 432 433 /* … … 464 465 roundup(mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN, 8) : AT_RX_BUF_SIZE; 465 466 } 467 468 469 static netdev_features_t atl1c_fix_features(struct net_device *netdev, 470 netdev_features_t features) 471 { 472 /* 473 * Since there is no support for separate rx/tx vlan accel 474 * enable/disable make sure tx flag is always in same state as rx. 475 */ 476 if (features & NETIF_F_HW_VLAN_RX) 477 features |= NETIF_F_HW_VLAN_TX; 478 else 479 features &= ~NETIF_F_HW_VLAN_TX; 480 481 if (netdev->mtu > MAX_TSO_FRAME_SIZE) 482 features &= ~(NETIF_F_TSO | NETIF_F_TSO6); 483 484 return features; 485 } 486 487 static int atl1c_set_features(struct net_device *netdev, 488 netdev_features_t features) 489 { 490 netdev_features_t changed = netdev->features ^ features; 491 492 if (changed & NETIF_F_HW_VLAN_RX) 493 atl1c_vlan_mode(netdev, features); 494 495 return 0; 496 } 497 466 498 /* 467 499 * atl1c_change_mtu - Change the Maximum Transfer Unit … … 1673 1705 skb->dev = netdev; 1674 1706 atl1c_rx_checksum(adapter, skb, rrs); 1675 if (unlikely(adapter->vlgrp) && 1676 le32_to_cpu(rrs->word3) & RRS_VLAN_INS) {1707 1708 if (le32_to_cpu(rrs->word3) & RRS_VLAN_INS) { 1677 1709 u16 vlan; 1678 1710 1679 1711 AT_TAG_TO_VLAN(rrs->vlan_tag, vlan); 1680 1712 vlan = le16_to_cpu(vlan); 1681 vlan_hwaccel_receive_skb(skb, adapter->vlgrp, vlan);1682 } else1683 netif_receive_skb(skb);1713 __vlan_hwaccel_put_tag(skb, vlan); 1714 } 1715 netif_receive_skb(skb); 1684 1716 1685 1717 netdev->last_rx = jiffies; … … 2421 2453 .ndo_set_rx_mode = atl1c_set_multi, 2422 2454 .ndo_change_mtu = atl1c_change_mtu, 2455 .ndo_fix_features = atl1c_fix_features, 2456 .ndo_set_features = atl1c_set_features, 2423 2457 .ndo_do_ioctl = atl1c_ioctl, 2424 2458 .ndo_tx_timeout = atl1c_tx_timeout, 2425 2459 .ndo_get_stats = atl1c_get_stats, 2426 .ndo_vlan_rx_register = atl1c_vlan_rx_register,2460 // .ndo_vlan_rx_register = atl1c_vlan_rx_register, 2427 2461 #ifdef CONFIG_NET_POLL_CONTROLLER 2428 2462 .ndo_poll_controller = atl1c_netpoll, -
src/linux/universal/linux-3.3/lib/pci_iomap.c
r18778 r18783 10 10 11 11 #ifdef CONFIG_PCI 12 #ifndef CONFIG_RB_IOMAP 12 13 /** 13 14 * pci_iomap - create a virtual mapping cookie for a PCI BAR … … 46 47 47 48 EXPORT_SYMBOL(pci_iomap); 49 #endif 48 50 #endif /* CONFIG_PCI */
Note: See TracChangeset
for help on using the changeset viewer.
