From owner-svn-src-head@freebsd.org Mon Mar 20 20:44:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63DCDD14E03; Mon, 20 Mar 2017 20:44:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DD4E1486; Mon, 20 Mar 2017 20:44:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2KKiFSq013956; Mon, 20 Mar 2017 20:44:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2KKiFkE013953; Mon, 20 Mar 2017 20:44:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703202044.v2KKiFkE013953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Mar 2017 20:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315652 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2017 20:44:16 -0000 Author: mav Date: Mon Mar 20 20:44:14 2017 New Revision: 315652 URL: https://svnweb.freebsd.org/changeset/base/315652 Log: Remove some more dead code. MFC after: 2 weeks Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Mon Mar 20 19:27:35 2017 (r315651) +++ head/sys/dev/isp/isp_freebsd.c Mon Mar 20 20:44:14 2017 (r315652) @@ -294,7 +294,6 @@ isp_attach(ispsoftc_t *isp) callout_init_mtx(&isp->isp_osinfo.tmo, &isp->isp_osinfo.lock, 0); isp_timer_count = hz >> 2; callout_reset(&isp->isp_osinfo.tmo, isp_timer_count, isp_timer, isp); - isp->isp_osinfo.timer_active = 1; isp->isp_osinfo.cdev = make_dev(&isp_cdevsw, du, UID_ROOT, GID_OPERATOR, 0600, "%s", nu); if (isp->isp_osinfo.cdev) { @@ -315,10 +314,6 @@ unwind: ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } - if (isp->isp_osinfo.cdev) { - destroy_dev(isp->isp_osinfo.cdev); - isp->isp_osinfo.cdev = NULL; - } cam_simq_free(isp->isp_osinfo.devq); isp->isp_osinfo.devq = NULL; return (-1); @@ -327,35 +322,20 @@ unwind: int isp_detach(ispsoftc_t *isp) { - struct cam_sim *sim; int chan; - ISP_LOCK(isp); - for (chan = isp->isp_nchan - 1; chan >= 0; chan -= 1) { - ISP_GET_PC(isp, chan, sim, sim); - if (sim->refcount > 2) { - ISP_UNLOCK(isp); - return (EBUSY); - } + if (isp->isp_osinfo.cdev) { + destroy_dev(isp->isp_osinfo.cdev); + isp->isp_osinfo.cdev = NULL; } + ISP_LOCK(isp); /* Tell spawned threads that we're exiting. */ isp->isp_osinfo.is_exiting = 1; - if (isp->isp_osinfo.timer_active) { - callout_stop(&isp->isp_osinfo.tmo); - isp->isp_osinfo.timer_active = 0; - } for (chan = isp->isp_nchan - 1; chan >= 0; chan -= 1) isp_detach_chan(isp, chan); ISP_UNLOCK(isp); - - if (isp->isp_osinfo.cdev) { - destroy_dev(isp->isp_osinfo.cdev); - isp->isp_osinfo.cdev = NULL; - } - if (isp->isp_osinfo.devq != NULL) { - cam_simq_free(isp->isp_osinfo.devq); - isp->isp_osinfo.devq = NULL; - } + callout_drain(&isp->isp_osinfo.tmo); + cam_simq_free(isp->isp_osinfo.devq); return (0); } Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Mon Mar 20 19:27:35 2017 (r315651) +++ head/sys/dev/isp/isp_freebsd.h Mon Mar 20 20:44:14 2017 (r315652) @@ -297,16 +297,7 @@ struct isposinfo { struct isp_pcmd * pcmd_pool; struct isp_pcmd * pcmd_free; - uint32_t -#ifdef ISP_TARGET_MODE - tmwanted : 1, - tmbusy : 1, -#else - : 2, -#endif - sixtyfourbit : 1, /* sixtyfour bit platform */ - timer_active : 1, - autoconf : 1; + int sixtyfourbit; /* sixtyfour bit platform */ int mbox_sleeping; int mbox_sleep_ok; int mboxbsy; Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Mon Mar 20 19:27:35 2017 (r315651) +++ head/sys/dev/isp/ispvar.h Mon Mar 20 20:44:14 2017 (r315652) @@ -532,9 +532,8 @@ struct ispsoftc { uint32_t isp_maxluns; /* maximum luns supported */ uint32_t isp_clock : 8, /* input clock */ - : 4, + : 5, isp_port : 1, /* 23XX/24XX only */ - isp_open : 1, /* opened (ioctl) */ isp_bustype : 1, /* SBus or PCI */ isp_loaded_fw : 1, /* loaded firmware */ isp_dblev : 16; /* debug log mask */