Author: smh
Date: Wed Jul 30 18:21:06 2014
New Revision: 269316
URL: http://svnweb.freebsd.org/changeset/base/269316

Log:
  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

Modified:
  head/sys/dev/mps/mps.c
  head/sys/dev/mps/mps_mapping.c
  head/sys/dev/mps/mps_sas.c
  head/sys/dev/mps/mpsvar.h

Modified: head/sys/dev/mps/mps.c
==============================================================================
--- head/sys/dev/mps/mps.c      Wed Jul 30 17:59:37 2014        (r269315)
+++ head/sys/dev/mps/mps.c      Wed Jul 30 18:21:06 2014        (r269316)
@@ -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,

Modified: head/sys/dev/mps/mps_mapping.c
==============================================================================
--- head/sys/dev/mps/mps_mapping.c      Wed Jul 30 17:59:37 2014        
(r269315)
+++ head/sys/dev/mps/mps_mapping.c      Wed Jul 30 18:21:06 2014        
(r269316)
@@ -336,12 +336,13 @@ _mapping_get_high_missing_mt_idx(struct 
        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) {

Modified: head/sys/dev/mps/mps_sas.c
==============================================================================
--- head/sys/dev/mps/mps_sas.c  Wed Jul 30 17:59:37 2014        (r269315)
+++ head/sys/dev/mps/mps_sas.c  Wed Jul 30 18:21:06 2014        (r269316)
@@ -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
 }
 
 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;

Modified: head/sys/dev/mps/mpsvar.h
==============================================================================
--- head/sys/dev/mps/mpsvar.h   Wed Jul 30 17:59:37 2014        (r269315)
+++ head/sys/dev/mps/mpsvar.h   Wed Jul 30 18:21:06 2014        (r269316)
@@ -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
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to