Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/piixide.c
RevisionDateAuthorComments
 1.67  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.66  26-May-2018  jakllsch branches: 1.66.2;
Match PCI_PRODUCT_INTEL_82Q45_IDER.

Not entirely sure which chip map to use, but as this is for AMT, it's
probably not like there's a real PATA interface to configure DMA for,
and as the 965 AMT stuff uses the sata version of the chip map, we'll
cargo cult it for now.
 1.65  01-Feb-2016  msaitoh branches: 1.65.16;
Rename macro (sync with pcidevs rev. 1.1246). No functional change.
 1.64  14-Nov-2012  jakllsch branches: 1.64.12; 1.64.14; 1.64.18;
enable the generic pciide detach function in piixide(4)
 1.63  31-Jul-2012  bouyer branches: 1.63.2;
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
 1.62  26-Jul-2012  jakllsch Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
 1.61  24-Jul-2012  jakllsch Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 and
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump.
First step in reverting regressions to ata(4) subsystem during the addition of
port multiplier support.
 1.60  15-Jul-2012  dsl Some namespace protection (and add greppablity).
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_.
Don't use an enum for drive_type - you don't know how big it will be.
Move driver_type to avoid implicit structure padding (esp on arm).
This change is purely lexical and mechanical.

Update to 6.99.9 - this wasn't done when the SATA PMP changes
were made - I'm sure they warranted a bump.
 1.59  02-Jul-2012  bouyer Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
when SATA cable move was needed
 1.58  05-Mar-2012  sborrill Add support for Intel 6 Series Serial ATA Controller
 1.57  04-Apr-2011  dyoung branches: 1.57.4; 1.57.8; 1.57.10;
Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.56  05-Nov-2010  jakllsch branches: 1.56.2;
Pave the way for detachment of pciide(4)-family ATA controllers.
 1.55  30-Jul-2010  njoly Adjust for Intel ICH10 devices update.
 1.54  24-Feb-2010  dyoung branches: 1.54.2;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.53  08-Jan-2010  dyoung branches: 1.53.2;
Expand PMF_FN_* macros.
 1.52  30-Nov-2009  sborrill Add support for Intel 3400 SATA
 1.51  19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.50  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.49  09-Mar-2009  christos Match Inter 82965PM, from Anon Ymous
 1.48  11-Feb-2009  markd Add some more ICH9 SATA controller variants.
 1.47  01-Oct-2008  christos branches: 1.47.2; 1.47.4; 1.47.8; 1.47.12;
ICH10 support from Brad du Plessis
 1.46  18-Mar-2008  cube branches: 1.46.4; 1.46.6; 1.46.10;
Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
 1.45  29-Feb-2008  dyoung Use PMF_FN_ARGS, PMF_FN_PROTO.
 1.44  15-Jan-2008  drochner branches: 1.44.2; 1.44.6;
fix some unaligned PCI config space accesses in suspend/resume functions
 1.43  04-Jan-2008  joerg Allow saving of up to 4 PCI registers in the IDE code.
 1.42  09-Dec-2007  jmcneill branches: 1.42.2;
Merge jmcneill-pm branch.
 1.41  09-Sep-2007  xtraeme branches: 1.41.6; 1.41.8; 1.41.10;
Another ICH8M SATA Controller found in jmcneill's laptop.
 1.40  31-Aug-2007  xtraeme Proper ICH8M IDE Controller support (missed in previous).
 1.39  31-Aug-2007  xtraeme Attach to the ICH8M IDE Controller.
 1.38  30-Aug-2007  xtraeme Attach to the ICH9 SATA devices.
 1.37  10-Mar-2007  itohy branches: 1.37.2; 1.37.10; 1.37.14; 1.37.16;
I tried the test code in PR kern/35934 on PIIX4 and ICH6,
both of which turned out to have the problem.
Enabled (untested) workaround for all PIIX controllers.

