<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in mfi_debug.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>685dc743 - sys: Remove $FreeBSD$: one-line .c pattern</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#685dc743</link>
        <description>sys: Remove $FreeBSD$: one-line .c patternRemove /^[\s*]*__FBSDID\(&quot;\$FreeBSD\$&quot;\);?\s*\n/

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Wed, 16 Aug 2023 17:54:36 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>4d846d26 - spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#4d846d26</link>
        <description>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDThe SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catchup to that fact and revert to their recommended match of BSD-2-Clause.Discussed with:		pfgMFC After:		3 daysSponsored by:		Netflix

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Wed, 10 May 2023 15:40:58 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>718cf2cc - sys/dev: further adoption of SPDX licensing ID tags.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#718cf2cc</link>
        <description>sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Mon, 27 Nov 2017 14:52:40 +0000</pubDate>
        <dc:creator>Pedro F. Giffuni &lt;pfg@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>dee3e845 - Add support for getting and setting BBU properties related to battery</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#dee3e845</link>
        <description>Add support for getting and setting BBU properties related to batteryrelearning. Specifically, add subcommands to mfiutil(8) which allow theuser to set the BBU and autolearn modes when the firmware supports it,and add a subcommand which kicks off a battery relearn.Reviewed by:	sbruno, rstoneTested by:	sbrunoApproved by:	rstone (co-mentor)MFC after:	2 weeksSponsored by:	Sandvine Incorporated

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Mon, 08 Apr 2013 17:46:45 +0000</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>08c89430 - Fixes queuing issues where mfi_release_command blindly sets the cm_flags = 0</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#08c89430</link>
        <description>Fixes queuing issues where mfi_release_command blindly sets the cm_flags = 0without first removing the command from the relavent queue.This was causing panics in the queue functions which check to ensure a commandis not on another queue.Fixed some cases where the error from mfi_mapcmd was lost and where the commandwas never released / dequeued in error cases.Ensure that all failures to mfi_mapcmd are logged.Fixed possible null pointer exception in mfi_aen_setup if mfi_get_log_statefailed.Fixed mfi_parse_entries &amp; mfi_aen_setup not returning possible errors.Corrected MFI_DUMP_CMDS calls with invalid vars SC vs sc.Commands which have timed out now set cm_error to ETIMEDOUT and callmfi_complete which prevents them getting stuck in the busy queue forever.Fixed possible use of NULL pointer in mfi_tbolt_get_cmd.Changed output formats to be more easily recognisable when debugging.Optimised mfi_cmd_pool_tbolt cleanup.Made information about driver limiting commands always display as for moderncards this can be severe.Fixed mfi_tbolt_alloc_cmd out of memory case which previously didnt return anerror.Added malloc checks for request_desc_pool including free when subsiquent errorsare detected.Fixed overflow error in SIMD reply descriptor check.Fixed tbolt_cmd leak in mfi_build_and_issue_cmd if there&apos;s an error during IObuild.Elimintated double checks on sc-&gt;mfi_aen_cm &amp; sc-&gt;mfi_map_sync_cm inmfi_shutdown.Move local hdr calculation after error check in mfi_aen_complete.Fixed wakeup on NULL in mfi_aen_complete.Fixed mfi_aen_cm cleanup in mfi_process_fw_state_chg_isr not checking if it wasNULL.Changed mfi_alloc_commands to error if bus_dmamap_create fails. Previously wewould try to continue with the number of allocated commands but lots of placesin the driver assume sc-&gt;mfi_max_fw_cmds is whats available so its unsafe to dothis without lots of changes.Removed mfi_total_cmds as its no longer used due the above change.Corrected mfi_tbolt_alloc_cmd to return ENOMEM where appropriate.Fixed timeouts actually firing at double what they should.Setting hw.mfi.max_cmds=-1 now configures to use the controller max.A few style (9) fixes e.g. braced single line conditions and double blank linesCleaned up queuing macrosRemoved invalid queuing tests for multiple queuesTrap and deal with errors when doing sends in mfi_data_cbRefactored frame sending into one method with error checking of the returncode so we can ensure commands aren&apos;t left on the queue after error. Thisensures that mfi_mapcmd &amp; mfi_data_cb leave the queue in a valid state.Refactored how commands are cleaned up, mfi_release_command now ensuresthat all queues and command state is maintained in a consistent state.Prevent NULL pointer use in mfi_tbolt_complete_cmdFixed use of NULL sc-&gt;mfi_map_sync_cm in wakeupAdded defines to help with output of mfi_cmd and header flags.Fixed mfi_tbolt_init_MFI_queue invalidating cm_index of the acquired mfi_cmd.Reset now reinitialises sync map as well as AEN.Fixed possible use of NULL pointer in mfi_build_and_issue_cmdFixed mfi_tbolt_init_MFI_queue call to mfi_process_fw_state_chg_isr causingpanic on failure.Ensure that tbolt cards always initialise next_host_reply_index andfree_host_reply_index (based off mfi_max_fw_cmds) on both startup andreset as per the linux driver.Fixed mfi_tbolt_complete_cmd not acknowledging unknown commands soit didn&apos;t clear the controller.Prevent locks from being dropped and re-acquired in the following functionswhich was allowing multiple threads to enter critical methods such asmfi_tbolt_complete_cmd &amp; mfi_process_fw_state_chg_isr:-* mfi_tbolt_init_MFI_queue* mfi_aen_complete / mfi_aen_register* mfi_tbolt_sync_map_info* mfi_get_log_state* mfi_parse_entriesThe locking for these functions was promoting to higher level methods. Thisalso fixed MFI_LINUX_SET_AEN_2 which was already acquiring the lock, so wouldhave paniced for recursive lock.This also required changing malloc of ld_sync in mfi_tbolt_sync_map_info toM_NOWAIT which can hence now fail but this was already expected as its returnwas being tested.Removed the assignment of cm_index in mfi_tbolt_init_MFI_queue which breaksthe world if the cmd returned by mfi_dequeue_free isn&apos;t the first cmd.Fixed locking in mfi_data_cb, this is an async callback from bus_dmamap_loadwhich could hence be called after the caller has dropped the lock. If wedon&apos;t have the lock we aquire it and ensure we unlock before returning.Fixed locking mfi_comms_init when mfi_dequeue_free fails.Fixed mfi_build_and_issue_cmd not returning tbolt cmds aquired to the poolon error.Fixed mfi_abort not dropping the io lock when mfi_dequeue_free fails.Added hw.mfi.polled_cmd_timeout sysctl that enables tuning of polledtimeouts. This shouldn&apos;t be reduced below 50 seconds as its used forfirmware patching which can take quite some time.Added hw.mfi.fw_reset_test sysctl which is avaliable when compiled withMFI_DEBUG and allows the testing of controller reset that was provoking alarge number of the issues encountered here.Reviewed by:	Doug AmbriskoApproved by:	pjd (mentor)MFC after:	1 month

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Wed, 27 Feb 2013 02:21:10 +0000</pubDate>
        <dc:creator>Steven Hartland &lt;smh@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>ddbffe7f - First fix pr 167226:</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#ddbffe7f</link>
        <description>First fix pr 167226:	ThunderBolt cannot read sector &gt;= 2^32 or 2^21with supplied patch.Second the bigger change, fix RAID operation on ThunderBolt basecard such as physically removing a disk from a RAID and replacingit.  The current situation is the RAID firmware effectively hangswaiting for an acknowledgement from the driver.  This is due tothe firmware support of the driver actually accessing the RAIDfrom under the firmware.  This is an interesting feature thatthe FreeBSD driver does not use.  However, when the firmaredetects the driver has attached it then expects the driver willsynchronize LD&apos;s with the firmware.  If the driver does not sync.then the management part of the firmware will hang waiting forit so a pulled driver will listed as still there.The fix for this problem isn&apos;t extremely difficult.  However,figuring out why some of the code was the way it was and thenredoing it was involved.  Not have a spec. made it harder totry to figure out.  The existing driver would send aMFI_DCMD_LD_MAP_GET_INFO command in write mode to acknowledgea LD state change.  In read mode it gets the RAID map from thefirmware.  The FreeBSD driver doesn&apos;t do that currently.  Itcould be added in the future with the appropriate structures.To simplify things, get the current LD state and then buildthe MFI_DCMD_LD_MAP_GET_INFO/write command so that it sendsan acknowledgement for each LD.  The map would probably statewhich LD&apos;s changed so then the driver could probably justacknowledge the LD&apos;s that changed versus all.  This doesn&apos;t seemto be a problem.  When a MFI_DCMD_LD_MAP_GET_INFO/write commandis sent to the firmware, it will complete later when a changeto the LD&apos;s happen.  So it is very much like an AEN commandreturning when something happened.  When theMFI_DCMD_LD_MAP_GET_INFO/write command completes, we refire thesync&apos;ing of the LD state.  This needs to be done in as an eventso that MFI_DCMD_LD_GET_LIST can wait for that command tocomplete before issuing the MFI_DCMD_LD_MAP_GET_INFO/write.The prior code didn&apos;t use the call-back function and triedto intercept the MFI_DCMD_LD_MAP_GET_INFO/write command whenprocessing an interrupt.  This added a bunch of code complexityto the interrupt handler.  Using the call-back that is donefor other commands got rid of this need.  So the interrupthandler is greatly simplified.  It seems that even commandsthat shouldn&apos;t be acknowledged end up in the interrupt handler.To deal with this, code was added to check to see if a commandis in the busy queue or not.  This might have contributed to theinterrupt storm happening without MSI enabled on these cards.Note that MFI_DCMD_LD_MAP_GET_INFO/read returns right away.It would be interesting to see what other complexity couldbe removed from the ThunderBolt driver that really isn&apos;tneeded in our mode of operation.  Letting the RAID firmwaredo all of the I/O to disks is a lot faster since it canuse its caches.  It greatly simplifies what the driver hasto do and potential bugs if the driver and firmware arenot in sync.Simplify the aen_abort/cm_map_abort and put it in the softcversus in the command structure.This should get merged to 9 before the driver is merged to8.PR:		167226Submitted by:	Petr LampaMFC after:	3 days

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Fri, 04 May 2012 16:00:39 +0000</pubDate>
        <dc:creator>Doug Ambrisko &lt;ambrisko@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>3fc05399 - Implement MFI_DEBUG for 64bit S/G lists.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#3fc05399</link>
        <description>Implement MFI_DEBUG for 64bit S/G lists.

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Wed, 07 Dec 2011 12:48:11 +0000</pubDate>
        <dc:creator>Alexander Motin &lt;mav@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>8474083c - MFC: Add single-message MSI support to mfi(4).</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#8474083c</link>
        <description>MFC: Add single-message MSI support to mfi(4).Reviewed by:	ambrisko, delphij

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Wed, 16 Nov 2011 18:53:52 +0000</pubDate>
        <dc:creator>John Baldwin &lt;jhb@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d185f187 - The sys/sysctl.h header is needed when MFI_DEBUG is defined.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#d185f187</link>
        <description>The sys/sysctl.h header is needed when MFI_DEBUG is defined.Nod from:	jhb

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Wed, 16 Nov 2011 18:42:39 +0000</pubDate>
        <dc:creator>Konstantin Belousov &lt;kib@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>441f6d5d - - Add a command validator for use in debugging.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#441f6d5d</link>
        <description>- Add a command validator for use in debugging.- Fix the locking protocol to eliminate races between normal I/O and AENs.- Various small improvements and usability tweaks.Sponsored by: IronPortPortions Submitted by: Doug Ambrisko

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Mon, 16 Oct 2006 04:18:38 +0000</pubDate>
        <dc:creator>Scott Long &lt;scottl@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>420a5a0e - Fix a bad #include statment</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#420a5a0e</link>
        <description>Fix a bad #include statment

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Wed, 27 Sep 2006 04:54:23 +0000</pubDate>
        <dc:creator>Scott Long &lt;scottl@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>5ba21ff1 - Add a command debugging module and a periodic watchdog timer.</title>
        <link>http://172.16.0.5:8080/history/freebsd-14.2/sys/dev/mfi/mfi_debug.c#5ba21ff1</link>
        <description>Add a command debugging module and a periodic watchdog timer.Sponsored by: IronPort

            List of files:
            /freebsd-14.2/sys/dev/mfi/mfi_debug.c</description>
        <pubDate>Mon, 25 Sep 2006 11:35:34 +0000</pubDate>
        <dc:creator>Scott Long &lt;scottl@FreeBSD.org&gt;</dc:creator>
    </item>
</channel>
</rss>
