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 ...
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 some variables that are only set but never used.Reported-by: dcbDragonfly-bug: <https://bugs.dragonflybsd.org/issues/3019>
kernel: Add 'static' to some function definitions.The declarations already have it, so no functional difference.
amd(4): Remove duplicate assignment.
kernel: Use DEVMETHOD_END in the drivers.
kernel: Remove some unused variables in RAID and disk drivers.
kernel: Remove some bogus casts to the own type.
kernel: Remove newlines from the panic messages that have one.panic() itself will add a newline.
kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).This is just cosmetics for easier reading.
Put 4 more kernel files under -Werror (fix x86_64 warnings).
Sync CAM with FreeBSD using lockmgr locks instead of mutexes.Note: This is mostly a code sync with FreeBSD which improves stabilityin addition to the items listed below. This provides a framework
Sync CAM with FreeBSD using lockmgr locks instead of mutexes.Note: This is mostly a code sync with FreeBSD which improves stabilityin addition to the items listed below. This provides a framework forreleasing the mplock, but for now it's still there.Add an xpt_print function to reduce most of the xpt_print_path/printfpairs. Convert the core code to use it.Initial cut at Basic Domain Validation.Make cam_xpt's pronouncements match camcontrol (Tagged -> Command) Queueing.Pay attention to return value from xpt_bus_register in xpt_init.Add an xpt_rescan function and a thread that will field rescan requests.The purpose of this is to allow a SIM (or other entities) to request a busrescan and have it then fielded in a different (process) context from thecaller.Check the return value from cam_periph_acquire.Drop the periph/sim lock when calling disk_destroy().Drop the topology lock before calling the periph oninvalidate and dtorvectors.For the XPT_SASYNC_CB operation, only decouple the broadcast to the busand device lists instead of decoupling the whole operation. This avoidsproblems with SIMs going away.Split the camisr into per-SIM done queues. This optimizes the locking alittle bit and allows for direct dispatch of the doneq from certaincontexts that would otherwise face recursive locking problems.Zero the CCBs when mallocing them.Only schedule the xpt_finishconfig_task once.Eliminate the use of M_TEMP.Add a helper function for registering async callbacks.Release the bus reference that is acquired when doing a CAMIOCOMMAND ioctl.Zero scsi_readcapacity allocations so we can really tell if there hasbeen data returned.Remove duplicate includes and fix typos.Add a bunch of definitions and structures to support newer drivers.When probing a newly found device, don't automatically assume that thedevice supports retrieving a serial number. Instead, first query thelist of VPD pages it does support, and only query the serial number ifit's supported, else silently move on. This eliminates a lot of noiseduring verbose booting, and will likely eliminate the need for mostNOSERIAL quirks.Reduce diffs from FreeBSD.Obtained-from: FreeBSD
Make CAM_NEW_TRAN_CODE default.As previously mentioned, this makes a huge performance difference for oneof my disks, and future work depends on this change.Obtained-from: FreeBSD
Fixes for CAM_NEW_TRAN_CODE.This commit is taken from a FreeBSD changeset, and is not intended tobe comprehensive. Some drivers will still not compile/work with theCAM_NEW_TRAN_CODE option, but
Fixes for CAM_NEW_TRAN_CODE.This commit is taken from a FreeBSD changeset, and is not intended tobe comprehensive. Some drivers will still not compile/work with theCAM_NEW_TRAN_CODE option, but this opens the door for wider testing.Obtained-from: FreeBSD
Fix numerous spelling mistakes.
Rename printf -> kprintf in sys/ and add some defines where necessary(files which are used in userland, too).
Do a major clean-up of the BUSDMA architecture. A large number ofessentially machine-independant drivers use the structures and definitionsin machine-dependant directories that are really machine-
Do a major clean-up of the BUSDMA architecture. A large number ofessentially machine-independant drivers use the structures and definitionsin machine-dependant directories that are really machine-independant innature.Split <machine/bus_dma.h> into machine-depdendant and machine-independant partsand make the primary access run through <sys/bus_dma.h>.Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>. Theoptimizations related to bus_memio.h and bus_pio.h made a huge mess,introduced machine-specific knowledge into essentially machine-independantdrivers, and required specific #include file orderings to do their job.They may be reintroduced in some other form later on.Move <machine/resource.h> to <sys/bus_resource.h>. The contents of the fileis machine-independant or can be made a superset across many platforms.Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> andinclude <sys/bus.h> where necessary. Remove all #include's of<machine/resource.h> and <machine/bus.h>. That is, make the BUSDMAinfrastructure integral to I/O-mapped and memory-mapped accesses to devicesand remove a large chunk of machine-specific dependancies from drivers.bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.
Remove all occurences of double semicolons at the end of a line bysingle ones.Submitted-by: Bill Marquette <bill.marquette@gmail.com>
Remove the INTR_TYPE_* flags. The interrupt type is no longer used tofigure out which spl*() set an interrupt belongs to, because, well, spl'sno longer exist.
Remove *spl() from dev/disk/{advansys,aha,ahb,aic7xxx,amd} replacing them withcritical sections.
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough forour needs.Implement some generic atomic.h functions to aid in the implementation ofa low level mutex.Implement a generic low
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough forour needs.Implement some generic atomic.h functions to aid in the implementation ofa low level mutex.Implement a generic low level sleep-mutex serializer, kern/lwkt_serialize.c.The serializer is designed to be a replacement for SPL calls but may alsobe used for other very low level work (e.g. lockmgr interlocks).Add a serializer argument to BUS_SETUP_INTR(). When non-NULL, the interrupthandler will no longer be protected by an SPL so e.g. spl*() will nolonger protect against that device's interrupts.The IF queueing and dequeueing mechanisms may no longer depend on outsideSPL state because network driver interrupt handlers are no longer required toenter splnet(). Use critical sections for the moment. The IFQ andIFF_OACTIVE interactions are not yet MP safe.
Fix a boot panic with the amd device. We inherited some busdma code fromFreeBSD which now requires that bus_dmamap_create() be called, and theamd device was not doing that.Reported-by: "Robin P.
Fix a boot panic with the amd device. We inherited some busdma code fromFreeBSD which now requires that bus_dmamap_create() be called, and theamd device was not doing that.Reported-by: "Robin P. Blanchard" <robin.blanchard@gactr.uga.edu>
timeout/untimeout ==> callout_*
The cam_sim structure was being deallocated unconditionally by devicedriver detach routines. The problem with this is that part of the CAMbus structure may still be active (for example, with pendi
The cam_sim structure was being deallocated unconditionally by devicedriver detach routines. The problem with this is that part of the CAMbus structure may still be active (for example, with pending timeout()'s),and even though the bus, target, and device is freed, since the sim ISfreed any accesses through the sim will hit 0xdeadc0de. This case most oftenoccurs with USB UMASS devices.The CAM_XPT and CAM_SIM layer has been revamped. CAM_DEV_UNCONFIGURED is nowaccounted for in the device->refcount, and the cam_sim structure is nowref-counted as well. Additionally, the cam_simq* code which handles thedevice queues has been revamped to refcount as well, so shared device queues(raid and multi-channel devices) are not free()'d before all references havegone away.scsi_low free'd its cam_sim twice. Fixed.USB was improperly using M_NOWAIT. All M_NOWAIT instances have been renamedto M_INTWAIT.
kernel tree reorganization stage 1: Major cvs repository work (not logged ascommits) plus a major reworking of the #include's to accomodate therelocations. * CVS repository files manually move
kernel tree reorganization stage 1: Major cvs repository work (not logged ascommits) plus a major reworking of the #include's to accomodate therelocations. * CVS repository files manually moved. Old directories left intact and empty (temporary). * Reorganize all filesystems into vfs/, most devices into dev/, sub-divide devices by function. * Begin to move device-specific architecture files to the device subdirs rather then throwing them all into, e.g. i386/include * Reorganize files related to system busses, placing the related code in a new bus/ directory. Also move cam to bus/cam though this may not have been the best idea in retrospect. * Reorganize emulation code and place it in a new emulation/ directory. * Remove the -I- compiler option in order to allow #include file localization, rename all config generated X.h files to use_X.h to clean up the conflicts. * Remove /usr/src/include (or /usr/include) dependancies during the kernel build, beyond what is normally needed to compile helper programs. * Make config create 'machine' softlinks for architecture specific directories outside of the standard <arch>/include. * Bump the config rev. WARNING! after this commit /usr/include and /usr/src/sys/compile/* should be regenerated from scratch.
12