XXX Do other controllers also have this problem?
 1.36  09-Feb-2007  ad branches: 1.36.2;
Merge newlock2 to head.
 1.35  01-Dec-2006  cube branches: 1.35.2; 1.35.4;
Now that we have a AHCI driver (thanks a bunch, Manuel!), we can remove the
nonsense quirk that switched operating mode on ICH7 and ICH8.

I removed the obvious candidates for ahcisata(4), and I'll have a closer
look later if there are others to be removed; ahcisata(4) will take over
handling the device anyway, but there is no reason to keep AHCI devices in
that list.

Along the way, remove the code that tries to put the chip in Enhanced mode,
it makes absolutely no sense to do that, and some BIOSes might not have
prepared the BARs for that, as proven by PR#34885. If people want to use
all IDE and SATA channels, they have to tell the BIOS.
 1.34  24-Nov-2006  wiz s/independant/independent/, from Zafer.
 1.33  16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.32  08-Nov-2006  drochner avoid magic number
 1.31  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.30  24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.29  03-Sep-2006  xtraeme branches: 1.29.2; 1.29.4;
* Add support for ICH8 and ICH8M SATA/RAID controllers.
* If the controller is in AHCI, ask for SATA IDE mode of operation.

jsg@openbsd says:

"X60/T60 Thinkpads are shipped in AHCI configuration by default,
this makes them work without changing a BIOS option."

Tested by eye of the beholder. From OpenBSD.

Ok'ed tls.
 1.28  08-Aug-2006  cube Add support for the 631xESB/632xESB.
 1.27  17-Jun-2006  jmcneill branches: 1.27.2;
Restore IDE and UDMA timings on resume for the PIIX4.
 1.26  19-May-2006  markd branches: 1.26.2; 1.26.4;
Add Intel 82801GBM/GHM Serial ATA Controller.
 1.25  11-Dec-2005  christos branches: 1.25.4; 1.25.6; 1.25.8; 1.25.12;
merge ktrace-lwp.
 1.24  10-Aug-2005  bouyer Not add PIIX are wired to compat mode these days. Problem reported and fix
tested by Havard Eidnes.
 1.23  21-Jul-2005  tron Add support for PATA and SATA ports in the Intel ICH7 southbridge (82801G).
Patch supplied by Marcello Balduccini in PR port-i386/30795.
 1.22  20-Jun-2005  briggs branches: 1.22.2;
Match the 6300ESB on-board SATA/RAID controller.
Set the ATA RAID flag, if appropriate, in the SATA chip map.
Ensure that the interrupts are enabled in the SATA chip map.
 1.21  15-Jun-2005  bouyer Support Intel 82801FBM Serial ATA Controller. From Kurt Schreiner on tech-kern.
 1.20  24-May-2005  lukem add __KERNEL_RCSID
 1.19  27-Feb-2005  perry branches: 1.19.2;
nuke trailing whitespace
 1.18  26-Jan-2005  jmcneill Add powerhooks for PIIX IDE driver.
 1.17  10-Nov-2004  cube branches: 1.17.4; 1.17.6;
Add support for the ICH6 IDE controller (82801FB).
 1.16  22-Oct-2004  cube Add support for the 82801FB/FR (ICH6/6R) SATA controllers.
 1.15  21-Aug-2004  thorpej atastart() (called only at splbio(), and from interrupts) can change
drive_flags, to make sure all drive_flags manipulations are done at
splbio().
 1.14  20-Aug-2004  thorpej Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
 1.13  19-Aug-2004  thorpej - Add and use a CHAN_TO_WDC() macro to get the wdc_softc from an
ata_channel.
- Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an
ata_channel.
- Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an
ata_channel.
- Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an
ata_channel. (This one just hides a cast, and is really just for
consistency with the others.)
 1.12  14-Aug-2004  thorpej - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
