@@ -5685,15 +5685,15 @@ static void rtl_ephy_init(struct rtl8169_private *tp, const struct ephy_info *e,
5685
5685
}
5686
5686
}
5687
5687
5688
- static void rtl_disable_clock_request (struct pci_dev * pdev )
5688
+ static void rtl_disable_clock_request (struct rtl8169_private * tp )
5689
5689
{
5690
- pcie_capability_clear_word (pdev , PCI_EXP_LNKCTL ,
5690
+ pcie_capability_clear_word (tp -> pci_dev , PCI_EXP_LNKCTL ,
5691
5691
PCI_EXP_LNKCTL_CLKREQ_EN );
5692
5692
}
5693
5693
5694
- static void rtl_enable_clock_request (struct pci_dev * pdev )
5694
+ static void rtl_enable_clock_request (struct rtl8169_private * tp )
5695
5695
{
5696
- pcie_capability_set_word (pdev , PCI_EXP_LNKCTL ,
5696
+ pcie_capability_set_word (tp -> pci_dev , PCI_EXP_LNKCTL ,
5697
5697
PCI_EXP_LNKCTL_CLKREQ_EN );
5698
5698
}
5699
5699
@@ -5745,16 +5745,14 @@ static void rtl_hw_start_8168bef(struct rtl8169_private *tp)
5745
5745
5746
5746
static void __rtl_hw_start_8168cp (struct rtl8169_private * tp )
5747
5747
{
5748
- struct pci_dev * pdev = tp -> pci_dev ;
5749
-
5750
5748
RTL_W8 (tp , Config1 , RTL_R8 (tp , Config1 ) | Speed_down );
5751
5749
5752
5750
RTL_W8 (tp , Config3 , RTL_R8 (tp , Config3 ) & ~Beacon_en );
5753
5751
5754
5752
if (tp -> dev -> mtu <= ETH_DATA_LEN )
5755
5753
rtl_tx_performance_tweak (tp , 0x5 << MAX_READ_REQUEST_SHIFT );
5756
5754
5757
- rtl_disable_clock_request (pdev );
5755
+ rtl_disable_clock_request (tp );
5758
5756
5759
5757
RTL_W16 (tp , CPlusCmd , RTL_R16 (tp , CPlusCmd ) & ~R8168_CPCMD_QUIRK_MASK );
5760
5758
}
@@ -5850,11 +5848,9 @@ static void rtl_hw_start_8168c_4(struct rtl8169_private *tp)
5850
5848
5851
5849
static void rtl_hw_start_8168d (struct rtl8169_private * tp )
5852
5850
{
5853
- struct pci_dev * pdev = tp -> pci_dev ;
5854
-
5855
5851
rtl_csi_access_enable_2 (tp );
5856
5852
5857
- rtl_disable_clock_request (pdev );
5853
+ rtl_disable_clock_request (tp );
5858
5854
5859
5855
RTL_W8 (tp , MaxTxPacketSize , TxPacketMax );
5860
5856
@@ -5866,21 +5862,18 @@ static void rtl_hw_start_8168d(struct rtl8169_private *tp)
5866
5862
5867
5863
static void rtl_hw_start_8168dp (struct rtl8169_private * tp )
5868
5864
{
5869
- struct pci_dev * pdev = tp -> pci_dev ;
5870
-
5871
5865
rtl_csi_access_enable_1 (tp );
5872
5866
5873
5867
if (tp -> dev -> mtu <= ETH_DATA_LEN )
5874
5868
rtl_tx_performance_tweak (tp , 0x5 << MAX_READ_REQUEST_SHIFT );
5875
5869
5876
5870
RTL_W8 (tp , MaxTxPacketSize , TxPacketMax );
5877
5871
5878
- rtl_disable_clock_request (pdev );
5872
+ rtl_disable_clock_request (tp );
5879
5873
}
5880
5874
5881
5875
static void rtl_hw_start_8168d_4 (struct rtl8169_private * tp )
5882
5876
{
5883
- struct pci_dev * pdev = tp -> pci_dev ;
5884
5877
static const struct ephy_info e_info_8168d_4 [] = {
5885
5878
{ 0x0b , 0x0000 , 0x0048 },
5886
5879
{ 0x19 , 0x0020 , 0x0050 },
@@ -5895,12 +5888,11 @@ static void rtl_hw_start_8168d_4(struct rtl8169_private *tp)
5895
5888
5896
5889
rtl_ephy_init (tp , e_info_8168d_4 , ARRAY_SIZE (e_info_8168d_4 ));
5897
5890
5898
- rtl_enable_clock_request (pdev );
5891
+ rtl_enable_clock_request (tp );
5899
5892
}
5900
5893
5901
5894
static void rtl_hw_start_8168e_1 (struct rtl8169_private * tp )
5902
5895
{
5903
- struct pci_dev * pdev = tp -> pci_dev ;
5904
5896
static const struct ephy_info e_info_8168e_1 [] = {
5905
5897
{ 0x00 , 0x0200 , 0x0100 },
5906
5898
{ 0x00 , 0x0000 , 0x0004 },
@@ -5926,7 +5918,7 @@ static void rtl_hw_start_8168e_1(struct rtl8169_private *tp)
5926
5918
5927
5919
RTL_W8 (tp , MaxTxPacketSize , TxPacketMax );
5928
5920
5929
- rtl_disable_clock_request (pdev );
5921
+ rtl_disable_clock_request (tp );
5930
5922
5931
5923
/* Reset tx FIFO pointer */
5932
5924
RTL_W32 (tp , MISC , RTL_R32 (tp , MISC ) | TXPLA_RST );
@@ -5937,7 +5929,6 @@ static void rtl_hw_start_8168e_1(struct rtl8169_private *tp)
5937
5929
5938
5930
static void rtl_hw_start_8168e_2 (struct rtl8169_private * tp )
5939
5931
{
5940
- struct pci_dev * pdev = tp -> pci_dev ;
5941
5932
static const struct ephy_info e_info_8168e_2 [] = {
5942
5933
{ 0x09 , 0x0000 , 0x0080 },
5943
5934
{ 0x19 , 0x0000 , 0x0224 }
@@ -5961,7 +5952,7 @@ static void rtl_hw_start_8168e_2(struct rtl8169_private *tp)
5961
5952
5962
5953
RTL_W8 (tp , MaxTxPacketSize , EarlySize );
5963
5954
5964
- rtl_disable_clock_request (pdev );
5955
+ rtl_disable_clock_request (tp );
5965
5956
5966
5957
RTL_W32 (tp , TxConfig , RTL_R32 (tp , TxConfig ) | TXCFG_AUTO_FIFO );
5967
5958
RTL_W8 (tp , MCU , RTL_R8 (tp , MCU ) & ~NOW_IS_OOB );
@@ -5976,8 +5967,6 @@ static void rtl_hw_start_8168e_2(struct rtl8169_private *tp)
5976
5967
5977
5968
static void rtl_hw_start_8168f (struct rtl8169_private * tp )
5978
5969
{
5979
- struct pci_dev * pdev = tp -> pci_dev ;
5980
-
5981
5970
rtl_csi_access_enable_2 (tp );
5982
5971
5983
5972
rtl_tx_performance_tweak (tp , 0x5 << MAX_READ_REQUEST_SHIFT );
@@ -5995,7 +5984,7 @@ static void rtl_hw_start_8168f(struct rtl8169_private *tp)
5995
5984
5996
5985
RTL_W8 (tp , MaxTxPacketSize , EarlySize );
5997
5986
5998
- rtl_disable_clock_request (pdev );
5987
+ rtl_disable_clock_request (tp );
5999
5988
6000
5989
RTL_W32 (tp , TxConfig , RTL_R32 (tp , TxConfig ) | TXCFG_AUTO_FIFO );
6001
5990
RTL_W8 (tp , MCU , RTL_R8 (tp , MCU ) & ~NOW_IS_OOB );
0 commit comments