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
This commit is contained in:
Warner Losh 2022-01-24 13:21:09 -07:00
parent 340e08beee
commit 802f8d4afe
4 changed files with 0 additions and 19 deletions

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;