Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196935
b: refs/heads/master
c: 347fd7d
h: refs/heads/master
i:
  196933: 87dedf7
  196931: da46911
  196927: 167d7f5
v: v3
  • Loading branch information
Henrik Hautakoski authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 4097290 commit 02cf89d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 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: 8d1fe5eaa3b796609a8e2b7dad2480e623c19819
refs/heads/master: 347fd7dbdb6ca771f59996ae3c75a2dfde66c3d7
37 changes: 20 additions & 17 deletions trunk/drivers/staging/rt2860/pci_main_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ MODULE_VERSION(STA_DRIVER_VERSION);
/* Our PCI driver structure */
/* */
static struct pci_driver rt2860_driver = {
name: "rt2860",
id_table:rt2860_pci_tbl,
probe: rt2860_probe,
remove:__devexit_p(rt2860_remove_one),
name: "rt2860",
id_table : rt2860_pci_tbl,
probe : rt2860_probe,
remove : __devexit_p(rt2860_remove_one),
#ifdef CONFIG_PM
suspend:rt2860_suspend,
resume:rt2860_resume,
suspend : rt2860_suspend,
resume : rt2860_resume,
#endif
};

Expand Down Expand Up @@ -211,9 +211,9 @@ static int rt2860_resume(struct pci_dev *pci_dev)

DBGPRINT(RT_DEBUG_TRACE, ("===> rt2860_resume()\n"));

if (net_dev == NULL) {
if (net_dev == NULL)
DBGPRINT(RT_DEBUG_ERROR, ("net_dev == NULL!\n"));
} else
else
GET_PAD_FROM_NET_DEV(pAd, net_dev);

if (pAd != NULL) {
Expand Down Expand Up @@ -281,15 +281,19 @@ static int __devinit rt2860_probe(IN struct pci_dev *pci_dev,

/*PCIDevInit============================================== */
/* wake up and enable device */
if ((rv = pci_enable_device(pci_dev)) != 0) {
rv = pci_enable_device(pci_dev);

if (rv != 0) {
DBGPRINT(RT_DEBUG_ERROR,
("Enable PCI device failed, errno=%d!\n", rv));
return rv;
}

print_name = (char *)pci_name(pci_dev);

if ((rv = pci_request_regions(pci_dev, print_name)) != 0) {
rv = pci_request_regions(pci_dev, print_name);

if (rv != 0) {
DBGPRINT(RT_DEBUG_ERROR,
("Request PCI resource failed, errno=%d!\n", rv));
goto err_out;
Expand Down Expand Up @@ -490,9 +494,8 @@ static void RTMPInitPCIeDevice(struct pci_dev *pci_dev, struct rt_rtmp_adapter *

/* Support advanced power save after 2892/2790. */
/* MAC version at offset 0x1000 is 0x2872XXXX/0x2870XXXX(PCIe, USB, SDIO). */
if ((MacCsr0 & 0xffff0000) != 0x28600000) {
if ((MacCsr0 & 0xffff0000) != 0x28600000)
OPSTATUS_SET_FLAG(pAd, fOP_STATUS_PCIE_DEVICE);
}
}
}

Expand Down Expand Up @@ -900,9 +903,9 @@ void RTMPPCIeLinkCtrlValueRestore(struct rt_rtmp_adapter *pAd, u8 Level)
if ((Configuration != 0) && (Configuration != 0xFFFF)) {
Configuration &= 0xfefc;
/* If call from interface down, restore to orginial setting. */
if (Level == RESTORE_CLOSE) {
if (Level == RESTORE_CLOSE)
Configuration |= pAd->HostLnkCtrlConfiguration;
} else
else
Configuration |= 0x0;
PCI_REG_WIRTE_WORD(pObj->parent_pci_dev,
pAd->HostLnkCtrlOffset,
Expand Down Expand Up @@ -1100,13 +1103,13 @@ void RTMPrt3xSetPCIePowerLinkCtrl(struct rt_rtmp_adapter *pAd)
/* Find PCI-to-PCI Bridge Express Capability Offset */
pos = pci_find_capability(pObj->parent_pci_dev, PCI_CAP_ID_EXP);

if (pos != 0) {
if (pos != 0)
pAd->HostLnkCtrlOffset = pos + PCI_EXP_LNKCTL;
}

/* If configurared to turn on L1. */
HostConfiguration = 0;
if (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1) {
DBGPRINT(RT_DEBUG_TRACE, ("Enter,PSM : Force ASPM \n"));
DBGPRINT(RT_DEBUG_TRACE, ("Enter,PSM : Force ASPM\n"));

/* Skip non-exist deice right away */
if ((pAd->HostLnkCtrlOffset != 0)) {
Expand Down

0 comments on commit 02cf89d

Please sign in to comment.