From: "Krzysztof Helt" <krzysztof.h1@wp.pl>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] sunlance probing problem
Date: Sat, 12 Aug 2006 13:20:55 +0000 [thread overview]
Message-ID: <44ddd5b780824@wp.pl> (raw)
In-Reply-To: <44dcfea4406f9@wp.pl>
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
Dnia 12-08-2006 o godz. 1:11 Eric Brower napisał(a):
> The "le" is not always a child of lebuffer or ledma. Attached is
> output from an SS2, where le hangs directly off sbus. Granted,
this
> is an older "le" implementation.
>
Thank you for the hint. This is a corrected patch which checks if
the "le" is child of ledma or lebuffer.
From: Krzysztof Helt (krzysztof.h1@wp.pl)
The patch skips probing of the "le" device if it is a child of
"ledma" or "lebuffer".
Signed-off-by: Krzysztof Helt (krzysztof.h1@wp.pl)
---
I tested it on SS20 and 2.6.18-rc4 kernel.
----------------------------------------------------
Czy 10 minut rozmowy = ponad 11 zł oszczędności ?
Sprawdź: http://klik.wp.pl/?adr=http%3A%2F%2Ftelefon.wp.pl%2Foszczednosci.html&sid=842
[-- Attachment #2: lance-id.patch --]
[-- Type: application/octet-stream, Size: 860 bytes --]
diff -upr linux-2.6.17/drivers/net/sunlance.c linux-new/drivers/net/sunlance.c
--- linux-2.6.17/drivers/net/sunlance.c 2006-08-10 08:58:34.000000000 +0200
+++ linux-new/drivers/net/sunlance.c 2006-08-12 15:02:20.000000000 +0200
@@ -1570,7 +1570,17 @@ static int __devinit sunlance_sbus_probe
int err;
if (!strcmp(dp->name, "le")) {
- err = sparc_lance_probe_one(sdev, NULL, NULL);
+ if (sdev->parent) {
+ struct of_device *parent = &sdev->parent->ofdev;
+
+ if (!strcmp(parent->node->name, "ledma") ||
+ !strcmp(parent->node->name, "lebuffer")) {
+ /* this is a child of already probed device */
+ err = 0;
+ } else
+ err = sparc_lance_probe_one(sdev->child, NULL, NULL);
+ } else
+ err = sparc_lance_probe_one(sdev->child, NULL, NULL);
} else if (!strcmp(dp->name, "ledma")) {
struct sbus_dma *ledma = find_ledma(sdev);
next prev parent reply other threads:[~2006-08-12 13:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-11 22:03 [PATCH] sunlance probing problem Krzysztof Helt
2006-08-11 23:11 ` Eric Brower
2006-08-11 23:27 ` David Miller
2006-08-12 13:20 ` Krzysztof Helt [this message]
2006-08-18 1:10 ` David Miller
2006-08-18 17:32 ` Krzysztof Helt
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=44ddd5b780824@wp.pl \
--to=krzysztof.h1@wp.pl \
--cc=sparclinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.