ata_channel. Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
maximum number of drives that can be present on the channel. For now,
this is always 2. Add an ATA_MAXDRIVES constant that places an upper
limit on this value, also currently 2.
 1.11  13-Aug-2004  thorpej WDCDEBUG -> ATADEBUG.
 1.10  13-Aug-2004  thorpej Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.
 1.9  11-May-2004  thorpej branches: 1.9.2;
Handle the i6300ESB IDE / SATA controllers. These are apparently just ICH5.
 1.8  03-Jan-2004  thorpej branches: 1.8.2;
More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
 1.7  03-Jan-2004  thorpej Rename "struct channel_softc" to "struct wdc_channel".
 1.6  14-Dec-2003  thorpej Split the Intel i31244 SATA controller ("Artisea") driver out of piixide
into its own driver (artsata).
 1.5  06-Dec-2003  bouyer Clone artisea_chip_map() for use by the ICH5 SATA controllers.
The 31244 is really different from the ICH5, and one day the map function
could be incompatibles. Suggested by thorpej@
 1.4  05-Dec-2003  bouyer Add support for the Intel 82801ER Serial ATA/Raid Controller.
From Simas Mockevicius on current-users@.
 1.3  27-Nov-2003  fvdl There are some cards that map the ATA control and IDE DMA registers
in a different fashion. Individually, they have the same functionality,
but their layout is different. An example of such a chipset is
the Promise 203xx.

To be able to deal with this, transform the cmd and dma bus_space handles
into an array of handles, each seperately created with bus_space_subregion.
The code generated by using the extra indirection shouldn't change much,
since the extra indirection is negated by having the offset calculation
already done in bus_space_subregion. E.g.

bus_space_write_4(tag, handle, offset, value)

becomes

bus_space_write_4(tag, handles[offset], 0, value)

Reviewed by Manuel Bouyer. Tested on wdc_isa, wdc_pcmcia, viaide, piixide (i386)
and on cmdide (sparc64).
 1.2  11-Oct-2003  thorpej Cosmetic changes:
- Use static to unexport symbols that don't need to be exported.
- ANSI'ify.
- Some whitespace nits.
 1.1  08-Oct-2003  bouyer Split pciide in per-chip family driver, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0007.html
We now have:
acardide* at pci? dev ? function ? # Acard IDE controllers
aceride* at pci? dev ? function ? # Acer Lab IDE controllers
cmdide* at pci? dev ? function ? # CMD tech IDE controllers
cypide* at pci? dev ? function ? # Cypress IDE controllers
hptide* at pci? dev ? function ? # Triones/HighPoint IDE controllers
optiide* at pci? dev ? function ? # Opti IDE controllers
piixide* at pci? dev ? function ? # Intel IDE controllers
pdcide* at pci? dev ? function ? # Promise IDE controllers
siside* at pci? dev ? function ? # SiS IDE controllers
slide* at pci? dev ? function ? # Symphony Labs IDE controllers
viaide* at pci? dev ? function ? # VIA/AMD/Nvidia IDE controllers
pciide* at pci? dev ? function ? flags 0x0000 # GENERIC pciide driver

serverworks driver not commited yet; there are still copyright issues about
it.
 1.8.2.1  28-Jul-2004  tron branches: 1.8.2.1.2;
