aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata
Commit message (Collapse)AuthorAgeFilesLines
* sys: Use is_pci_device instead of direct comparisons to devclassesJohn Baldwin37 hours1-2/+1
| | | | | | Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56997
* pmap_quick_(enter|remove)_page: Use void * instead of vm_offset_tJohn Baldwin2026-04-231-12/+12
| | | | | | | Effort: CHERI upstreaming Reviewed by: kib Sponsored by: AFRL, DARPA Pull Request: https://github.com/freebsd/freebsd-src/pull/2068
* ata-serverworks: Fix incorrect port count for BCM5770 SATA controllerDmitry Borisov2026-01-091-2/+2
| | | | | | | | The 1166:0241 PCI device has 8 ports instead of 4. Signed-off-by: Dmitry Borisov <di.sean@protonmail.com> Reviewed by: imp, jlduran Pull Request: https://github.com/freebsd/freebsd-src/pull/1883
* bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHODJohn Baldwin2025-12-092-7/+7
| | | | | | | | | The wrapper functions such as bus_alloc_resource_any() still support passing the rid by value or pointer, but the underlying implementation now passes by value. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53402
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-1125-25/+28
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* Use bus_generic_detach instead of device_delete_children in detachJohn Baldwin2025-01-021-1/+4
| | | | | | | While here, check for errors from bus_generic_detach and move it to the start of detach if necessary. Differential Revision: https://reviews.freebsd.org/D47969
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-063-3/+3
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-252-2/+2
| | | | Sponsored by: Netflix
* ata: Use device_set_descf()Mark Johnston2024-06-025-32/+22
| | | | | | No functional change intended. MFC after: 1 week
* new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCEJohn Baldwin2024-03-132-11/+7
| | | | | | | | | | The public bus_release_resource() API still accepts both forms, but the internal kobj method no longer passes the arguments. Implementations which need the rid or type now use rman_get_rid() or rman_get_type() to fetch the value from the allocated resource. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44131
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-2727-27/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* ata: Retire unused variable / externsWarner Losh2023-11-242-6/+1
| | | | | | | When looking for something else, I noticed these are no longer used anywhere. Sponsored by: Netflix
* Add IDs for Intel BayTrail SATA.Dmitry Luhtionov2023-10-302-0/+5
|
* arm: prune imx5 support from the treeKyle Evans2023-10-271-234/+0
| | | | | | | | | | | | | | | | | The IMX5 configs were removed in advance of FreeBSD 14.0 in cdb0c2a73df ("arm: Remove IMX5 specific kernel configs"). This code isn't built with GENERIC and doesn't actually build today as-is, so let's remove it to avoid needless maintenance work to it that won't be tested. As usual, revival is welcome with a committed user and work to maintain it with upstream DTS and, ideally, in GENERIC. I note that vt_early_fb is now effectively orphaned as nothing else will use it, but I haven't yet removed it since I have not done anything to ascertain if it could be integrated easily enough for other SoC. It is among the files that doesn't actually build with today's clang, though. Reviewed by: imp, manu Differential Revision: https://reviews.freebsd.org/D41836
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1628-56/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1230-30/+30
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* ata(4): Fix a typo in a source code commentGordon Bergling2022-07-031-1/+1
| | | | | | - s/fuctions/functions/ MFC after: 3 days
* Remove unused ata_pci_devclass.John Baldwin2022-05-063-8/+3
|
* ata: Remove ata_devclass from DRIVER_MODULE invocations.John Baldwin2022-05-063-3/+4
| | | | | | | Keep the global variable for its uses in ata-pci.c and chipsets/ata-fsl.c but initialize it in the existing ata_module_event_handler. Move the module event handler a bit earlier to ensure the variable is set before any devices are attached.
* ata-fsl: Remove unused variable.John Baldwin2022-04-131-4/+0
|
* ata-promise: kill lenght, it's set but never usedWarner Losh2021-12-141-2/+1
| | | | Sponsored by: Netflix
* Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrightsEd Maste2021-08-081-1/+0
| | | | | | | These ones were unambiguous cases where the Foundation was the only listed copyright holder (in the associated license block). Sponsored by: The FreeBSD Foundation
* newbus: Move from bus_child_{pnpinfo,location}_src to ↵Warner Losh2021-06-233-8/+7
| | | | | | | | | | | | | | | | | | | | | | bus_child_{pnpinfo,location} with sbuf Now that the upper layers all go through a layer to tie into these information functions that translates an sbuf into char * and len. The current interface suffers issues of what to do in cases of truncation, etc. Instead, migrate all these functions to using struct sbuf and these issues go away. The caller is also in charge of any memory allocation and/or expansion that's needed during this process. Create a bus_generic_child_{pnpinfo,location} and make it default. It just returns success. This is for those busses that have no information for these items. Migrate the now-empty routines to using this as appropriate. Document these new interfaces with man pages, and oversight from before. Reviewed by: jhb, bcr Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29937
* pccard: Remove ata(4) PC Card attachemntWarner Losh2021-01-081-189/+0
| | | | | | Remove ata PC Card attachment. Relnotes: Yes
* Make MAXPHYS tunable. Bump MAXPHYS to 1M.Konstantin Belousov2020-11-283-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys. Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value. Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work. Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav. Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225 Notes: svn path=/head/; revision=368124
* ata(4): Release the ioport resource if device initialization failsMark Johnston2020-11-241-1/+5
| | | | | | | | | PR: 251346 Submitted by: janm@transactionware.com MFC after: 1 week Notes: svn path=/head/; revision=367989
* ata: clean up empty lines in .c and .h filesMateusz Guzik2020-09-0115-30/+13
| | | | Notes: svn path=/head/; revision=365115
* Tag pccard drivers with gone in 13.Warner Losh2020-08-201-0/+1
| | | | | | | | | MFC After: 3 days Reviewed by: emaste, brooks, adrian (on twitter) Differential Revision: https://reviews.freebsd.org/D26095 Notes: svn path=/head/; revision=364430
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+2
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Remove sparc64 kernel supportWarner Losh2020-02-032-16/+0
| | | | | | | | | Remove all sparc64 specific files Remove all sparc64 ifdefs Removee indireeect sparc64 ifdefs Notes: svn path=/head/; revision=357455
* Avoid a tautological bitwise compare.Brooks Davis2019-12-171-1/+1
| | | | | | | | | | | | | | This looks like a bit of debugging code that sliped into the initial import of the new ATA framework. This changes the behavior to omit a line of output that appears to have been intended for omission. Reviewed by: mav MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22845 Notes: svn path=/head/; revision=355830
* Use a void * argument to callout handlers instead of timeout_t casts.John Baldwin2019-12-053-3/+5
| | | | | | | | Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D22684 Notes: svn path=/head/; revision=355426
* GC ATA_REQUEST_TIMEOUT option remnantsAndriy Voskoboinyk2019-02-161-4/+0
| | | | | | | | | | It was removed from code in r249083 and from sys/conf/options in r249213. PR: 222170 MFC after: 3 days Notes: svn path=/head/; revision=344198
* Reset indentiation of ata_suspend() such that its clear we fall throughSean Bruno2018-07-031-7/+7
| | | | | | | | | | this function and that we aren't supposed to be controlled by the first if() conditional. Found with gcc. No functional change is intended with this commit. Notes: svn path=/head/; revision=335896
* Reset indentation of this flag. No functional change intended.Sean Bruno2018-07-031-1/+1
| | | | | | | | | | | | | | | | Found with gcc. sys/dev/ata/chipsets/ata-siliconimage.c: In function 'ata_cmd_ch_attach': sys/dev/ata/chipsets/ata-siliconimage.c:187:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (ctlr->chip->cfg2 & SII_INTR) ^~ sys/dev/ata/chipsets/ata-siliconimage.c:190:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' ch->flags |= ATA_NO_ATAPI_DMA; Notes: svn path=/head/; revision=335894
* Add ready polling after PHY reset on VIA SATA controllers.Alexander Motin2018-05-231-2/+19
| | | | | | | | | | | | | | | | According to PR there are cases of controller hang if soft reset is sent before device report ready status after the hard reset. I don't think this patch is perfect, but it was reported as working by the submitter, and I have neither the old hardware nor interest to test some improved version, so just done some style cleaning. PR: 183294 Submitted by: alexandre.martins@netasq.com MFC after: 1 month Notes: svn path=/head/; revision=334099
* Add ISA PNP tables to ISA drivers. Fix a few incidental comments.Warner Losh2018-01-291-0/+1
| | | | | | | ACPI ISA PBP tables not tagged, there's bigger issues with them. Notes: svn path=/head/; revision=328524
* Fix typoEitan Adler2017-11-301-1/+1
| | | | | | | Reported by: mjg, zrj@dragonflybsd.org Notes: svn path=/head/; revision=326387
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2731-0/+62
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Use "Ibex Peak" codename for "5 Series/3400 Series" chipsets.Alexander Motin2017-08-092-12/+12
| | | | | | | | | This is shorter and unifies naming with later chipsets. MFC after: 1 week Notes: svn path=/head/; revision=322309
* Remove dead mentions of CAM target mode APIs from drivers.Alexander Motin2017-02-191-4/+0
| | | | | | | This makes grepping kernel for target mode implementation much easier. Notes: svn path=/head/; revision=313949
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-282-355/+0
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)Alan Somers2017-01-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v". This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field. PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 Reviewed by: imp, sephe, slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9037 Differential Revision: https://reviews.freebsd.org/D9038 Notes: svn path=/head/; revision=311305
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-033-3/+3
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Implement Auxiliary register. Add PIM_ATA_EXT flag to flag that a SIMWarner Losh2016-04-171-0/+6
| | | | | | | | | | | | can handle it, and add the code to add it to the FIS that's sent to the drive. The mvs driver is the only other ATA driver in the system, and its hardware doesn't appear to support setting the Auxiliary register. Differential Revision: https://reviews.freebsd.org/D5598 Notes: svn path=/head/; revision=298143
* Cleanup unnecessary semicolons from the kernel.Pedro F. Giffuni2016-04-101-1/+1
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297793
* Small typo.Pedro F. Giffuni2016-03-291-1/+1
| | | | Notes: svn path=/head/; revision=297402
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits2016-02-273-16/+16
| | | | | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137