summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
Commit message (Collapse)AuthorAgeFilesLines
* MFC r290855: Increase reset assertion time from 10 to 100us.mav2015-11-291-1/+1
| | | | | | | | | On my own tests I see no effect from this change, but I also can't reproduce the reported problem in general. PR: 127391 PR: 204554 Submitted by: satz@iranger.com
* MFC r286814, r286816: Remove UMA allocation of ATA requests.mav2015-08-292-36/+3
| | | | | | After CAM replaced old ATA stack, this driver processes no more then one request at a time per channel. Using UMA after that is overkill, so replace it with simple preallocation of one request per channel.
* MFC r286448: Disable 32-bit PIO for 6Gbit/s Intel SATA controllers.mav2015-08-222-21/+24
| | | | | | | | | | | For some reason 32-bit PIO writes are not working on 6Gbit/s Intel SATA ports, while 16/32-bit PIO reads and 16-bit PIO writes are working fine. 3Gbit/s ports on the same controllers have no this problem. Workaround this by disabling 32-bit PIO for all Intel controllers that may have 6Gbit/s ports. It halves PIO performance from 6MB/s to 3MB/s, but who bother about speed of such rare and slow mode, which is also highly discouraged by SATA specifications?
* MFC r280451:mav2015-08-2212-2485/+16
| | | | | | | Remove from legacy ata(4) driver support for hardware, supported by newer and more functional drivers ahci(4), siis(4) and mvs(4). This removes about 3400 lines of code, unused since FreeBSD 9.0 release.
* MFC r280393: Reduce priority of ATA/SATA drivers.mav2015-04-0624-24/+24
| | | | | 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 r279963: Fix SATA Gen3 speed constants.mav2015-03-201-1/+2
|
* MFC r275101:mav2014-12-032-0/+25
| | | | Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.
* MFC r273328: Add another PCI ID for JMB368 PATA controller.mav2014-10-272-0/+2
|
* MFC: r268095marius2014-07-041-1/+1
| | | | | | Actually pro AMD chipsets, making r244146 work. Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC 264389: Fix the style of ata_interrupt_locked().ian2014-05-171-13/+11
|
* MFC 264180, 264181, 264182:ian2014-05-171-1/+2
| | | | | | | | Follow files.imx51 and add vt support for imx53. Add fsl,imx53 compatible string. Need to include machine/fdt.h in vt_early_fb.c
* MFC r261410ian2014-05-151-0/+3
| | | | | Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
* MFC Alexander Motin's direct dispatch, multi-queue, and finer-grainedscottl2014-01-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | locking support for CAM r256826: Fix several target mode SIMs to not blindly clear ccb_h.flags field of ATIO CCBs. Not all CCB flags there belong to them. r256836: Remove hard limit on number of BIOs handled with one ATA TRIM request. r256843: Merge CAM locking changes from the projects/camlock branch to radically reduce lock congestion and improve SMP scalability of the SCSI/ATA stack, preparing the ground for the coming next GEOM direct dispatch support. r256888: Unconditionally acquire periph reference on CCB allocation failure. r256895: Fix memory and references leak due to unfreed path. r256960: Move CAM_UNQUEUED_INDEX setting to the last moment and under the periph lock. This fixes race condition with cam_periph_ccbwait(), causing use-after-free. r256975: Minor (mostly cosmetical) addition to r256960. r257054: Some microoptimizations for da and ada drivers: - Replace ordered_tag_count counter with single flag; - From da remove outstanding_cmds counter, duplicating pending_ccbs list; - From da_softc remove unused links field. r257482: Fix lock recursion, triggered by `smartctl -a /dev/adaX`. r257501: Make getenv_*() functions and respectively TUNABLE_*_FETCH() macros not allocate memory and so not require sleepable environment. getenv() has already used on-stack temporary storage, so just use it more rationally. getenv_string() receives buffer as argument, so don't need another one. r257914: Some CAM locks polishing: - Fix LOR and possible lock recursion when handling high-power commands. Introduce new lock to protect left power quota and list of frozen devices. - Correct locking around xpt periph creation. - Remove seems never used XPT_FLAG_OPEN xpt periph flag. Again, Netflix assisted with testing the merge, but all of the credit goes to Alexander and iX Systems. Submitted by: mav Sponsored by: iX Systems
* MFC r258162:mav2014-01-052-0/+27
| | | | Add some more IDs for Intel ATA, AHCI and USB controllers.
* MFC r256304grehan2013-10-112-2/+2
| | | | | | | Allow the legacy CDROM device to be accessed in a FreeBSD guest, while still using enlightened drivers for other block devices. Approved by: re@ (gjb)
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-121-4/+1
| | | | | | | | | | | | | | | | | command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
* Add missing NULL check after malloc(M_NOWAIT).mav2013-07-251-0/+4
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices.jfv2013-07-192-0/+7
| | | | MFC after: 1 week
* Add test for SATA registers writability and skip using them if it failed.mav2013-06-251-5/+30
| | | | | | | | | | There are some systems reported, where PCI BAR(5), used for SATA registers access, is present, but not functional. Attempt to use it brakes devices detection logic. Try to detect those cases on attach by setting and testing some bits in SControl register. If bits are unsettable, fallback to legacy ATA without hot-plug detection, speed control/reporting, etc. MFC after: 2 weeks
* Pass proper memory type to free() in ata_ali_chipinit().mav2013-06-181-1/+1
| | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week
* Fix several typoseadler2013-05-121-1/+1
| | | | | | PR: kern/176054 Submitted by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days
* Usnure that PCI bus BIS_GET_DMA_TAG() method sees the actual PCIkib2013-04-141-0/+8
| | | | | | | | | | | device which makes the request for dma tag, instead of some descendant of the PCI device, by creating a pass-through trampoline for vga_pci and ata_pci buses. Sponsored by: The FreeBSD Foundation Suggested by: jhb Discussed with: jhb, mav MFC after: 1 week
* - With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) relatedmarius2013-04-0631-35/+3
| | | | | | | | | option left but actually consumed by ada(4), so move it to opt_ada.h and get rid of opt_ata.h. - Fix stand-alone build of atacore(4) by adding opt_cam.h. - Use __FBSDID. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
* - Make ata_str2mode() static, it's not used outside of ata-all.c.marius2013-04-064-195/+153
| | | | | | | | | | - Move ata_timeout() to ata-all.c so we don't need to expose both this function and ata_cam_end_transaction() but only the former. - Move ata_cmd2str() from ata-queue.c to ata-all.c so we can get rid of the former. - Add some missing prototypes. MFC after: 3 days
* Remove some more remnants of !ATA_CAM.marius2013-04-061-11/+0
|
* Unbreak ATA_NO_48BIT_DMA with ATA_CAM by treating 48-bit DMA as anmarius2013-04-061-7/+23
| | | | | | | optional property with PATA transport. Reviewed by: mav MFC after: 3 days
* Remove all legacy ATA code parts, not used since options ATA_CAM enabled inmav2013-04-0428-13814/+2
| | | | | | | | | most kernels before FreeBSD 9.0. Remove such modules and respective kernel options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the atacontrol utility and some man pages. Remove useless now options ATA_CAM. No objections: current@, stable@ MFC after: never
* Since ATA_CAM mode has no implemented support for serializing access to themav2013-04-032-6/+22
| | | | | | | | | different ATA channels, required for acard and pc98 ATA controllers, block access to second channels of both, hoping that one working channel is better then none. I have an idea how that support could be implemented, but I have no hardware to work on that. MFC after: 1 week
* Add some more ATA_CAM ifdefs.mav2013-04-032-7/+15
| | | | | Submitted by: marius (partially) MFC after: 1 week
* Integrate Efika MX project back to home.ray2013-03-201-0/+238
| | | | Sponsored by: The FreeBSD Foundation
* Fix command timeout caused by data underrun during fetching ATAPI sensemav2013-02-223-1/+3
| | | | | | | | data, introduced by r246713. There are two places where ata_request is filled in ATA_CAM: ata_cam_begin_transaction() and ata_cam_request_sense(). In the first case DMA should be done for addresses from the CCB. In second case, DMA should be done to the different address, the address of the sense buffer inside the CCB structure itself.
* Reform the busdma API so that new types may be added without modifyingkib2013-02-122-10/+11
| | | | | | | | | | | | | | | | | | | | | every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback. The cam changes unify the bus_dmamap_load* handling in cam drivers. The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals 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 <freebsd-listen@fabiankeil.de>)
* Improve r238673 to additionally allow for odd-aligned buffers asmarius2013-02-022-10/+49
| | | | | | | | | passed in by smartd of smartmontools. While at it, hint the compiler that 32-bit PIO is the most likely case (idea from Linux) and use bus_{read,write}_stream_2(9) instead of bus_{read,write}_multi_stream_2(9) for single count reads/writes. MFC after: 1 week
* In case somebody still use it, fix legacy ataraid(4) to work on combinedmav2013-01-151-1/+2
| | | | | | | PATA+AHCI controllers, such as JMicron JMB363. PR: kern/159271 MFC after: 1 week
* Add Intel Lynx Point PCH SATA Controller Device IDsjfv2013-01-022-0/+25
|
* Add IDs for SATA controllers on AMD Hudson-2 series chipsets.mav2012-12-122-0/+12
| | | | | | | I am not exactly sure about the naming due to lack of specs on AMD site, but it is better to have some identification then none at all. MFC after: 1 month
* Remove duplicate const specifiers in many drivers (I hope I got all ofdim2012-11-0517-18/+18
| | | | | | | | | | | | | | | | | | | | them, please let me know if not). Most of these are of the form: static const struct bzzt_type { [...list of members...] } const bzzt_devs[] = { [...list of initializers...] }; The second const is unnecessary, as arrays cannot be modified anyway, and if the elements are const, the whole thing is const automatically (e.g. it is placed in .rodata). I have verified this does not change the binary output of a full kernel build (except for build timestamps embedded in the object files). Reviewed by: yongari, marius MFC after: 1 week
* Only four specific ATA PIO commands transfer several sectors per DRQ blockmav2012-11-011-2/+10
| | | | | | (interrupt). All other ATA PIO commands transfer one sector or 512 bytes at one time. Hardcode these exceptions in ata(4) with ATA_CAM option. This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.
* Implement CAM_ATAIO_NEEDRESULT (fetching full set of result registers) formav2012-10-265-6/+21
| | | | | | | ata(4) driver in ATA_CAM mode. That slighty improves error reporting and also should fix `smartctl -l scterc /dev/adaX` operation. MFC after: 3 weeks
* Add checks for ata_sata_scr_read() return statuses. It is mostly to silencemav2012-10-101-3/+5
| | | | Clang Static Analyzer warnings as errors there are usually unlikely.
* Fix build without `options ATA_CAM`, broken by r241144.mav2012-10-031-0/+4
|
* Implement SATA revision (speed) control for legacy SATA controller formav2012-10-023-4/+27
| | | | | | | both boot (via loader tunables) and run-time (via `camcontrol negotiate`). Tested to work at least on NVIDIA MCP55 chipset. H/w provided by: glebius
* Remove bogus break statements.kevlo2012-09-181-1/+0
| | | | Obtained from: DragonFly
* Add IDs for JMicron JMB360/JMB362 AHCI SATA controllers.mav2012-08-302-0/+2
| | | | MFC after: 1 week
* Use 16bit PIO instead of 32bit in case of misaligned buffer.mav2012-07-211-18/+14
| | | | It fixes kernel panic during CD write with cdrecord on sparc64.
* Fix typo in bzero length argument during sense fetching.mav2012-07-211-1/+1
| | | | | | For me it at least fixed CD burning in PIO mode. MFC after: 3 days
* Remove variables which are initialized but never used thereaftereadler2012-07-071-4/+0
| | | | | | | reported by gcc46 warning Approved by: cperciva MFC after: 1 week
* - As a baind-aid, disable ATAPI DMA when using ATA_CAM for these controllersmarius2012-06-141-2/+5
| | | | | | | | as well as it causes the kernel to hang during boot. Reported and tested by: Kevin Oberman - Use NULL instead of 0 for a pointer. MFC after: 3 days
* Partially revert r236666:mav2012-06-101-1/+1
| | | | | | | | | | | Return PROTO_ATA protocol in response to XPT_PATH_INQ. smartmontools uses it to identify ATA devices and I don't know any other place now where it is important. It could probably use XPT_GDEV_TYPE instead for more accurate protocol information, but let it live for now. Reported by: matthew MFC after: 3 days
* ATA/SATA controllers have no idea about protocol of the connected devicemav2012-06-061-2/+2
| | | | | | | until transport will do some probe actions (at least soft reset). Make ATA/SATA SIMs to not report bogus and confusing PROTO_ATA protocol. Make ATA/SATA transport to fill that gap by reporting protocol to SIM with XPT_SET_TRAN_SETTINGS and patching XPT_GET_TRAN_SETTINGS results if needed.
OpenPOWER on IntegriCloud