Skip to content

Commit

Permalink
r8169: improve rtl8169_irq_mask_and_ack
Browse files Browse the repository at this point in the history
Code can be slightly simplified by acking even events we're not
interested in. In addition add a comment making clear that the
read has no functional purpose and is just a PCI commit.

Signed-off-by: Heiner Kallweit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hkallweit authored and davem330 committed Sep 25, 2018
1 parent 4bee64b commit de20e12
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,8 @@ static void rtl_irq_enable_all(struct rtl8169_private *tp)
static void rtl8169_irq_mask_and_ack(struct rtl8169_private *tp)
{
rtl_irq_disable(tp);
rtl_ack_events(tp, RTL_EVENT_NAPI | tp->event_slow);
rtl_ack_events(tp, 0xffff);
/* PCI commit */
RTL_R8(tp, ChipCmd);
}

Expand Down Expand Up @@ -7365,14 +7366,12 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)

rtl_init_rxcfg(tp);

rtl_irq_disable(tp);
rtl8169_irq_mask_and_ack(tp);

rtl_hw_initialize(tp);

rtl_hw_reset(tp);

rtl_ack_events(tp, 0xffff);

pci_set_master(pdev);

rtl_init_mdio_ops(tp);
Expand Down

0 comments on commit de20e12

Please sign in to comment.