Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2017 08:51:22 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r315976 - stable/10/sys/dev/isp
Message-ID:  <201703260851.v2Q8pMOF073201@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Mar 26 08:51:22 2017
New Revision: 315976
URL: https://svnweb.freebsd.org/changeset/base/315976

Log:
  MFC r315163: Remove strange config_intrhook_establish() magic.
  
  Interrupts are enabled as part of chip reset just during driver attach.
  Later "enabling" of already enabled interrupts is useless.

Modified:
  stable/10/sys/dev/isp/isp_freebsd.c
  stable/10/sys/dev/isp/isp_freebsd.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/10/sys/dev/isp/isp_freebsd.c	Sun Mar 26 08:50:50 2017	(r315975)
+++ stable/10/sys/dev/isp/isp_freebsd.c	Sun Mar 26 08:51:22 2017	(r315976)
@@ -278,25 +278,11 @@ isp_attach(ispsoftc_t *isp)
 	int du = device_get_unit(isp->isp_dev);
 	int chan;
 
-	isp->isp_osinfo.ehook.ich_func = isp_intr_enable;
-	isp->isp_osinfo.ehook.ich_arg = isp;
-	/*
-	 * Haha. Set this first, because if we're loaded as a module isp_intr_enable
-	 * will be called right awawy, which will clear isp_osinfo.ehook_active,
-	 * which would be unwise to then set again later.
-	 */
-	isp->isp_osinfo.ehook_active = 1;
-	if (config_intrhook_establish(&isp->isp_osinfo.ehook) != 0) {
-		isp_prt(isp, ISP_LOGERR, "could not establish interrupt enable hook");
-		return (-EIO);
-	}
-
 	/*
 	 * Create the device queue for our SIM(s).
 	 */
 	isp->isp_osinfo.devq = cam_simq_alloc(isp->isp_maxcmds);
 	if (isp->isp_osinfo.devq == NULL) {
-		config_intrhook_disestablish(&isp->isp_osinfo.ehook);
 		return (EIO);
 	}
 
@@ -330,10 +316,6 @@ unwind:
 		ISP_UNLOCK(isp);
 		cam_sim_free(sim, FALSE);
 	}
-	if (isp->isp_osinfo.ehook_active) {
-		config_intrhook_disestablish(&isp->isp_osinfo.ehook);
-		isp->isp_osinfo.ehook_active = 0;
-	}
 	if (isp->isp_osinfo.cdev) {
 		destroy_dev(isp->isp_osinfo.cdev);
 		isp->isp_osinfo.cdev = NULL;
@@ -371,10 +353,6 @@ isp_detach(ispsoftc_t *isp)
 		destroy_dev(isp->isp_osinfo.cdev);
 		isp->isp_osinfo.cdev = NULL;
 	}
-	if (isp->isp_osinfo.ehook_active) {
-		config_intrhook_disestablish(&isp->isp_osinfo.ehook);
-		isp->isp_osinfo.ehook_active = 0;
-	}
 	if (isp->isp_osinfo.devq != NULL) {
 		cam_simq_free(isp->isp_osinfo.devq);
 		isp->isp_osinfo.devq = NULL;
@@ -790,28 +768,6 @@ ispioctl(struct cdev *dev, u_long c, cad
 	return (retval);
 }
 
-static void
-isp_intr_enable(void *arg)
-{
-	int chan;
-	ispsoftc_t *isp = arg;
-	ISP_LOCK(isp);
-	if (IS_FC(isp)) {
-		for (chan = 0; chan < isp->isp_nchan; chan++) {
-			if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) {
-				ISP_ENABLE_INTS(isp);
-				break;
-			}
-		}
-	} else {
-		ISP_ENABLE_INTS(isp);
-	}
-	isp->isp_osinfo.ehook_active = 0;
-	ISP_UNLOCK(isp);
-	/* Release our hook so that the boot can continue. */
-	config_intrhook_disestablish(&isp->isp_osinfo.ehook);
-}
-
 /*
  * Local Inlines
  */

Modified: stable/10/sys/dev/isp/isp_freebsd.h
==============================================================================
--- stable/10/sys/dev/isp/isp_freebsd.h	Sun Mar 26 08:50:50 2017	(r315975)
+++ stable/10/sys/dev/isp/isp_freebsd.h	Sun Mar 26 08:51:22 2017	(r315976)
@@ -272,7 +272,6 @@ struct isposinfo {
 	struct mtx		lock;
 	device_t		dev;
 	struct cdev *		cdev;
-	struct intr_config_hook	ehook;
 	struct cam_devq *	devq;
 
 	/*
@@ -312,7 +311,6 @@ struct isposinfo {
 		sixtyfourbit	: 1,	/* sixtyfour bit platform */
 		timer_active	: 1,
 		autoconf	: 1,
-		ehook_active	: 1,
 		mbox_sleeping	: 1,
 		mbox_sleep_ok	: 1,
 		mboxcmd_done	: 1,



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