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 */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to