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 ...
ahci - sili - Reduce insertion delay from 10 seconds to 5* Reduce the insertion delay for hot-plug from 10 seconds to 5 seconds.
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: Remove unused *.h files from SRCS in kernel module Makefiles.They were found by checking the preprocessed code of the filesin SRCS to see if the header was included at some point.After r
kernel: Remove unused *.h files from SRCS in kernel module Makefiles.They were found by checking the preprocessed code of the filesin SRCS to see if the header was included at some point.After removal, the preprocessed source of a build with the oldMakefiles was compared against one with the changes (for variouskernel configurations and when building just from /usr/src) toverify that the commit leads to no functional change.
kernel/disk: Remove use of "%b" format.Switch to args safe "%pb%i" internal format.
sili: Add MSI support; not enabled by defaultMSI does not seem to work at all on 3132, sigh
kernel: Generate miidevs.h, pccarddevs.h and pcidevs.h on the fly.It removes the need to regenerate those header file after first editingthe associated list of IDs (miidevs, pccarddevs or pcidevs)
kernel: Generate miidevs.h, pccarddevs.h and pcidevs.h on the fly.It removes the need to regenerate those header file after first editingthe associated list of IDs (miidevs, pccarddevs or pcidevs). After thiscommit, editing the list alone is enough to add IDs.We already did it like that for usb4bsd's usbdevs.h before. This commitadjusts things for the remaining ID lists.
sili(4): Maximum I/O size is 256KB
kernel: Use DEVMETHOD_END in the drivers.
kernel/disk: Remove some unused variables and add __debugvar.
kernel: Remove unneeded #include <sys/devicestat.h> in disk/RAID drivers.
ahci(4)/sili(4): Fix for drives >2TB.CAM will issue the 16 byte version of the READ CAPACITY command whenmaxsector is 0xffffffff:----- scsi_da.c -----if (maxsector == 0xffffffff) { softc->stat
ahci(4)/sili(4): Fix for drives >2TB.CAM will issue the 16 byte version of the READ CAPACITY command whenmaxsector is 0xffffffff:----- scsi_da.c -----if (maxsector == 0xffffffff) { softc->state = DA_STATE_PROBE2; kfree(rdcap, M_SCSIDA); xpt_release_ccb(done_ccb); xpt_schedule(periph, /*priority*/5); return;}---------------------However, we are subtracting 1 from it (presumably because it's a "lastsector on the device" value starting at 0) so in CAM, it ended up being0xfffffffe, resulting in disks attached via ahci(4) and sili(4) to belimited to 2TB.To fix, set the local var to 0 in this case, so that after subtracting 1from the value (cast to 32 bit) CAM gets 0xffffffff.Fix-by: dillon
kernel: Remove NULL checks after kmalloc() with M_WAITOK.
kernel - Fix bug in SILI, remove debugging in AHCI* Fix the same unlock/lock sequence bug in the SILI driver that was fixed in the AHCI driver.* Remove a flag that was being added to the servic
kernel - Fix bug in SILI, remove debugging in AHCI* Fix the same unlock/lock sequence bug in the SILI driver that was fixed in the AHCI driver.* Remove a flag that was being added to the service set in AHCI for debugging purposes.
kernel/sili: Actually print the generation.
kernel - Fix SILI callout timer race* Do similar fix for SILI that we did for AHCI.* callout_stop_sync() can block. If this occurs a race can cause a CCB to be processed for completion twice.
kernel - Fix SILI callout timer race* Do similar fix for SILI that we did for AHCI.* callout_stop_sync() can block. If this occurs a race can cause a CCB to be processed for completion twice.* Add a serial number to detect this situation.* If the serial number does not match after the timeout is stopped we don't want to mess with the xa at all.Tested-by: lentferj
ahci(4)/sili(4): Fix some comments.Submitted-by: Johannes Hofmann <johannes.hofmann@gmx.de>Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/1692>
Remove empty DragonFly CVS IDs.
kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).This is just cosmetics for easier reading.
kernel: Remove some redundant .PATH targets.
kernel - Change ccb state with lock held* When putting a CCB back into the ap_ccb_free list do not change the state until after ap_ccb_lock has been acquired.
kernel - Fix CAM tag reservation for AHCI and SILI driver* These drivers were adjusting the number of available tags upward using the wrong CAM call, which resulted in CAM not actually queueing
kernel - Fix CAM tag reservation for AHCI and SILI driver* These drivers were adjusting the number of available tags upward using the wrong CAM call, which resulted in CAM not actually queueing multiple tags. Use the correct call.* With the issue fix and verified up to a combined 31 read and write requests can now be queued in parallel to a SATA drive via the AHCI driver. It does appear to make a difference.
kernel: Remove most definitions of CDEV_MAJOR.These are no longer needed since we have devfs.A few are left in because they are added to the order in SYSINIT()s.This needs further investigation.
kernel - unwind kthread_create() mplock* All kthread_create*() calls and kproc_start() calls now create threads which do not hold the mplock at startup.* Add get_mplock()/rel_mplock() to thread
kernel - unwind kthread_create() mplock* All kthread_create*() calls and kproc_start() calls now create threads which do not hold the mplock at startup.* Add get_mplock()/rel_mplock() to threads which are not yet mpsafe.* Remove rel_mplock() calls from thread startups which were making themselves mpsafe by releasing the mplock.* Kernel eventhandler API is now MPSAFE* Kernel kproc API is now MPSAFE* Rename a few thread procedures to make their function more obvious.
12