summaryrefslogtreecommitdiffstats
path: root/sys/cam/ata
Commit message (Collapse)AuthorAgeFilesLines
* Make SATA XPT negotiate and enable some additional SATA features, such as:mav2010-05-022-3/+154
| | | | | | | - device initiated power management (some devices support only this way); - Automatic Partial to Slumber Transition (more power saving); - DMA auto-activation (expected to slightly improve performance). More features could be added later, when hardware supports.
* Report PMP absence using target 15, same as for precence (not a wildcard),mav2010-04-301-4/+6
| | | | to not confuse target ID checks at SIMs.
* Update device identify data and serial number when device change detected.mav2010-04-271-2/+6
| | | | Reprobe immediately following this should have fresh data.
* MFp4:mav2010-04-262-14/+19
| | | | Move PI_TAG_ABLE check from ada driver to ATA XPT.
* Make PUIS detection more strict. Previous implementation caused falsemav2010-02-261-5/+4
| | | | positives on VMWare's virtual CD-ROMs.
* Virtualize transport part of periph announcement.mav2010-02-221-0/+81
|
* On probe error, if restart requested, skip any retries and recovery.mav2010-02-041-1/+2
| | | | Just restart probe from the beginning immediately.
* MFp4:mav2010-02-032-2/+39
| | | | | | Add Power Up In Stand-by feature support. Device with PUIS enabled require explicit command to do initial spin-up. Mark that command with CAM_HIGH_POWER flag, to allow CAM manage staggered spin-up.
* - Use separate buffer for identify data fetching. We can't use main buffermav2010-02-023-45/+19
| | | | | here if device already running, as data need to be formatted before use. - Remove some saved_ccb variables. They are unused now.
* - Give ATA/SATA SIMs info about ATAPI packet size, supported by device.mav2010-02-021-1/+35
| | | | | - Make ATA XPT to reject longer SCSI CDBs then supported by device, or any SCSI CDBs, if device doesn't support ATAPI.
* MFp4: Large set of CAM inprovements.mav2010-01-284-124/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many drivers. - Any bus, attached before CAM completed it's boot-time initialization, will equally join to the process, delaying boot if needed. - New kern.cam.boot_delay loader tunable should help controllers that are still unable to register their buses in time (such as slow USB/ PCCard/ CardBus devices), by adding one more event to wait on boot. - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. - Improve SCSI error recovery for devices on buses without automatic sense reporting, such as ATAPI or USB. For example, it allows CAM to wait, while CD drive loads disk, instead of immediately return error status. - Decapitalize diagnostic messages and make them more readable and sensible. - Teach PMP driver to limit maximum speed on fan-out ports. - Make boot wait for PMP scan completes, and make rescan more reliable. - Fix pass driver, to return CCB to user level in case of error. - Increase number of retries in cd driver, as device may return several UAs.
* - Report SATA in legacy emulation mode still as SATA.mav2010-01-101-16/+13
| | | | - Make ATA XPT able to handle such case.
* Add BIO_DELETE support to ada(4):mav2009-12-282-114/+250
| | | | | | | | | | | | | | | | | | | - For SSDs use TRIM feature of DATA SET MANAGEMENT command, as defined by ACS-2 specification working draft. - For CompactFlash use CFA ERASE command, same as ad(4) does. With this patch, `newfs -E /dev/ada1` was able to restore write speed of my heavily weared OCZ Vertex SSD (firmware 1.4) up to the initial level for the most part of it's capacity. Previous 1.3 firmware, even reportiong TRIM capabilty bit set, was not working, reporting ABORT error for every DSM command. I have no idea whether it is normal, but for some reason it takes 200ms to handle any TRIM command on this drive, that was making delete extremely slow. But TRIM command is able to accept long list of LBAs and the length of that list seems doesn't affect it's execution time. Implemented request clusting algorithm allowed me to rise delete rate up to reasonable numbers, when many parallel DELETE requests running.
* Report stripe size only if physical sector size is not equal to logical.mav2009-12-241-3/+8
|
* MFp4;mav2009-12-073-14/+23
| | | | | | - Cleanup kernel messages, mostly PMP. - Took references on devices, while PMP reinitializes them, to not let them go and distort freeze reference counting.
* MFp4:mav2009-12-061-0/+3
| | | | | If we panicked with SIM lock held, do not try to flush caches. Extra lock recursing will not make debugging easier.
* MFp4:mav2009-12-061-4/+72
| | | | | | | | | | | | | | | | | | 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)
* Add CAM_ATAIO_DMA ATA command flag to mark DMA protocol commands.mav2009-12-012-3/+18
| | | | It is not needed for SATA controllers, but required for PATA.
* MFp4:mav2009-11-262-1/+34
| | | | Improve ATA mode/SATA revision control.
* Fix small copu-paste bug.mav2009-11-251-1/+1
|
* MFp4:mav2009-11-244-21/+182
| | | | | | | | | | | | - Extend XPT-SIM transfer settings control API. Now it allows to report to SATA SIM number of tags supported by each device, implement ATA mode and SATA revision negotiation for both SATA and PATA SIMs. - Make ahci(4) and siis(4) to use submitted maximum tag number, when scheduling requests. It allows to support NCQ on devices with lower tags count then controller supports. - Make PMP driver to report attached devices connection speeds. - Implement ATA mode negotiation between user settings, device and controller capabilities.
* Disable PortMultiplier Async Notifications for time of ports reset.mav2009-11-161-12/+33
| | | | | | They are useless at that time, but confuse Marvell AHCI. Add quirk for SiI57XX Port Multipliers, to hide extra port.
* MFp4:mav2009-11-141-1/+2
| | | | Do not enable tagged queueing if controller reports 0 tags support.
* MFp4:mav2009-11-114-107/+90
| | | | | | | | | | - Move tagged queueing control from ADA to ATA XPT. It allows to control device command queue length correctly. First step to support < 32 tags. - Limit queue for non-tagged devices by 2 slots for ahci(4) and siis(4). - Implement quirk matching for ATA devices. - Move xpt_schedule_dev_sendq() from header to source file. - Move delayed queue shrinking to the more expected place - element freeing. - Remove some SCSIsms in ATA.
* Fix protype.mav2009-11-041-1/+1
|
* PMP commands use short format. PMP write doesn't return result.mav2009-11-041-10/+4
|
* MFp4:mav2009-11-041-2/+0
| | | | | | | | | - Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be periph flag. May be SIM, may be CCB, but now it works fine just without it. - Remove check unused for at least five years. If we will ever have non-BIO devices in CAM, this check is smallest of what we will need. - If several controllers complete requests same time, call swi_sched() only once.
* MFp4:mav2009-11-044-32/+56
| | | | | | - Add support for sector size > 512 bytes and physical sector of several logical sectors, introduced by ATA-7 specification. - Remove some obsoleted code.
* MFp4:mav2009-11-032-0/+187
| | | | Improve reporting ATA Status error details.
* MFp4:mav2009-11-011-1/+6
| | | | | | | | | Fix reference counting bug, when device unreferenced before then invalidated. To do it, do not handle validity flag as another reference, but explicitly modify reference count each time flag is modified. Discovered by: thompsa
* MFp4:mav2009-10-313-505/+393
| | | | | | | | | | | | - Reduce code duplication in ATA XPT and PMP driver. - Move PIO size setting from ada driver to ATA XPT. It is XPT business to negotiate transfer details. ada driver is now stateless. - Report PIO size to SIM. It is required for correct PATA SIM operation. - Tune PMP scan timings. It workarounds some problems with SiI. - If reset hapens during PMP initialization - restart it. - Introduce early-initialized periph drivers, which are used during initial scan process. Use it for xpt, probe, aprobe and pmp. It gives pmp chance to finish scan before mountroot and numerate devices in right order.
* MFp4:mav2009-10-232-254/+758
| | | | | Move Port Multiplier support code out of ATA XPT into pmp periph driver. This is convinient, as PMP itself is a bus target and has own state.
* Replace most of priority numbers with defines. No logical changes.mav2009-10-232-21/+21
|
* MFp4:mav2009-10-211-174/+28
| | | | | | | Separate CAM_DEV_IDENTIFY_DATA_VALID flag from CAM_DEV_INQUIRY_DATA_VALID. Add workaround for very old devices without support for mode setting. Add some PATA bus scanning support. Remove some SCSIsms.
* MFp4:mav2009-10-211-85/+111
| | | | | | | Add support for PIO-only devices. Fix maxio values and 256 sectors transactions for 28bits commands. Implement periodic ordered commands insertion, sames as da driver does. Remove some SCSIsms.
* MFp4:mav2009-10-211-1/+2
| | | | | Report real max_target = 15. SIM doesn't need to know that target 15 is PMP. It is XPT business.
* Export disk serial numbers for adaX disks.pjd2009-10-091-0/+2
| | | | | Reviewed by: mav MFC after: 3 days
* Report SATA 3.x devices.mav2009-09-271-1/+3
|
* Short ATA command format has 28bit address, not 36bit.mav2009-08-304-12/+12
| | | | | | Rename ata_36bit_cmd() into ata_28bit_cmd(), while it didn't become legacy. MFC after: 2 days
* ATA_FLUSHCACHE is a 36bit format command, not 48.mav2009-08-301-4/+4
|
* Fix copy/paste bug, that requests data read during ATA device probe sequencemav2009-08-181-4/+4
| | | | | | | | | for ATA_SETFEATURES/ATA_SF_SETXFER command which by definition transfers no data. Most of controllers are irrelevant to this bug, but some nVidia's doesn't. Tested on: current@ Approved by: re (kib)
* Fix copy-paste bug. Use regular non-polled mode for executing FLUSHCACHEmav2009-07-171-2/+3
| | | | | | command on disk close. Approved by: re (implicitly)
* Fix copy-paste bug, enabling SIM PMP support, when it was not really found.mav2009-07-131-1/+1
| | | | Approved by: re (implicitly)
* Rename ATA probe driver to "aprobe" to resolve name conflict with SCSImav2009-07-131-4/+4
| | | | | | and fix loading cam as module. Approved by: re (implicitly)
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-104-0/+3448
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
OpenPOWER on IntegriCloud