From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: <linuxppc-dev@ozlabs.org>
Subject: [PATCH 3/6] ibm_newemac: Fix ZMII refcounting bug
Date: Thu, 08 Nov 2007 19:06:59 +1100 [thread overview]
Message-ID: <20071108080730.75261DDDFB@ozlabs.org> (raw)
In-Reply-To: <1194509217.421165.545980042680.qpush@grosgo>
When using ZMII for MDIO only (such as 440GX with RGMII for data and ZMII for
MDIO), the ZMII code would fail to properly refcount, thus triggering a
BUG_ON().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/net/ibm_newemac/zmii.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-work/drivers/net/ibm_newemac/zmii.c
===================================================================
--- linux-work.orig/drivers/net/ibm_newemac/zmii.c 2007-11-08 15:45:32.000000000 +1100
+++ linux-work/drivers/net/ibm_newemac/zmii.c 2007-11-08 15:46:21.000000000 +1100
@@ -83,12 +83,14 @@ int __devinit zmii_attach(struct of_devi
ZMII_DBG(dev, "init(%d, %d)" NL, input, *mode);
- if (!zmii_valid_mode(*mode))
+ if (!zmii_valid_mode(*mode)) {
/* Probably an EMAC connected to RGMII,
* but it still may need ZMII for MDIO so
* we don't fail here.
*/
+ dev->users++;
return 0;
+ }
mutex_lock(&dev->lock);
next prev parent reply other threads:[~2007-11-08 8:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 8:06 [PATCH 0/6] ibm_newemac: Pending patches for review Benjamin Herrenschmidt
2007-11-08 8:06 ` [PATCH 1/6] ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support Benjamin Herrenschmidt
2007-11-08 8:06 ` [PATCH 2/6] ibm_newemac: Add ET1011c " Benjamin Herrenschmidt
2007-11-08 8:41 ` Stefan Roese
2007-11-08 8:42 ` Benjamin Herrenschmidt
2007-11-08 12:08 ` Josh Boyer
2007-11-08 20:55 ` Benjamin Herrenschmidt
2007-11-09 5:44 ` Stefan Roese
2007-11-08 8:06 ` [PATCH 4/6] ibm_newemac: Workaround reset timeout when no link Benjamin Herrenschmidt
2007-11-08 8:44 ` Stefan Roese
2007-11-08 8:06 ` Benjamin Herrenschmidt [this message]
2007-11-08 8:43 ` [PATCH 3/6] ibm_newemac: Fix ZMII refcounting bug Stefan Roese
2007-11-08 8:07 ` [PATCH 5/6] ibm_newemac: Cleanup/Fix RGMII MDIO support detection Benjamin Herrenschmidt
2007-11-08 9:24 ` Stefan Roese
2007-11-08 8:07 ` [PATCH 6/6] ibm_newemac: Cleanup/fix support for STACR register variants Benjamin Herrenschmidt
2007-11-08 9:38 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071108080730.75261DDDFB@ozlabs.org \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).