Essentially revert r239912. The amr_periodic function hadn't been armed in
over 10 years and was dead code; the previous revision exposed it as such to CLANG. The solution is to cull the whole thing.
This commit is contained in:
parent
80a343862a
commit
8a0591e0dc
@ -138,11 +138,6 @@ static void amr_setup_data(void *arg, bus_dma_segment_t *segs, int nsegments, in
|
|||||||
static void amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegments, int error);
|
static void amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegments, int error);
|
||||||
static void amr_abort_load(struct amr_command *ac);
|
static void amr_abort_load(struct amr_command *ac);
|
||||||
|
|
||||||
/*
|
|
||||||
* Status monitoring
|
|
||||||
*/
|
|
||||||
static void amr_periodic(void *data);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interface-specific shims
|
* Interface-specific shims
|
||||||
*/
|
*/
|
||||||
@ -348,11 +343,6 @@ amr_startup(void *arg)
|
|||||||
/* interrupts will be enabled before we do anything more */
|
/* interrupts will be enabled before we do anything more */
|
||||||
sc->amr_state |= AMR_STATE_INTEN;
|
sc->amr_state |= AMR_STATE_INTEN;
|
||||||
|
|
||||||
/*
|
|
||||||
* Start the timeout routine.
|
|
||||||
*/
|
|
||||||
/* callout_reset(&sc->amr_timeout, hz, amr_periodic, sc);*/
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,9 +381,6 @@ amr_free(struct amr_softc *sc)
|
|||||||
if (sc->amr_pass != NULL)
|
if (sc->amr_pass != NULL)
|
||||||
device_delete_child(sc->amr_dev, sc->amr_pass);
|
device_delete_child(sc->amr_dev, sc->amr_pass);
|
||||||
|
|
||||||
/* cancel status timeout */
|
|
||||||
callout_drain(&sc->amr_timeout);
|
|
||||||
|
|
||||||
/* throw away any command buffers */
|
/* throw away any command buffers */
|
||||||
while ((acc = TAILQ_FIRST(&sc->amr_cmd_clusters)) != NULL) {
|
while ((acc = TAILQ_FIRST(&sc->amr_cmd_clusters)) != NULL) {
|
||||||
TAILQ_REMOVE(&sc->amr_cmd_clusters, acc, acc_link);
|
TAILQ_REMOVE(&sc->amr_cmd_clusters, acc, acc_link);
|
||||||
@ -957,31 +944,6 @@ amr_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct threa
|
|||||||
return(error);
|
return(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************
|
|
||||||
********************************************************************************
|
|
||||||
Status Monitoring
|
|
||||||
********************************************************************************
|
|
||||||
********************************************************************************/
|
|
||||||
|
|
||||||
/********************************************************************************
|
|
||||||
* Perform a periodic check of the controller status
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
amr_periodic(void *data)
|
|
||||||
{
|
|
||||||
struct amr_softc *sc = (struct amr_softc *)data;
|
|
||||||
|
|
||||||
debug_called(2);
|
|
||||||
|
|
||||||
/* XXX perform periodic status checks here */
|
|
||||||
|
|
||||||
/* compensate for missed interrupts */
|
|
||||||
amr_done(sc);
|
|
||||||
|
|
||||||
/* reschedule */
|
|
||||||
callout_reset(&sc->amr_timeout, hz, amr_periodic, sc);
|
|
||||||
}
|
|
||||||
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
Command Wrappers
|
Command Wrappers
|
||||||
|
@ -331,7 +331,6 @@ amr_pci_attach(device_t dev)
|
|||||||
*/
|
*/
|
||||||
mtx_init(&sc->amr_list_lock, "AMR List Lock", NULL, MTX_DEF);
|
mtx_init(&sc->amr_list_lock, "AMR List Lock", NULL, MTX_DEF);
|
||||||
mtx_init(&sc->amr_hw_lock, "AMR HW Lock", NULL, MTX_DEF);
|
mtx_init(&sc->amr_hw_lock, "AMR HW Lock", NULL, MTX_DEF);
|
||||||
callout_init(&sc->amr_timeout, CALLOUT_MPSAFE);
|
|
||||||
if ((error = amr_setup_mbox(sc)) != 0)
|
if ((error = amr_setup_mbox(sc)) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
@ -256,7 +256,6 @@ struct amr_softc
|
|||||||
device_t amr_pass;
|
device_t amr_pass;
|
||||||
int (*amr_cam_command)(struct amr_softc *sc, struct amr_command **acp);
|
int (*amr_cam_command)(struct amr_softc *sc, struct amr_command **acp);
|
||||||
struct intr_config_hook amr_ich; /* wait-for-interrupts probe hook */
|
struct intr_config_hook amr_ich; /* wait-for-interrupts probe hook */
|
||||||
struct callout amr_timeout; /* periodic status check */
|
|
||||||
int amr_allow_vol_config;
|
int amr_allow_vol_config;
|
||||||
int amr_linux_no_adapters;
|
int amr_linux_no_adapters;
|
||||||
int amr_ld_del_supported;
|
int amr_ld_del_supported;
|
||||||
|
Loading…
Reference in New Issue
Block a user