Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2010 02:24:21 +0000 (UTC)
From:      Jeff Roberson <jeff@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r210594 - projects/ofed/head/sys/ofed/include/linux
Message-ID:  <201007290224.o6T2OLbY002477@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jeff
Date: Thu Jul 29 02:24:21 2010
New Revision: 210594
URL: http://svn.freebsd.org/changeset/base/210594

Log:
   - Add the proper irq argument to the device structure.  This only works
     for devices with a single irq.  msi/msix are handled seperately.
   - Acquire giant before destroying devices it is required in the bus
     layer.
  
  Sponsored by:	Isilon Systems, iX Systems, and Panasas.

Modified:
  projects/ofed/head/sys/ofed/include/linux/device.h

Modified: projects/ofed/head/sys/ofed/include/linux/device.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/device.h	Thu Jul 29 02:22:54 2010	(r210593)
+++ projects/ofed/head/sys/ofed/include/linux/device.h	Thu Jul 29 02:24:21 2010	(r210594)
@@ -57,6 +57,7 @@ struct device {
 	struct class	*class;
 	void		(*release)(struct device *dev);
 	irqreturn_t	(*irqhandler)(int, void *);
+	void		*irqarg;
 	void		*irqtag;
 	struct kobject	kobj;
 	uint64_t	*dma_mask;
@@ -188,8 +189,10 @@ device_unregister(struct device *dev)
 	device_t bsddev;
 
 	bsddev = dev->bsddev;
+	mtx_lock(&Giant);
 	if (bsddev)
 		device_delete_child(device_get_parent(bsddev), bsddev);
+	mtx_unlock(&Giant);
 	put_device(dev);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007290224.o6T2OLbY002477>