Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143434
b: refs/heads/master
c: a8729eb
h: refs/heads/master
v: v3
  • Loading branch information
Anatolij Gustschin authored and David S. Miller committed Apr 13, 2009
1 parent b760c21 commit fa7cfb1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 140bc92903287cff4545e358c1651e4b7312cbd3
refs/heads/master: a8729eb302a5b5da8b0b4d29582c42648a2e0f12
9 changes: 9 additions & 0 deletions trunk/drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ static void phy_change(struct work_struct *work)
struct phy_device *phydev =
container_of(work, struct phy_device, phy_queue);

if (phydev->drv->did_interrupt &&
!phydev->drv->did_interrupt(phydev))
goto ignore;

err = phy_disable_interrupts(phydev);

if (err)
Expand All @@ -681,6 +685,11 @@ static void phy_change(struct work_struct *work)

return;

ignore:
atomic_dec(&phydev->irq_disable);
enable_irq(phydev->irq);
return;

irq_enable_err:
disable_irq(phydev->irq);
atomic_inc(&phydev->irq_disable);
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,12 @@ struct phy_driver {
/* Enables or disables interrupts */
int (*config_intr)(struct phy_device *phydev);

/*
* Checks if the PHY generated an interrupt.
* For multi-PHY devices with shared PHY interrupt pin
*/
int (*did_interrupt)(struct phy_device *phydev);

/* Clears up any memory if needed */
void (*remove)(struct phy_device *phydev);

Expand Down

0 comments on commit fa7cfb1

Please sign in to comment.