diff options
author | smh <smh@FreeBSD.org> | 2014-07-30 18:21:06 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2014-07-30 18:21:06 +0000 |
commit | cbd981b419c23b29367c53ad9b75d3a2bb30c1e4 (patch) | |
tree | b06cf453ea9ba4be438aebdb7feb5a4466df51fb /sys | |
parent | 9af66cbda234ef1061db94471badefecc48db86c (diff) | |
download | FreeBSD-src-cbd981b419c23b29367c53ad9b75d3a2bb30c1e4.zip FreeBSD-src-cbd981b419c23b29367c53ad9b75d3a2bb30c1e4.tar.gz |
Bring in LSI's phase19 changes
* Removed unused mpssas_discovery_timeout function.
* Don't alter mapping boundaries if not raid firmware.
* Check free_busaddr instead of post_busaddr (diff minimisation really)
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/mps/mps.c | 2 | ||||
-rw-r--r-- | sys/dev/mps/mps_mapping.c | 11 | ||||
-rw-r--r-- | sys/dev/mps/mps_sas.c | 41 | ||||
-rw-r--r-- | sys/dev/mps/mpsvar.h | 2 |
4 files changed, 8 insertions, 48 deletions
diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 149e576..403a4d2 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -610,7 +610,7 @@ mps_iocfacts_free(struct mps_softc *sc) mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - if (sc->post_busaddr != 0) + if (sc->free_busaddr != 0) bus_dmamap_unload(sc->queues_dmat, sc->queues_map); if (sc->free_queue != NULL) bus_dmamem_free(sc->queues_dmat, sc->free_queue, diff --git a/sys/dev/mps/mps_mapping.c b/sys/dev/mps/mps_mapping.c index 97e24be..80022ea 100644 --- a/sys/dev/mps/mps_mapping.c +++ b/sys/dev/mps/mps_mapping.c @@ -336,12 +336,13 @@ _mapping_get_high_missing_mt_idx(struct mps_softc *sc) end_idx = sc->max_devices; if (ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0) start_idx = 1; - if (sc->ir_firmware) + if (sc->ir_firmware) { _mapping_get_ir_maprange(sc, &start_idx_ir, &end_idx_ir); - if (start_idx == start_idx_ir) - start_idx = end_idx_ir + 1; - else - end_idx = start_idx_ir; + if (start_idx == start_idx_ir) + start_idx = end_idx_ir + 1; + else + end_idx = start_idx_ir; + } mt_entry = &sc->mapping_table[start_idx]; for (map_idx = start_idx; map_idx < end_idx; map_idx++, mt_entry++) { if (mt_entry->missing_count > high_missing_count) { diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index d2ca888..e729d1c 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -115,7 +115,6 @@ static uint8_t op_code_prot[256] = { MALLOC_DEFINE(M_MPSSAS, "MPSSAS", "MPS SAS memory"); -static void mpssas_discovery_timeout(void *data); static void mpssas_remove_device(struct mps_softc *, struct mps_command *); static void mpssas_remove_complete(struct mps_softc *, struct mps_command *); static void mpssas_action(struct cam_sim *sim, union ccb *ccb); @@ -910,46 +909,6 @@ mpssas_discovery_end(struct mpssas_softc *sassc) } static void -mpssas_discovery_timeout(void *data) -{ - struct mpssas_softc *sassc = data; - struct mps_softc *sc; - - sc = sassc->sc; - MPS_FUNCTRACE(sc); - - mps_lock(sc); - mps_dprint(sc, MPS_INFO, - "Timeout waiting for discovery, interrupts may not be working!\n"); - sassc->flags &= ~MPSSAS_DISCOVERY_TIMEOUT_PENDING; - - /* Poll the hardware for events in case interrupts aren't working */ - mps_intr_locked(sc); - - mps_dprint(sassc->sc, MPS_INFO, - "Finished polling after discovery timeout at %d\n", ticks); - - if ((sassc->flags & MPSSAS_IN_DISCOVERY) == 0) { - mpssas_discovery_end(sassc); - } else { - if (sassc->discovery_timeouts < MPSSAS_MAX_DISCOVERY_TIMEOUTS) { - sassc->flags |= MPSSAS_DISCOVERY_TIMEOUT_PENDING; - callout_reset(&sassc->discovery_callout, - MPSSAS_DISCOVERY_TIMEOUT * hz, - mpssas_discovery_timeout, sassc); - sassc->discovery_timeouts++; - } else { - mps_dprint(sassc->sc, MPS_FAULT, - "Discovery timed out, continuing.\n"); - sassc->flags &= ~MPSSAS_IN_DISCOVERY; - mpssas_discovery_end(sassc); - } - } - - mps_unlock(sc); -} - -static void mpssas_action(struct cam_sim *sim, union ccb *ccb) { struct mpssas_softc *sassc; diff --git a/sys/dev/mps/mpsvar.h b/sys/dev/mps/mpsvar.h index dead1db..bae023e 100644 --- a/sys/dev/mps/mpsvar.h +++ b/sys/dev/mps/mpsvar.h @@ -32,7 +32,7 @@ #ifndef _MPSVAR_H #define _MPSVAR_H -#define MPS_DRIVER_VERSION "18.00.00.00-fbsd" +#define MPS_DRIVER_VERSION "19.00.00.00-fbsd" #define MPS_DB_MAX_WAIT 2500 |