提交 b518fa8e 编写于 作者: F Francois Romieu

r8169: udelay() removal

No need to chew CPU cycles as there is no heavy timing requirement
and the delays are always requested from a sleepable context.
Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
上级 188f4af0
...@@ -1623,10 +1623,10 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1623,10 +1623,10 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
RTL_W8(ChipCmd, CmdReset); RTL_W8(ChipCmd, CmdReset);
/* Check that the chip has finished the reset. */ /* Check that the chip has finished the reset. */
for (i = 1000; i > 0; i--) { for (i = 100; i > 0; i--) {
if ((RTL_R8(ChipCmd) & CmdReset) == 0) if ((RTL_R8(ChipCmd) & CmdReset) == 0)
break; break;
udelay(10); msleep_interruptible(1);
} }
/* Identify chip attached to board */ /* Identify chip attached to board */
...@@ -1848,10 +1848,10 @@ rtl8169_hw_start(struct net_device *dev) ...@@ -1848,10 +1848,10 @@ rtl8169_hw_start(struct net_device *dev)
RTL_W8(ChipCmd, CmdReset); RTL_W8(ChipCmd, CmdReset);
/* Check that the chip has finished the reset. */ /* Check that the chip has finished the reset. */
for (i = 1000; i > 0; i--) { for (i = 100; i > 0; i--) {
if ((RTL_R8(ChipCmd) & CmdReset) == 0) if ((RTL_R8(ChipCmd) & CmdReset) == 0)
break; break;
udelay(10); msleep_interruptible(1);
} }
if (tp->mac_version == RTL_GIGA_MAC_VER_13) { if (tp->mac_version == RTL_GIGA_MAC_VER_13) {
...@@ -1914,7 +1914,9 @@ rtl8169_hw_start(struct net_device *dev) ...@@ -1914,7 +1914,9 @@ rtl8169_hw_start(struct net_device *dev)
RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr >> 32)); RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr >> 32));
RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb);
RTL_W8(Cfg9346, Cfg9346_Lock); RTL_W8(Cfg9346, Cfg9346_Lock);
udelay(10);
/* Initially a 10 us delay. Turned it into a PCI commit. - FR */
RTL_R8(IntrMask);
RTL_W32(RxMissed, 0); RTL_W32(RxMissed, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册