Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255975
b: refs/heads/master
c: e44daad
h: refs/heads/master
i:
  255973: 4e2bf16
  255971: 02cd441
  255967: 2858b46
v: v3
  • Loading branch information
Jon Mason authored and David S. Miller committed Jun 28, 2011
1 parent cb686bf commit 4470f69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3aa0cb44f2cfcdfa6df1bd40b9c182b35528849
refs/heads/master: e44daaded19baf8b7cf9ab3dedad8a01b8c49251
20 changes: 6 additions & 14 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@ struct rtl8169_private {
unsigned int (*phy_reset_pending)(struct rtl8169_private *tp);
unsigned int (*link_ok)(void __iomem *);
int (*do_ioctl)(struct rtl8169_private *tp, struct mii_ioctl_data *data, int cmd);
int pcie_cap;
struct delayed_work task;
unsigned features;

Expand Down Expand Up @@ -3444,9 +3443,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
}
tp->mmio_addr = ioaddr;

tp->pcie_cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
if (!tp->pcie_cap)
netif_info(tp, probe, dev, "no PCI Express capability\n");
if (!pci_is_pcie(pdev))
netif_info(tp, probe, dev, "not PCI Express\n");

RTL_W16(IntrMask, 0x0000);

Expand Down Expand Up @@ -3898,9 +3896,7 @@ static void rtl_hw_start_8169(struct net_device *dev)

static void rtl_tx_performance_tweak(struct pci_dev *pdev, u16 force)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev);
int cap = tp->pcie_cap;
int cap = pci_pcie_cap(pdev);

if (cap) {
u16 ctl;
Expand Down Expand Up @@ -3948,9 +3944,7 @@ static void rtl_ephy_init(void __iomem *ioaddr, const struct ephy_info *e, int l

static void rtl_disable_clock_request(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev);
int cap = tp->pcie_cap;
int cap = pci_pcie_cap(pdev);

if (cap) {
u16 ctl;
Expand All @@ -3963,9 +3957,7 @@ static void rtl_disable_clock_request(struct pci_dev *pdev)

static void rtl_enable_clock_request(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev);
int cap = tp->pcie_cap;
int cap = pci_pcie_cap(pdev);

if (cap) {
u16 ctl;
Expand Down Expand Up @@ -4395,7 +4387,7 @@ static void rtl_hw_start_8101(struct net_device *dev)

if (tp->mac_version == RTL_GIGA_MAC_VER_13 ||
tp->mac_version == RTL_GIGA_MAC_VER_16) {
int cap = tp->pcie_cap;
int cap = pci_pcie_cap(pdev);

if (cap) {
pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL,
Expand Down

0 comments on commit 4470f69

Please sign in to comment.