Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2016 14:35:32 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296453 - head/sys/compat/linuxkpi/common/src
Message-ID:  <201603071435.u27EZWfH047994@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Mar  7 14:35:31 2016
New Revision: 296453
URL: https://svnweb.freebsd.org/changeset/base/296453

Log:
  Run the LinuxKPI PCI shutdown handler free of the Giant mutex.
  
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/src/linux_pci.c

Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_pci.c	Mon Mar  7 13:43:23 2016	(r296452)
+++ head/sys/compat/linuxkpi/common/src/linux_pci.c	Mon Mar  7 14:35:31 2016	(r296453)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2015 Mellanox Technologies, Ltd.
+ * Copyright (c) 2015-2016 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -209,8 +209,11 @@ linux_pci_shutdown(device_t dev)
 	struct pci_dev *pdev;
 
 	pdev = device_get_softc(dev);
-	if (pdev->pdrv->shutdown != NULL)
+	if (pdev->pdrv->shutdown != NULL) {
+		DROP_GIANT();
 		pdev->pdrv->shutdown(pdev);
+		PICKUP_GIANT();
+	}
 	return (0);
 }
 



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