Pull up revision 1.9 (requested by joda in ticket #721):
Handle the i6300ESB IDE / SATA controllers. These are apparently just ICH5.
 1.8.2.1.2.4  22-Aug-2005  riz Pull up following revision(s) (requested by bouyer in ticket #5602):
sys/dev/pci/piixide.c: revision 1.24
Not all PIIX are wired to compat mode these days. Problem reported and fix
tested by Havard Eidnes.
 1.8.2.1.2.3  21-Jun-2005  riz Pull up revision 1.21 (requested by bouyer in ticket #2008):
Support Intel 82801FBM Serial ATA Controller. From Kurt Schreiner on tech-kern.
 1.8.2.1.2.2  19-May-2005  tron Pull up revision 1.17 via patch (requested by riz in ticket #1531):
Ad support for the ICH6 IDE controller (82801FB).
 1.8.2.1.2.1  19-May-2005  tron Pull up revision 1.16 (requested by riz in ticket #1531):
Add support for the 82801FB/FR (ICH6/6R) SATA controllers.
 1.9.2.10  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.9  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.9.2.8  04-Feb-2005  skrll Sync with HEAD.
 1.9.2.7  14-Nov-2004  skrll Sync with HEAD.
 1.9.2.6  02-Nov-2004  skrll Sync with HEAD.
 1.9.2.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.4  18-Sep-2004  skrll Sync with HEAD.
 1.9.2.3  25-Aug-2004  skrll Sync with HEAD.
 1.9.2.2  03-Aug-2004  skrll Sync with HEAD
 1.9.2.1  11-May-2004  skrll file piixide.c was added on branch ktrace-lwp on 2004-08-03 10:49:12 +0000
 1.17.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.17.6.1  12-Feb-2005  yamt sync with head.
 1.17.4.1  29-Apr-2005  kent sync with -current
 1.19.2.5  08-Apr-2008  jdc Pull up revisions:
src/sys/dev/pci/pcidevs 1.816
src/sys/dev/pci/piixide.c 1.28
(requested by bouyer in ticket #1909).

Add device IDs for Intel's 631xESB/632xESB southbridges, and start the list
for the 5000X northbridge. I'll add the rest later, the spec is currently
unavailable so I'll collect them from another source.

Add support for the 631xESB/632xESB.
 1.19.2.4  24-Aug-2005  tron Pull up revision 1.24 (requested by bouyer in ticket #692):
Not add PIIX are wired to compat mode these days. Problem reported and fix
tested by Havard Eidnes.
 1.19.2.3  23-Jul-2005  riz Pull up revision 1.23 (requested by tron in ticket #609):
Add support for PATA and SATA ports in the Intel ICH7 southbridge (82801G).
Patch supplied by Marcello Balduccini in PR port-i386/30795.
 1.19.2.2  03-Jul-2005  tron Pull up revision 1.22 (requested by briggs in ticket #522):
Match the 6300ESB on-board SATA/RAID controller.
Set the ATA RAID flag, if appropriate, in the SATA chip map.
Ensure that the interrupts are enabled in the SATA chip map.
 1.19.2.1  21-Jun-2005  tron Pull up revision 1.21 (requested by bouyer in ticket #479):
Support Intel 82801FBM Serial ATA Controller. From Kurt Schreiner on tech-kern.
 1.22.2.8  24-Mar-2008  yamt sync with head.
 1.22.2.7  17-Mar-2008  yamt sync with head.
 1.22.2.6  21-Jan-2008  yamt sync with head
 1.22.2.5  27-Oct-2007  yamt sync with head.
 1.22.2.4  03-Sep-2007  yamt sync with head.
 1.22.2.3  26-Feb-2007  yamt sync with head.
 1.22.2.2  30-Dec-2006  yamt sync with head.
 1.22.2.1  21-Jun-2006  yamt sync with head.
 1.25.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.25.8.4  14-Sep-2006  yamt sync with head.
 1.25.8.3  11-Aug-2006  yamt sync with head
 1.25.8.2  26-Jun-2006  yamt sync with head.
 1.25.8.1  24-May-2006  yamt sync with head.
 1.25.6.1  01-Jun-2006  kardel Sync with head.
 1.25.4.1  09-Sep-2006  rpaulo sync with head
 1.26.4.1  13-Jul-2006  gdamore Merge from HEAD.
 1.26.2.2  19-Jun-2006  chap Sync with head.
 1.26.2.1  19-May-2006  chap file piixide.c was added on branch chap-midi on 2006-06-19 04:01:37 +0000
 1.27.2.2  07-Sep-2006  riz Pull up following revision(s) (requested by xtraeme in ticket #117):
sys/dev/pci/piixide.c: revision 1.29
sys/dev/pci/pciide_piix_reg.h: revision 1.12
* Add support for ICH8 and ICH8M SATA/RAID controllers.
* If the controller is in AHCI, ask for SATA IDE mode of operation.
jsg@openbsd says:
"X60/T60 Thinkpads are shipped in AHCI configuration by default,
this makes them work without changing a BIOS option."
Tested by eye of the beholder. From OpenBSD.
Ok'ed tls.
 1.27.2.1  11-Aug-2006  riz Pull up following revision(s) (requested by cube in ticket #8):
sys/dev/pci/piixide.c: revision 1.28
sys/dev/pci/pcidevs: revision 1.816
Add device IDs for Intel's 631xESB/632xESB southbridges, and start the list
for the 5000X northbridge. I'll add the rest later, the spec is currently
unavailable so I'll collect them from another source.
Add support for the 631xESB/632xESB.
 1.29.4.2  10-Dec-2006  yamt sync with head.
 1.29.4.1  22-Oct-2006  yamt sync with head
 1.29.2.3  06-Feb-2007  ad Quiten noisy boot messages.
 1.29.2.2  12-Jan-2007  ad Sync with head.
 1.29.2.1  18-Nov-2006  ad Sync with head.
 1.35.4.1  06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.35.2.1  24-Oct-2007  pavel Pull up following revisions (requested by msaitoh in ticket #935):
sys/dev/pci/piixide.c: revision 1.38-1.41 via patch
sys/dev/pci/pcidevs: revision 1.900 via patch
Attach to the ICH9 SATA devices.
Attach to the ICH8M IDE Controller.
Proper ICH8M IDE Controller support (missed in previous).
Another ICH8M SATA Controller found in jmcneill's laptop.
 1.36.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.37.16.3  23-Mar-2008  matt sync with HEAD
 1.37.16.2  09-Jan-2008  matt sync with HEAD
 1.37.16.1  06-Nov-2007  matt sync with HEAD
 1.37.14.6  08-Dec-2007  jmcneill Rename pnp(9) -> pmf(9), as requested by many.
 1.37.14.5  06-Nov-2007  joerg Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
three layers (class logic, device logic, bus logic), all of them being
optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
not suspended (even partially), device_is_enabled returns true if the
device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
pnp_system_resume. Before running any suspend/resume handlers, check
that all currently attached devices support power management and bail
out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
can register what events they are interested in and whether the handler
should be global or not.
- Introduce device_active API for devices to mark themselve in use from
either the system or the device. Use this to implement the idle handling
for audio and input devices. This is intended to replace most ad-hoc
watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.
 1.37.14.4  02-Oct-2007  joerg Sync with HEAD.
 1.37.14.3  01-Oct-2007  joerg Extend device API by device_power_private and device_power_set_private.
The latter is a temporary mean until the pnp_register API itself is
overhault. This functions allow a generic power handler to store its
state independent of the driver.

Use this and revamp the PCI power handling. Pretty much all PCI devices
had power handlers that did the same thing, generalize this in
pci_generic_power_register/deregister and the handler. This interface
offers callbacks for the drivers to save and restore state on
transistions. After a long discussion with jmcneill@ it was considered
to be powerful enough until evidence is shown that devices can handle
D1/D2 with less code and higher speed than without the full
save/restore. The generic code is carefully written to handle device
without PCI-PM support and ensure that the correct registers are written
to when D3 loses all state.

Reimplement the generic PCI network device handling on
top of PCI generic power handling.

Introduce pci_disable_retry as used and implemented locally at least by
ath(4) and iwi(4). Use it in this drivers to restore behaviour from
before the introduction of generic PCI network handling.

Convert all PCI drivers that were using pnp_register to the new
framework. The only exception is vga(4) as it is commonly used as
console device. Add a note therein that this should be fixed later.
 1.37.14.2  03-Sep-2007  jmcneill Sync with HEAD.
 1.37.14.1  03-Aug-2007  jmcneill Pull in power management changes from private branch.
 1.37.10.2  10-Sep-2007  skrll Sync with HEAD.
 1.37.10.1  03-Sep-2007  skrll Sync with HEAD.
 1.37.2.1  09-Oct-2007  ad Sync with head.
 1.41.10.1  11-Dec-2007  yamt sync with head.
 1.41.8.1  26-Dec-2007  ad Sync with head.
 1.41.6.1  18-Feb-2008  mjf Sync with HEAD.
 1.42.2.2  19-Jan-2008  bouyer Sync with HEAD
 1.42.2.1  08-Jan-2008  bouyer Sync with HEAD
 1.44.6.2  05-Oct-2008  mjf Sync with HEAD.
 1.44.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.44.2.1  24-Mar-2008  keiichi sync with head.
 1.46.10.1  19-Oct-2008  haad Sync with HEAD.
 1.46.6.1  10-Oct-2008  skrll Sync with HEAD.
 1.46.4.3  11-Aug-2010  yamt sync with head.
 1.46.4.2  11-Mar-2010  yamt sync with head
 1.46.4.1  04-May-2009  yamt sync with head.
 1.47.12.1  21-Apr-2010  matt sync to netbsd-5
 1.47.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.47.4.2  17-Mar-2012  bouyer Pull up following revision(s) (requested by sborrill in ticket #1739):
sys/dev/pci/piixide.c: revision 1.58
sys/dev/pci/pcidevs: patch
Add support for Intel 6 Series Serial ATA Controller
 1.47.4.1  18-Dec-2009  snj Pull up following revision(s) (requested by sborrill in ticket #1175):
sys/dev/pci/piixide.c: revision 1.52
Add support for Intel 3400 SATA
 1.47.2.2  28-Apr-2009  skrll Sync with HEAD.
 1.47.2.1  03-Mar-2009  skrll Sync with HEAD.
 1.53.2.3  06-Nov-2010  uebayasi Sync with HEAD.
 1.53.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.53.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.54.2.2  21-Apr-2011  rmind sync with head
 1.54.2.1  05-Mar-2011  rmind sync with head
 1.56.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.57.10.1  07-Mar-2012  riz Pull up following revision(s) (requested by sborrill in ticket #98):
sys/dev/pci/piixide.c: revision 1.58
Add support for Intel 6 Series Serial ATA Controller
 1.57.8.1  06-Mar-2012  mrg sync to -current
 1.57.4.3  16-Jan-2013  yamt sync with (a bit old) head
 1.57.4.2  30-Oct-2012  yamt sync with head
 1.57.4.1  17-Apr-2012  yamt sync with head
 1.63.2.3  03-Dec-2017  jdolecek update from HEAD
 1.63.2.2  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.63.2.1  09-Oct-2012  bouyer Support transfers of up to MACHINE_MAXPHYS in all pciide variants, and ahci.
wd(4) limits its maxphys depending on the drives's capability (64k sectors
for LBA48, 256 sectors for LBA and 128 sectors for older devices).

I assumed all pciide controllers could do MACHINE_MAXPHYS transfers, but
this may not be true. The capabilities of each controller variants should be
looked at more closely.
 1.64.18.1  18-Jan-2017  skrll Sync with netbsd-5
 1.64.14.1  19-Mar-2016  skrll Sync with HEAD
 1.64.12.1  09-Dec-2016  snj Pull up following revision(s) (requested by msaitoh in ticket #1298):
sys/dev/pci/piixide.c: revision 1.65
sys/dev/pci/pcidevs: revision 1.1246
- s/82081/82801/ from OpenBSD.
- 0x2829 is SATA. 0x282a is RAID.
--
Rename macro (sync with pcidevs rev. 1.1246). No functional change.
 1.65.16.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.65.16.1  25-Jun-2018  pgoyette Sync with HEAD
 1.66.2.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed