102-iegbe_nuke_polling_netdev.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --- a/Embedded/src/GbE/iegbe.h
  2. +++ b/Embedded/src/GbE/iegbe.h
  3. @@ -316,7 +316,6 @@ struct iegbe_adapter {
  4. int cleaned_count);
  5. struct iegbe_rx_ring *rx_ring; /* One per active queue */
  6. struct napi_struct napi;
  7. - struct net_device *polling_netdev; /* One per active queue */
  8. int num_tx_queues;
  9. int num_rx_queues;
  10. --- a/Embedded/src/GbE/iegbe_main.c
  11. +++ b/Embedded/src/GbE/iegbe_main.c
  12. @@ -763,7 +763,7 @@ static int __devinit iegbe_probe(struct
  13. struct iegbe_hw *hw;
  14. static int cards_found = 0;
  15. - int i, err, pci_using_dac;
  16. + int err, pci_using_dac;
  17. u16 eeprom_data = 0;
  18. u16 eeprom_apme_mask = E1000_EEPROM_APME;
  19. int bars;
  20. @@ -984,11 +984,8 @@ err_eeprom:
  21. iegbe_phy_hw_reset(hw);
  22. if (hw->flash_address)
  23. iounmap(hw->flash_address);
  24. - for (i = 0; i < adapter->num_rx_queues; i++)
  25. - dev_put(&adapter->polling_netdev[i]);
  26. kfree(adapter->tx_ring);
  27. kfree(adapter->rx_ring);
  28. - kfree(adapter->polling_netdev);
  29. err_sw_init:
  30. iounmap(hw->hw_addr);
  31. err_ioremap:
  32. @@ -1017,7 +1014,6 @@ iegbe_remove(struct pci_dev *pdev)
  33. struct net_device *netdev = pci_get_drvdata(pdev);
  34. struct iegbe_adapter *adapter = netdev_priv(netdev);
  35. uint32_t manc;
  36. - int i;
  37. if(adapter->hw.mac_type >= iegbe_82540
  38. && adapter->hw.mac_type != iegbe_icp_xxxx
  39. @@ -1030,15 +1026,11 @@ iegbe_remove(struct pci_dev *pdev)
  40. }
  41. unregister_netdev(netdev);
  42. - for (i = 0x0; i < adapter->num_rx_queues; i++)
  43. - dev_put(&adapter->polling_netdev[i]);
  44. -
  45. if(!iegbe_check_phy_reset_block(&adapter->hw)) {
  46. iegbe_phy_hw_reset(&adapter->hw);
  47. }
  48. kfree(adapter->tx_ring);
  49. kfree(adapter->rx_ring);
  50. - kfree(adapter->polling_netdev);
  51. iounmap(adapter->hw.hw_addr);
  52. pci_release_regions(pdev);
  53. @@ -1061,7 +1053,6 @@ iegbe_sw_init(struct iegbe_adapter *adap
  54. struct iegbe_hw *hw = &adapter->hw;
  55. struct net_device *netdev = adapter->netdev;
  56. struct pci_dev *pdev = adapter->pdev;
  57. - int i;
  58. /* PCI config space info */
  59. @@ -1111,11 +1102,6 @@ iegbe_sw_init(struct iegbe_adapter *adap
  60. return -ENOMEM;
  61. }
  62. - for (i = 0; i < adapter->num_rx_queues; i++) {
  63. - adapter->polling_netdev[i].priv = adapter;
  64. - dev_hold(&adapter->polling_netdev[i]);
  65. - set_bit(__LINK_STATE_START, &adapter->polling_netdev[i].state);
  66. - }
  67. spin_lock_init(&adapter->tx_queue_lock);
  68. /*
  69. @@ -1137,8 +1123,7 @@ iegbe_sw_init(struct iegbe_adapter *adap
  70. * @adapter: board private structure to initialize
  71. *
  72. * We allocate one ring per queue at run-time since we don't know the
  73. - * number of queues at compile-time. The polling_netdev array is
  74. - * intended for Multiqueue, but should work fine with a single queue.
  75. + * number of queues at compile-time.
  76. **/
  77. static int __devinit
  78. @@ -1158,15 +1143,6 @@ iegbe_alloc_queues(struct iegbe_adapter
  79. return -ENOMEM;
  80. }
  81. - adapter->polling_netdev = kcalloc(adapter->num_rx_queues,
  82. - sizeof(struct net_device),
  83. - GFP_KERNEL);
  84. - if (!adapter->polling_netdev) {
  85. - kfree(adapter->tx_ring);
  86. - kfree(adapter->rx_ring);
  87. - return -ENOMEM;
  88. - }
  89. -
  90. return E1000_SUCCESS;
  91. }