Add PNP info to PCI attachments of cbb, cxgb, ida, iwn, ixl, ixlv,mfi, mps, mpr, mvs, my, oce, pcn, ral, rl. This only labels existingpci device tables, and has no probe / attach code changes.Rev
Add PNP info to PCI attachments of cbb, cxgb, ida, iwn, ixl, ixlv,mfi, mps, mpr, mvs, my, oce, pcn, ral, rl. This only labels existingpci device tables, and has no probe / attach code changes.Reviewed by: imp, chuckSubmitted by: Lakhan Shiva Kamireddy <[email protected]>Sponsored by: Google, Inc. (GSoC 2018)Approved by: re (glen)
show more ...
kernel: Fix several typos and minor errors- duplicate words- typos- references to old versions of FreeBSDReviewed by: imp, benno
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 - error
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.
Remove dead mentions of CAM target mode APIs from drivers.This makes grepping kernel for target mode implementation much easier.
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/c
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq arefixed-length strings. AFAICT the only place they're read is insbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.However, the kernel doesn't null-terminate them. A bunch of copy-pasted codeuses strncpy to write them, and doesn't guarantee null-termination. For atleast 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actuallyoverflows. You can see the result by doing "camcontrol negotiate da0 -v".This change null-terminates those fields everywhere they're set in thekernel. It also shortens a few strings to ensure they'll fit within the16-character field.PR: 215474Reported by: CoverityCID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187CID: 1010035 1010036 1010042 1010041 1010040 1010039Reviewed by: imp, sephe, slmMFC after: 4 weeksSponsored by: Spectra Logic CorpDifferential Revision: https://reviews.freebsd.org/D9037Differential Revision: https://reviews.freebsd.org/D9038
sys/dev: minor spelling fixes.Most affect comments, very few have user-visible effects.
Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIMcan handle it, and add the code to add it to the FIS that's sent tothe drive. The mvs driver is the only other ATA driver in the
Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIMcan handle it, and add the code to add it to the FIS that's sent tothe drive. The mvs driver is the only other ATA driver in the system,and its hardware doesn't appear to support setting the Auxiliaryregister.Differential Revision: https://reviews.freebsd.org/D5598
Replace 0 with NULL for pointers in misc. device drivers.Found with devel/coccinelle.
Cleanup unnecessary semicolons from the kernel.Found with devel/coccinelle.
Fix some more long -> rman_res_tReported by: Michael Butler (siis breakage)
Convert rman to use rman_res_t instead of u_longSummary:Migrate to using the semi-opaque type rman_res_t to specify rman resources. Fornow, this is still compatible with u_long.This is step on
Convert rman to use rman_res_t instead of u_longSummary:Migrate to using the semi-opaque type rman_res_t to specify rman resources. Fornow, this is still compatible with u_long.This is step one in migrating rman to use uintmax_t for resources instead ofu_long.Going forward, this could feasibly be used to specify architecture-specificdefinitions of resource ranges, rather than baking a specific integer type intothe API.This change has been broken out to facilitate MFC'ing drivers back to 10 withoutbreaking ABI.Reviewed By: jhbSponsored by: Alex Perez/Inertial ComputingDifferential Revision: https://reviews.freebsd.org/D5075
Reduce priority of ATA/SATA drivers.Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY; more functional ahci(4), siis(4),mvs(4) -> BUS_PROBE_DEFAULT; BUS_PROBE_VENDOR leave for vendor drivers.MFC after:
Reduce priority of ATA/SATA drivers.Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY; more functional ahci(4), siis(4),mvs(4) -> BUS_PROBE_DEFAULT; BUS_PROBE_VENDOR leave for vendor drivers.MFC after: 2 weeks
Fix SATA Gen3 speed constants.MFC after: 1 week
Prevent overflow issues in timeout processingPreviously, any timeout value for which (timeout * hz) will overflow thesigned integer, will give weird results, since callout(9) routines willconvert
Prevent overflow issues in timeout processingPreviously, any timeout value for which (timeout * hz) will overflow thesigned integer, will give weird results, since callout(9) routines willconvert negative values of ticks to '1'. For unsigned integer overflow wewill get sufficiently smaller timeout values than expected.Switch from callout_reset, which requires conversion to int based ticksto callout_reset_sbt to avoid this.Also correct isci to correctly resolve ccb timeout.This was based on the original work done by Eygene Ryabinkin<[email protected]> back in 5 Aug 2011 which used a macro to help avoidthe overlow.Differential Revision: https://reviews.freebsd.org/D1157Reviewed by: mav, davideMFC after: 1 monthSponsored by: Multiplay
Initialize variables before resource_int_value().Submitted by: Dmitry Luhtionov <[email protected]>
Don't bother clearing maps for static DMA allocations to NULL. Instead,leave them as purely opaque values that are only set by bus_dmamem_alloc().
Follow r261352 by updating all drivers which are children of simplebusto check the status property in their probe routines.Simplebus used to only instantiate its children whose status="okay"but t
Follow r261352 by updating all drivers which are children of simplebusto check the status property in their probe routines.Simplebus used to only instantiate its children whose status="okay"but that was improper behavior, fixed in r261352. Now that it doesn'tcheck anymore and probes all its children; the children all have todo the check because really only the children know how to properlyinterpret their status property strings.Right now all existing drivers only understand "okay" versus something-that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisshifts into the sign bit. Instead use (1U << 31) which gets theexpected result.This fix is not ideal as it assumes a 32 bi
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisshifts into the sign bit. Instead use (1U << 31) which gets theexpected result.This fix is not ideal as it assumes a 32 bit int, but does fix the issuefor most cases.A similar change was made in OpenBSD.Discussed with: -arch, rdivackyReviewed by: cperciva
Run mvs SATA driver on Armada XP instead of old mv_sataThe mvs driver seems to be more functional than mv_sata and is notcausing random interrupt storms during boot.
Merge CAM locking changes from the projects/camlock branch to radicallyreduce lock congestion and improve SMP scalability of the SCSI/ATA stack,preparing the ground for the coming next GEOM direct
Merge CAM locking changes from the projects/camlock branch to radicallyreduce lock congestion and improve SMP scalability of the SCSI/ATA stack,preparing the ground for the coming next GEOM direct dispatch support.Replace big per-SIM locks with bunch of smaller ones: - per-LUN locks to protect device and peripheral drivers state; - per-target locks to protect list of LUNs on target; - per-bus locks to protect reference counting; - per-send queue locks to protect queue of CCBs to be sent; - per-done queue locks to protect queue of completed CCBs; - remaining per-SIM locks now protect only HBA driver internals.While holding LUN lock it is allowed (while not recommended for performancereasons) to take SIM lock. The opposite acquisition order is forbidden.All the other locks are leaf locks, that can be taken anywhere, but shouldnot be cascaded. Many functions, such as: xpt_action(), xpt_done(),xpt_async(), xpt_create_path(), etc. are no longer require (but allow) SIMlock to be held.To keep compatibility and solve cases where SIM lock can't be dropped, allxpt_async() calls in addition to xpt_done() calls are queued to completionthreads for async processing in clean environment without SIM lock held.Instead of single CAM SWI thread, used for commands completion processingbefore, use multiple (depending on number of CPUs) threads. Load balancedbetween them using "hash" of the device B:T:L address.HBA drivers that can drop SIM lock during completion processing and havesufficient number of completion threads to efficiently scale to multipleCPUs can use new function xpt_done_direct() to avoid extra context switch.Make ahci(4) driver to use this mechanism depending on hardware setup.Sponsored by: iXsystems, Inc.MFC after: 2 months
Replicate r242422 from ata(4) to mvs(4):Only four specific ATA PIO commands transfer several sectors per DRQ block(interrupt). All other ATA PIO commands transfer one sector or 512 bytesat one ti
Replicate r242422 from ata(4) to mvs(4):Only four specific ATA PIO commands transfer several sectors per DRQ block(interrupt). All other ATA PIO commands transfer one sector or 512 bytesat one time. Hardcode these exceptions in mvs(4) with ATA_CAM option.This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.Also it fixes timeout of DOWNLOAD_MICROCODE on `camcontrol fwdownload`.
Make siis(4) and mvs(4) send bus_get_dma_tag() requests to parent busespassing real bus' child pointers instead of grandchilds.Requested by: kib
Reform the busdma API so that new types may be added without modifyingevery architecture's busdma_machdep.c. It is done by unifying thebus_dmamap_load_buffer() routines so that they may be called
Reform the busdma API so that new types may be added without modifyingevery architecture's busdma_machdep.c. It is done by unifying thebus_dmamap_load_buffer() routines so that they may be called from MIcode. The MD busdma is then given a chance to do any final processingin the complete() callback.The cam changes unify the bus_dmamap_load* handling in cam drivers.The arm and mips implementations are updated to track virtualaddresses for sync(). Previously this was done in a type specificway. Now it is done in a generic way by recording the list ofvirtuals in the map.Submitted by: jeff (sponsored by EMC/Isilon)Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes)Discussed with: ian (arm changes)Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <[email protected]>)
Add support for Marvell 88F6282.Sponsored by: Plat'Home, Co.,Ltd.
- Limit r214102 workaround to only x86. On arm it causes more problemsthen solves because of cache coherency issues. This fixes periodic errormessages on console and command timeouts. - Patch SATA
- Limit r214102 workaround to only x86. On arm it causes more problemsthen solves because of cache coherency issues. This fixes periodic errormessages on console and command timeouts. - Patch SATA PHY configuration for 65nm SoCs to improve SNR same asLinux does.MFC after: 2 weeks
12