svn commit: r210594 - projects/ofed/head/sys/ofed/include/linux

Jeff Roberson jeff at FreeBSD.org
Thu Jul 29 02:24:21 UTC 2010


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);
 }
 


More information about the svn-src-projects mailing list