svn commit: r316400 - stable/11/sys/dev/isp
Alexander Motin
mav at FreeBSD.org
Sun Apr 2 10:53:04 UTC 2017
Author: mav
Date: Sun Apr 2 10:53:03 2017
New Revision: 316400
URL: https://svnweb.freebsd.org/changeset/base/316400
Log:
MFC r315587, r315652: Remove some dead/useless code.
Modified:
stable/11/sys/dev/isp/isp.c
stable/11/sys/dev/isp/isp_freebsd.c
stable/11/sys/dev/isp/isp_freebsd.h
stable/11/sys/dev/isp/ispvar.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/isp/isp.c
==============================================================================
--- stable/11/sys/dev/isp/isp.c Sun Apr 2 10:52:00 2017 (r316399)
+++ stable/11/sys/dev/isp/isp.c Sun Apr 2 10:53:03 2017 (r316400)
@@ -4530,7 +4530,6 @@ isp_start(XS_T *xs)
return (dmaresult);
}
isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "START cmd cdb[0]=0x%x datalen %ld", XS_CDBP(xs)[0], (long) XS_XFRLEN(xs));
- isp->isp_nactive++;
return (CMD_QUEUED);
}
@@ -5359,9 +5358,6 @@ isp_intr_respq(ispsoftc_t *isp)
}
isp_destroy_handle(isp, sp->req_handle);
- if (isp->isp_nactive > 0) {
- isp->isp_nactive--;
- }
complist[ndone++] = xs; /* defer completion call until later */
ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */
last_etype = etype;
@@ -5932,9 +5928,6 @@ isp_handle_other_response(ispsoftc_t *is
void *ptr;
switch (type) {
- case RQSTYPE_STATUS_CONT:
- isp_prt(isp, ISP_LOG_WARN1, "Ignored Continuation Response");
- return (1);
case RQSTYPE_MARKER:
isp_prt(isp, ISP_LOG_WARN1, "Marker Response");
return (1);
@@ -6536,9 +6529,6 @@ isp_fastpost_complete(ispsoftc_t *isp, u
if (XS_XFRLEN(xs)) {
ISP_DMAFREE(isp, xs, fph);
}
- if (isp->isp_nactive) {
- isp->isp_nactive--;
- }
isp_done(xs);
}
@@ -7579,7 +7569,6 @@ isp_reinit(ispsoftc_t *isp, int do_load_
}
cleanup:
- isp->isp_nactive = 0;
isp_clear_commands(isp);
if (IS_FC(isp)) {
for (i = 0; i < isp->isp_nchan; i++)
Modified: stable/11/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/11/sys/dev/isp/isp_freebsd.c Sun Apr 2 10:52:00 2017 (r316399)
+++ stable/11/sys/dev/isp/isp_freebsd.c Sun Apr 2 10:53:03 2017 (r316400)
@@ -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);
}
@@ -1591,7 +1571,6 @@ isp_target_start_ctio(ispsoftc_t *isp, u
xpt_done(ccb);
continue;
}
- isp->isp_nactive++;
ccb->ccb_h.status = CAM_REQ_INPROG | CAM_SIM_QUEUED;
if (xfrlen) {
ccb->ccb_h.spriv_field0 = atp->bytes_xfered;
@@ -2113,9 +2092,6 @@ isp_handle_platform_ctio(ispsoftc_t *isp
isp_destroy_handle(isp, handle);
resid = data_requested = PISP_PCMD(ccb)->datalen;
isp_free_pcmd(isp, ccb);
- if (isp->isp_nactive) {
- isp->isp_nactive--;
- }
bus = XS_CHANNEL(ccb);
if (IS_24XX(isp)) {
Modified: stable/11/sys/dev/isp/isp_freebsd.h
==============================================================================
--- stable/11/sys/dev/isp/isp_freebsd.h Sun Apr 2 10:52:00 2017 (r316399)
+++ stable/11/sys/dev/isp/isp_freebsd.h Sun Apr 2 10:53:03 2017 (r316400)
@@ -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: stable/11/sys/dev/isp/ispvar.h
==============================================================================
--- stable/11/sys/dev/isp/ispvar.h Sun Apr 2 10:52:00 2017 (r316399)
+++ stable/11/sys/dev/isp/ispvar.h Sun Apr 2 10:53:03 2017 (r316400)
@@ -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 */
@@ -553,7 +552,6 @@ struct ispsoftc {
volatile u_int isp_mboxbsy; /* mailbox command active */
volatile u_int isp_state;
- volatile u_int isp_nactive; /* how many commands active */
volatile mbreg_t isp_curmbx; /* currently active mailbox command */
volatile uint32_t isp_reqodx; /* index of last ISP pickup */
volatile uint32_t isp_reqidx; /* index of next request */
More information about the svn-src-stable-11
mailing list