From: Greg KH on
On Mon, Mar 22, 2010 at 04:19:14PM -0500, pavan_savoy(a)ti.com wrote:
> +/* structures specific for sysfs entries */
> +static struct kobj_attribute pid_attr =
> +__ATTR(pid, 0644, (void *)show_pid, (void *)store_pid);
> +
> +static struct kobj_attribute list_protocols =
> +__ATTR(protocols, 0444, (void *)show_list, NULL);

As you are creating sysfs attributes, you have to have
Documentation/ABI/ updates as well. Please include them so we can see
what you are trying to do here.

And why "raw" attributes and not device ones?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Savoy, Pavan on

----------------------
Thanks & Regards,
Pavan Savoy | x0099669
________________________________________
From: Greg KH [gregkh(a)suse.de]
Sent: Tuesday, March 23, 2010 3:06 AM
To: Savoy, Pavan
Cc: alan(a)lxorguk.ukuu.org.uk; linux-kernel(a)vger.kernel.org
Subject: Re: [PATCH 4/6] drivers:misc: sources for Init manager module

On Mon, Mar 22, 2010 at 04:19:14PM -0500, pavan_savoy(a)ti.com wrote:
> +/* structures specific for sysfs entries */
> +static struct kobj_attribute pid_attr =
> +__ATTR(pid, 0644, (void *)show_pid, (void *)store_pid);
> +
> +static struct kobj_attribute list_protocols =
> +__ATTR(protocols, 0444, (void *)show_list, NULL);

>As you are creating sysfs attributes, you have to have
>Documentation/ABI/ updates as well. Please include them so we can see
>what you are trying to do here.
>And why "raw" attributes and not device ones?
>thanks,
>greg k-h

[pavan] >>>>>>>>
I am creating a sysfs entry for the daemon/service to write in it's PID to the sysfs entry, so
as to whenever a new protocol driver - BT/FM or GPS wants to use the N_TI_SHARED ldisc,
the driver would then send signal to daemon on this PID.

The source for this problem, was that I could not install line discipline from kernel space.
i.e make N_TI_SHARED line discipline the current ldisc from kernel space itself.
>>>>>>

From 92d89d132b5036d8ab58ce4f36b24bb1859610e0 Mon Sep 17 00:00:00 2001
From: Pavan Savoy <pavan_savoy(a)ti.com>
Date: Mon, 22 Mar 2010 18:11:32 -0400
Subject: [PATCH 1/1] Documentation/ABI: for N_TI_SHARED ldisc
N_TI_SHARED creates a sysfs entry to communicate
with the application/daemon which would want to install/
un-install the line discipline, it's documentation
now exists in testing/ subdirectory.
Signed-off-by: Pavan Savoy <pavan_savoy(a)ti.com>
---
Documentation/ABI/testing/sysfs-uim | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-uim
diff --git a/Documentation/ABI/testing/sysfs-uim b/Documentation/ABI/testing/sysfs-uim
new file mode 100644
index 0000000..899aa4d
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-uim
@@ -0,0 +1,24 @@
+What: /sys/uim
+Date: March 22
+Contact: Pavan Savoy <pavan_savoy(a)ti.com>
+Description:
+ Create a new kobject to pass information about the
+ N_TI_SHARED line discipline created to application/daemon
+ which would install/un-install line discipline.
+
+What: /sys/uim/pid
+Date: March 22
+Contact: Pavan Savoy <pavan_savoy(a)ti.com>
+Description:
+ The daemon/application wanting to use the line discipline
+ N_TI_SHARED will write in it's process Id, for the LDISC
+ driver to send SIGUSR2 signal to the process whenever a
+ upper layer protocol driver wants to make use of the LDISC
+ driver.
+
+What: /sys/uim/protocols
+Date: March 22
+Contact: Pavan Savoy <pavan_savoy(a)ti.com>
+Description:
+ List the protocols currently making use of the LDISC to ensure
+ LDISC is not un-installed when BT/FM or GPS is making use of it.
--
1.5.4.3--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Tue, Mar 23, 2010 at 03:33:50AM +0530, Savoy, Pavan wrote:
>
> ----------------------
> Thanks & Regards,
> Pavan Savoy | x0099669

