History log of /freebsd-current/sys/dev/ata/chipsets/ata-intel.c
Revision Date Author Comments
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 05d1c205 30-Oct-2023 Dmitry Luhtionov <dmitryluhtionov@gmail.com>

Add IDs for Intel BayTrail SATA.


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 718cf2cc 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# 6750c3d0 08-Aug-2017 Alexander Motin <mav@FreeBSD.org>

Use "Ibex Peak" codename for "5 Series/3400 Series" chipsets.

This is shorter and unifies naming with later chipsets.

MFC after: 1 week


# 74b8d63d 10-Apr-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

Cleanup unnecessary semicolons from the kernel.

Found with devel/coccinelle.


# dd7df419 15-Nov-2015 Alexander Motin <mav@FreeBSD.org>

Increase reset assertion time from 10 to 100us.

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 after: 2 weeks


# 709c835a 08-Aug-2015 Alexander Motin <mav@FreeBSD.org>

Disable 32-bit PIO for 6Gbit/s Intel SATA controllers.

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 after: 2 weeks


# cdc58367 24-Mar-2015 Alexander Motin <mav@FreeBSD.org>

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.


# 3036de3c 23-Mar-2015 Alexander Motin <mav@FreeBSD.org>

Reduce priority of ATA/SATA drivers.

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 after: 2 weeks


# e67f3bec 25-Nov-2014 Alexander Motin <mav@FreeBSD.org>

Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.

MFC after: 1 week


# eda36fb4 15-Nov-2013 Alexander Motin <mav@FreeBSD.org>

Add some more IDs for Intel ATA, AHCI and USB controllers.


# 428e286d 19-Jul-2013 Jack F Vogel <jfv@FreeBSD.org>

Add new Coleto Creek device support: SATA, SMBus, and Watchdog devices.

MFC after: 1 week


# f49c6198 25-Jun-2013 Alexander Motin <mav@FreeBSD.org>

Add test for SATA registers writability and skip using them if it failed.

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


# d2ce15bd 06-Apr-2013 Marius Strobl <marius@FreeBSD.org>

- With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related
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.


# 45f6d665 04-Apr-2013 Alexander Motin <mav@FreeBSD.org>

Remove all legacy ATA code parts, not used since options ATA_CAM enabled in
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


# e1d6f7b4 02-Jan-2013 Jack F Vogel <jfv@FreeBSD.org>

Add Intel Lynx Point PCH SATA Controller Device IDs


# 29658c96 05-Nov-2012 Dimitry Andric <dim@FreeBSD.org>

