rpms/kernel/devel linux-2.6-common-uevent.patch, NONE, 1.1 linux-2.6-softmac-work.patch, NONE, 1.1 linux-2.6-uevent-ebus.patch, NONE, 1.1 linux-2.6-uevent-macio.patch, NONE, 1.1 linux-2.6-uevent-of_platform.patch, NONE, 1.1 kernel-2.6.spec, 1.2885, 1.2886 linux-2.6-of_platform-uevent.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Dec 19 11:20:33 UTC 2006
Author: dwmw2
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv15958
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-common-uevent.patch linux-2.6-softmac-work.patch
linux-2.6-uevent-ebus.patch linux-2.6-uevent-macio.patch
linux-2.6-uevent-of_platform.patch
Removed Files:
linux-2.6-of_platform-uevent.patch
Log Message:
fix softmac, update OF uevent handler
linux-2.6-common-uevent.patch:
arch/powerpc/kernel/of_device.c | 63 ++++++++++++++++++++++++++++++++++++++++
include/asm-powerpc/of_device.h | 3 +
2 files changed, 66 insertions(+)
--- NEW FILE linux-2.6-common-uevent.patch ---
>From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Dec 18 22:49:34 2006
Return-path: <linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org>
Envelope-to: dwmw2 at baythorne.infradead.org
Delivery-date: Mon, 18 Dec 2006 23:17:50 +0000
Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
1GwRIc-0002Ng-8p for dwmw2 at baythorne.infradead.org; Mon, 18 Dec 2006
22:49:34 +0000
Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1GwRIa-00080A-Iv for
dwmw2 at infradead.org; Mon, 18 Dec 2006 22:49:33 +0000
Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
with ESMTP id B0D9467D33 for <dwmw2 at infradead.org>; Tue, 19 Dec 2006
09:48:42 +1100 (EST)
X-Original-To: linuxppc-dev at ozlabs.org
Delivered-To: linuxppc-dev at ozlabs.org
Received: from outmx012.isp.belgacom.be (outmx012.isp.belgacom.be
[195.238.5.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP
id 7ABD567B8F for <linuxppc-dev at ozlabs.org>; Tue, 19 Dec 2006 09:48:08
+1100 (EST)
Received: from outmx012.isp.belgacom.be (localhost [127.0.0.1]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMm02e006326 for <linuxppc-dev at ozlabs.org>; Mon, 18 Dec 2006
23:48:02 +0100 (envelope-from <tnt at 246tNt.com>)
Received: from localhost.localdomain
(109.139-245-81.adsl-dyn.isp.belgacom.be [81.245.139.109]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMltEv006292; Mon, 18 Dec 2006 23:47:55 +0100 (envelope-from
<tnt at 246tNt.com>)
From: Sylvain Munaut <tnt at 246tNt.com>
To: Paul Mackerras <paulus at samba.org>
Subject: [PATCH 1/4] powerpc: Add a unified uevent handler for bus based on
of_device
Date: Mon, 18 Dec 2006 23:46:36 +0100
Message-Id: <1166482000535-git-send-email-tnt at 246tNt.com>
X-Mailer: git-send-email 1.4.2
In-Reply-To: <1166481999359-git-send-email-tnt at 246tNt.com>
References: <1166481999359-git-send-email-tnt at 246tNt.com>
Cc: Sylvain Munaut <tnt at 246tNt.com>, Arnd Bergmann <arnd at arndb.de>, Linux PPC Devel <linuxppc-dev at ozlabs.org>
X-BeenThere: linuxppc-dev at ozlabs.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
List-Post: <mailto:linuxppc-dev at ozlabs.org>
List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
Errors-To: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject.
X-Spam-Note: SpamAssassin invocation failed
X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
Content-Transfer-Encoding: 8bit
This common uevent handler allow the several bus types based on
of_device to generate the uevent properly and avoiding
code duplication.
Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
---
arch/powerpc/kernel/of_device.c | 63 +++++++++++++++++++++++++++++++++++++++
include/asm-powerpc/of_device.h | 3 ++
2 files changed, 66 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index e921514..a7e3a5f 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -120,6 +120,68 @@ void of_device_unregister(struct of_devi
}
+int of_device_uevent(struct of_device *ofdev,
+ char **envp, int num_envp, char *buffer, int buffer_size)
+{
+ const char *compat;
+ char *compat2;
+ char compat_buf[128]; /* need to be size of 'compatible' */
+ int i = 0, length = 0, seen = 0, cplen, sl;
+
+ if (!ofdev)
+ return -ENODEV;
+
+ if (add_uevent_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "OF_NAME=%s", ofdev->node->name))
+ return -ENOMEM;
+
+ if (add_uevent_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "OF_TYPE=%s", ofdev->node->type))
+ return -ENOMEM;
+
+ /* Since the compatible field can contain pretty much anything
+ * it's not really legal to split it out with commas. We split it
+ * up using a number of environment variables instead. */
+
+ compat = get_property(ofdev->node, "compatible", &cplen);
+ compat2 = compat_buf;
+ if (compat)
+ memcpy(compat2, compat, cplen);
+ while (compat && *compat && cplen > 0) {
+ if (add_uevent_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "OF_COMPATIBLE_%d=%s", seen, compat))
+ return -ENOMEM;
+
+ sl = strlen (compat) + 1;
+ compat += sl;
+ compat2 += sl;
+ cplen -= sl;
+ seen++;
+ compat2[-1] = 'C';
+ }
+ compat2[seen?-1:0] = 0;
+
+ if (add_uevent_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "OF_COMPATIBLE_N=%d", seen))
+ return -ENOMEM;
+
+ if (add_uevent_var(envp, num_envp, &i,
+ buffer, buffer_size, &length,
+ "MODALIAS=of:N%sT%sC%s",
+ ofdev->node->name, ofdev->node->type,
+ compat_buf))
+ return -ENOMEM;
+
+ envp[i] = NULL;
+
+ return 0;
+}
+
+
EXPORT_SYMBOL(of_match_node);
EXPORT_SYMBOL(of_match_device);
EXPORT_SYMBOL(of_device_register);
@@ -127,3 +189,4 @@ EXPORT_SYMBOL(of_device_unregister);
EXPORT_SYMBOL(of_dev_get);
EXPORT_SYMBOL(of_dev_put);
EXPORT_SYMBOL(of_release_dev);
+EXPORT_SYMBOL(of_device_uevent);
diff --git a/include/asm-powerpc/of_device.h b/include/asm-powerpc/of_device.h
index a889b20..caf0619 100644
--- a/include/asm-powerpc/of_device.h
+++ b/include/asm-powerpc/of_device.h
@@ -32,5 +32,8 @@ extern int of_device_register(struct of_
extern void of_device_unregister(struct of_device *ofdev);
extern void of_release_dev(struct device *dev);
+extern int of_device_uevent(struct of_device *ofdev,
+ char **envp, int num_envp, char *buffer, int buffer_size);
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_OF_DEVICE_H */
--
1.4.2
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
linux-2.6-softmac-work.patch:
ieee80211softmac_assoc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE linux-2.6-softmac-work.patch ---
diff --git a/net/ieee80211/softmac/ieee80211softmac_assoc.c b/net/ieee80211/softmac/ieee80211softmac_assoc.c
index e3f37fd..4d270ed 100644
--- a/net/ieee80211/softmac/ieee80211softmac_assoc.c
+++ b/net/ieee80211/softmac/ieee80211softmac_assoc.c
@@ -167,7 +167,7 @@ static void
ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context)
{
struct ieee80211softmac_device *mac = ieee80211_priv(dev);
- ieee80211softmac_assoc_work((void*)mac);
+ ieee80211softmac_assoc_work(&mac->associnfo.work.work);
}
static void
@@ -177,7 +177,7 @@ ieee80211softmac_assoc_notify_auth(struct net_device *dev, int event_type, void
switch (event_type) {
case IEEE80211SOFTMAC_EVENT_AUTHENTICATED:
- ieee80211softmac_assoc_work((void*)mac);
+ ieee80211softmac_assoc_work(&mac->associnfo.work.work);
break;
case IEEE80211SOFTMAC_EVENT_AUTH_FAILED:
case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT:
linux-2.6-uevent-ebus.patch:
ibmebus.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+)
--- NEW FILE linux-2.6-uevent-ebus.patch ---
>From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Dec 18 22:51:13 2006
Return-path: <linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org>
Envelope-to: dwmw2 at baythorne.infradead.org
Delivery-date: Mon, 18 Dec 2006 22:51:13 +0000
Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
1GwRKC-0002O4-MW for dwmw2 at baythorne.infradead.org; Mon, 18 Dec 2006
22:51:13 +0000
Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1GwRKB-00087c-Ca for
dwmw2 at infradead.org; Mon, 18 Dec 2006 22:51:11 +0000
Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
with ESMTP id 06A1767BBD for <dwmw2 at infradead.org>; Tue, 19 Dec 2006
09:49:03 +1100 (EST)
X-Original-To: linuxppc-dev at ozlabs.org
Delivered-To: linuxppc-dev at ozlabs.org
Received: from outmx012.isp.belgacom.be (outmx012.isp.belgacom.be
[195.238.5.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP
id 63BFD67C52 for <linuxppc-dev at ozlabs.org>; Tue, 19 Dec 2006 09:48:13
+1100 (EST)
Received: from outmx012.isp.belgacom.be (localhost [127.0.0.1]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMm0XI006322 for <linuxppc-dev at ozlabs.org>; Mon, 18 Dec 2006
23:48:01 +0100 (envelope-from <tnt at 246tNt.com>)
Received: from localhost.localdomain
(109.139-245-81.adsl-dyn.isp.belgacom.be [81.245.139.109]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMltF0006292; Mon, 18 Dec 2006 23:47:57 +0100 (envelope-from
<tnt at 246tNt.com>)
From: Sylvain Munaut <tnt at 246tNt.com>
To: Paul Mackerras <paulus at samba.org>
Subject: [PATCH 4/4] powerpc: Add uevent handler for ibmebus
Date: Mon, 18 Dec 2006 23:46:39 +0100
Message-Id: <11664820011861-git-send-email-tnt at 246tNt.com>
X-Mailer: git-send-email 1.4.2
In-Reply-To: <11664820013460-git-send-email-tnt at 246tNt.com>
References: <1166481999359-git-send-email-tnt at 246tNt.com>
<1166482000535-git-send-email-tnt at 246tNt.com>
<11664820003098-git-send-email-tnt at 246tNt.com>
<11664820013460-git-send-email-tnt at 246tNt.com>
Cc: Sylvain Munaut <tnt at 246tNt.com>, Arnd Bergmann <arnd at arndb.de>, Linux PPC Devel <linuxppc-dev at ozlabs.org>
X-BeenThere: linuxppc-dev at ozlabs.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
List-Post: <mailto:linuxppc-dev at ozlabs.org>
List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
Errors-To: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject.
X-Spam-Note: SpamAssassin invocation failed
X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
Content-Transfer-Encoding: 8bit
Adding this handler allow userspace to properly handle the module
autoloading. The generation of the uevent itself is now common to
all bus using of_device, so not much code here.
Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
---
arch/powerpc/kernel/ibmebus.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 82bd2f1..5a42100 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -361,9 +361,27 @@ static int ibmebus_bus_match(struct devi
return 0;
}
+static int ibmebus_bus_uevent(struct device *dev,
+ char **envp, int num_envp, char *buffer, int buffer_size)
+{
+ struct ibmebus_dev *ebus_dev;
+ struct of_device *of;
+
+ if (!dev)
+ return -ENODEV;
+
+ ebus_dev = to_ibmebus_dev(dev);
+ if (!ebus_dev)
+ return -ENODEV;
+
+ of = &ebus_dev->ofdev;
+ return of_device_uevent(of, envp, num_envp, buffer, buffer_size);
+}
+
struct bus_type ibmebus_bus_type = {
.name = "ibmebus",
.match = ibmebus_bus_match,
+ .uevent = ibmebus_bus_uevent,
};
EXPORT_SYMBOL(ibmebus_bus_type);
--
1.4.2
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
linux-2.6-uevent-macio.patch:
macio_asic.c | 81 -----------------------------------------------------------
1 files changed, 1 insertion(+), 80 deletions(-)
--- NEW FILE linux-2.6-uevent-macio.patch ---
>From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Dec 18 22:48:20 2006
Return-path: <linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org>
Envelope-to: dwmw2 at baythorne.infradead.org
Delivery-date: Mon, 18 Dec 2006 22:48:20 +0000
Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
1GwRHQ-0002NW-D6 for dwmw2 at baythorne.infradead.org; Mon, 18 Dec 2006
22:48:20 +0000
Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1GwRHP-0007zi-1M for
dwmw2 at infradead.org; Mon, 18 Dec 2006 22:48:19 +0000
Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
with ESMTP id 417FA67BFE for <dwmw2 at infradead.org>; Tue, 19 Dec 2006
09:48:14 +1100 (EST)
X-Original-To: linuxppc-dev at ozlabs.org
Delivered-To: linuxppc-dev at ozlabs.org
Received: from outmx012.isp.belgacom.be (outmx012.isp.belgacom.be
[195.238.5.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP
id E025467B6C for <linuxppc-dev at ozlabs.org>; Tue, 19 Dec 2006 09:48:07
+1100 (EST)
Received: from outmx012.isp.belgacom.be (localhost [127.0.0.1]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMm0t9006318 for <linuxppc-dev at ozlabs.org>; Mon, 18 Dec 2006
23:48:01 +0100 (envelope-from <tnt at 246tNt.com>)
Received: from localhost.localdomain
(109.139-245-81.adsl-dyn.isp.belgacom.be [81.245.139.109]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMltEw006292; Mon, 18 Dec 2006 23:47:56 +0100 (envelope-from
<tnt at 246tNt.com>)
From: Sylvain Munaut <tnt at 246tNt.com>
To: Paul Mackerras <paulus at samba.org>
Subject: [PATCH 2/4] macintosh: Use the new of_device common uevent handler
Date: Mon, 18 Dec 2006 23:46:37 +0100
Message-Id: <11664820003098-git-send-email-tnt at 246tNt.com>
X-Mailer: git-send-email 1.4.2
In-Reply-To: <1166482000535-git-send-email-tnt at 246tNt.com>
References: <1166481999359-git-send-email-tnt at 246tNt.com>
<1166482000535-git-send-email-tnt at 246tNt.com>
Cc: Sylvain Munaut <tnt at 246tNt.com>, Arnd Bergmann <arnd at arndb.de>, Linux PPC Devel <linuxppc-dev at ozlabs.org>
X-BeenThere: linuxppc-dev at ozlabs.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
List-Post: <mailto:linuxppc-dev at ozlabs.org>
List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
Errors-To: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject.
X-Spam-Note: SpamAssassin invocation failed
X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
Content-Transfer-Encoding: 8bit
The generation of the uevent is now common to all bus using
of_device.
Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
---
drivers/macintosh/macio_asic.c | 81 ----------------------------------------
1 files changed, 1 insertions(+), 80 deletions(-)
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index d562160..767ad00 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -139,11 +139,6 @@ static int macio_uevent(struct device *d
{
struct macio_dev * macio_dev;
struct of_device * of;
- char *scratch;
- const char *compat, *compat2;
-
- int i = 0;
- int length, cplen, cplen2, seen = 0;
if (!dev)
return -ENODEV;
@@ -153,81 +148,7 @@ static int macio_uevent(struct device *d
return -ENODEV;
of = &macio_dev->ofdev;
-
- /* stuff we want to pass to /sbin/hotplug */
- envp[i++] = scratch = buffer;
- length = scnprintf (scratch, buffer_size, "OF_NAME=%s", of->node->name);
- ++length;
- buffer_size -= length;
- if ((buffer_size <= 0) || (i >= num_envp))
- return -ENOMEM;
- scratch += length;
-
- envp[i++] = scratch;
- length = scnprintf (scratch, buffer_size, "OF_TYPE=%s", of->node->type);
- ++length;
- buffer_size -= length;
- if ((buffer_size <= 0) || (i >= num_envp))
- return -ENOMEM;
- scratch += length;
-
- /* Since the compatible field can contain pretty much anything
- * it's not really legal to split it out with commas. We split it
- * up using a number of environment variables instead. */
-
- compat = get_property(of->node, "compatible", &cplen);
- compat2 = compat;
- cplen2= cplen;
- while (compat && cplen > 0) {
- envp[i++] = scratch;
- length = scnprintf (scratch, buffer_size,
- "OF_COMPATIBLE_%d=%s", seen, compat);
- ++length;
- buffer_size -= length;
- if ((buffer_size <= 0) || (i >= num_envp))
- return -ENOMEM;
- scratch += length;
- length = strlen (compat) + 1;
- compat += length;
- cplen -= length;
- seen++;
- }
-
- envp[i++] = scratch;
- length = scnprintf (scratch, buffer_size, "OF_COMPATIBLE_N=%d", seen);
- ++length;
- buffer_size -= length;
- if ((buffer_size <= 0) || (i >= num_envp))
- return -ENOMEM;
- scratch += length;
-
- envp[i++] = scratch;
- length = scnprintf (scratch, buffer_size, "MODALIAS=of:N%sT%s",
- of->node->name, of->node->type);
- /* overwrite '\0' */
- buffer_size -= length;
- if ((buffer_size <= 0) || (i >= num_envp))
- return -ENOMEM;
- scratch += length;
-
- if (!compat2) {
- compat2 = "";
- cplen2 = 1;
- }
- while (cplen2 > 0) {
- length = snprintf (scratch, buffer_size, "C%s", compat2);
- buffer_size -= length;
- if (buffer_size <= 0)
- return -ENOMEM;
- scratch += length;
- length = strlen (compat2) + 1;
- compat2 += length;
- cplen2 -= length;
- }
-
- envp[i] = NULL;
-
- return 0;
+ return of_device_uevent(of, envp, num_envp, buffer, buffer_size);
}
extern struct device_attribute macio_dev_attrs[];
--
1.4.2
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
linux-2.6-uevent-of_platform.patch:
of_platform.c | 13 +++++++++++++
1 files changed, 13 insertions(+)
--- NEW FILE linux-2.6-uevent-of_platform.patch ---
>From linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org Mon Dec 18 22:48:47 2006
Return-path: <linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org>
Envelope-to: dwmw2 at baythorne.infradead.org
Delivery-date: Mon, 18 Dec 2006 22:48:47 +0000
Received: from pentafluge.infradead.org ([2001:4bd0:203e::1]) by
baythorne.infradead.org with esmtps (Exim 4.63 #1 (Red Hat Linux)) id
1GwRHr-0002Nb-8X for dwmw2 at baythorne.infradead.org; Mon, 18 Dec 2006
22:48:47 +0000
Received: from ozlabs.org ([203.10.76.45]) by pentafluge.infradead.org with
esmtps (Exim 4.63 #1 (Red Hat Linux)) id 1GwRHp-0007zu-VY for
dwmw2 at infradead.org; Mon, 18 Dec 2006 22:48:46 +0000
Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix)
with ESMTP id 4D74A67D46 for <dwmw2 at infradead.org>; Tue, 19 Dec 2006
09:48:32 +1100 (EST)
X-Original-To: linuxppc-dev at ozlabs.org
Delivered-To: linuxppc-dev at ozlabs.org
Received: from outmx012.isp.belgacom.be (outmx012.isp.belgacom.be
[195.238.5.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP
id 244AD67B8B for <linuxppc-dev at ozlabs.org>; Tue, 19 Dec 2006 09:48:07
+1100 (EST)
Received: from outmx012.isp.belgacom.be (localhost [127.0.0.1]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMm02U006326 for <linuxppc-dev at ozlabs.org>; Mon, 18 Dec 2006
23:48:01 +0100 (envelope-from <tnt at 246tNt.com>)
Received: from localhost.localdomain
(109.139-245-81.adsl-dyn.isp.belgacom.be [81.245.139.109]) by
outmx012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22) with
ESMTP id kBIMltEx006292; Mon, 18 Dec 2006 23:47:56 +0100 (envelope-from
<tnt at 246tNt.com>)
From: Sylvain Munaut <tnt at 246tNt.com>
To: Paul Mackerras <paulus at samba.org>
Subject: [PATCH 3/4] powerpc: Add uevent handler for of_platform_bus
Date: Mon, 18 Dec 2006 23:46:38 +0100
Message-Id: <11664820013460-git-send-email-tnt at 246tNt.com>
X-Mailer: git-send-email 1.4.2
In-Reply-To: <11664820003098-git-send-email-tnt at 246tNt.com>
References: <1166481999359-git-send-email-tnt at 246tNt.com>
<1166482000535-git-send-email-tnt at 246tNt.com>
<11664820003098-git-send-email-tnt at 246tNt.com>
Cc: Sylvain Munaut <tnt at 246tNt.com>, Arnd Bergmann <arnd at arndb.de>, Linux PPC Devel <linuxppc-dev at ozlabs.org>
X-BeenThere: linuxppc-dev at ozlabs.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>
List-Unsubscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=unsubscribe>
List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev>
List-Post: <mailto:linuxppc-dev at ozlabs.org>
List-Help: <mailto:linuxppc-dev-request at ozlabs.org?subject=help>
List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>,
<mailto:linuxppc-dev-request at ozlabs.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Sender: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
Errors-To: linuxppc-dev-bounces+dwmw2=infradead.org at ozlabs.org
X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject.
X-Spam-Note: SpamAssassin invocation failed
X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
Content-Transfer-Encoding: 8bit
Adding this handler allow userspace to properly handle the module
autoloading. The generation of the uevent itself is now common to
all bus using of_device, so not much code here.
Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
---
arch/powerpc/kernel/of_platform.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 3002ea3..ce40dd5 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -73,6 +73,18 @@ static int of_platform_bus_match(struct
return of_match_device(matches, of_dev) != NULL;
}
+static int of_platform_device_uevent(struct device *dev,
+ char **envp, int num_envp, char *buffer, int buffer_size)
+{
+ struct of_device *of;
+
+ if (!dev)
+ return -ENODEV;
+
+ of = to_of_device(dev);
+ return of_device_uevent(of, envp, num_envp, buffer, buffer_size);
+}
+
static int of_platform_device_probe(struct device *dev)
{
int error = -ENODEV;
@@ -132,6 +144,7 @@ static int of_platform_device_resume(str
struct bus_type of_platform_bus_type = {
.name = "of_platform",
.match = of_platform_bus_match,
+ .uevent = of_platform_device_uevent,
.probe = of_platform_device_probe,
.remove = of_platform_device_remove,
.suspend = of_platform_device_suspend,
--
1.4.2
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.2885
retrieving revision 1.2886
diff -u -r1.2885 -r1.2886
--- kernel-2.6.spec 18 Dec 2006 12:37:00 -0000 1.2885
+++ kernel-2.6.spec 19 Dec 2006 11:20:31 -0000 1.2886
@@ -315,19 +315,25 @@
Patch203: linux-2.6-x86_64-silence-up-apic-errors.patch
# 300 - 399 ppc(64)
+Patch300: linux-2.6-g5-therm-shutdown.patch
Patch301: linux-2.6-cell-mambo-drivers.patch
Patch302: linux-2.6-systemsim-work.patch
Patch303: linux-2.6-ppc32-ucmpdi2.patch
-Patch304: linux-2.6-of_platform-uevent.patch
-Patch305: linux-2.6-usb-endian-quirks.patch
-Patch306: linux-2.6-usb-endian-toshiba.patch
-Patch307: linux-2.6-usb-endian-ehci.patch
-Patch310: linux-2.6-g5-therm-shutdown.patch
+
+Patch310: linux-2.6-common-uevent.patch
+Patch311: linux-2.6-uevent-macio.patch
+Patch312: linux-2.6-uevent-of_platform.patch
+Patch313: linux-2.6-uevent-ebus.patch
+
+Patch320: linux-2.6-usb-endian-quirks.patch
+Patch321: linux-2.6-usb-endian-toshiba.patch
+Patch322: linux-2.6-usb-endian-ehci.patch
# Efika support
-Patch311: linux-2.6-ohci-multi-init.patch
-Patch312: linux-2.6-ohci-platform-bus.patch
-Patch313: linux-2.6-mpc52xx-ata.patch
-Patch314: linux-2.6-efika-before-chrp.patch
+Patch325: linux-2.6-ohci-multi-init.patch
+Patch326: linux-2.6-ohci-platform-bus.patch
+
+Patch330: linux-2.6-mpc52xx-ata.patch
+Patch331: linux-2.6-efika-before-chrp.patch
# 400 - 499 ia64
@@ -386,6 +392,7 @@
Patch1021: linux-2.6-debug-boot-delay.patch
Patch1022: linux-2.6-debug-sysfs-crash-debugging.patch
Patch1023: linux-2.6-debug-sysfs-crash-debugging-xen.patch
+Patch1024: linux-2.6-softmac-work.patch
# Restrict /dev/mem usage.
Patch1050: linux-2.6-devmem.patch
@@ -748,27 +755,30 @@
#
# PowerPC
#
+# Alleviate G5 thermal shutdown problems
+%patch300 -p1
# Support the IBM Mambo simulator; core as well as disk and network drivers.
%patch301 -p1
%patch302 -p1
# Temporary hack to work around GCC PR #25724 / #21237
%patch303 -p1
# uevent support for of_platform device
-%patch304 -p1
-# Big-endian USB support (Celleb, PS3)
-%patch305 -p1
-%patch306 -p1
-%patch307 -p1
-# Alleviate G5 thermal shutdown problems
%patch310 -p1
-# OHCI bus glue rework to allow several at once
%patch311 -p1
-# OHCI of_device support
%patch312 -p1
-# MPC52xx PATA
%patch313 -p1
+# Big-endian USB support (Celleb, PS3)
+%patch320 -p1
+%patch321 -p1
+%patch322 -p1
+# OHCI bus glue rework to allow several at once
+%patch325 -p1
+# OHCI of_device support
+%patch326 -p1
+# MPC52xx PATA
+%patch330 -p1
# Probe for Efika before CHRP
-%patch314 -p1
+%patch331 -p1
# S390
@@ -1802,6 +1812,11 @@
# - tux.
%changelog
+* Tue Dec 19 2006 David Woodhouse <dwmw2 at redhat.com>
+- Fix squashfs
+- Fix softmac fallout from work_struct changes
+- Update OF uevent handler patch
+
* Mon Dec 18 2006 David Woodhouse <dwmw2 at redhat.com>
- Enable CONFIG_IDE on PowerPC, for PMAC. Need pata_pmac driver...
- Fix the deleteme handling
--- linux-2.6-of_platform-uevent.patch DELETED ---
More information about the fedora-cvs-commits
mailing list