busdma - Remove filter functionality- Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one
busdma - Remove filter functionality- Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one exception: if_jme.- Remove filter functionality internally and parent tag tracking. Without filter functions, we do not need to keep track of tag ancestry. All inheritance of the parent tag's parameters occurs when creating the new child tag.- rename run_filter() to addr_needs_bounce().- FreeBSD keeps the filtfunc and filtarg arguments but requires them to be NULL.- Drop filterfunc usage from if_jme. In case of "JMC260 chip full mask revision 2", which has a hardware bug when it comes to DMA transfers crossing the 4 GB bounday, the parent buffer tag already limits DMA memory to 32bit address space. As such it should be safe to drop the filterfunc. The filterfunc was checking if the lower 32bits of the physical address used for DMA are all 0. In case of a 32bit address space, the only address where all lower 32-bits are all zero is 0 itself and I am here assuming that the physical address 0 is not used for DMA transfers!Mainly obtained from: FreeBSD (commits 7cb028de, 900907f4, 1228b93b, 3933ff56)
show more ...
Remove <machine/inttypes.h> from a number of files that don't need it.
CAM - A few more kmalloc -> xpt_alloc_ccb fixes* Fix (now improper) kmalloc()s of ccbs in the ASR and MPS drivers. Properly use xpt_alloc_ccb().
kernel - Rewrite the callout_*() API* Rewrite the entire API from scratch and improve compatibility with FreeBSD. This is not an attempt to achieve full API compatibility, as FreeBSD's API has
kernel - Rewrite the callout_*() API* Rewrite the entire API from scratch and improve compatibility with FreeBSD. This is not an attempt to achieve full API compatibility, as FreeBSD's API has unnecessary complexity that coders would frequently make mistakes interpreting.* Remove the IPI mechanisms in favor of fine-grained spin-locks instead.* Add some robustness features in an attempt to track down corrupted callwheel lists due to originating subsystems freeing structures out from under an active callout.* The code supports a full-blown type-stable/adhoc-reuse structural separation between the front-end and the back-end, but this feature is currently not operational and may be removed at some future point. Instead we currently just embed the struct _callout inside the struct callout.* Replace callout_stop_sync() with callout_cancel().* callout_drain() is now implemented as a synchronous cancel instead of an asynchronous stop, which is closer to the FreeBSD API and expected operation for ported code (usb stack in particular). We will just have to fix any deadlocks which we come across.* Retain our callout_terminate() function as the 'better' way to stop using a callout, as it will not only cancel the callout but also de-flag the structure so it can no longer be used.
kernel - Change callout in struct ccb_hdr* Change the callout declaration in struct ccb_hdr from an embedded structure to a pointer, add padding to get the whole structure to its original size
kernel - Change callout in struct ccb_hdr* Change the callout declaration in struct ccb_hdr from an embedded structure to a pointer, add padding to get the whole structure to its original size (prior to the recent callout patch).* This removes an improper ABI dependency on the kernel struct callout structure which was causing 'camcontrol', and 'smartctl' (from smartmontools) to fail.Testing: dillon, tuxillo
kernel: Change CFLAGS -> KCFLAGS also in commented out Makefile lines.
kernel/disk: Remove use of "%b" format.Switch to args safe "%pb%i" internal format.
kernel: Fix some -Wundef warnings in oce(4) and mps(4).__FreeBSD_version is not defined in DragonFly, so make it clearerwhich path we take.
Remove <sys/ioccom.h> inclusion from a number of files.<sys/ioccom.h> should only be included from header files that defineioctls.
kernel: Don't include <sys/mutex.h> in some drivers that don't need it.
drm - Fix major stalls by fixing an improper taskqueue priority* drm was creating task queues with a LWKT priority of 0, which is lower than the priority of a running user thread.* Fix all case
drm - Fix major stalls by fixing an improper taskqueue priority* drm was creating task queues with a LWKT priority of 0, which is lower than the priority of a running user thread.* Fix all cases where improper priorities are passed to taskqueue_start_threads(). This fixes major video stalls and glitches that occur when other things might be running on the system cpu-bound.* taskqueue_start_threads() now asserts if the priority passed to it is illegal.
kernel: Remove the COMPAT_43 kernel option along with all related code.It is commented out in our default kernel config files for almost fiveyears now, since 9466f37df5258f3bc3d99ae43627a71c1c085e
kernel: Remove the COMPAT_43 kernel option along with all related code.It is commented out in our default kernel config files for almost fiveyears now, since 9466f37df5258f3bc3d99ae43627a71c1c085e7d.Approved-by: dillonDragonfly-bug: <https://bugs.dragonflybsd.org/issues/2946>
kernel - Cleanup gcc warnings* Cleanup gcc warnings at higher optimization levels. This will allow us to build kernels -O2 or -O3.
mps(4): Add forgotten D_MPSAFE to dev_ops and use callout_init_mp().
mps(4): Remove unnecessary assignment (cam_calc_geometry() sets it).
kernel: Use callout_stop_sync() in a number of drivers.
kernel - Change time_second to time_uptime for all expiration calculations* Vet the entire kernel and change use cases for expiration calculations using time_second to use time_uptime instead.*
kernel - Change time_second to time_uptime for all expiration calculations* Vet the entire kernel and change use cases for expiration calculations using time_second to use time_uptime instead.* Protects these expiration calculations from step changes in the wall time, particularly needed for route table entries.* Probably requires further variable type adjustments but the use of time_uptime instead if time_second is highly unlikely to ever overrun any demotions to int still present.
kernel/raid: Match xpt_alloc_ccb() and xpt_free_ccb() for rescan callbacks.
kernel: Remove some more unused kmalloc types.M_MPSSASM_MPTUSERM_NETGRAPH_ITEMM_NWFSMNTM_PDUM_RDRANDM_SMBDATAM_SMBFSMNT
kernel/mps: Fix a panic after the recent upgrade.It was crashing in xpt_done() with a NULL ccb. Reverting FreeBSD'sr249468 fixes that.Something seems to be missing or different in our CAM here.
kernel - Sync numerous commits from FreeBSDSynchronize a bunch of commits from the FreeBSD tree. Commitids shown below are from the github FreeBSD repo.Several commits were not synchronized, th
kernel - Sync numerous commits from FreeBSDSynchronize a bunch of commits from the FreeBSD tree. Commitids shown below are from the github FreeBSD repo.Several commits were not synchronized, the main one being 3c7b39f7b5a4...(Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version).This one needs to be brought in.One other note, not yet fixed is an issue where the driver configuresmany more tags than the disk drive can actually support. In my testcase, 255 tags for a Seagate SAS disk that really only seems to support63. When large numbers of commands are queued, and even sometimes whennot, the drive becomes severely inefficient for reads and writes. Writebandwidth that is usually in the ~30-50 MB/s range drops to ~5 MB/s.Doing a camcontrol to reduce tags to ~16 or so seems to fix the issue.(camcontrol tags da0 -N 16), but we need a permanent solution for thisproblem.* 56527fa077227f78a92c9ebc6f4f35d1bc3e1c21 Bring in a number of mps(4) driver fixes from LSI: 1. Fixed timeout specification for the msleep in mps_wait_command(). Added 30 second timeout for mps_wait_command() calls in mps_user.c. 2. Make sure we call mps_detach_user() from the kldunload path. 3. Raid Hotplug behavior change. The driver now removes a volume when it goes to a failed state, so we also need to add volume back to the OS when it goes to opitimal/degraded/online from failed/missing. Handle raid volume add and remove from the IR_Volume event. 4. Added some more debugging information. 5. Replace xpt_async(AC_LOST_DEVICE, path, NULL) with mpssas_rescan_target(). This is to work around a panic in CAM that shows up when adding a drive with a rescan and removing another device from the driver thread with an AC_LOST_DEVICE async notification. This problem was encountered in testing with the LSI sas2ircu utility, which was used to create a RAID volume from physical disks. The driver has to create the RAID volume target and remove the physical disk targets, and triggered a panic in the process. The CAM issue needs to be fully diagnosed and fixed, but this works around the issue for now. 6. Fix some memory initialization issues in mps_free_command(). 7. Resolve the "devq freeze forever" issue. This was caused by the internal read capacity command issued in the non-head version of the driver. When the command completed with an error, the driver wasn't unfreezing thd device queue. The version in head uses the CAM infrastructure for getting the read capacity information, and therefore doesn't have the same issue. 8. Bump the version to 13.00.00.00-fbsd. (this is very close to LSI's internal stable driver 13.00.00.00)* ebc4133dca40744e7e5a2037e613bf403a16cc65 Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver probe routine. This will allow LSI to ship drivers that return BUS_PROBE_VENDOR to override the in-tree version of the driver.* dce65ce6be9088b0a0444b5f603e5f110a76e249 Set the max_lun field of the path inquiry CCB to 8. This allows LUNs greater than 0 to be probed. It can be increased later if need be. This brings back SVN rev 224973, which was inadvertently removed with the import of the LSI driver.* 4b86692e31efa1f09f72ff85635a3fdfe28368c5 (not synchronized) (Make the mps(4) module depend on the cam module)* 8473fac9559e9e3560fcd37c558101cd1718ba01 (originated from DragonFly) (Correct sizeof usage)* 3c7b39f7b5a4dac525c1cf3896051741096de47a (not synchronized - TODO!) (Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version)* 0069682926e482627d3f64225ad0ad6018023ce6 (not synchronized) Change the mps(4) driver to only scan a target if that is what is needed instead of scanning the full bus every time.* 5f97d83a2bb253e5fadfc217cb66c65542557a91 Fix a small memory leak in mpssas_get_sata_identify(). The change has been submitted upstream as well.* e5c6ca6783da2418a0046f43f47977f4534925d3 Fix kernel panic on `camcontrol reset` for specific target, caused by uninitialized cm_targ in mpssas_action_resetdev().* d35997f97e5bca6ac7e1dffebc4f7bc0bf4a168e Several fixes to allow firmware/BIOS flash access from user-level: Set max DMA segment size to 24bit, as MPI SGE supports it. Use mps_add_dmaseg() to add empty SGE instead of custom code. Tune endianness safety.* 8600cbb5b6ebb06db859c9e2c76d07be50b8ff6a Correct double "the the"* 5277f913de0e34474af844aed711a14c28c20d2b (not synchronized) (Add casts to unbreak the i386 PAE build for the mps(4) driver.)* f124bf985f4786c8ddd24f5127e7bf200d0396ad Don't lose the 255'th disk behind the initiator.* 3f7a414911a892c8c84206394eb643cbde706d20 (already synchronized) remove duplicate semicolons where possible.* bd7f0fa0bb4b7b0f87227e0c4d49a4bd9b113cf0 (not synchronized) (Reform the busdma API so that new types may be added without modifying...)* 8857575b13cf118cc89efb1b462dd314df09c180 (not applicable) (Replace the TDP_NOSLEEPING flag with a counter so that the)* 674a0b97f5232c5275bfd0394620e7809315c694 (not applicable) (Except one case mps(4) driver does not touch the data and works well...)* 3d32e6b10c85bbbaea953937412778787bba3629 MFprojects/camlock r248982: Stop abusing xpt_periph in random plases that really have no periph related* bf0ecb667034d07b6288c04623d895a0919377c0 Fix uninitialized warning in mps* 0389554b1afa82981e507befda68b56631251990 Fix NULL-dereference kernel panic in case of mps_attach() failure.* 9a638117821b8de32c1f05d7244562702b4155b6 Fix uninitialized memory reference in mps_read_config_page. It was ...
kernel: Use NULL for pointers in DRIVER_MODULE()s.
kernel - mps driver - Adjust M_NOWAIT -> M_INTWAIT.* This (and many other drivers) really should not be using M_NOWAIT, which can fail trivially even when memory is available. Use M_INTWAIT in
kernel - mps driver - Adjust M_NOWAIT -> M_INTWAIT.* This (and many other drivers) really should not be using M_NOWAIT, which can fail trivially even when memory is available. Use M_INTWAIT instead.
kernel: Use DEVMETHOD_END in the drivers.
Remove some duplicated semicolons (mostly in the kernel).
12