| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Make ATA_CAM wrapper to report SATA power management capabilities to CAM to
make it configure device to initiate transitions if controller configured
to accept them. This makes hint.ata.X.pm_level=1 mode working.
Notes:
svn path=/stable/8/; revision=215777
|
| |
|
|
|
|
|
|
| |
Even if we are skipping SATA hard reset - set power management bits in
SControl register. This should make things more consistent.
Notes:
svn path=/stable/8/; revision=215776
|
| |
|
|
|
|
|
| |
Add support for VIA VX900 chipset SATA controller.
Notes:
svn path=/stable/8/; revision=215772
|
| |
|
|
|
|
|
|
| |
Mark command submission timeouts as timeouts. This should trigger device
resets and increase chances of getting device back again.
Notes:
svn path=/stable/8/; revision=215771
|
| |
|
|
|
|
|
| |
Add support for odd-sized PIO transfers, sometimes used by ATAPI.
Notes:
svn path=/stable/8/; revision=215769
|
| |
|
|
|
|
|
|
|
|
| |
Fix typos.
PR: bin/148894
Submitted by: olgeni
Notes:
svn path=/stable/8/; revision=215588
|
| |
|
|
|
|
|
| |
Remove stale line, accidentally slipped into r214016.
Notes:
svn path=/stable/8/; revision=215512
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a safety-belt. If the identified disk has 0 blocks, don't attach
it. This can happen in some cases when plugging in SD/SmartCard PC
Cards with empty slots. It is better to detect this bogosity, and
refuse to attach rather than panic with a division by zero (in one of
many places) down stream.
Notes:
svn path=/stable/8/; revision=215511
|
| |
|
|
|
|
|
| |
Minor formatting nits.
Notes:
svn path=/stable/8/; revision=215510
|
| |
|
|
|
|
|
|
| |
Teach ahci(4), siis(4) and ATA_CAM ata(4) wrapper report to CAM residual
I/O length on underruns, that often happens for some SCSI commands.
Notes:
svn path=/stable/8/; revision=215509
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set of legacy mode SATA enchancements:
- Implement proper combined mode decoding for Intel controllers to properly
identify SATA and PATA channels and associate ATA channels with SATA ports.
This fixes wrong reporting and in some cases hard resets to wrong SATA ports.
- Improve SATA registers support to handle hot-plug events and potentially
interface errors. For ICH5/6300ESB chipsets these registers accessible via
PCI config space. For later ones they may be accessible via PCI BAR(5).
- For controllers not generating interrupts on hot-plug events, implement
periodic status polling. Use it to detect hot-plug on Intel and VIA
controllers. Same probably could also be used for Serverworks and SIS.
Notes:
svn path=/stable/8/; revision=214671
|
| |
|
|
|
|
|
|
|
| |
Revert r132291.
Restore setting PIO/WDMA timings for VIA UDMA133 controllers.
Linux disables only AST register writing there, but no all timings.
Notes:
svn path=/stable/8/; revision=214669
|
| |
|
|
|
|
|
| |
Add missing le32toh(), same as recently done in ata-siliconimage.c.
Notes:
svn path=/stable/8/; revision=214668
|
| |
|
|
|
|
|
|
| |
Add missing byteswap, works on big endian systems now (tested on Netlogic
XLS MIPS processor).
Notes:
svn path=/stable/8/; revision=214667
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix a problem where device detection would work unreliably on Serverworks
K2 SATA controllers. The chip's status register must be read first, and
as a long, for other registers to be correctly updated after a command, and
this includes the command sequence in device detection as well as the
previously handled case after interrupts. While here, clean up some
previous hacks related to this controller.
Notes:
svn path=/stable/8/; revision=213291
|
| |
|
|
|
|
|
|
|
|
| |
Add workaround for SiI3114 and SiI3512 chips bug, which caused sending
R_ERR in response to DMA activate FIS under certain circumstances. This is
recommended fix from chip datasheet. If triggered, this bug most likely
caused write command timeout.
Notes:
svn path=/stable/8/; revision=212720
|
| |
|
|
|
|
|
|
|
|
|
| |
SATA1.x SiliconImage controllers on power-on reset TFD Status register into
value 0xff. On hot-plug this value confuses ata_generic_reset() device
presence detection logic. As soon as we already know drive presence from
SATA hard reset, hint ata_generic_reset() to wait for device signature
until success or full timeout.
Notes:
svn path=/stable/8/; revision=212719
|
| |
|
|
|
|
|
|
| |
Increase device reset timeout from 10 to 15 seconds, same as in ahci(4).
Some devices found need about 10-12 seconds to spinup.
Notes:
svn path=/stable/8/; revision=212718
|
| |
|
|
|
|
|
|
| |
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.
Notes:
svn path=/stable/8/; revision=212192
|
| |
|
|
|
|
|
|
|
|
|
| |
Make legacy ATA emulation detection more strict. This should fix false
positive legacy detection and attach failure/panic for Marvell 88SX6141
controller and potentially some others.
PR: kern/145064
Notes:
svn path=/stable/8/; revision=210281
|
| |
|
|
|
|
|
| |
Improve interrupt setup errors handling.
Notes:
svn path=/stable/8/; revision=210280
|
| |
|
|
|
|
|
|
|
|
|
| |
Make interrupt handler check that CAM bus initialization completed before
touching it. It fixes possible panic during controller attach in ATA_CAM
mode.
While there, slightly improve attach errors handling.
Notes:
svn path=/stable/8/; revision=210208
|
| |
|
|
|
|
|
| |
Disable multi-sector PIO transfers if ATA_SET_MULTI command failed.
Notes:
svn path=/stable/8/; revision=210206
|
| |
|
|
|
|
|
|
|
| |
If ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark
channel as having no devices connected. This improves hot-unplug operation
on legacy-emulating SATA controllers.
Notes:
svn path=/stable/8/; revision=210205
|
| |
|
|
|
|
|
|
|
|
| |
Make hw.ata.ata_dma_check_80pin tunable affect not only device side, but
also controller side cable checks. Make respective sysctl writable.
PR: kern/143462
Notes:
svn path=/stable/8/; revision=210204
|
| |
|
|
|
|
|
|
|
|
|
| |
Add ata(4) ability to limit initial ATA mode for devices via device hints.
After boot this mode can be changed with atacontrol/camcontrol as usual.
It works for both legacy and ATA_CAM wrapper mode.
PR: kern/123980
Notes:
svn path=/stable/8/; revision=210164
|
| |
|
|
|
|
|
| |
Fix possible use after free.
Notes:
svn path=/stable/8/; revision=210163
|
| |
|
|
|
|
|
| |
Fix use after free on error.
Notes:
svn path=/stable/8/; revision=210162
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Program the K2 SATA controller's interrupt to be level-triggered low, and
respect the edge/level settings in the device tree.
OpenPIC on powerpc sets interrupts to be level high by default. On Apple
interrupt controllers, all level interrupts are low regardless of
programming except interrupt 0, used by K2 SATA on some Apple systems, with
the result that the K2 SATA IRQ is misconfigured. Pending review of changes
to this default, work around this by changing the programming of the K2
SATA interrupt to level low.
Approved by: re (kib)
Notes:
svn path=/stable/8/; revision=209044
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some revisions of the Serverworks K2 SATA controller have a data
corruption bug where if an ATA command is issued before DMA is started,
data will become available to the controller before it knows what to do
with it. This results in either data corruption or a controller crash.
This patch remedies the problem by adopting the workaround employed
by Linux and Darwin: starting the DMA engine prior to sending the ATA
command.
Reviewed by: mav
Approved by: re (kib)
Notes:
svn path=/stable/8/; revision=209042
|
| |
|
|
|
|
|
|
|
| |
Fix PCH chipset IDs. They are 0x3bxx, not 0x3axx.
Approved by: re (kib)
Notes:
svn path=/stable/8/; revision=208908
|
| |
|
|
|
|
|
| |
Report ATA/SATA channel number to NewBus at location string.
Notes:
svn path=/stable/8/; revision=208492
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change ad_firmware_geom_adjust() to operate on a struct disk * only and
hook it up to ada(4) also. While at it, rename *ad_firmware_geom_adjust()
to *ata_disk_firmware_geom_adjust() etc now that these are no longer
limited to ad(4). This also allows to maintain a compatibility shim for
pc98_ad_firmware_geom_adjust() for the tier-1 PC98 in stable/8.
Reviewed by: mav (r208349)
Notes:
svn path=/stable/8/; revision=208451
|
| |
|
|
|
|
|
|
| |
Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.
Notes:
svn path=/stable/8/; revision=208448
|
| |
|
|
|
|
|
| |
Add Target/LUN ID checks.
Notes:
svn path=/stable/8/; revision=207773
|
| |
|
|
|
|
|
|
| |
Mark ATA channel as idle on timeout in non-ATA_CAM mode.
This should fix possible duplicate request completion.
Notes:
svn path=/stable/8/; revision=207503
|
| |
|
|
|
|
|
|
| |
For early ALI chips do not announce I/O sizes that require unsupported
48bit DMA commands.
Notes:
svn path=/stable/8/; revision=207502
|
| |
|
|
|
|
|
|
| |
Include opt_ata.h, as some structures here depending on ATA_CAM option.
This fixes ATA_CAM with atamvsata and probably some other drivers.
Notes:
svn path=/stable/8/; revision=206655
|
| |
|
|
|
|
|
|
|
|
| |
Use last 16 bytes of serial number in metadata instead of first ones,
same as Intel MatrixRAID does.
PR: kern/124064
Notes:
svn path=/stable/8/; revision=206653
|
| |
|
|
|
|
|
|
|
|
| |
Mask disk_idx to avoid panic because of extra bits set.
PR: kern/102211
Submitted by: yoichi
Notes:
svn path=/stable/8/; revision=205968
|
| |
|
|
|
|
|
|
| |
- Add ALI M5228 PATA ID.
- Add missed DMA initialization for ALI SATA chips.
Notes:
svn path=/stable/8/; revision=204653
|
| |
|
|
|
|
|
| |
Fix recursive lock attempt on hot-plug event in non-ATA_CAM mode.
Notes:
svn path=/stable/8/; revision=204652
|
| |
|
|
|
|
|
| |
Add Intel PCH SATA controller IDs.
Notes:
svn path=/stable/8/; revision=204651
|
| |
|
|
|
|
|
| |
Improve output for controllers that doesn't report SATA speed.
Notes:
svn path=/stable/8/; revision=204528
|
| |
|
|
|
|
|
|
| |
Implement poll method for atapicam.
It is not perfect, but better then nothing.
Notes:
svn path=/stable/8/; revision=203900
|
| |
|
|
|
|
|
| |
NetCell is a PCI hardware RAID without cable and mode setting.
Notes:
svn path=/stable/8/; revision=203898
|
| |
|
|
|
|
|
| |
Report SATA300 chips also as SATA.
Notes:
svn path=/stable/8/; revision=203897
|
| |
|
|
|
|
|
|
| |
Report to CAM unit number of underlying ataX bus device, instead of this
atapicamX. It is more apropriate and useful together with "ata" name.
Notes:
svn path=/stable/8/; revision=203895
|
| |
|
|
|
|
|
|
|
| |
- Give ATA/SATA SIMs info about ATAPI packet size, supported by device.
- Make ATA XPT to reject longer SCSI CDBs then supported by device, or
any SCSI CDBs, if device doesn't support ATAPI.
Notes:
svn path=/stable/8/; revision=203890
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Large set of CAM improvements:
- 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.
Notes:
svn path=/stable/8/; revision=203889
|