summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
Commit message (Collapse)AuthorAgeFilesLines
...
* Limit maximum I/O size, depending on command set supported by device.mav2009-12-101-0/+4
| | | | | It is required to suppot non-LBA48 devices with MAXPHYS above 128K. Same is done in ada(4).
* MFp4:mav2009-12-0635-1111/+1469
| | | | | | | | | | | | | | | | | | Introduce ATA_CAM kernel option, turning ata(4) controller drivers into cam(4) interface modules. When enabled, this options deprecates all ata(4) peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers (ada, cd, ...) and interfaces to be natively used instead. As side effect of this, ata(4) mode setting code was completely rewritten to make controller API more strict and permit above change. While doing this, SATA revision was separated from PATA mode. It allows DMA-incapable SATA devices to operate and makes hw.ata.atapi_dma tunable work again. Also allow ata(4) controller drivers (except some specific or broken ones) to handle larger data transfers. Previous constraint of 64K was artificial and is not really required by PCI ATA BM specification or hardware. Submitted by: nwitehorn (powerpc part)
* Do not ignore device interrupt if bus mastering is still active. It ismav2009-12-051-2/+1
| | | | | | | | | | | normal in case of media read error and some ATAPI cases, when transfer size is unknown beforehand. PCI ATA BM specification tells that in case of such underrun driver should just manually stop DMA engine. DMA engine should same time guarantie that all bus mastering transfers completed at the moment of driver reads interrupt flag asserted. This change should fix interrupt storms and command timeouts in many cases. PR: kern/103602, sparc64/121539, kern/133122, kern/139654
* On Soft Reset, read device signature from FIS receive area, instead ofmav2009-12-051-3/+5
| | | | | | PxSIG register. It works better for NVidia chipsets. ahci(4) does the same. PR: kern/140472, i386/138668
* Drop USB mass storage devices support from ata(4). It is out of the build asmav2009-11-262-1130/+0
| | | | | | | | long as I remember, and completely superseded by better maintained umass(4). It's main idea was to optionally avoid CAM dependency for such devices, but with move ATA to CAM, it is not actual any more. No objections: hselasky@, thompsa@, arch@
* Use only lower byte of sectors_intr IDENTIFY word as sector count.mav2009-11-241-1/+1
| | | | | This fixes SET_MULTI error during boot on devices supporting less then 16 sectors per interrupt.
* Release over-agressive WDMA0 mode timings as close to spec as chip can.mav2009-11-221-1/+1
|
* Fix Intel PATA UDMA timings setting, affecting write performance.mav2009-11-221-2/+2
| | | | | | Binary divider value 10 specified in datasheet is not a hex 0x10. UDMA2 should be 33/2 instead of 66/4, which is documented as reverved, UDMA4 should be 66/2 instead of 66/4, which is definitely wrong.
* Change the way in which AHCI+PATA combined controllers, such as JMicronmav2009-11-165-285/+306
| | | | | | | | | | | | | | and Marvell handled. Instead of trying to attach two different drivers to single device, wrapping each call, make one of them (atajmicron, atamarvell) attach do device solely, but create child device for AHCI driver, passing it all required resources. It is quite easy, as none of resources are shared, except IRQ. As result, it: - makes drivers operation more independent and straitforward, - allows to use new ahci(4) driver with such devices, adding support for new features, such as PMP and NCQ, same time keeping legacy PATA support, - will allow to just drop old ataahci driver, when it's time come.
* Disable PMP probing for Marvell AHCI controllers.mav2009-11-141-3/+6
| | | | It is not working for some reason. Linux does the same.
* Add support for SATA ports on SATA+PATA Marvell controllers.mav2009-11-132-25/+72
| | | | | | These controllers provide combination of AHCI for SATA and legacy PCI ATA for PATA. Use same solution as used for JMicron controllers. Add IDs of Marvell 88SX6102, 88SX6111. 88SX6141 alike controllers
* Add more ICH10 chip IDs.mav2009-11-092-0/+8
| | | | Submitted by: Dmitry S. Luhtionov <mitya@cabletv.dp.ua>
* Introduce define and kernel option ATA_REQUEST_TIMEOUT to control ATA(4)mav2009-11-085-12/+16
| | | | | | command timeout. Submitted by: keramida
* Add IDs for nVidia MCP65/77/79/89 SATA conntrollers.mav2009-11-022-1/+89
|
* MFp4:mav2009-11-011-0/+1
| | | | | Allow SATA1 SiI chips to do full-sized DMA. Specification tells that we may release DMA constrants even more, but it require some additional handling.
* Allow newly added controllers to use full I/O sizes.mav2009-10-311-1/+3
|
* MFp4:mav2009-10-3113-148/+132
| | | | | | | | - Remove most of direct relations between ATA(4) peripherial and controller levels. It makes logic more transparent and is a mandatory step to wrap ATA(4) controller level into ATA-native CAM SIM. - Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger I/O transaction sizes without additional cost.
* Add support for different request block format used by Gen-IIe Marvell SATA.mav2009-10-303-30/+70
| | | | This adds support for Marvell 6042/7042 chips and Adaptec 1430SA controller.
* Add some magic taken from OS X and Linux to support early revision K2nwhitehorn2009-10-291-0/+31
| | | | | | SATA controllers, like those found on the G5 Xserve. Reviewed by: mav
* Turn off use of ATA_A_4BIT on modern hardware. This flag was alreadynwhitehorn2009-10-291-1/+10
| | | | | | | | | | obsoleted in 1996 by ATA-2, and crashes some modern hardware like some revisions of the Serverworks K2 SATA controller. Even very ancient hardware seems not to require it. In the unlikely event this causes problems, the previous behavior can be re-enabled by defining ATA_LEGACY_SUPPORT at the top of this file. Reviewed by: Alexander Motin <mav@freebsd.org>
* Don't ignore the return value of g_modevent() in acd_modevent().jh2009-10-271-2/+1
| | | | Approved by: trasz (mentor)
* Report SATA speeds to CAM, to not confuse users with low numbers logged.mav2009-10-261-0/+6
|
* Round timeout up when converting CAM milliseconds to ATA seconds.mav2009-10-261-2/+2
|
* Increase ATA command timeouts. Some drives need more then 5s to spin-up.mav2009-10-264-9/+9
| | | | PR: kern/111023
* Add IDs for PATA part also.mav2009-10-261-0/+2
|
* Add two more VIA SATA chip IDs.mav2009-10-262-0/+4
| | | | PR: kern/135057
* Fix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)mav2009-10-261-1/+2
| | | | | | | memory access. PR: amd64/128686, amd64/132372, amd64/139156 MFC after: 3 days
* MFp4:mav2009-10-234-15/+4
| | | | Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.
* - Revert r191568 partially. Forcing AHCI mode by changing device subclassjkim2009-10-051-63/+31
| | | | | | | | | and progif is evil. It doesn't work reliably[1] and we should honor BIOS configuration by the user. - If the SATA controller is enbled but combined mode is disabled, mask off the emulated IDE channel on the legacy IDE controller. Pointed out by: mav[1]
* - Add missing bus_dmamap_sync(9) calls for the work DMA map. Previouslymarius2009-09-221-7/+18
| | | | | | | | | | | | | | | | the work area was totally unsynchronized which means this driver only had a chance of working on x86 when no bounce buffers were involved, which isn't that likely given that support for 64-bit DMA is currently broken throughout ata(4). - Add necessary little-endian conversion of accesses to the work area, making this driver work on big-endian hosts. While at it, use the alignment-agnostic byte order encoders in order to be on the safe side. - Clear the reserved member of the SG list entries in order to be on the safe side. [1] Submitted by: yongari [1] Reviewed by: yongari MFC after: 3 days
* Revert previous commit and add myself to the list of people who shouldphk2009-09-083-4/+2
| | | | know better than to commit with a cat in the area.
* Add necessary include.phk2009-09-083-2/+4
|
* Remove constraint, requiring request data to fulfill controller's alignmentmav2009-09-061-3/+3
| | | | | | | | | requirements. It is busdma task, to manage proper alignment by loading data to bounce buffers. PR: kern/127316 Reviewed by: current@ Tested by: Ryan Rogers
* Remove 'ad:' prefix from disk serial number. We don't want serial numberpjd2009-09-041-2/+2
| | | | | | | to change when we reconnect the disk in a way that it is accessible through CAM for example. Discussed with: trasz
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-19/+15
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-08-021-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
* Restore PATA device probe order, broken by PMP support implementation,mav2009-07-261-1/+17
| | | | | | | | requesting IDENTIFY from slave device first. This order is important for proper cable type detection by master device. PR: kern/136438 Approved by: re (kib)
* Limit IOCATAREQUEST ioctl data size to controller's maximum I/O size.mav2009-07-161-0/+5
| | | | | | | | It fixes kernel panic when requested size is too large (0xffffffff), PR: kern/136726 Approved by: re (kib) MFC after: 2 weeks
* Fix Marvel SATA controllers operation, broken by rev. 188765,mav2009-07-131-2/+2
| | | | | | | by using uninitialized variable. Tested by: Chris Hedley Approved by: re (kensmith)
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
* Fix kernel panic, when ataahci driver is used on system with increasedmav2009-07-081-1/+1
| | | | | | | | | MAXPHYS. Current ataahci driver memory allocation scheme includes only 64 items in DMA S/G table, and so not guarantied to support transactions with more then 252K data. Approved by: re (kensmith) MFC after: 2 weeks
* Revert revisions 188839 and 188868. Use of the ioctl in geom_dev.cmarcel2009-07-081-4/+1
| | | | | | | | | | | | is invalid because the ioctl happens without prior open. The ioctl got introduced to provide backward compatibility for extended partitions, but it ended up not being used because it didn't work as expected. Since there are no consumers of the ioctl and the implementation is broken, the best fix is to remove the code entirely. Spotted by: phk Approved by: re (kensmith)
* Mark atanvidia depending on ataahci since rev.188846.mav2009-07-051-0/+1
| | | | Approved by: re (kib)
* MFp4:mav2009-06-2422-22/+22
| | | | | Reduce default PCI ATA drivers priorities from absolute to default, to allow them been overriden. It was so before modularization.
* Move non-PCI prototypes from ata-pci.h -> ata-all.h.raj2009-06-244-18/+13
| | | | | | | | This removes unnecessary PCI #includes dependency for systems with ATA controllers living at non-PCI buses. Submitted by: Piotr Ziecik Obtained from: Semihalf
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-71/+99
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* Fix compile with changes to the usb_config struct.thompsa2009-06-151-39/+39
|
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-151-23/+23
|
* Preallocate the four BARs in ALI SATA controllers during the chipinitjhb2009-06-101-12/+31
| | | | | | | | | routine and save the resources using a chipset-data structure. Use these preallocated resources to setup resources for the SATA channels to avoid asking the PCI bus to allocate the same BAR multiple times. Tested by: bms MFC after: 1 week
* Add another PCI id for Nvidia nForce MCP67, found in several Acer laptops.ariff2009-06-082-0/+2
|
OpenPOWER on IntegriCloud