That made no sense :(

> On Mon, Mar 22, 2010 at 04:19:14PM -0500, pavan_savoy(a)ti.com wrote:
> > +/* structures specific for sysfs entries */
> > +static struct kobj_attribute pid_attr =
> > +__ATTR(pid, 0644, (void *)show_pid, (void *)store_pid);
> > +
> > +static struct kobj_attribute list_protocols =
> > +__ATTR(protocols, 0444, (void *)show_list, NULL);
>
> >As you are creating sysfs attributes, you have to have
> >Documentation/ABI/ updates as well. Please include them so we can see
> >what you are trying to do here.
> >And why "raw" attributes and not device ones?
> >thanks,
> >greg k-h
>
> [pavan] >>>>>>>>

Ick. Please fix your email client to quote properly. There are
hundreds of free email programs out there that will do that. Heck,
there are free web email clients that even get this right...

> I am creating a sysfs entry for the daemon/service to write in it's
> PID to the sysfs entry, so as to whenever a new protocol driver -
> BT/FM or GPS wants to use the N_TI_SHARED ldisc, the driver would then
> send signal to daemon on this PID.

Then document it. All sysfs files need documentation.

Hm, writing a PID to a sysfs file? Oh, that's going to be ripe for
problems. What namespace is that PID in?

> The source for this problem, was that I could not install line
> discipline from kernel space. i.e make N_TI_SHARED line discipline
> the current ldisc from kernel space itself.

Are you sure? I thought the bluetooth core did this already. Have you
looked at how that works?

> >From 92d89d132b5036d8ab58ce4f36b24bb1859610e0 Mon Sep 17 00:00:00 2001
> From: Pavan Savoy <pavan_savoy(a)ti.com>
> Date: Mon, 22 Mar 2010 18:11:32 -0400
> Subject: [PATCH 1/1] Documentation/ABI: for N_TI_SHARED ldisc
> N_TI_SHARED creates a sysfs entry to communicate
> with the application/daemon which would want to install/
> un-install the line discipline, it's documentation
> now exists in testing/ subdirectory.
> Signed-off-by: Pavan Savoy <pavan_savoy(a)ti.com>
> ---
> Documentation/ABI/testing/sysfs-uim | 24 ++++++++++++++++++++++++
> 1 files changed, 24 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/ABI/testing/sysfs-uim
> diff --git a/Documentation/ABI/testing/sysfs-uim b/Documentation/ABI/testing/sysfs-uim
> new file mode 100644
> index 0000000..899aa4d
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-uim
> @@ -0,0 +1,24 @@
> +What: /sys/uim
> +Date: March 22
> +Contact: Pavan Savoy <pavan_savoy(a)ti.com>
> +Description:
> + Create a new kobject to pass information about the
> + N_TI_SHARED line discipline created to application/daemon
> + which would install/un-install line discipline.

No, you don't get to create a new root sysfs file, sorry. Please put it
in the correct subsystem location, if anywhere at all.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Marcel Holtmann on
Hi Greg,

> > The source for this problem, was that I could not install line
> > discipline from kernel space. i.e make N_TI_SHARED line discipline
> > the current ldisc from kernel space itself.
>
> Are you sure? I thought the bluetooth core did this already. Have you
> looked at how that works?

I didn't have time to look at it at all so far. However I think this
should just go via a proper review process. And it might need some
architecture review first. It is clearly not a candidate for staging
since it is not really self-contained.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Pavan Savoy on
--- On Wed, 24/3/10, Marcel Holtmann <marcel(a)holtmann.org> wrote:

> From: Marcel Holtmann <marcel(a)holtmann.org>
> Subject: Re: [PATCH 4/6] drivers:misc: sources for Init manager module
> To: "Greg KH" <gregkh(a)suse.de>
> Cc: "Savoy, Pavan" <pavan_savoy(a)ti.com>, "alan(a)lxorguk.ukuu.org.uk" <alan(a)lxorguk.ukuu.org.uk>, "linux-kernel(a)vger.kernel.org" <linux-kernel(a)vger.kernel.org>
> Date: Wednesday, 24 March, 2010, 1:34 PM
> Hi Greg,
>
> > > The source for this problem, was that I could not
> install line
> > > discipline from kernel space.� i.e make
> N_TI_SHARED line discipline
> > > the current ldisc from kernel space itself.
> >
> > Are you sure?� I thought the bluetooth core did
> this already.� Have you
> > looked at how that works?
>
> I didn't have time to look at it at all so far. However I
> think this
> should just go via a proper review process. And it might
> need some
> architecture review first. It is clearly not a candidate
> for staging
> since it is not really self-contained.
>
> Regards
>
> Marcel
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo(a)vger.kernel.org
> More majordomo info at� http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at� http://www.tux.org/lkml/
>


Marcel, Greg,

I wanted to somehow put this in staging because then it would probably have a thorough architectural review process.
Some details about this driver -

1. This driver will be used by Bluetooth-BlueZ/FM-V4L2 and GPS (probably character device driver) using the EXPORTED symbols (-register/_unregister).

2. Much like the hciattach daemon which maintains N_HCI bluetooth line discipline, this driver will also have a User-Space N_TI_WL Init manager (UIM) maintaining the Line discipline.

3. Because of the UIM should know when to install/uninstall line discipline, the /sys entry is created a root called UIM (a new kobject) and UIM daemon would write it's PID to it.

4. As Alan suggested, If I make it self-contained by pushing number of line disciplines to a slightly larger number, then would it be OK ?



Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/