aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-01-24 20:21:09 +0000
committerWarner Losh <imp@FreeBSD.org>2022-01-24 20:21:09 +0000
commit802f8d4afeafa8667af378c652b7a5cf12958b4e (patch)
treeca21040e6393b9a4c34c57912b2cd0acd8192299
parent340e08beee8228f01b714704999c6cc8f1d43b6e (diff)
mpr/mps: Remove write-only flag and callout
The discovery callout is initialized and cancelled only, making it write-only. Remove a state flag associated with it being pending as well as two defines that aren't used that are associated with it. Remove MP?SAS_SHUTDOWN flag, which is unused. Sponsored by: Netflix Reviewed by: ken, scottl, mav Differential Revision: https://reviews.freebsd.org/D33925
-rw-r--r--sys/dev/mpr/mpr_sas.c5
-rw-r--r--sys/dev/mpr/mpr_sas.h3
-rw-r--r--sys/dev/mps/mps_sas.c8
-rw-r--r--sys/dev/mps/mps_sas.h3
4 files changed, 0 insertions, 19 deletions
diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c
index db5df14562e7..4a8dccb18538 100644
--- a/sys/dev/mpr/mpr_sas.c
+++ b/sys/dev/mpr/mpr_sas.c
@@ -820,8 +820,6 @@ mpr_attach_sas(struct mpr_softc *sc)
sc->sassc->startup_refcount = 0;
mprsas_startup_increment(sassc);
- callout_init(&sassc->discovery_callout, 1 /*mpsafe*/);
-
mpr_unlock(sc);
/*
@@ -937,9 +935,6 @@ mprsas_discovery_end(struct mprsas_softc *sassc)
MPR_FUNCTRACE(sc);
- if (sassc->flags & MPRSAS_DISCOVERY_TIMEOUT_PENDING)
- callout_stop(&sassc->discovery_callout);
-
/*
* After discovery has completed, check the mapping table for any
* missing devices and update their missing counts. Only do this once
diff --git a/sys/dev/mpr/mpr_sas.h b/sys/dev/mpr/mpr_sas.h
index 4ec6be15613c..5c7344eef6fa 100644
--- a/sys/dev/mpr/mpr_sas.h
+++ b/sys/dev/mpr/mpr_sas.h
@@ -91,9 +91,7 @@ struct mprsas_softc {
u_int flags;
#define MPRSAS_IN_DISCOVERY (1 << 0)
#define MPRSAS_IN_STARTUP (1 << 1)
-#define MPRSAS_DISCOVERY_TIMEOUT_PENDING (1 << 2)
#define MPRSAS_QUEUE_FROZEN (1 << 3)
-#define MPRSAS_SHUTDOWN (1 << 4)
#define MPRSAS_TOREMOVE (1 << 5)
u_int maxtargets;
struct mprsas_target *targets;
@@ -101,7 +99,6 @@ struct mprsas_softc {
struct cam_sim *sim;
struct cam_path *path;
struct intr_config_hook sas_ich;
- struct callout discovery_callout;
struct mpr_event_handle *mprsas_eh;
u_int startup_refcount;
diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c
index 681565aca2d1..e55c4978208a 100644
--- a/sys/dev/mps/mps_sas.c
+++ b/sys/dev/mps/mps_sas.c
@@ -86,9 +86,6 @@ __FBSDID("$FreeBSD$");
#include <dev/mps/mps_table.h>
#include <dev/mps/mps_sas.h>
-#define MPSSAS_DISCOVERY_TIMEOUT 20
-#define MPSSAS_MAX_DISCOVERY_TIMEOUTS 10 /* 200 seconds */
-
/*
* static array to check SCSI OpCode for EEDP protection bits
*/
@@ -773,8 +770,6 @@ mps_attach_sas(struct mps_softc *sc)
sc->sassc->startup_refcount = 0;
mpssas_startup_increment(sassc);
- callout_init(&sassc->discovery_callout, 1 /*mpsafe*/);
-
mps_unlock(sc);
/*
@@ -889,9 +884,6 @@ mpssas_discovery_end(struct mpssas_softc *sassc)
MPS_FUNCTRACE(sc);
- if (sassc->flags & MPSSAS_DISCOVERY_TIMEOUT_PENDING)
- callout_stop(&sassc->discovery_callout);
-
/*
* After discovery has completed, check the mapping table for any
* missing devices and update their missing counts. Only do this once
diff --git a/sys/dev/mps/mps_sas.h b/sys/dev/mps/mps_sas.h
index 4d782ad8e7a3..3750500f4091 100644
--- a/sys/dev/mps/mps_sas.h
+++ b/sys/dev/mps/mps_sas.h
@@ -86,16 +86,13 @@ struct mpssas_softc {
u_int flags;
#define MPSSAS_IN_DISCOVERY (1 << 0)
#define MPSSAS_IN_STARTUP (1 << 1)
-#define MPSSAS_DISCOVERY_TIMEOUT_PENDING (1 << 2)
#define MPSSAS_QUEUE_FROZEN (1 << 3)
-#define MPSSAS_SHUTDOWN (1 << 4)
u_int maxtargets;
struct mpssas_target *targets;
struct cam_devq *devq;
struct cam_sim *sim;
struct cam_path *path;
struct intr_config_hook sas_ich;
- struct callout discovery_callout;
struct mps_event_handle *mpssas_eh;
u_int startup_refcount;