login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
30
Re: [PATCH 9/16] CRIS architecture: Correct compile errors
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Roel Kluin <12o3l@...>
To: Jesper Nilsson <jesper.nilsson@...>
Cc: Andrew Morton <akpm@...>, Mikael Starvik <mikael.starvik@...>, <linux-kernel@...>, <jgarzik@...>
Subject:
Re: [PATCH 9/16] CRIS architecture: Correct compile errors
Date: Tuesday, October 30, 2007 - 11:32 am
Jesper Nilsson wrote:
quoted text
> static int > e100_probe_transceiver(struct net_device* dev) > { > +#if !defined(CONFIG_ETRAX_NO_PHY) > unsigned int phyid_high; > unsigned int phyid_low; > unsigned int oui; > struct transceiver_ops* ops = NULL; > + struct net_local *np = netdev_priv(dev); > + > + spin_lock(&np->transceiver_lock); > > /* Probe MDIO physical address */ > - for (mdio_phy_addr = 0; mdio_phy_addr <= 31; mdio_phy_addr++) { > - if (e100_get_mdio_reg(dev, mdio_phy_addr, MII_BMSR) != 0xffff) > + for (np->mii_if.phy_id = 0; np->mii_if.phy_id <= 31; > + np->mii_if.phy_id++) { > + if (e100_get_mdio_reg(dev, > + np->mii_if.phy_id, MII_BMSR) != 0xffff) > break; > } > - if (mdio_phy_addr == 32) > + if (np->mii_if.phy_id == 32) > return -ENODEV;
You need to unlock before this return.
quoted text
> > /* Get manufacturer */ > - phyid_high = e100_get_mdio_reg(dev, mdio_phy_addr, MII_PHYSID1); > - phyid_low = e100_get_mdio_reg(dev, mdio_phy_addr, MII_PHYSID2); > + phyid_high = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_PHYSID1); > + phyid_low = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_PHYSID2); > oui = (phyid_high << 6) | (phyid_low >> 10); > > for (ops = &transceivers[0]; ops->oui; ops++) { > @@ -998,6 +912,8 @@ > } > transceiver = ops; > > + spin_unlock(&np->transceiver_lock); > +#endif > return 0; > }
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 9/16] CRIS architecture: Correct compile errors
, Jesper Nilsson
, (Tue Oct 30, 5:32 am)
Re: [PATCH 9/16] CRIS architecture: Correct compile errors
, Andrew Morton
, (Tue Oct 30, 6:14 pm)
Re: [PATCH 9/16] CRIS architecture: Correct compile errors
, Roel Kluin
, (Tue Oct 30, 11:32 am)
Re: [PATCH 9/16] CRIS architecture: Correct compile errors
, Jesper Nilsson
, (Fri Nov 2, 5:47 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Vladislav Bolkhovitin
Re: Integration of SCST in the mainstream Linux kernel
Eric Paris
[RFC 0/5] [TALPA] Intro to a linux interface for on access scanning
holzheu
Re: [RFC/PATCH] Documentation of kernel messages
debian developer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
git
:
linux-netdev
:
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
[GIT]: Networking
Alan Cox
Re: [BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
876 guests
online.
Online users
mator
Syndicate