Remove duplicate const specifiers in many drivers (I hope I got all of
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


# 5187458f 21-Mar-2012 Marius Strobl <marius@FreeBSD.org>

- First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers

MFC after: 1 week


# 9a14aa01 15-Jan-2012 Ulrich Spörlein <uqs@FreeBSD.org>

Convert files to UTF-8


# 9bea89c1 05-Jan-2012 Jim Harris <jimharris@FreeBSD.org>

Add 0x2826 device ID for C600 (Patsburg) SATA controller in RAID mode.

Reviewed by: mav
Approved by: scottl


# dd3ebdba 14-Dec-2011 Alexander Motin <mav@FreeBSD.org>

Add PCI IDs for the Intel ICH9M SATA controllers.

MFC after: 2 weeks


# dd60e051 22-Jul-2011 Alexander Motin <mav@FreeBSD.org>

- Use mutex to serialize index/data register pair usage, when
accessing SATA registers. Unserialized access under heavy load caused
wrong speed reporting and potentially could cause device loss.
- To free memory and other resources (including above), allocated
during chipinit() method call on attach, add new chipdeinit() method,
called during driver detach.

Submitted by: Andrew Boyer <aboyer@averesystems.com> (initial version)
Approved by: re (kib)
MFC after: 1 week


# e292b310 14-Jun-2011 Alexander Motin <mav@FreeBSD.org>

Skip BAR(5) usage for SATA registers access on ICH8M Apples, because for
some reason it causes system lock up. Linux does the same.

MFC after: 1 week


# 73e3bb65 11-May-2011 Jack F Vogel <jfv@FreeBSD.org>

Chipset support for the new Intel Panther Point PCH, thanks
to Seth Heasley for preparing the changes.


# c7dd7de6 21-Apr-2011 Alexander Motin <mav@FreeBSD.org>

According to ATA specifications, when ATAPI master is the only device, it
should respond with all zeroes to any access to slave registers. Test with
PATA devices confirmed such behavior. Unluckily, Intel SATA controllers in
legacy emulation mode behave differently, not making any difference between
ATA and ATAPI devices. It causes false positive slave device detection and,
as result, command timeouts.

To workaround this problem, mask result of legacy-emulated soft-reset with
the device presence information received from the SATA-specific registers.


# 53479021 21-Apr-2011 Alexander Motin <mav@FreeBSD.org>

- Fix mapping of the last two SATA ports on 6-port Intel controllers.
This improves hard-reset and hot-plug on these ports.
- Device with ID 0x29218086 is a 2-port variant of ICH9 in legacy mode.
Skip probing for nonexistent slave devices there.


# bf0477b2 31-Jan-2011 Jack F Vogel <jfv@FreeBSD.org>

Support for the new Patsburg PCH chipset:
- SMBus Controller
- SATA Controller
- HD Audio Controller
- Watchdog Controller

Thanks to Seth Heasley (seth.heasley@intel.com) for providing us code.

MFC after 3 days


# d5267ede 31-Jan-2011 Jack F Vogel <jfv@FreeBSD.org>

Support for the new DH89xxCC PCH chipset including:
- SATA controller
- Watchdog timer
- SMBus controller


# f1bfc8ab 24-Jan-2011 Alexander Motin <mav@FreeBSD.org>

ICH7 SATA controller in legacy mode can provide access to SATA registers
via AHCI-like memory resource at BAR(5). Use it if BIOS was so kind to
allocate memory for that BAR. This allows hot-plug support and connection
speed reporting.

MFC after: 2 weeks


# 82d2b37b 02-Nov-2010 Alexander Motin <mav@FreeBSD.org>

Remove stale line, accidentally slipped into r214016.

MFC after: 3 days


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# bda55b6a 18-Oct-2010 Alexander Motin <mav@FreeBSD.org>

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.


# bfc8500c 28-Aug-2010 Alexander Motin <mav@FreeBSD.org>

Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

Submitted by: jfv@
MFC after: 1 week


# aecfe194 10-Jul-2010 Alexander Motin <mav@FreeBSD.org>

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.


# 9a9bce34 10-Jul-2010 Alexander Motin <mav@FreeBSD.org>

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


# 2d0033c8 08-Jun-2010 Alexander Motin <mav@FreeBSD.org>

MFC r208796:
Fix PCH chipset IDs. They are 0x3bxx, not 0x3axx.

Approved by: re (kib)


# 6ee9deb1 04-Jun-2010 Alexander Motin <mav@FreeBSD.org>

Fix PCH chipset IDs. They are 0x3bxx, not 0x3axx.

Pointy hat to: me


# 4c881381 03-Mar-2010 Alexander Motin <mav@FreeBSD.org>

MFC r204210, r204216:
Add Intel PCH SATA controller IDs.


# 41a11d87 22-Feb-2010 Alexander Motin <mav@FreeBSD.org>

Oops! Wrong word order. :(


# 6f2c1316 22-Feb-2010 Alexander Motin <mav@FreeBSD.org>

Add Intel PCH SATA controller IDs.


# 4c75a1d3 19-Jan-2010 Alexander Motin <mav@FreeBSD.org>

MFC r200857:
Add support for Intel SCH PATA controller.

PR: kern/140251


# 7aab51b3 22-Dec-2009 Alexander Motin <mav@FreeBSD.org>

Add support for Intel SCH PATA controller.

PR: kern/140251


# 71e7360e 12-Dec-2009 Alexander Motin <mav@FreeBSD.org>

MFC r200171, r200182, r200275, r200295, r200359:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into
cam(4) interface modules. When enabled, this option 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.(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)


# 066f913a 05-Dec-2009 Alexander Motin <mav@FreeBSD.org>

MFp4:
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)


# 02648336 26-Nov-2009 Alexander Motin <mav@FreeBSD.org>

MFC r199645, r199646:
Fix Intel PATA UDMA timings setting, affecting write performance.
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.
Release over-agressive WDMA0 mode timings as close to spec as chip can.


# 555a8009 23-Nov-2009 Alexander Motin <mav@FreeBSD.org>

MFC r198717:
- 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.


# 301f81f0 21-Nov-2009 Alexander Motin <mav@FreeBSD.org>

Release over-agressive WDMA0 mode timings as close to spec as chip can.


# 48a21eb9 22-Nov-2009 Alexander Motin <mav@FreeBSD.org>

Fix Intel PATA UDMA timings setting, affecting write performance.
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.


# b882e039 16-Nov-2009 Alexander Motin <mav@FreeBSD.org>

MFC r199074:

Add more ICH10 chip IDs.


# fb549e86 09-Nov-2009 Alexander Motin <mav@FreeBSD.org>

Add more ICH10 chip IDs.

Submitted by: Dmitry S. Luhtionov <mitya@cabletv.dp.ua>


# ebbb35ba 31-Oct-2009 Alexander Motin <mav@FreeBSD.org>

MFp4:
- 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.


# f95dcaae 24-Jun-2009 Alexander Motin <mav@FreeBSD.org>

MFp4:
Reduce default PCI ATA drivers priorities from absolute to default,
to allow them been overriden. It was so before modularization.


# db7da923 01-Jun-2009 Xin LI <delphij@FreeBSD.org>

According to Intel documentation (307013), 3Gbps mode is supported on
Desktop chipsets only for ICH7 series, so mark all ICH7M as ATA_SA150
instead of ATA_SA300.


# 9cf4fe2e 30-Mar-2009 Alexander Motin <mav@FreeBSD.org>

Integrate user/mav/ata branch:

Add ch_suspend/ch_resume methods for PCI controllers and implement them
for AHCI. Refactor AHCI channel initialization according to it.

Fix Port Multipliers operation. It is far from perfect yet, but works now.
Tested with JMicron JMB363 AHCI + SiI 3726 PMP pair.
Previous version was also tested with SiI 4726 PMP.

Hardware sponsored by: Vitsch Electronics / VEHosting.nl


# 9373e7bb 04-Mar-2009 Robert Noland <rnoland@FreeBSD.org>

Remove the local management of INTx as this is now taken care of by pci.

Reviewed by: jhb
MFC after: 3 days


# 78d15416 18-Feb-2009 Alexander Motin <mav@FreeBSD.org>

Quite mechanical ch_detach implementations for all atapci subdrivers.
Some dmainit call fixes for previous commit.


# 04ff88ce 18-Feb-2009 Alexander Motin <mav@FreeBSD.org>

As soon as they called in only same one place (ata_pcichannel_attach()),
join allocate() and dmainit() atapci subdriver's channel initialization
methods into single ch_attach() method.

As opposite to ch_attach() add new ch_detach() method to deallocate/disable
channel.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 13014ca0 08-Oct-2008 Søren Schmidt <sos@FreeBSD.org>

This is the roumored ATA modulerisation works, and it needs a little explanation.

If you just config KERNEL as usual there should be no apparent changes, you'll get all chipset support code compiled in.

However there is now a way to only compile in code for chipsets needed on a pr vendor basis. ATA now has the following "device" entries:

atacore: ATA core functionality, always needed for any ATA setup

atacard: CARDBUS support
atacbus: PC98 cbus support
ataisa: ISA bus support
atapci: PCI bus support only generic chipset support.

ataahci: AHCI support, also pulled in by some vendor modules.

ataacard, ataacerlabs, ataadaptec, ataamd, ataati, atacenatek, atacypress, atacyrix, atahighpoint, ataintel, ataite, atajmicron, atamarvell, atamicron, atanational, atanetcell, atanvidia, atapromise, ataserverworks, atasiliconimage, atasis, atavia; Vendor support, ie atavia for VIA chipsets

atadisk: ATA disk driver
ataraid: ATA softraid driver

atapicd: ATAPI cd/dvd driver
atapifd: ATAPI floppy/flashdisk driver
atapist: ATAPI tape driver

atausb: ATA<>USB bridge
atapicam: ATA<>CAM bridge

This makes it possible to config a kernel with just VIA chipset support by having the following ATA lines in the kernel config file:

device atacore
device atapci
device atavia

And then you need the atadisk, atapicd etc lines in there just as usual.

If you use ATA as modules loaded at boot there is few changes except the rename of the "ata" module to "atacore", things looks just as usual.
However under atapci you now have a whole bunch of vendor specific drivers, that you can kldload individually depending on you needs. Drivers have the same names as used in the kernel config explained above.