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: Rename BUILDING_WITH_KERNEL to KERNBUILDDIR.Fits better with e.g. KERNCONFDIR.Add a small paragraph in kmod.mk which was taken from FreeBSD.
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: Use DEVMETHOD_END in the drivers.
kernel/disk: Remove some unused variables and add __debugvar.
kernel: Use NULL instead of 0 for pointers, part 1/x.Found-with: Coccinelle (http://coccinelle.lip6.fr/)
kernel: Remove some bogus casts to the own type.
kernel: Use ${.TARGET} in module Makefiles.
kernel: Use NULL for DRIVER_MODULE()'s evh & arg (which are pointers).This is just cosmetics for easier reading.
Remove useless .PATH targets from kernel module Makefiles.All these came in from FreeBSD which keeps their module Makefiles insys/modules (that is, separate from the source). We don't, so they are
Remove useless .PATH targets from kernel module Makefiles.All these came in from FreeBSD which keeps their module Makefiles insys/modules (that is, separate from the source). We don't, so they arenot needed.
Eliminate some dead initialization.Found-by: LLVM/Clang Static Analyzer
Fix comment.
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
Sync with FreeBSD:CAM_NEW_TRAN_CODE fixes.Remove unneeded includes and add missing ones.Use BUS_PROBE_DEFAULT in preference to 0.Call trm_Interrupt() in trm_poll(). This fixes the lock at reb
Sync with FreeBSD:CAM_NEW_TRAN_CODE fixes.Remove unneeded includes and add missing ones.Use BUS_PROBE_DEFAULT in preference to 0.Call trm_Interrupt() in trm_poll(). This fixes the lock at reboot time somepeople reported in FreeBSD.Use bus_alloc_resource_any(9).Use one bus_dma_tag_t for all pSRB instead of creating one for each.Free what is allocated for pSRBs at unload time or if something bad happens.Do not test if pDCB is not NULL, we dereference it before anyway, and itshould not happen. Add a KASSERT instead.Mark trm as depending on cam.Use PCIR_BAR(x) instead of PCIR_MAPS.Remove two useless bzero() calls.Use cam_calc_geometry.Indentation/style fixes.Add support for Tekram DC395U2W cards.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
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>.
Rename malloc->kmalloc, free->kfree, and realloc->krealloc. Pass 2
Remove all occurences of double semicolons at the end of a line bysingle ones.Submitted-by: Bill Marquette <bill.marquette@gmail.com>
* Ansify function definitions.* Minor style cleanup.Submitted-by: Alexey Slynko <slynko@tronet.ru>
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.
spl->critical section conversion.
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.
12