summaryrefslogtreecommitdiffstats
path: root/sys/dev/mvs
Commit message (Collapse)AuthorAgeFilesLines
* MFC r280393: Reduce priority of ATA/SATA drivers.mav2015-04-063-3/+3
| | | | | 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-2/+2
|
* MFC r274819:smh2014-12-211-7/+7
| | | | | | | | | Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay
* 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 r257170, r257171, r257172, r257240, r257278, r257279, r257280, r257281,ian2014-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | r257282, r257332 Wait for DesignWare UART transfers completion before accessing line control Enable UART busy detection handling for Armada XP - based board Enable SATA interface on Armada XP Run mvs SATA driver on Armada XP instead of old mv_sata Retire arm_remap_nocache() and the data and constants associated with it. Remove hard-coded mappings related to Armada XP support Fix-up DTB for Armada XP registers' base according to the actual settings Change Armada XP kernel load address to the u-boot's end address Remove not working and deprecated PJ4Bv6 support Switch off explicit broadcasting of the TLB flush operations for PJ4B CPU Add missing ARMv6 CPU functions to ARM Makefile
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-1/+1
| | | | | | | | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD.
* 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
* Replicate r242422 from ata(4) to mvs(4):mav2013-06-121-3/+9
| | | | | | | | Only four specific ATA PIO commands transfer several sectors per DRQ block (interrupt). All other ATA PIO commands transfer one sector or 512 bytes at 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 busesmav2013-04-182-1/+17
| | | | | | passing real bus' child pointers instead of grandchilds. Requested by: kib
* Reform the busdma API so that new types may be added without modifyingkib2013-02-121-12/+2
| | | | | | | | | | | | | | | | | | | | | 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>)
* Add support for Marvell 88F6282.hrs2012-07-281-0/+1
| | | | Sponsored by: Plat'Home, Co.,Ltd.
* - Limit r214102 workaround to only x86. On arm it causes more problemsmav2012-06-123-1/+47
| | | | | | | | | then solves because of cache coherency issues. This fixes periodic error messages on console and command timeouts. - Patch SATA PHY configuration for 65nm SoCs to improve SNR same as Linux does. MFC after: 2 weeks
* 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.
* Add two functions xpt_batch_start() and xpt_batch_done() to the CAM SIM KPImav2012-05-121-0/+2
| | | | | | | | | to allow drivers to handle request completion directly without passing them to the CAM SWI thread removing extra context switch. Modify all ATA/SATA drivers to use them. Reviewed by: gibbs, ken MFC after: 2 weeks
* Adjust mvs(4) to handle interrupt cause reg depending on the actual number ofraj2012-02-012-10/+16
| | | | | | | | | | | | | | | | channels available - current code treats bits 4:7 in 'SATAHC interrupt mask' and 'SATAHC interrupt cause' as flags for SATA channels 2 and 3 - for embedded SATA controllers (SoC) these bits have been marked as reserved in datasheets so far, but for some new and upcoming chips they are used for purposes other than SATA Submitted by: Lukasz Plachno Reviewed by: mav Obtained from: Semihalf MFC after: 2 weeks
* Rename device_delete_all_children() into device_delete_children().hselasky2011-11-222-2/+2
| | | | | Suggested by: jhb @ and marius @ MFC after: 1 week
* Move the device_delete_all_children() function from usb_util.chselasky2011-11-192-14/+4
| | | | | | | | to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Identify a few other places where it makes sense to use device_delete_all_children(). MFC after: 1 week
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+1
| | | | This means that their use is restricted to a single C file.
* According to SATA specification, when Serial ATA Enclosure Management Bridgemav2011-05-251-10/+34
| | | | | | | | | | | | | | | | | | | | (SEMB) is unable to communicate to Storage Enclosure Processor (SEP), in response to hard and soft resets it should among other things return value 0x7F in Status register. The weird side is that it means DRQ bit set, which tells that reset request is not completed. It would be fine if SEMB was the only device on port. But if SEMB connected to PMP or built into it, it may block access to other devices sharing same SATA port. Make some tunings/fixes to soft-reset handling to workaround the issue: - ahci(4): request CLO on the port after soft reset to ignore DRQ bit; - siis(4): gracefully reinitialize port after soft reset timeout (hardware doesn't detect reset request completion in this case); - mvs(4): if PMP is used, send dummy soft-reset to the PMP port to make it clear DRQ bit for us. For now this makes quirks in ata_pmp.c, hiding SEMB ports of SiI3726/SiI4726 PMPs, less important. Further, if hardware permit, I hope to implement real SEMB support.
* Fix some English grammar.mav2011-04-192-6/+6
|
* According to specification. device should respond to COMRESET with COMINITmav2011-04-191-10/+14
| | | | | in no more then 10ms. If we detected no device presence within that time, there is no reason to wait longer.
* Properly handle memory allocation errors during error recovery.mav2011-04-191-6/+19
|
* Refactor hard-reset implementation in mvs(4).mav2011-04-142-17/+86
| | | | | | | | | Instead of spinning in a tight loop for up to 15 seconds, polling for device readiness while it spins up, return reset completion just after PHY reports "connect well" or 100ms connection timeout. If device was found, use callout for checking device readiness with 100ms period up to full 31 second timeout. This fixes system freeze for 5-10 seconds on drives hot plug-in.
* Improve SATA Asynchronous Notification feature support in CAM:mav2011-04-131-0/+15
| | | | | | | | | | | | | - make SATA SIMs announce capabilities to handle SDB with Notification bit; - make PMP driver honor this SIMs capability; - make SATA XPT to negotiate and enable this feature for ATAPI devices. This feature allows supporting SATA ATAPI devices to inform system about some events happened, that may require attention. In my case this allows LG GH22LS50 SATA DVR-RW drive to report tray open/close events. Events reported to CAM in form of AC_SCSI_AEN async. Further they could be used as a hints for checking device status and reporting media change to upper layers, for example, via spoiling mechanism of GEOM.
* Implement automatic SCSI sense fetching for mvs(4).mav2011-04-122-38/+111
| | | | | Make few improvements/changes to ATAPI PIO support to pass most of scgcheck (cdrtools) tests.
* Update mvs(4) driver to work over FDT's simplebus(4) bus.mav2011-03-281-4/+9
|
* Workaround strange situation when EDMA_RESQIP register returns zero insteadmav2010-10-201-15/+31
| | | | | | | | of proper value. It caused bunch of "EMPTY CRPB" messages and potentially may cause premature requests completion, which could cause data corruption. For most cases it seems enough to just reread register to get proper value. To protect against worse cases - erase processed queue entries with impossible values and ignore them if problem still happen.
* Some style cleanup:mav2010-10-203-44/+37
| | | | | - remove commented debugging code; - wrap long lines.
* Fix panic, when due to some kind of congestion on FIS-based switchingmav2010-09-161-5/+8
| | | | | | | port multiplier some command triggers false positive timeout, but then completes normally. MFC after: 2 weeks
* Export PCI IDs of ATA/SATA controllers through CAM and ata(4) layers tomav2010-07-251-1/+9
| | | | | GEOM. This information needed for proper soft-RAID's on-disk metadata reading and writing.
* Plug memory leak to silent Coverity. Error is still not really handled.mav2010-06-051-0/+1
| | | | | Found with: Coverity Prevent(tm) CID: 4137
* Fill rman range start/end values. It makes devinfo output more readable.mav2010-05-222-0/+4
|
* Report ATA/SATA channel number to NewBus at location string.mav2010-05-222-0/+22
|
* Improve suspend/resume support. Make sure controller is idle on suspendmav2010-05-211-15/+44
| | | | and reset it on resume.
* Fix polled operation. Now it is possible to dump kernel via mvs(4).mav2010-05-061-1/+1
|
* Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllersmav2010-05-025-0/+3801
driver for CAM ATA subsystem. This driver supports same hardware as atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides many additional features, such as NCQ, PMP, etc.
OpenPOWER on IntegriCloud