linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix IB with latest versions of udev
@ 2006-01-21  0:08 Greg KH
  2006-01-21  0:28 ` Sean Hefty
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2006-01-21  0:08 UTC (permalink / raw)
  To: rolandd, mshefty, Kay Sievers
  Cc: openib-general, linux-kernel, linux-hotplug-devel

Here's a patch that will remove a few lines of code from the IB core,
and let it work properly with userspace programs that are only watching
the netlink socket for events, instead of mucking around in sysfs (like
the latest versions of udev do.)

I've only compile tested it as I have no IB hardware here.

If you want, I can forward this on to Linus in my driver tree, or you
can send it yourselves.

thanks,

greg k-h

---------------------

From: Greg Kroah-Hartman <gregkh@suse.de>
Subject: IB: fix up major/minor sysfs interface for IB core

Current IB code doesn't work with userspace programs that listen only to
the kernel event netlink socket as it is trying to create its own dev
interface.  This small patch fixes this problem, and removes some
unneeded code as the driver core handles this logic for you
automatically.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/infiniband/core/ucm.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

--- gregkh-2.6.orig/drivers/infiniband/core/ucm.c
+++ gregkh-2.6/drivers/infiniband/core/ucm.c
@@ -1319,15 +1319,6 @@ static struct class ucm_class = {
 	.release = ib_ucm_release_class_dev
 };
 
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-	struct ib_ucm_device *dev;
-	
-	dev = container_of(class_dev, struct ib_ucm_device, class_dev);
-	return print_dev_t(buf, dev->dev.dev);
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
 static ssize_t show_ibdev(struct class_device *class_dev, char *buf)
 {
 	struct ib_ucm_device *dev;
@@ -1364,15 +1355,13 @@ static void ib_ucm_add_one(struct ib_dev
 
 	ucm_dev->class_dev.class = &ucm_class;
 	ucm_dev->class_dev.dev = device->dma_device;
+	ucm_dev->class_dev.devt = ucm_dev->dev.dev;
 	snprintf(ucm_dev->class_dev.class_id, BUS_ID_SIZE, "ucm%d",
 		 ucm_dev->devnum);
 	if (class_device_register(&ucm_dev->class_dev))
 		goto err_cdev;
 
 	if (class_device_create_file(&ucm_dev->class_dev,
-				     &class_device_attr_dev))
-		goto err_class;
-	if (class_device_create_file(&ucm_dev->class_dev,
 				     &class_device_attr_ibdev))
 		goto err_class;
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix IB with latest versions of udev
  2006-01-21  0:08 [PATCH] fix IB with latest versions of udev Greg KH
@ 2006-01-21  0:28 ` Sean Hefty
  2006-01-21  0:45   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Hefty @ 2006-01-21  0:28 UTC (permalink / raw)
  To: Greg KH
  Cc: rolandd, Kay Sievers, openib-general, linux-kernel, linux-hotplug-devel

Greg KH wrote:
> If you want, I can forward this on to Linus in my driver tree, or you
> can send it yourselves.

Thanks, Greg.  Please go ahead and forward this patch.

- Sean

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix IB with latest versions of udev
  2006-01-21  0:28 ` Sean Hefty
@ 2006-01-21  0:45   ` Greg KH
  2006-01-21  0:46     ` Sean Hefty
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2006-01-21  0:45 UTC (permalink / raw)
  To: Sean Hefty
  Cc: rolandd, Kay Sievers, openib-general, linux-kernel, linux-hotplug-devel

On Fri, Jan 20, 2006 at 04:28:39PM -0800, Sean Hefty wrote:
> Greg KH wrote:
> >If you want, I can forward this on to Linus in my driver tree, or you
> >can send it yourselves.
> 
> Thanks, Greg.  Please go ahead and forward this patch.

Great, will do, thanks.

Care to give me an "Acked-by:" line to add to it?

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] fix IB with latest versions of udev
  2006-01-21  0:45   ` Greg KH
@ 2006-01-21  0:46     ` Sean Hefty
  0 siblings, 0 replies; 4+ messages in thread
From: Sean Hefty @ 2006-01-21  0:46 UTC (permalink / raw)
  To: Greg KH
  Cc: rolandd, Kay Sievers, openib-general, linux-kernel, linux-hotplug-devel

Greg KH wrote:
> Care to give me an "Acked-by:" line to add to it?

Please apply.

Acked-by: Sean Hefty <sean.hefty@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-21  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-21  0:08 [PATCH] fix IB with latest versions of udev Greg KH
2006-01-21  0:28 ` Sean Hefty
2006-01-21  0:45   ` Greg KH
2006-01-21  0:46     ` Sean Hefty

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).