The NetBSD Project

CVS log for src/sys/dev/ic/ahcisata_core.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / ic

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.107.4.1 / (download) - annotate - [select for diffs], Mon Sep 11 14:39:21 2023 UTC (6 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.107: +4 -8 lines
Diff to previous 1.107 (colored) next main 1.108 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by abs in ticket #366):

	sys/dev/pci/ahcisata_pci.c: revision 1.70
	sys/dev/ic/ahcisata_core.c: revision 1.108
	sys/dev/ic/ahcisatavar.h: revision 1.28
	sys/conf/files: revision 1.1309

Rework AHCISATA_EXTRA_DELAY for kern/56737
- Remove AHCI_QUIRK_EXTRA_DELAY as issue appears to be drive and
  not controller related
- Replace AHCISATA_EXTRA_DELAY with AHCISATA_REMOVE_EXTRA_DELAY,
  so defaulting to enabling the extra delay, as the downside of
  slower probing on systems which do not need it is less than having
  other systems intermittently fail to probe and attach drives
- Also allow disabling extra delay with AHCISATA_EXTRA_DELAY_MS = 0

We should return to this code to work out which of the extra delays
are needed, and how long they need to be. It may be that faster
systems are more likely to trigger the issue (I've only seen it on
a 13th gen i7-13700, though only tested on a limited set)

Revision 1.108 / (download) - annotate - [select for diffs], Sun Sep 10 14:04:28 2023 UTC (6 months, 2 weeks ago) by abs
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.107: +4 -8 lines
Diff to previous 1.107 (colored) to selected 1.15.2.2 (colored)

Rework AHCISATA_EXTRA_DELAY for kern/56737

- Remove AHCI_QUIRK_EXTRA_DELAY as issue appears to be drive and
  not controller related
- Replace AHCISATA_EXTRA_DELAY with AHCISATA_REMOVE_EXTRA_DELAY,
  so defaulting to enabling the extra delay, as the downside of
  slower probing on systems which do not need it is less than having
  other systems intermittently fail to probe and attach drives
- Also allow disabling extra delay with AHCISATA_EXTRA_DELAY_MS = 0

We should return to this code to work out which of the extra delays
are needed, and how long they need to be. It may be that faster
systems are more likely to trigger the issue (I've only seen it on
a 13th gen i7-13700, though only tested on a limited set)

XXX pullup -10

Revision 1.75.4.5 / (download) - annotate - [select for diffs], Fri Dec 30 14:39:09 2022 UTC (14 months, 4 weeks ago) by martin
Branch: netbsd-9
Changes since 1.75.4.4: +21 -37 lines
Diff to previous 1.75.4.4 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #1557):

	sys/dev/ic/ahcisata_core.c: revision 1.83
	sys/dev/ic/ahcisata_core.c: revision 1.102
	sys/dev/ata/ata.c: revision 1.164
	sys/dev/ata/ata_wdc.c: revision 1.115
	sys/dev/ata/ata_recovery.c: revision 1.4
	sys/dev/ic/siisata.c: revision 1.42
	sys/dev/ic/wdc.c: revision 1.308
	sys/dev/ic/mvsata.c: revision 1.56
	sys/dev/scsipi/atapi_wdc.c: revision 1.138
	sys/dev/ic/siisata.c: revision 1.49
	sys/dev/ata/atavar.h: revision 1.105
	sys/dev/ata/wd.c: revision 1.460
	sys/dev/ata/ata.c: revision 1.155
	sys/dev/ata/wd.c: revision 1.462
	sys/dev/ata/atavar.h: revision 1.109
	sys/dev/ata/satapmp_subr.c: revision 1.16
	sys/dev/ic/wdc.c: revision 1.299
	sys/dev/ic/ahcisata_core.c: revision 1.93
	sys/dev/ata/ata_wdc.c: revision 1.120
	sys/dev/ic/wdcvar.h: revision 1.100
	sys/dev/scsipi/atapi_wdc.c: revision 1.141
	sys/dev/ic/mvsata.c: revision 1.61
	sys/dev/usb/umass_isdata.c	(apply patch)

drop wd lock in wdstart1() before calling the ata_bio hook; when called
from ata thread context, that can still need to sleep for wdc attachments
in wdcwait()

fix use-after-free for ata xfer on bio submission found by KASAN
driver ata_bio hooks read parts of the xfer after ata_exec_xfer()
call in order to determine return value, change so that the hook
doesn't return any value - callers do not care already,
as all I/O requests are asynchronous

this problem was uncovered by recent change for wd(4) to not hold
wd mutex during ata_bio call, the interrupt for the xfer might
thus actually fire immediately

adjust also ata_exec_command driver hooks similarily - remove all
completion and waiting logic from drivers, upper layer ata code
using AT_WAIT/AT_POLL changed to call ata_wait_cmd() itself
PR kern/55169 by Nick Hudson

Function declaration formating whitespace consistency.  NFCI.

PR kern/56403
Fix kernel freeze for wdc(4) variants with ATAC_CAP_NOIRQ:

(1) Change ata_xfer_ops:c_poll from void to int function. When it returns
    ATAPOLL_AGAIN, let ata_xfer_start() iterate itself again.
(2) Let wdc_ata_bio_poll() return ATAPOLL_AGAIN until ATA_ITSDONE is
    achieved.

A similar change has been made for mvsata(4) (see mvsata_bio_poll()),
and no functional changes for other devices.

This is how the drivers worked before jdolecek-ncq branch was merged.
Note that this changes are less likely to cause infinite recursion:

(1) wdc_ata_bio_intr() called from wdc_ata_bio_poll() asserts ATA_ITSDONE
    in its error handling paths via wdc_ata_bio_done().
(2) Return value from c_start (= wdc_ata_bio_start()) is checked in
    ata_xfer_start().

Therefore, errors encountered in ata_xfer_ops:c_poll and c_start routines
terminate the recursion for wdc(4). The situation is similar for mvsata(4).

Still, there is a possibility where ata_xfer_start() takes long time to
finish a normal operation. This can result in a delayed response for lower
priority interrupts. But, I've never observed such a situation, even when
heavy thrashing takes place for swap partition in wd(4).
"Go ahead" by jdolecek@.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Aug 1 07:37:18 2022 UTC (19 months, 3 weeks ago) by mlelstv
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.106: +3 -21 lines
Diff to previous 1.106 (colored) to selected 1.15.2.2 (colored)

Revert last accidental commits.

Revision 1.106 / (download) - annotate - [select for diffs], Mon Aug 1 07:34:28 2022 UTC (19 months, 3 weeks ago) by mlelstv
Branch: MAIN
Changes since 1.105: +23 -5 lines
Diff to previous 1.105 (colored) to selected 1.15.2.2 (colored)

Also fix shift values for SCT constants.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Nov 19 23:46:55 2021 UTC (2 years, 4 months ago) by rin
Branch: MAIN
Changes since 1.104: +25 -15 lines
Diff to previous 1.104 (colored) to selected 1.15.2.2 (colored)

ahcisata(4): Introduce AHCI_QUIRK_EXTRA_DELAY quirk for devices that
need extra delays as done by AHCISATA_EXTRA_DELAY option.

Enable this quirk for "C600/X79 AHCI". Also add commented out quirk
entries for "Bay Trail SATA (AHCI)" and "Mobile AHCI SATA Controller",
for which non-reproducible failures worked around by extra delays have
been reported.

500 ms of delays inserted by these option/quirk may be too much. Add
AHCISATA_EXTRA_DELAY_MS option to adjust number of delays in ms, like:

----
options 	AHCISATA_EXTRA_DELAY_MS=200
----

Thanks prlw1@ and jun@ for testing!

Revision 1.104 / (download) - annotate - [select for diffs], Wed Nov 10 17:19:30 2021 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored) to selected 1.15.2.2 (colored)

s/endianess/endianness/

Revision 1.103 / (download) - annotate - [select for diffs], Mon Oct 11 12:48:10 2021 UTC (2 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.102: +12 -2 lines
Diff to previous 1.102 (colored) to selected 1.15.2.2 (colored)

ahcisata: remove excessive delays from drive probe path

There are a handful of inexplicable 500ms delays introduced to the drive
detect path in this driver, slowing boot. They can be re-enabled with
options AHCISATA_EXTRA_DELAY, but should not be enabled for normal kernels.
If a delay does need to be introduced in these places, the value should
either be more carefully selected or the scope limited to hardware that
requires the extra delay.

Revision 1.102 / (download) - annotate - [select for diffs], Tue Oct 5 08:01:05 2021 UTC (2 years, 5 months ago) by rin
Branch: MAIN
Changes since 1.101: +12 -8 lines
Diff to previous 1.101 (colored) to selected 1.15.2.2 (colored)

PR kern/56403

Fix kernel freeze for wdc(4) variants with ATAC_CAP_NOIRQ:

(1) Change ata_xfer_ops:c_poll from void to int function. When it returns
    ATAPOLL_AGAIN, let ata_xfer_start() iterate itself again.

(2) Let wdc_ata_bio_poll() return ATAPOLL_AGAIN until ATA_ITSDONE is
    achieved.

A similar change has been made for mvsata(4) (see mvsata_bio_poll()),
and no functional changes for other devices.

This is how the drivers worked before jdolecek-ncq branch was merged.

Note that this changes are less likely to cause infinite recursion:

(1) wdc_ata_bio_intr() called from wdc_ata_bio_poll() asserts ATA_ITSDONE
    in its error handling paths via wdc_ata_bio_done().

(2) Return value from c_start (= wdc_ata_bio_start()) is checked in
    ata_xfer_start().

Therefore, errors encountered in ata_xfer_ops:c_poll and c_start routines
terminate the recursion for wdc(4). The situation is similar for mvsata(4).

Still, there is a possibility where ata_xfer_start() takes long time to
finish a normal operation. This can result in a delayed response for lower
priority interrupts. But, I've never observed such a situation, even when
heavy thrashing takes place for swap partition in wd(4).

"Go ahead" by jdolecek@.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Sep 3 01:23:33 2021 UTC (2 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.100: +6 -18 lines
Diff to previous 1.100 (colored) to selected 1.15.2.2 (colored)

revert "make ahcisata(4) work on rk3399 (rockpro64)" from 23-06-2021.

this problem is known to affect more than AHCI, and a more general
solution has been commited now.

Revision 1.100 / (download) - annotate - [select for diffs], Sat Aug 7 16:19:11 2021 UTC (2 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2
Changes since 1.99: +3 -4 lines
Diff to previous 1.99 (colored) to selected 1.15.2.2 (colored)

Merge thorpej-cfargs2.

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Wed Aug 4 20:14:42 2021 UTC (2 years, 7 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.99: +3 -4 lines
Diff to previous 1.99 (colored) next main 1.100 (colored) to selected 1.15.2.2 (colored)

Adapt to CFARGS().

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:23 2021 UTC (2 years, 7 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.98: +18 -6 lines
Diff to previous 1.98 (colored) next main 1.99 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.99 / (download) - annotate - [select for diffs], Wed Jun 23 00:56:41 2021 UTC (2 years, 9 months ago) by mrg
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base
Branch point for: thorpej-cfargs2
Changes since 1.98: +18 -6 lines
Diff to previous 1.98 (colored) to selected 1.15.2.2 (colored)

make ahcisata(4) work on rk3399 (rockpro64)

on rk3399, a marvell 9230 ahci sata card consistently takes between
1213 and 1216 milliseconds, the ahci spec says this should complete
in 1000 or fewer.

add a "pcie-reset-ms" uint32 property that ahcisata defaults to 1000
if not set, and the rockchip platform code sets to 2000.


ok @jmcneill

Revision 1.98 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:55 2021 UTC (2 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.97: +5 -4 lines
Diff to previous 1.97 (colored) to selected 1.15.2.2 (colored)

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

Revision 1.83.2.2 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:44 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.83.2.1: +8 -8 lines
Diff to previous 1.83.2.1 (colored) to branchpoint 1.83 (colored) next main 1.84 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.97.2.1 / (download) - annotate - [select for diffs], Fri Apr 2 22:17:44 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.97: +5 -4 lines
Diff to previous 1.97 (colored) next main 1.98 (colored) to selected 1.15.2.2 (colored)

config_found_ia() -> config_found() w/ CFARG_IATTR.

Revision 1.97 / (download) - annotate - [select for diffs], Thu Mar 4 07:29:40 2021 UTC (3 years ago) by skrll
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Changes since 1.96: +6 -6 lines
Diff to previous 1.96 (colored) to selected 1.15.2.2 (colored)

Use BUS_ADDR_{LO,HI}32.  NFC.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Mar 4 07:24:38 2021 UTC (3 years ago) by skrll
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored) to selected 1.15.2.2 (colored)

Use __BIT().  NFC.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jan 11 16:48:35 2021 UTC (3 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored) to selected 1.15.2.2 (colored)

KNF

Revision 1.83.2.1 / (download) - annotate - [select for diffs], Sun Jan 3 16:34:58 2021 UTC (3 years, 2 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.83: +96 -69 lines
Diff to previous 1.83 (colored) to selected 1.15.2.2 (colored)

Sync w/ HEAD.

Revision 1.75.4.4 / (download) - annotate - [select for diffs], Wed Dec 30 15:12:38 2020 UTC (3 years, 2 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Changes since 1.75.4.3: +62 -34 lines
Diff to previous 1.75.4.3 (colored) to branchpoint 1.75 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #1167):

	sys/dev/ic/ahcisata_core.c: revision 1.84
	sys/dev/ic/ahcisata_core.c: revision 1.85
	sys/dev/ic/ahcisata_core.c: revision 1.88
	sys/dev/ic/ahcisata_core.c: revision 1.89
	sys/arch/arm/nvidia/tegra_ahcisata.c: revision 1.13
	sys/dev/ic/ahcisatavar.h: revision 1.26
	sys/dev/ic/ahcisata_core.c: revision 1.90
	sys/dev/ic/ahcisata_core.c: revision 1.91
	sys/dev/ic/ahcisata_core.c: revision 1.92
	sys/dev/ata/satareg.h: revision 1.6

ahci_exec_fis: wait for the correct amount of time when AT_WAIT is set

Retry clearing WDCTL_RST a few times before giving up. Makes SATA work in
Solidrun Honeycomb LX2K.

AHCI 1.3.1 specification says that it is good practice for system software
to 'zero-out' the memory allocated and referenced by PxCLB and PxFB.

ahci_intr: use ffs in the port bitmask instead of looping over all 32 bits

AHCI 1.3.1 section 5.5.3 "Processing Completed Commands" says that we
should clear PxIS before IS.IPS.

Add G3 and DevSleep definitions. This changes the mask used by
SControl_IPM_NONE from 0x3 to 0x7.

Make sure to ack IS after PxIS when polling and when using multiple MSI-X
messages.

Remove the AHCI_QUIRK_SKIP_RESET quirk now that the underlying issue is
fixed.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Dec 29 08:00:48 2020 UTC (3 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.93: +4 -5 lines
Diff to previous 1.93 (colored) to selected 1.15.2.2 (colored)

Some more whitespace consistency / KNF

Revision 1.93 / (download) - annotate - [select for diffs], Tue Dec 29 07:56:22 2020 UTC (3 years, 2 months ago) by skrll
Branch: MAIN
Changes since 1.92: +7 -7 lines
Diff to previous 1.92 (colored) to selected 1.15.2.2 (colored)

Function declaration formating whitespace consistency.  NFCI.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Dec 28 14:08:42 2020 UTC (3 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.91: +2 -6 lines
Diff to previous 1.91 (colored) to selected 1.15.2.2 (colored)

Remove the AHCI_QUIRK_SKIP_RESET quirk now that the underlying issue is
fixed.

Revision 1.91 / (download) - annotate - [select for diffs], Mon Dec 28 11:05:54 2020 UTC (3 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.90: +20 -5 lines
Diff to previous 1.90 (colored) to selected 1.15.2.2 (colored)

Make sure to ack IS after PxIS when polling and when using multiple MSI-X
messages.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Dec 27 15:13:07 2020 UTC (3 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored) to selected 1.15.2.2 (colored)

AHCI 1.3.1 section 5.5.3 "Processing Completed Commands" says that we
should clear PxIS before IS.IPS.

Revision 1.89 / (download) - annotate - [select for diffs], Sat Dec 26 15:40:29 2020 UTC (3 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.88: +10 -7 lines
Diff to previous 1.88 (colored) to selected 1.15.2.2 (colored)

ahci_intr: use ffs in the port bitmask instead of looping over all 32 bits

Revision 1.88 / (download) - annotate - [select for diffs], Sat Dec 26 10:56:25 2020 UTC (3 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.87: +8 -2 lines
Diff to previous 1.87 (colored) to selected 1.15.2.2 (colored)

AHCI 1.3.1 specification says that it is good practice for system software
to 'zero-out' the memory allocated and referenced by PxCLB and PxFB.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Dec 25 08:57:38 2020 UTC (3 years, 3 months ago) by skrll
Branch: MAIN
Changes since 1.86: +20 -20 lines
Diff to previous 1.86 (colored) to selected 1.15.2.2 (colored)

Trailing whitespace

Revision 1.86 / (download) - annotate - [select for diffs], Fri Dec 25 08:55:40 2020 UTC (3 years, 3 months ago) by skrll
Branch: MAIN
Changes since 1.85: +12 -12 lines
Diff to previous 1.85 (colored) to selected 1.15.2.2 (colored)

Use designated initializers for struct ata_bustype

Revision 1.85 / (download) - annotate - [select for diffs], Sun Dec 20 00:14:30 2020 UTC (3 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.84: +28 -16 lines
Diff to previous 1.84 (colored) to selected 1.15.2.2 (colored)

Retry clearing WDCTL_RST a few times before giving up. Makes SATA work in
Solidrun Honeycomb LX2K.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Dec 19 19:12:02 2020 UTC (3 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.83: +5 -9 lines
Diff to previous 1.83 (colored) to selected 1.15.2.2 (colored)

ahci_exec_fis: wait for the correct amount of time when AT_WAIT is set

Revision 1.60.4.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:16 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.60.4.3: +5 -25 lines
Diff to previous 1.60.4.3 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.82.4.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:03 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.82: +7 -27 lines
Diff to previous 1.82 (colored) next main 1.83 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.83 / (download) - annotate - [select for diffs], Mon Apr 13 10:49:34 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Branch point for: thorpej-futex
Changes since 1.82: +7 -27 lines
Diff to previous 1.82 (colored) to selected 1.15.2.2 (colored)

fix use-after-free for ata xfer on bio submission found by KASAN

driver ata_bio hooks read parts of the xfer after ata_exec_xfer()
call in order to determine return value, change so that the hook
doesn't return any value - callers do not care already,
as all I/O requests are asynchronous

this problem was uncovered by recent change for wd(4) to not hold
wd mutex during ata_bio call, the interrupt for the xfer might
thus actually fire immediately

adjust also ata_exec_command driver hooks similarily - remove all
completion and waiting logic from drivers, upper layer ata code
using AT_WAIT/AT_POLL changed to call ata_wait_cmd() itself

PR kern/55169 by Nick Hudson

Revision 1.60.4.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:21 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.60.4.2: +6 -1 lines
Diff to previous 1.60.4.2 (colored) to branchpoint 1.60 (colored) to selected 1.15.2.2 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.60.4.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:05 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.60.4.1: +29 -11 lines
Diff to previous 1.60.4.1 (colored) to branchpoint 1.60 (colored) to selected 1.15.2.2 (colored)

Merge changes from current as of 20200406

Revision 1.80.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:08 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.80.2.1: +8 -8 lines
Diff to previous 1.80.2.1 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored) to selected 1.15.2.2 (colored)

Sync with head.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Feb 19 16:04:39 2020 UTC (4 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.81: +8 -8 lines
Diff to previous 1.81 (colored) to selected 1.15.2.2 (colored)

C99 initializers for scsipi_bustype.  No functional change intended.

Revision 1.80.2.1 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:46 2020 UTC (4 years, 2 months ago) by ad
Branch: ad-namecache
Changes since 1.80: +7 -2 lines
Diff to previous 1.80 (colored) to selected 1.15.2.2 (colored)

Sync with head.

Revision 1.75.4.3 / (download) - annotate - [select for diffs], Tue Jan 21 15:19:51 2020 UTC (4 years, 2 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.75.4.2: +7 -2 lines
Diff to previous 1.75.4.2 (colored) to branchpoint 1.75 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by simonb in ticket #630):

	sys/dev/ic/ahcisatavar.h: revision 1.24
	sys/dev/pci/ahcisata_pci.c: revision 1.57
	sys/dev/ic/ahcisata_core.c: revision 1.81

Add new AHCI_QUIRK_BADNCQ quick for controllers that have issues with
NCQ on (some) drives.  Enable this quirk for ATI (AMD) SB600/SB700
controllers.  Alternate fix for kern/54790 and kern/54855.
ok jdolecek@, tested on my SB700 chipset and tsutsui's SB600 chipset.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Jan 18 11:26:11 2020 UTC (4 years, 2 months ago) by simonb
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.80: +7 -2 lines
Diff to previous 1.80 (colored) to selected 1.15.2.2 (colored)

Add new AHCI_QUIRK_BADNCQ quick for controllers that have issues with
NCQ on (some) drives.  Enable this quirk for ATI (AMD) SB600/SB700
controllers.  Alternate fix for kern/54790 and kern/54855.

ok jdolecek@, tested on my SB700 chipset and tsutsui's SB600 chipset.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Dec 27 09:41:50 2019 UTC (4 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored) to selected 1.15.2.2 (colored)

s/transfered/transferred/

Revision 1.75.4.2 / (download) - annotate - [select for diffs], Tue Dec 24 17:34:33 2019 UTC (4 years, 3 months ago) by martin
Branch: netbsd-9
Changes since 1.75.4.1: +16 -3 lines
Diff to previous 1.75.4.1 (colored) to branchpoint 1.75 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #576):

	sys/dev/ic/ahcisata_core.c: revision 1.79

When resetting a drive, if the command list is running and CLO is not
supported, attempt to stop the drive first and fail gracefully if that
fails instead of triggering a KASSERT on DIAGNOSTIC kernels.

Revision 1.79 / (download) - annotate - [select for diffs], Sun Dec 22 19:19:43 2019 UTC (4 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.78: +16 -3 lines
Diff to previous 1.78 (colored) to selected 1.15.2.2 (colored)

When resetting a drive, if the command list is running and CLO is not
supported, attempt to stop the drive first and fail gracefully if that
fails instead of triggering a KASSERT on DIAGNOSTIC kernels.

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Wed Oct 23 18:06:46 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RC1
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by jdolecek in ticket #357):

	sys/dev/ic/ahcisata_core.c: revision 1.76

Ensure cmdh_prdtl is 0 in ahci_do_reset_drive().
(I'm probably just being paranoid here.)

Revision 1.78 / (download) - annotate - [select for diffs], Sun Sep 29 21:28:20 2019 UTC (4 years, 5 months ago) by jakllsch
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.77: +6 -3 lines
Diff to previous 1.77 (colored) to selected 1.15.2.2 (colored)

Use AHCI_RFIS_SYNC in ahci_cmd_complete() AT_READREG case.

Ensures CPU sees the current device to host FIS before parsing.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Sep 29 21:25:08 2019 UTC (4 years, 5 months ago) by jakllsch
Branch: MAIN
Changes since 1.76: +3 -2 lines
Diff to previous 1.76 (colored) to selected 1.15.2.2 (colored)

Use AHCI_CMDTBL_SYNC in ahci_exec_fis() to ensure hardware sees the
command FIS.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Sep 29 21:21:41 2019 UTC (4 years, 5 months ago) by jakllsch
Branch: MAIN
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored) to selected 1.15.2.2 (colored)

Ensure cmdh_prdtl is 0 in ahci_do_reset_drive().

(I'm probably just being paranoid here.)

Revision 1.60.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:10 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.60: +251 -288 lines
Diff to previous 1.60 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.75 / (download) - annotate - [select for diffs], Sun Apr 7 17:46:49 2019 UTC (4 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.74: +15 -2 lines
Diff to previous 1.74 (colored) to selected 1.15.2.2 (colored)

If Command List Override is not supported by the controller, the FIS setting
the WDC_RST bit will fail if the drive already has BSY or DRQ set.
In this case, reset the channel and retry the drive reset.
With this, the drive reset will succeed after a atactl sleep command on
a controller without the CLO feature.

Revision 1.60.2.6 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:06 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.60.2.5: +6 -10 lines
Diff to previous 1.60.2.5 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Fri Jan 18 19:16:50 2019 UTC (5 years, 2 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-20190127
Changes since 1.73: +4 -8 lines
Diff to previous 1.73 (colored) to selected 1.15.2.2 (colored)

revert rev 1.73 - while it apparently helped Christos case, it re-broke
the disk detection on several other systems, so need something else

Revision 1.60.2.5 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:26 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.60.2.4: +10 -6 lines
Diff to previous 1.60.2.4 (colored) to branchpoint 1.60 (colored) to selected 1.15.2.2 (colored)

Synch with HEAD

Revision 1.73 / (download) - annotate - [select for diffs], Sat Jan 12 15:16:51 2019 UTC (5 years, 2 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-20190118
Changes since 1.72: +10 -6 lines
Diff to previous 1.72 (colored) to selected 1.15.2.2 (colored)

partially back-off rev. 1.68 - when the drive reset for port 15 fails,
on some systems controller isn't actually able to process further commands,
it's really necessary to do explicitely reset for drive 0 too

towards resolution of PR kern/53307

Revision 1.60.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:48 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.60.2.3: +25 -10 lines
Diff to previous 1.60.2.3 (colored) to branchpoint 1.60 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.72 / (download) - annotate - [select for diffs], Fri Dec 7 22:22:12 2018 UTC (5 years, 3 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-1226
Changes since 1.71: +25 -10 lines
Diff to previous 1.71 (colored) to selected 1.15.2.2 (colored)

add optional hook for intr establish when active port is attached, export
ahci_intr_port() in form suitable for interrupt hanlder, and probe for GHC
MRSM flag as courtesy for use by the intr hook

towards multi-vector MSI/MSI-X support

Revision 1.60.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:31 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.60.2.2: +202 -269 lines
Diff to previous 1.60.2.2 (colored) to branchpoint 1.60 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.71 / (download) - annotate - [select for diffs], Tue Nov 20 19:19:21 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored) to selected 1.15.2.2 (colored)

s/failing/failed/ for the aprint_error()

Revision 1.70 / (download) - annotate - [select for diffs], Tue Nov 20 08:47:55 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored) to selected 1.15.2.2 (colored)

also set WDCTL_4BIT for the softreset, seems this one is actually also
required to fully resolve the problem

PR kern/48214 PR kern/53307 PR kern/53524

Revision 1.69 / (download) - annotate - [select for diffs], Mon Nov 19 22:05:22 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.68: +9 -2 lines
Diff to previous 1.68 (colored) to selected 1.15.2.2 (colored)

during SRST (softreset), make a short delay between the RST set and
clear; SATA specifies minimum 5 usec for the toggle period, and
some controllers (seems usually on AMD motherboards) actually require it

this fixes the 'clearing WDCTL_RST failed' error in PR kern/53307
and PR kern/53524

confirmed working on a ASUS Prime A320M-K mainboard by me, and by Patrick
Welche on another Ryzen system

XXX pullup-8

Revision 1.68 / (download) - annotate - [select for diffs], Mon Nov 19 21:52:24 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.67: +28 -25 lines
Diff to previous 1.67 (colored) to selected 1.15.2.2 (colored)

if softreset during PMP detection fails, disable PMP, reset port and continue
with sig detected after the initial COMRESET

this does not yet fix the infamous 'clearing WDCTL_RST failed', but at least
now the disk is detected and usable when it happens

tested on AMD system with ASUS Prime A320M-K, similar to one from PR kern/53524

Revision 1.67 / (download) - annotate - [select for diffs], Mon Nov 19 19:52:08 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.66: +18 -18 lines
Diff to previous 1.66 (colored) to selected 1.15.2.2 (colored)

consistently use the SATA correct 'port %d' instead of 'channel', some
whitespace fixes

Revision 1.66 / (download) - annotate - [select for diffs], Fri Nov 2 21:27:30 2018 UTC (5 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.65: +8 -5 lines
Diff to previous 1.65 (colored) to selected 1.15.2.2 (colored)

fix ahci_detach() to count the ports propertly (same as attach), to avoid
triggerring panic when disks are plugged to non-adjacent ports - this should
fix panic reported by Masanobu SAITOH on current-users

also fix different miscounting of ports in ahci_setup_ports() and
ahci_reprobe_drives()

Revision 1.65 / (download) - annotate - [select for diffs], Wed Oct 24 19:38:00 2018 UTC (5 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.64: +28 -7 lines
Diff to previous 1.64 (colored) to selected 1.15.2.2 (colored)

detach the controller itself on shutdown; adjust to not detach already
detached atabus/channel

Revision 1.64 / (download) - annotate - [select for diffs], Mon Oct 22 20:13:47 2018 UTC (5 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.63: +122 -223 lines
Diff to previous 1.63 (colored) to selected 1.15.2.2 (colored)

Merge jdolecek-ncqfixes branch

- ata_xfer's are dynamicall allocated as needed using a pool, no longer
  limited to number of possible openings supported by controller; dump
  and recovery paths use dedicated pre-allocated storage
- moved callouts and condvars from ata_xfer to queue or channel, so that
  ata_xfer does not need special initialization
- slot allocation now done when xfer is being activated, uncoupled
  from memory allocation; active slots are no longer tracked by controller
  code
- channel and drive reset is done always via the atabus thread, and
  now executes with channel locked the whole time
- NCQ recovery moved to shared function, and run via the thread also
- added some workarounds for buggy error recovery AHCI emulation in QEMU
  and Parallels

designed to primarily fix kern/52614, but might also help with kern/47041
and kern/53183

Revision 1.62.2.10 / (download) - annotate - [select for diffs], Mon Oct 15 21:18:53 2018 UTC (5 years, 5 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.9: +18 -23 lines
Diff to previous 1.62.2.9 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored) to selected 1.15.2.2 (colored)

change the SATA/NCQ recovery to run in the atabus thread

Revision 1.62.2.9 / (download) - annotate - [select for diffs], Thu Oct 11 20:57:51 2018 UTC (5 years, 5 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.8: +28 -130 lines
Diff to previous 1.62.2.8 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

refactor shared parts of the SATA error recovery into new function
ata_recovery_resume() and use for ahcisata/siisata/mvsata, also replace
per-controller hold/unhold with generic version

move the shared recovery code into separate file ata_recovery.c

Revision 1.62.2.8 / (download) - annotate - [select for diffs], Sun Oct 7 15:44:47 2018 UTC (5 years, 5 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.7: +5 -6 lines
Diff to previous 1.62.2.7 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

move atastart() call after xfer deactivation during ATA command completion,
so that it's executed after the slot is freed

Revision 1.62.2.7 / (download) - annotate - [select for diffs], Thu Oct 4 17:59:35 2018 UTC (5 years, 5 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.6: +5 -5 lines
Diff to previous 1.62.2.6 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

further channel locking pass for reset

Revision 1.62.2.6 / (download) - annotate - [select for diffs], Wed Oct 3 19:20:48 2018 UTC (5 years, 5 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.5: +4 -7 lines
Diff to previous 1.62.2.5 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

change channel reset and drive reset for all ATA controllers to always
run via thread, and with channel lock held the whole time; the queue is
frozen while reset is pending

for this repurpose ata_reset_channel() into new ata_thread_run()

also adjust some device printfs to not leak xfer pointer, and avoid
aprint_* for non-autoconf messages

Revision 1.60.2.2 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:50 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.60.2.1: +4 -2 lines
Diff to previous 1.60.2.1 (colored) to branchpoint 1.60 (colored) to selected 1.15.2.2 (colored)

Ssync with HEAD

Revision 1.62.2.5 / (download) - annotate - [select for diffs], Sat Sep 22 09:22:59 2018 UTC (5 years, 6 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.4: +34 -26 lines
Diff to previous 1.62.2.4 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

separate ata_xfer slot allocation and the memory allocation, so that
there can be more queued xfers than number of supported slots by controller,
and use a pool instead of custom pre-allocation

primarily to help PR kern/52614

remove no longer needed custom wd(4) logic for flush cache

switch also wd(4) trim/suspend/setcache/wdioctlstrategy to sleep waiting
for the memory, they are all called from process context and this
avoids spurious failures

Revision 1.63 / (download) - annotate - [select for diffs], Tue Sep 18 21:28:22 2018 UTC (5 years, 6 months ago) by jdolecek
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.62: +4 -2 lines
Diff to previous 1.62 (colored) to selected 1.15.2.2 (colored)

fix ata_xfer leak on drive probe

Revision 1.62.2.4 / (download) - annotate - [select for diffs], Mon Sep 17 19:30:25 2018 UTC (5 years, 6 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.3: +4 -4 lines
Diff to previous 1.62.2.3 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

move ATAPI-only members of ata_xfer to an union struct to further save space

Revision 1.62.2.3 / (download) - annotate - [select for diffs], Mon Sep 17 18:36:13 2018 UTC (5 years, 6 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.2: +37 -25 lines
Diff to previous 1.62.2.2 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

move low-level protocol handlers hooks from ata_xfer to separate struct,
initialized statically

primarily to reduce ata_xfer struct size, but also improves readibility,
and enforces consistency

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Sat Sep 1 10:13:41 2018 UTC (5 years, 6 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62.2.1: +15 -14 lines
Diff to previous 1.62.2.1 (colored) to branchpoint 1.62 (colored) to selected 1.15.2.2 (colored)

only call ata_deactivate_xfer() once completely done with the active
xfer in controller code (i.e. after bus_dmamap_sync() et.al.), so that
the command slot is safe to be reused immediatelly after deactivate

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Fri Aug 31 19:08:03 2018 UTC (5 years, 6 months ago) by jdolecek
Branch: jdolecek-ncqfixes
Changes since 1.62: +16 -25 lines
Diff to previous 1.62 (colored) to selected 1.15.2.2 (colored)

refactor ata_xfer to be just dumb structure; move all callouts/condvars out

retry callout to wd(4); reset callout and the active/cmd finish condvars
to channel queue; change code using the condvars so it works if there
are multiple waiters

simplify the async wait code for cmds, replace ata_wait_xfer()/ata_wake_xfer()
with ata_wait_cmd()

fix the callout_invoking/ack race handling code for timeouts to
actually have chance to work; change mvsata(4) to use generic timeout func

towards resolution of kern/52614

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:44 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.60: +35 -35 lines
Diff to previous 1.60 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.62 / (download) - annotate - [select for diffs], Mon Jul 9 10:44:44 2018 UTC (5 years, 8 months ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-compat-0906, pgoyette-compat-0728, jdolecek-ncqfixes-base
Branch point for: jdolecek-ncqfixes
Changes since 1.61: +32 -32 lines
Diff to previous 1.61 (colored) to selected 1.15.2.2 (colored)

Avoid undefined behavior of signedness bit shift in ahcisata_core.c

sys/dev/ic/ahcisata_core.c:365:31, left shift of 1 by 31 places cannot be represented in type 'int'
sys/dev/ic/ahcisata_core.c:558:16, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with Kernel Undefined Behavior Sanitizer.

This code could be refactored in future and switched to ISSET(9) API,
instead of reinventing the common functionality.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jul 8 17:58:26 2018 UTC (5 years, 8 months ago) by jdolecek
Branch: MAIN
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored) to selected 1.15.2.2 (colored)

whitespace fix

Revision 1.43.2.6 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:02 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.43.2.5: +661 -338 lines
Diff to previous 1.43.2.5 (colored) next main 1.44 (colored) to selected 1.15.2.2 (colored)

update from HEAD

Revision 1.60 / (download) - annotate - [select for diffs], Sat Nov 11 16:49:13 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.59: +12 -8 lines
Diff to previous 1.59 (colored) to selected 1.15.2.2 (colored)

change several of error logs in ahci_intr_port() to use AHCIDEBUG_PRINT()
so they don't show unless debugging; e.g. the AHCI_P_IX_TFES seems to be
triggered normally by ATAPI with 'Media Change' error

adresses 'dmesg spam: ahcisata0 port 1: active 2 is 0x40000001 tfd 0x2051'
thread by Stefan Hertenberger on current-users@

Revision 1.59 / (download) - annotate - [select for diffs], Fri Oct 20 07:06:07 2017 UTC (6 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.58: +2 -4 lines
Diff to previous 1.58 (colored) to selected 1.15.2.2 (colored)

move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606

Revision 1.58 / (download) - annotate - [select for diffs], Sat Oct 7 16:05:32 2017 UTC (6 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.57: +631 -330 lines
Diff to previous 1.57 (colored) to selected 1.15.2.2 (colored)

Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)

Revision 1.57.6.29 / (download) - annotate - [select for diffs], Tue Sep 19 21:06:25 2017 UTC (6 years, 6 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.28: +66 -26 lines
Diff to previous 1.57.6.28 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored) to selected 1.15.2.2 (colored)

replace all remaining tsleep()/wakeup() calls with condition variables, or
calls to ata_delay(), as appropriate; change ata_delay() to require the
channel lock on entry, and pass the lock to kpause() for unlocking while
sleeping

Revision 1.57.6.28 / (download) - annotate - [select for diffs], Tue Sep 19 17:52:52 2017 UTC (6 years, 6 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.27: +12 -7 lines
Diff to previous 1.57.6.27 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

seems the CMD/CCS slot is always zero at least under QEMU for successful
polled commands, so go back to using it only on error path; while the value
seems good on real hardware, there is no good reason for register read anyway

Revision 1.57.6.27 / (download) - annotate - [select for diffs], Sun Sep 10 19:31:15 2017 UTC (6 years, 6 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.26: +97 -42 lines
Diff to previous 1.57.6.26 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

refactor code so that xfer c_start() hook is called with channel mutex held,
and hence the controller submit code no longer relies on spl

tested all the affected drivers - wdc (via piixide), ahci, mvsata, siisata,
both disk and atapi I/O

Revision 1.57.6.26 / (download) - annotate - [select for diffs], Sat Aug 12 22:12:04 2017 UTC (6 years, 7 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.25: +3 -2 lines
Diff to previous 1.57.6.25 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

do not reset drive after successful NCQ error recovery

Revision 1.57.6.25 / (download) - annotate - [select for diffs], Tue Aug 1 22:02:32 2017 UTC (6 years, 7 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.24: +15 -10 lines
Diff to previous 1.57.6.24 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

fix logic bug in processing of finished commands - mask of active
commands can change during the loop as c_intr() callback can queue
new commands, so the interrupt routine should only mark as finished
those which were actually active before the loop started; otherwise
the code marked as finished commands which were just started, and
being executed by HBA, leading to all sorts of data corruption

while here mark the active mask volatile, as it is modified from
interrupt context

this fixes for good the random crashes, short reads, and fatal command
errors which I've been tracing down for past couple weeks

thanks to Jonathan (jakllsch@) for testing, and a script to easily
triggered the condition, and led to this bug being finally found and squashed

Revision 1.57.6.24 / (download) - annotate - [select for diffs], Sat Jul 29 16:50:32 2017 UTC (6 years, 8 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.23: +2 -3 lines
Diff to previous 1.57.6.23 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

whitespace

Revision 1.57.6.23 / (download) - annotate - [select for diffs], Sat Jul 29 15:07:46 2017 UTC (6 years, 8 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.22: +33 -26 lines
Diff to previous 1.57.6.22 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

make compile without AHCI_DEBUG

Revision 1.57.6.22 / (download) - annotate - [select for diffs], Sat Jul 29 14:50:58 2017 UTC (6 years, 8 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.21: +5 -6 lines
Diff to previous 1.57.6.21 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

make ahci_channel_recover() non-static, so that it's visible in backtrace,
and can set a separate breakpoint there

Revision 1.57.6.21 / (download) - annotate - [select for diffs], Sat Jul 29 13:02:50 2017 UTC (6 years, 8 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.20: +53 -30 lines
Diff to previous 1.57.6.20 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

do not do the drive reset on non-fatal recovery - spec explicitely says
says the READ LOG EXT should only be done when neither COMRESET nor software
reset was done, and indeed it returns junk in this case

use C_RECOVERY slot for drive reset, so that it now will always succeed
in getting a slot, in cases when it would be necessary

adjust code and comments on the recovery path to explain better what's going on

with this AHCI error recovery works with real hardware without timeouts again

Revision 1.57.6.20 / (download) - annotate - [select for diffs], Sun Jul 23 14:14:43 2017 UTC (6 years, 8 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.19: +105 -65 lines
Diff to previous 1.57.6.19 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

rework the error handling and recovery, so that errors during the recovery
are handled correctly, and the recovery more closely follows the spec

this fixes e.g. NCQ error handling under QEMU, which doesn't implement
READ LOG EXT - previous code actually made the call 'succeed', returning bogus
(zero) slot/error/status

finished xfers are still handled before entering recovery (with channel frozen)
to avoid unnecessary retries

Revision 1.57.6.19 / (download) - annotate - [select for diffs], Fri Jul 21 18:36:47 2017 UTC (6 years, 8 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.18: +22 -11 lines
Diff to previous 1.57.6.18 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

use free slot for drive reset, rather than always using slot zero; if we can't
get the slot, fallback to channel reset as usual

note this increases the odds of not being able to do the reset, when all slots
happen to be active

this is in same area as problem reported by PR kern/52372 but I
don't believe that this change actually make any change for it - during
probe/attach there shouldn't be any paralell request with drive reset

Revision 1.57.6.18 / (download) - annotate - [select for diffs], Wed Jul 19 20:21:42 2017 UTC (6 years, 8 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.17: +204 -105 lines
Diff to previous 1.57.6.17 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

update error handling:
- switch to ata_timeout()
- stop using ch_status/ch_error for passing state/error, stop setting
  ATACH_IRQ_WAIT in ch_flags; pass the state via the last parameter
  to c_intr() routine
- add NCQ recovery and KILL_REQUEUE
- only call atastart() in c_intr() if there was no error

ahcisata-specific tweaks:
- add some handling for PM in the error recovery using FBS register,
  according to spec it should be independant of actual FBSS feature; untested
  as my hw doesn't support PM

Revision 1.57.6.17 / (download) - annotate - [select for diffs], Tue Jun 27 18:36:03 2017 UTC (6 years, 9 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.16: +63 -35 lines
Diff to previous 1.57.6.16 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

attend error paths, more strict asserts and code consistency

- atastart() and ata_kill_pending() now KASSERT() that all xfers on queue
  have same channel
- inactive xfers are killed via new reason KILL_GONE_INACTIVE, controller
  code must not call any resource deactivation in that case
- c_intr() must call ata_waitdrain_xfer_check() as first thing, and must not
  further touch any xfer structures on exit path; any resource cleanup
  is supposed to be done in c_kill_xfer()
- c_kill_xfer() should never call atastart()
- ata_waitdrain_check() removed, replaced by ata_waitdrain_xfer_check()
- ATA_DRIVE_WAITDRAIN handling converted to use condvar
- removed unused ata_c callback

Revision 1.57.6.16 / (download) - annotate - [select for diffs], Wed Jun 21 19:38:42 2017 UTC (6 years, 9 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.15: +4 -6 lines
Diff to previous 1.57.6.15 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

change ata_queue_hwslot_to_xfer() and ata_queue_get_active_xfer() to take
ata_channel instead of ata_queue as parameter, and lock the channel while
traversing the queue

Revision 1.57.6.15 / (download) - annotate - [select for diffs], Tue Jun 20 20:58:22 2017 UTC (6 years, 9 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.14: +3 -3 lines
Diff to previous 1.57.6.14 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

remove ata queue downsizing - every device, attached to the same channel,
uses slots according to it's own limits

wdc code changed to expect maximum one active xfer, and not check number
of openings in the channel; this is to facilitate using wdc functions
for e.g. handling of atapi commands  for drivers which support both ATAPI
and NCQ

Revision 1.57.6.14 / (download) - annotate - [select for diffs], Mon Jun 19 21:00:00 2017 UTC (6 years, 9 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.13: +5 -3 lines
Diff to previous 1.57.6.13 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

add ata_channel lock, use it to protect queue manipulation (only that for now);
add ata_channel_detach() to destroy the locks

change ata_get_xfer() so that it can wait for xfer, convert all on-stack
xfer code to use the blocking variant

fix siisata_reset_drive() to use polled reset and not try ata_activate_xfer(),
convert drive probe code also over from slot0 XXX to ata_get_xfer()

drive reset and PMP now works on siisata(4) too; changes tested also
on piixide(4), ahci(4), mvsata(4)

Revision 1.57.6.13 / (download) - annotate - [select for diffs], Fri Jun 16 20:40:49 2017 UTC (6 years, 9 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.12: +16 -27 lines
Diff to previous 1.57.6.12 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

adjust reset channel and dump paths
- channel reset now always kills active transfer, even on dump path, but
  now doesn't touch the queued waiting transfers; also kill_xfer hook is
  always called, so that HBA can free any private xfer resources and thus
  the dump request has chance to work
- kill_xfer routines now always call ata_deactivate_xfer(); added KASSERT()s
  to ata_free_xfer() to expect deactivated xfer
- when called during channel reset before dump, ata_kill_active() drops
  any queued waiting transfers without processing
- do not (re)queue any transfers in wddone() when dumping
- kill AT_RST_NOCMD flag

This should also hopefully fix the 'polled command has been queued' panic
as reported in:
PR kern/11811 by John Hawkinson
PR kern/47041 by Taylor R Campbell
PR kern/51979 by Martin Husemann

dump tested working with piixide(4) and ahci(4). mvsata(4) dump times out,
but otherwise tested working, will be fixed separately. siisata(4) mechanically
changed and not tested.

Revision 1.57.6.12 / (download) - annotate - [select for diffs], Tue Apr 25 20:55:05 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.11: +3 -3 lines
Diff to previous 1.57.6.11 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

make compile without DIAGNOSTIC

Revision 1.57.6.11 / (download) - annotate - [select for diffs], Mon Apr 24 18:22:31 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.10: +4 -3 lines
Diff to previous 1.57.6.10 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

only clear the bcount for NCQ case when the transfer actually ended w/o error

Revision 1.57.6.10 / (download) - annotate - [select for diffs], Mon Apr 24 15:15:02 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.9: +10 -4 lines
Diff to previous 1.57.6.9 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

do not use PRD Byte Count for queued commands to determine number of bytes
actually transferred; it should not be used and is not guaranteed to be
valid according to AHCI spec, underflow is always invalid for queued cmds

this fixes my ls problem under QEMU

Revision 1.57.6.9 / (download) - annotate - [select for diffs], Mon Apr 24 10:21:15 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.8: +25 -24 lines
Diff to previous 1.57.6.8 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

adjust error handling in interrupt handler - finish the successfully
finished xfers, and iterate to error out all the unfinished ones

Revision 1.57.6.8 / (download) - annotate - [select for diffs], Thu Apr 20 19:24:25 2017 UTC (6 years, 11 months ago) by jakllsch
Branch: jdolecek-ncq
Changes since 1.57.6.7: +3 -3 lines
Diff to previous 1.57.6.7 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

Don't bail out of handling interrupts at the first inactive slot.

Appears to fix the frequent timeouts issue.

Revision 1.57.6.7 / (download) - annotate - [select for diffs], Wed Apr 19 20:49:17 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.6: +60 -34 lines
Diff to previous 1.57.6.6 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

adjust ata code to support more than one active command, including the
timeout handling, add support for NCQ commands

move probe for NCQ and number of tags to middle layer, negotiate mutual
support between drive and controller

implement NCQ support in ahci(4)

Revision 1.57.6.6 / (download) - annotate - [select for diffs], Sat Apr 15 23:58:31 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.5: +44 -49 lines
Diff to previous 1.57.6.5 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

use xfer->c_slot instead of slot = 0

fix ahci_bio_complete() calls - last param is reason, not slot

Revision 1.57.6.5 / (download) - annotate - [select for diffs], Sat Apr 15 23:54:41 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.4: +7 -13 lines
Diff to previous 1.57.6.4 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

ahci_intr_port(): use same code on both the error and non-error path for
for getting the slot and skipping interrupts for non-active slots

Revision 1.57.6.4 / (download) - annotate - [select for diffs], Sat Apr 15 17:14:11 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.3: +13 -19 lines
Diff to previous 1.57.6.3 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

pass also ata_command via ata_xfer, callers of ata_exec_command() is now
responsible for allocation/disposal of the structure

change code to allocate ata_xfer for commands on stack same way as previously
the ata_command were, using c_slot 0; adjust asserts so that it would allow
several xfers with same c_slot, as long as only one such transfer is active
at a time

Revision 1.57.6.3 / (download) - annotate - [select for diffs], Sat Apr 15 12:01:23 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.2: +12 -20 lines
Diff to previous 1.57.6.2 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

make ata_xfer's allocated as part of ata_queue and make it include ata_bio;
they are pre-allocated on attach and ata_get_xfer() now never sleep, drop the
pool

modify wd(4) to file the bio requests using the xfers and hence
make it possible to have more than one active I/O request in flight;
ata_bio callback doesn't need to allocate any memory any more,
require it to never return ATACMD_TRY_AGAIN

move lp, badsect, multi from ata_bio to ata_drive_datas, as they are per-drive,
not per transfer

drop unused drv atac_claim_hw/atac_free_hw hooks, and also drop again ata_bio
c_hwslot

Revision 1.57.6.2 / (download) - annotate - [select for diffs], Tue Apr 11 18:13:17 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57.6.1: +3 -3 lines
Diff to previous 1.57.6.1 (colored) to branchpoint 1.57 (colored) to selected 1.15.2.2 (colored)

fix to not access active_xfer directly

Revision 1.57.6.1 / (download) - annotate - [select for diffs], Mon Apr 10 22:57:02 2017 UTC (6 years, 11 months ago) by jdolecek
Branch: jdolecek-ncq
Changes since 1.57: +26 -35 lines
Diff to previous 1.57 (colored) to selected 1.15.2.2 (colored)

ATA infrastructure improvements to eventually support more outstanding
commands

patch by Matt Thomas

Revision 1.52.2.5 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:02 2016 UTC (7 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.52.2.4: +4 -3 lines
Diff to previous 1.52.2.4 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jun 3 10:34:03 2016 UTC (7 years, 9 months ago) by jmcneill
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: jdolecek-ncq
Changes since 1.56: +4 -3 lines
Diff to previous 1.56 (colored) to selected 1.15.2.2 (colored)

PR kern/51211: atactl atabus0 reset causes a panic on Tegra K1

Fix an issue where ahci_reset_channel calls ahci_channel_start with clo=1
even if CAP.SCLO=0.

Revision 1.52.2.4 / (download) - annotate - [select for diffs], Sun May 29 08:44:21 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.52.2.3: +8 -7 lines
Diff to previous 1.52.2.3 (colored) to branchpoint 1.52 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.56 / (download) - annotate - [select for diffs], Mon May 2 19:18:29 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.55: +8 -7 lines
Diff to previous 1.55 (colored) to selected 1.15.2.2 (colored)

move scsipi_strvis -> libkern:strnvisx()
change the prototype to match userland
fix sizes of strings passed to it

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:49 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.52.2.2: +9 -7 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.55 / (download) - annotate - [select for diffs], Wed Nov 11 02:43:09 2015 UTC (8 years, 4 months ago) by jakllsch
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.54: +9 -7 lines
Diff to previous 1.54 (colored) to selected 1.15.2.2 (colored)

Only sync and unload dma map in ahci_atapi_complete() if appropriate.

Fixes ahcisata atapi cd(4) on arm (specifically, JETSONTK1), which insists
that a zero-length dmamap can not be synced.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:07 2015 UTC (8 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.52.2.1: +28 -22 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.54 / (download) - annotate - [select for diffs], Sun May 24 22:30:05 2015 UTC (8 years, 10 months ago) by jmcneill
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.53: +8 -2 lines
Diff to previous 1.53 (colored) to selected 1.15.2.2 (colored)

Add AHCI_QUIRK_SKIP_RESET quirk to allow for skipping the drive reset
sequence in ahci_do_reset_drive.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:09 2015 UTC (8 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.52: +6 -4 lines
Diff to previous 1.52 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.53 / (download) - annotate - [select for diffs], Thu Dec 4 21:50:29 2014 UTC (9 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.52: +6 -4 lines
Diff to previous 1.52 (colored) to selected 1.15.2.2 (colored)

Increase reset delay in polling mode to 10ms per loop. It seems like
AHCI on the Cubietruck doesn't like the tigther loop.

PR 49448.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Nov 23 01:38:49 2014 UTC (9 years, 4 months ago) by joerg
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.51: +15 -7 lines
Diff to previous 1.51 (colored) to selected 1.15.2.2 (colored)

Provide the timeout argument to ahci_exec_fis in ms. Use 1ms delays
when we are not allowed to sleep, full ticks otherwise.

Bump the timeout for reset to 100ms, 10ms is not enough on the
Cubietruck.

Revision 1.43.2.5 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:37 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.43.2.4: +62 -17 lines
Diff to previous 1.43.2.4 (colored) to selected 1.15.2.2 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.32.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:40:21 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.32.2.3: +73 -32 lines
Diff to previous 1.32.2.3 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored) to selected 1.15.2.2 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.48.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:37 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.48: +63 -18 lines
Diff to previous 1.48 (colored) next main 1.49 (colored) to selected 1.15.2.2 (colored)

sync with head

Revision 1.18.4.1.4.2 / (download) - annotate - [select for diffs], Mon Mar 24 18:47:17 2014 UTC (10 years ago) by matt
Branch: matt-nb5-mips64
Changes since 1.18.4.1.4.1: +281 -224 lines
Diff to previous 1.18.4.1.4.1 (colored) to branchpoint 1.18.4.1 (colored) next main 1.18.4.2 (colored) to selected 1.15.2.2 (colored)

Merge needed changes from HEAD for cubie

Revision 1.51 / (download) - annotate - [select for diffs], Mon Feb 24 12:19:05 2014 UTC (10 years, 1 month ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.50: +49 -4 lines
Diff to previous 1.50 (colored) to selected 1.15.2.2 (colored)

- Only enable AHCI mode if it is not already enabled.
- Add support for capturing initial CAP/CAP2/PI regs before reset (and
  restoring them afterwords)
- Add optional callbacks for channel_start / channel_stop.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Sep 8 11:47:16 2013 UTC (10 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.49: +12 -15 lines
Diff to previous 1.49 (colored) to selected 1.15.2.2 (colored)

Allow the attachment to override ahci_ports.
Keep ACHI_PI cached in the softc.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Sep 8 11:19:47 2013 UTC (10 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.48: +7 -4 lines
Diff to previous 1.48 (colored) to selected 1.15.2.2 (colored)

If there is only 1 port, don't say "1 ports".
Add a debug printf after reading the active ports.

Revision 1.43.2.4 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:17 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.43.2.3: +9 -12 lines
Diff to previous 1.43.2.3 (colored) to selected 1.15.2.2 (colored)

resync from head

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jun 22 05:41:25 2013 UTC (10 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored) to selected 1.15.2.2 (colored)

Make sure dynamically allocated channel_queue struct are zero-filled.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Apr 3 17:15:07 2013 UTC (10 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: khorben-n900
Changes since 1.46: +9 -12 lines
Diff to previous 1.46 (colored) to selected 1.15.2.2 (colored)

Fix kernel dump on ahci controller, by making sure we won't sleep
while dumping:
- introduce ata_delay() which either use delay() or kpause()
  depending on flags. use it in sata_reset_interface() and
  some ahci functions
- kill ATA_NOSLEEP, it was tested but never set. use ATA_POLL instead.
- reduce delay while polling in ahci, to speed up the dump

Should fix PR kern/41095

Revision 1.43.2.3 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:13 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.43.2.2: +4 -5 lines
Diff to previous 1.43.2.2 (colored) to selected 1.15.2.2 (colored)

resync with head

Revision 1.46 / (download) - annotate - [select for diffs], Sat Feb 2 14:11:37 2013 UTC (11 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.45: +4 -5 lines
Diff to previous 1.45 (colored) to selected 1.15.2.2 (colored)

Use __SHIFTOUT to simplify an expression.

Revision 1.33.4.1 / (download) - annotate - [select for diffs], Mon Dec 3 22:00:53 2012 UTC (11 years, 3 months ago) by matt
Branch: matt-nb6-plus
Changes since 1.33: +17 -11 lines
Diff to previous 1.33 (colored) next main 1.34 (colored) to selected 1.15.2.2 (colored)

Pullup changes in rev 1.44.

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:02 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.43.2.1: +25 -14 lines
Diff to previous 1.43.2.1 (colored) to selected 1.15.2.2 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.32.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:21:00 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.32.2.2: +275 -80 lines
Diff to previous 1.32.2.2 (colored) to branchpoint 1.32 (colored) to selected 1.15.2.2 (colored)

sync with head

Revision 1.45 / (download) - annotate - [select for diffs], Fri Oct 26 09:59:11 2012 UTC (11 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.44: +10 -4 lines
Diff to previous 1.44 (colored) to selected 1.15.2.2 (colored)

Workaround PR kern/47097: use delay() instead of tsleep() ahci_do_reset_drive()
if not called with AT_WAIT.
The right fix here is to change the ata layer to reset the drive from
thread context, to avoid a 0.5 delay() in interrupt context when a drive
fails.

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Tue Oct 9 13:36:04 2012 UTC (11 years, 5 months ago) by bouyer
Branch: tls-maxphys
Changes since 1.43: +6 -5 lines
Diff to previous 1.43 (colored) to selected 1.15.2.2 (colored)

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.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Sep 27 00:39:47 2012 UTC (11 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.43: +17 -12 lines
Diff to previous 1.43 (colored) to selected 1.15.2.2 (colored)

Add some more debugging messages.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Aug 20 12:48:47 2012 UTC (11 years, 7 months ago) by bouyer
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.42: +4 -4 lines
Diff to previous 1.42 (colored) to selected 1.15.2.2 (colored)

Fix typo, pointed out by Markus W Kilbinger

Revision 1.42 / (download) - annotate - [select for diffs], Mon Aug 20 11:59:29 2012 UTC (11 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.41: +4 -3 lines
Diff to previous 1.41 (colored) to selected 1.15.2.2 (colored)

Fix AHCI_QUIRK_BADPMPRESET: when reset fails for drive 15, stop, clear
errors and restart the channel before retrying with drive 0.
Should fix the problem of drives not detected any more reported by
Markus W Kilbinger on current-users.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Aug 10 16:35:00 2012 UTC (11 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.40: +18 -2 lines
Diff to previous 1.40 (colored) to selected 1.15.2.2 (colored)

Work around some SATA PMP issues in some AHCI controllers by either
disabling PMP entirely, or special handling in the reset function.
Controller list from linux and FreeBSD.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Jul 31 15:50:34 2012 UTC (11 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.39: +238 -71 lines
Diff to previous 1.39 (colored) to selected 1.15.2.2 (colored)

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.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Jul 26 20:49:48 2012 UTC (11 years, 8 months ago) by jakllsch
Branch: MAIN
Changes since 1.38: +65 -232 lines
Diff to previous 1.38 (colored) to selected 1.15.2.2 (colored)

Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@

Revision 1.38 / (download) - annotate - [select for diffs], Tue Jul 24 14:04:29 2012 UTC (11 years, 8 months ago) by jakllsch
Branch: MAIN
Changes since 1.37: +12 -12 lines
Diff to previous 1.37 (colored) to selected 1.15.2.2 (colored)

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.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jul 15 10:55:29 2012 UTC (11 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.36: +14 -14 lines
Diff to previous 1.36 (colored) to selected 1.15.2.2 (colored)

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.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jul 9 19:10:16 2012 UTC (11 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.35: +3 -4 lines
Diff to previous 1.35 (colored) to selected 1.15.2.2 (colored)

This a 'quick fix' for the breakage in rev 1.35.
Patch from Manuel on current-users mailing list.
Probably requires further investigation, but is a little nicer than
reverting the previous change.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Jul 2 18:15:46 2012 UTC (11 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.34: +233 -65 lines
Diff to previous 1.34 (colored) to selected 1.15.2.2 (colored)

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

Revision 1.32.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:07:55 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.32.2.1: +3 -2 lines
Diff to previous 1.32.2.1 (colored) to branchpoint 1.32 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.32.6.2 / (download) - annotate - [select for diffs], Sun Apr 29 23:04:49 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.32.6.1: +3 -2 lines
Diff to previous 1.32.6.1 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored) to selected 1.15.2.2 (colored)

sync to latest -current.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 20 20:23:20 2012 UTC (11 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored) to selected 1.15.2.2 (colored)

Add a bustype_async_event_xfer_mode() callback to scsipi_bustype (which can
be NULL), so that transport-specific details of transfer mode setting/printing
can be handled more easily.
Move scsipi_async_event_xfer_mode() and scsipi_print_xfer_mode() to
scsi_base.c and split in parallel scsi and FC/SAS parts.
size of struct scsipi_bustype has changed, welcome to 6.99.5

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:31 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored) to selected 1.15.2.2 (colored)

sync with head

Revision 1.32.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:34:14 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored) to selected 1.15.2.2 (colored)

merge to -current.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jan 10 01:43:05 2012 UTC (12 years, 2 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: matt-nb6-plus
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored) to selected 1.15.2.2 (colored)

When a port reset fails, it is important to know which port.

Revision 1.18.4.4.4.1 / (download) - annotate - [select for diffs], Fri Oct 14 16:55:33 2011 UTC (12 years, 5 months ago) by matt
Branch: matt-nb5-pq3
Changes since 1.18.4.4: +13 -2 lines
Diff to previous 1.18.4.4 (colored) next main 1.18.4.5 (colored) to selected 1.15.2.2 (colored)

revision 1.25
date: 2010/03/12 19:03:14;  author: jakllsch;  state: Exp;  lines: +13 -2
ata(4) expects IDENTIFY data to be in host endianess.
Logic borrowed from siisata(4) (which I've confirmed works on sparc64).

Revision 1.32 / (download) - annotate - [select for diffs], Sat Aug 20 16:03:48 2011 UTC (12 years, 7 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.31: +33 -20 lines
Diff to previous 1.31 (colored) to selected 1.15.2.2 (colored)

Rework version printout to be more future proof.
Rework features printout using snprintb.

Revision 1.25.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:53:12 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.25.2.1: +159 -94 lines
Diff to previous 1.25.2.1 (colored) next main 1.26 (colored) to selected 1.15.2.2 (colored)

sync with head

Revision 1.18.4.5 / (download) - annotate - [select for diffs], Sun Jan 16 13:06:49 2011 UTC (13 years, 2 months ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.18.4.4: +5 -4 lines
Diff to previous 1.18.4.4 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #1530):
	sys/dev/ic/ahcisata_core.c: revision 1.31
Don't call bus_dmamap_load(9) and bus_dmamap_sync(9) on command xfers
if (AT_READ|AT_WRITE) in ata_c->flags is set but ata_c->bcount is zero.
Someone actually tries to put such a command and it causes
DIAGNOSTIC panic in x86/bus_dma.c:_bus_dmamap_sync().
I think bus_dma(9) API itself may allow calls with mapsize==0
but there are many MD code that asserts offset>=mapsize or len==0.
The problem is reported and fix is confirmed by Takuro KUBOTA
with XEN DOM0 kernel (which has options DIAGNOSTIC).

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jan 10 11:18:14 2011 UTC (13 years, 2 months ago) by tsutsui
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.30: +3 -2 lines
Diff to previous 1.30 (colored) to selected 1.15.2.2 (colored)

Don't call bus_dmamap_load(9) and bus_dmamap_sync(9) on command xfers
if (AT_READ|AT_WRITE) in ata_c->flags is set but ata_c->bcount is zero.
Someone actually tries to put such a command and it causes
DIAGNOSTIC panic in x86/bus_dma.c:_bus_dmamap_sync().
I think bus_dma(9) API itself may allow calls with mapsize==0
but there are many MD code that asserts offset>=mapsize or len==0.

The problem is reported and fix is confirmed by Takuro KUBOTA
with XEN DOM0 kernel (which has options DIAGNOSTIC).

Revision 1.30 / (download) - annotate - [select for diffs], Sat Nov 13 13:52:00 2010 UTC (13 years, 4 months ago) by uebayasi
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.29: +2 -4 lines
Diff to previous 1.29 (colored) to selected 1.15.2.2 (colored)

Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.

Revision 1.22.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:46:08 2010 UTC (13 years, 7 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.22.2.1: +154 -88 lines
Diff to previous 1.22.2.1 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.14.4.5 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:22 2010 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.14.4.4: +195 -111 lines
Diff to previous 1.14.4.4 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jul 27 22:07:50 2010 UTC (13 years, 8 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.28: +140 -73 lines
Diff to previous 1.28 (colored) to selected 1.15.2.2 (colored)

Support detachment of ahcisata(4).
Use use 64-bit DMA tag (where available) for ahcisata(4) at jmide(4).
Beginnings of detach/resume support for jmide(4).
Sprinkle static.  Misc. little changes.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jul 20 19:24:11 2010 UTC (13 years, 8 months ago) by jakllsch
Branch: MAIN
Changes since 1.27: +12 -13 lines
Diff to previous 1.27 (colored) to selected 1.15.2.2 (colored)

Prepare ahcisata(4) to work with 64-bit bus_dma_tag_t.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jul 20 18:50:48 2010 UTC (13 years, 8 months ago) by jakllsch
Branch: MAIN
Changes since 1.26: +8 -8 lines
Diff to previous 1.26 (colored) to selected 1.15.2.2 (colored)

Convert ahcisata(4) to C99 exact-width integer types.

Revision 1.25.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:20 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.25: +14 -15 lines
Diff to previous 1.25 (colored) to selected 1.15.2.2 (colored)

sync with head

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:12 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.22: +43 -20 lines
Diff to previous 1.22 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.18.4.1.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:27:35 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.18.4.1: +20 -7 lines
Diff to previous 1.18.4.1 (colored) to selected 1.15.2.2 (colored)

sync to netbsd-5

Revision 1.26 / (download) - annotate - [select for diffs], Wed Apr 7 17:51:16 2010 UTC (13 years, 11 months ago) by jakllsch
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.25: +14 -15 lines
Diff to previous 1.25 (colored) to selected 1.15.2.2 (colored)

satafis:
- Add function to parse RDH FIS for use in implementing AT_READREG.
- Correct and clean up some structure definitions.
- Sprinkle a bit of const.
- Remove dependency on <dev/ic/wdcreg.h>, WDCTL_4BIT doesn't seem
  to be specified by any recent ATA standard, and it seems to make
  no difference in practice.
- Stop using WDSD_IBM, these bits have been obsolete since before SATA.

siisata:
- Implement AT_READREG.
- Reap now-unneeded <dev/ic/wdcreg.h>.
- Whitespace and slight debug code cleanup.
- Some possibly-uncessary code reordering.

ahcisata:
- Implement AT_READREG.
- Reap now-unneeded <dev/ic/wdcreg.h>.

Revision 1.18.4.4 / (download) - annotate - [select for diffs], Sun Mar 28 16:21:18 2010 UTC (14 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base
Branch point for: matt-nb5-pq3
Changes since 1.18.4.3: +20 -7 lines
Diff to previous 1.18.4.3 (colored) to branchpoint 1.18 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1317):
	sys/dev/ic/ahcisata_core.c: revision 1.23, 1.24
Move ahci_channel_start() after BSY has cleared (what seems to matter
here is not touching SError while BSY is asserted). Fix random
behavior (serial console corruption/misfunction, misbehavior of USB
controllers, crasy interrupts crashing the Xen hypervisor, ...)
of Intel ESB2 controller with some brand of hitachi drives.
--
ahcisata_core.c 1.23 cause long drive probe (31s, reported by
Roy Marples), or other devices misbehavior probably due to interrupts issues
(reported by Jukka Ruohonen). Back it out and do the following changes:
- clear port interrupt register before ahci_channel_start() which enables
  interrupts
- wait 500ms after sata_reset_interface() before touching SERROR register.
  This is what seems to fix the issue I'm seeming on ESB2 controller.
- The 31s delay didn't cause the probe to fail because of a mismatch
  in loop index comparison; use a #define for delay after reset
  instead of numeric values, to avoid this kind of bugs in the
  future.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Mar 12 19:03:14 2010 UTC (14 years ago) by jakllsch
Branch: MAIN
Branch point for: rmind-uvmplock
Changes since 1.24: +13 -2 lines
Diff to previous 1.24 (colored) to selected 1.15.2.2 (colored)

ata(4) expects IDENTIFY data to be in host endianess.
Logic borrowed from siisata(4) (which I've confirmed works on sparc64).
Should fix PR kern/39659.

Revision 1.14.4.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:28 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.14.4.3: +15 -15 lines
Diff to previous 1.14.4.3 (colored) to branchpoint 1.14 (colored) to selected 1.15.2.2 (colored)

sync with head

Revision 1.24 / (download) - annotate - [select for diffs], Wed Mar 10 19:23:57 2010 UTC (14 years ago) by bouyer
Branch: MAIN
Changes since 1.23: +18 -10 lines
Diff to previous 1.23 (colored) to selected 1.15.2.2 (colored)

ahcisata_core.c 1.23 cause long drive probe (31s, reported by
Roy Marples), or other devices misbehavior probably due to interrupts issues
(reported by Jukka Ruohonen). Back it out and do the following changes:
- clear port interrupt register before ahci_channel_start() which enables
  interrupts
- wait 500ms after sata_reset_interface() before touching SERROR register.
  This is what seems to fix the issue I'm seeming on ESB2 controller.
- The 31s delay didn't cause the probe to fail because of a mismatch
  in loop index comparison; use a #define for delay after reset
  instead of numeric values, to avoid this kind of bugs in the
  future.

Revision 1.18.4.3 / (download) - annotate - [select for diffs], Sun Mar 7 08:52:21 2010 UTC (14 years ago) by sborrill
Branch: netbsd-5
Changes since 1.18.4.2: +7 -12 lines
Diff to previous 1.18.4.2 (colored) to branchpoint 1.18 (colored) to selected 1.15.2.2 (colored)

Backout ticket 1317 until problems reported in -current are fixed:
http://mail-index.netbsd.org/current-users/2010/03/04/msg012810.html

Revision 1.18.4.2 / (download) - annotate - [select for diffs], Sat Mar 6 22:10:46 2010 UTC (14 years ago) by sborrill
Branch: netbsd-5
Changes since 1.18.4.1: +12 -7 lines
Diff to previous 1.18.4.1 (colored) to branchpoint 1.18 (colored) to selected 1.15.2.2 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #1317):
	sys/dev/ic/ahcisata_core.c:	revision 1.23

Move ahci_channel_start() after BSY has cleared (do not touch SError while
BSY is asserted). Fixes random behaviour of Intel ESB2 controller with some
models of Hitachi drives (serial console corruption/misfunction, misbehavior
of USB controllers, crazy interrupts crashing the Xen hypervisor, etc.).

Revision 1.23 / (download) - annotate - [select for diffs], Tue Feb 23 21:38:36 2010 UTC (14 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Changes since 1.22: +12 -7 lines
Diff to previous 1.22 (colored) to selected 1.15.2.2 (colored)

Move ahci_channel_start() after BSY has cleared (what seems to matter
here is not touching SError while BSY is asserted). Fix random
behavior (serial console corruption/misfunction, misbehavior of USB
controllers, crasy interrupts crashing the Xen hypervisor, ...)
of Intel ESB2 controller with some brand of hitachi drives.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Nov 21 23:47:01 2009 UTC (14 years, 4 months ago) by jakllsch
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored) to selected 1.15.2.2 (colored)

Change bus_space_subregion() size for each SATA PHY register from 1 to 4,
as we do a bus_space_read_4() within these subregions.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:12 2009 UTC (14 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.20: +2 -7 lines
Diff to previous 1.20 (colored) to selected 1.15.2.2 (colored)

Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.18.8.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:31:47 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.18.8.1: +11 -88 lines
Diff to previous 1.18.8.1 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.14.4.3 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:21 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.14.4.2: +11 -88 lines
Diff to previous 1.14.4.2 (colored) to branchpoint 1.14 (colored) to selected 1.15.2.2 (colored)

sync with head

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jun 17 03:55:04 2009 UTC (14 years, 9 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.19: +11 -88 lines
Diff to previous 1.19 (colored) to selected 1.15.2.2 (colored)

Use abstracted FIS code for ahcisata(4).  Have the FIS code pre-zero the FIS.

Revision 1.18.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:19:21 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.18: +11 -4 lines
Diff to previous 1.18 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.14.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:40 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.14.4.1: +54 -39 lines
Diff to previous 1.14.4.1 (colored) to branchpoint 1.14 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Tue Mar 3 18:30:45 2009 UTC (15 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.18: +11 -4 lines
Diff to previous 1.18 (colored) next main 1.19 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.4.12.4.4.1 / (download) - annotate - [select for diffs], Thu Feb 26 08:12:29 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-4-0
Changes since 1.4.12.4: +11 -4 lines
Diff to previous 1.4.12.4 (colored) next main 1.4.12.5 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1277):
	sys/dev/ic/ahcisata_core.c: revision 1.19
When an error is reported on a write, data may have been transfered
to the device's cache anyway and so cmdh_prdbc reports a completed
transfer. If we use it to update ata_bio->bcount this has 2 conseqences:
- the automatic LBA48 workaround doesn't qick in because bcount is used
  to compute the last sector of the transfer (wd(4) part of kern/40569)
- wd(4) will report a B_ERROR buffer with a b_resid of 0, which panics
  a DIAGNOSTIC kernel
Fix by ignoring cmdh_prdbc if we had a write with errors, and in this case
leave ata_bio->bcount at its initial value.
While there use NOERROR instead of 0 for ata_bio->error (cosmetic).
thanks to Matthias Scheler for tests.

Revision 1.4.12.7 / (download) - annotate - [select for diffs], Thu Feb 26 08:09:23 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-4
Changes since 1.4.12.6: +11 -4 lines
Diff to previous 1.4.12.6 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1277):
	sys/dev/ic/ahcisata_core.c: revision 1.19
When an error is reported on a write, data may have been transfered
to the device's cache anyway and so cmdh_prdbc reports a completed
transfer. If we use it to update ata_bio->bcount this has 2 conseqences:
- the automatic LBA48 workaround doesn't qick in because bcount is used
  to compute the last sector of the transfer (wd(4) part of kern/40569)
- wd(4) will report a B_ERROR buffer with a b_resid of 0, which panics
  a DIAGNOSTIC kernel
Fix by ignoring cmdh_prdbc if we had a write with errors, and in this case
leave ata_bio->bcount at its initial value.
While there use NOERROR instead of 0 for ata_bio->error (cosmetic).
thanks to Matthias Scheler for tests.

Revision 1.18.4.1 / (download) - annotate - [select for diffs], Thu Feb 19 20:30:15 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.18: +11 -4 lines
Diff to previous 1.18 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #455):
	sys/dev/ic/ahcisata_core.c: revision 1.19
When an error is reported on a write, data may have been transfered
to the device's cache anyway and so cmdh_prdbc reports a completed
transfer. If we use it to update ata_bio->bcount this has 2 conseqences:
- the automatic LBA48 workaround doesn't qick in because bcount is used
  to compute the last sector of the transfer (wd(4) part of kern/40569)
- wd(4) will report a B_ERROR buffer with a b_resid of 0, which panics
  a DIAGNOSTIC kernel
Fix by ignoring cmdh_prdbc if we had a write with errors, and in this case
leave ata_bio->bcount at its initial value.
While there use NOERROR instead of 0 for ata_bio->error (cosmetic).
thanks to Matthias Scheler for tests.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Feb 12 11:44:11 2009 UTC (15 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.18: +11 -4 lines
Diff to previous 1.18 (colored) to selected 1.15.2.2 (colored)

When an error is reported on a write, data may have been transfered
to the device's cache anyway and so cmdh_prdbc reports a completed
transfer. If we use it to update ata_bio->bcount this has 2 conseqences:
- the automatic LBA48 workaround doesn't qick in because bcount is used
  to compute the last sector of the transfer (wd(4) part of kern/40569)
- wd(4) will report a B_ERROR buffer with a b_resid of 0, which panics
  a DIAGNOSTIC kernel
Fix by ignoring cmdh_prdbc if we had a write with errors, and in this case
leave ata_bio->bcount at its initial value.

While there use NOERROR instead of 0 for ata_bio->error (cosmetic).

thanks to Matthias Scheler for tests.

Revision 1.16.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:16:25 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.16: +31 -32 lines
Diff to previous 1.16 (colored) next main 1.17 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Fri Oct 10 22:30:58 2008 UTC (15 years, 5 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.15.2.2: +29 -30 lines
Diff to previous 1.15.2.2 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Sync with HEAD.

Revision 1.12.6.5 / (download) - annotate - [select for diffs], Sun Oct 5 20:11:29 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.12.6.4: +27 -28 lines
Diff to previous 1.12.6.4 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Oct 3 13:02:08 2008 UTC (15 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, netbsd-5-base, netbsd-5-0-RC2, netbsd-5-0-RC1, mjf-devfs2-base, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, jym-xensuspend
Changes since 1.17: +29 -30 lines
Diff to previous 1.17 (colored) to selected 1.15.2.2 (colored)

Make sure the adapter is ready to accept FISs before bringing the PHY up.
Wait for the BSY bit to clear in the status register.
Makes the cdrom drive probe properly on a ATI SB600 controller in AHCI
mode.

Revision 1.12.6.4 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:21 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.12.6.3: +2 -2 lines
Diff to previous 1.12.6.3 (colored) to branchpoint 1.12 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.15.2.2 / (download) - annotate - [selected], Thu Sep 18 04:35:03 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.15.2.1: +4 -4 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Aug 1 17:41:54 2008 UTC (15 years, 7 months ago) by dillo
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored) to selected 1.15.2.2 (colored)

Increase delay after channel reset from 100ms to 500ms, suggested by bouyer.
Fixes unreliable drive detection on NVIDIA MCP67.

Revision 1.12.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:06 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.12.6.2: +14 -5 lines
Diff to previous 1.12.6.2 (colored) to branchpoint 1.12 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:04 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.15: +16 -7 lines
Diff to previous 1.15 (colored) to selected 1.15.2.2 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:14:34 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.14.2.1: +16 -7 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jun 7 12:56:57 2008 UTC (15 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl
Branch point for: haad-dm
Changes since 1.15: +16 -7 lines
Diff to previous 1.15 (colored) to selected 1.15.2.2 (colored)

For ATAPI, in addition to storing the short sense, report a SCSI_CHECK
condition, to that the scsipi layer will issue a request sense.

Revision 1.4.14.4 / (download) - annotate - [select for diffs], Tue Jun 3 20:47:19 2008 UTC (15 years, 9 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.4.14.3: +458 -7 lines
Diff to previous 1.4.14.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.15.2.2 (colored)

Sync with netbsd-4.

Revision 1.12.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:23:17 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.12.6.1: +2 -0 lines
Diff to previous 1.12.6.1 (colored) to branchpoint 1.12 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:33:41 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.14: +4 -2 lines
Diff to previous 1.14 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.14.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:24:02 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.14: +4 -2 lines
Diff to previous 1.14 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.15 / (download) - annotate - [select for diffs], Wed May 7 13:52:12 2008 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.14: +4 -2 lines
Diff to previous 1.14 (colored) to selected 1.15.2.2 (colored)

Wait 100ms after we resseting the PHY and found that a device is preent.
Some device seems to need a bit of delay before being ready to accept a
command (such as my SATA cdrom drive)  May fix port-i386/38548.
As a bonus this makes the dmesg output prettier, by not mixing PHY
status with ATA/ATAPI probe.

Revision 1.12.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:39 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.12: +13 -11 lines
Diff to previous 1.12 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Mar 24 14:44:26 2008 UTC (16 years ago) by cube
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.13: +4 -3 lines
Diff to previous 1.13 (colored) to selected 1.15.2.2 (colored)

Split device_t and softc for atapibus(4).

Revision 1.4.16.7 / (download) - annotate - [select for diffs], Mon Mar 24 09:38:49 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.4.16.6: +10 -9 lines
Diff to previous 1.4.16.6 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:15:16 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.12: +10 -9 lines
Diff to previous 1.12 (colored) next main 1.13 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.4.12.6 / (download) - annotate - [select for diffs], Sun Mar 23 09:52:24 2008 UTC (16 years ago) by jdc
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.4.12.5: +455 -4 lines
Diff to previous 1.4.12.5 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Pull up revision 1.8 (requested by bouyer in ticket #1085).

Add ATAPI support to ahcisata(4). lightly tested with a DVD burner, by
mounting a CD and reading from it, and blanking a DVD-RW using cdrecord.

Revision 1.4.12.5 / (download) - annotate - [select for diffs], Sun Mar 23 09:38:17 2008 UTC (16 years ago) by jdc
Branch: netbsd-4
Changes since 1.4.12.4: +1 -1 lines
Diff to previous 1.4.12.4 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Pull up revision 1.6 (requested by bouyer in ticket #1082).

Move a delay() inside a loop, so that the 1s delay is really 1s.

Revision 1.4.10.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:37 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.4.10.2: +14 -9 lines
Diff to previous 1.4.10.2 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.15.2.2 (colored)

sync with HEAD

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 18 20:46:36 2008 UTC (16 years ago) by cube
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Changes since 1.12: +10 -9 lines
Diff to previous 1.12 (colored) to selected 1.15.2.2 (colored)

Split device_t and softc for ATA devices, as well as wd(4).  Other
cosmetic changes where appropriate.

Revision 1.5.6.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:40 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.5.6.2: +6 -2 lines
Diff to previous 1.5.6.2 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.4.16.6 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:33 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.4.16.5: +3 -2 lines
Diff to previous 1.4.16.5 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Feb 11 08:23:48 2008 UTC (16 years, 1 month ago) by xtraeme
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored) to selected 1.15.2.2 (colored)

Attach ahcisata(4) to any RAID controller that supports AHCI, and make it
pass the ATAC_CAP_RAID capability for them. ok'ed by bouyer@.

Revision 1.4.16.5 / (download) - annotate - [select for diffs], Mon Feb 4 09:23:21 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.4.16.4: +5 -2 lines
Diff to previous 1.4.16.4 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jan 25 21:41:48 2008 UTC (16 years, 2 months ago) by xtraeme
Branch: MAIN
Changes since 1.10: +3 -0 lines
Diff to previous 1.10 (colored) to selected 1.15.2.2 (colored)

Make it print the correct version for AHCI 1.2 controllers.

Revision 1.4.10.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:52:44 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.4.10.1: +549 -28 lines
Diff to previous 1.4.10.1 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

sync with HEAD

Revision 1.4.8.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:37:47 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.4.8.3: +2 -2 lines
Diff to previous 1.4.8.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.5.6.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:19:32 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.5.6.1: +2 -2 lines
Diff to previous 1.5.6.1 (colored) to branchpoint 1.5 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 4 15:42:05 2007 UTC (16 years, 3 months ago) by spz
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386
Changes since 1.9: +0 -0 lines
Diff to previous 1.9 (colored) to selected 1.15.2.2 (colored)

try fixing up broken revision string again

Revision 1.9 / (download) - annotate - [select for diffs], Tue Dec 4 15:41:20 2007 UTC (16 years, 3 months ago) by spz
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.15.2.2 (colored)

fix up broken revision string

Revision 1.5.6.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:47:51 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.5: +547 -26 lines
Diff to previous 1.5 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.4.16.4 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:07 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.4.16.3: +547 -26 lines
Diff to previous 1.4.16.3 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.4.8.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:24 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.4.8.2: +455 -6 lines
Diff to previous 1.4.8.2 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.5.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:00:59 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.5: +547 -26 lines
Diff to previous 1.5 (colored) next main 1.6 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD

Revision 1.8 / (download) - annotate - [select for diffs], Mon Nov 12 21:25:14 2007 UTC (16 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking2, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.7: +454 -4 lines
Diff to previous 1.7 (colored) to selected 1.15.2.2 (colored)

Add ATAPI support to ahcisata(4). lightly tested with a DVD burner, by
mounting a CD and reading from it, and blanking a DVD-RW using cdrecord.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Nov 12 20:10:32 2007 UTC (16 years, 4 months ago) by joerg
Branch: MAIN
Changes since 1.6: +92 -21 lines
Diff to previous 1.6 (colored) to selected 1.15.2.2 (colored)

Merge refactoring from jmcneill-pm.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Nov 11 18:03:46 2007 UTC (16 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored) to selected 1.15.2.2 (colored)

Move a delay() inside a loop, so that the 1s delay is really 1s.

Revision 1.4.10.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:26:19 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.4: +41 -24 lines
Diff to previous 1.4 (colored) to selected 1.15.2.2 (colored)

sync with HEAD

Revision 1.4.16.3 / (download) - annotate - [select for diffs], Sat Oct 27 11:30:27 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.4.16.2: +39 -22 lines
Diff to previous 1.4.16.2 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.1.4.5 / (download) - annotate - [select for diffs], Tue Oct 9 13:41:19 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.1.4.4: +41 -24 lines
Diff to previous 1.1.4.4 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.15.2.2 (colored)

Sync with head.

Revision 1.4.8.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:22 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.4.8.1: +41 -24 lines
Diff to previous 1.4.8.1 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Sync with HEAD.

Revision 1.4.14.3 / (download) - annotate - [select for diffs], Sun Sep 23 21:36:29 2007 UTC (16 years, 6 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.4.14.2: +39 -22 lines
Diff to previous 1.4.14.2 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Sync with somewhat-recent netbsd-4.

Revision 1.4.12.4 / (download) - annotate - [select for diffs], Sun Sep 16 15:29:05 2007 UTC (16 years, 6 months ago) by xtraeme
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-1-RELEASE, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0
Changes since 1.4.12.3: +39 -22 lines
Diff to previous 1.4.12.3 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #882):
	sys/dev/ic/ahcisata_core.c: revision 1.5
	sys/dev/ic/ahcisatareg.h: revision 1.2

Fix various error handling bugs:
- the value of the ATA error register would be computed wrongly, leading to
  bogus error values reported to wd(4)
- the channel would not always be restarted after an error, so the next
  command would not be handled by the controller
- a timeout condition would not be properly reported to wd(4), leading
  to a short transfer instead of a reset/retry
these bugs would cause a AHCI SATA channel to be stalled (no more command
processed) after a "ID not found" or "Aborted command" error reported by the
drive.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Sep 16 15:02:07 2007 UTC (16 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.4: +41 -24 lines
Diff to previous 1.4 (colored) to selected 1.15.2.2 (colored)

Fix various error handling bugs:
- the value of the ATA error register would be computed wrongly, leading to
  bogus error values reported to wd(4)
- the channel would not always be restarted after an error, so the next
  command would not be handled by the controller
- a timeout condition would not be properly reported to wd(4), leading
  to a short transfer instead of a reset/retry
these bugs would cause a AHCI SATA channel to be stalled (no more command
processed) after a "ID not found" or "Aborted command" error reported by the
drive.

Revision 1.4.16.2 / (download) - annotate - [select for diffs], Mon Sep 3 14:34:13 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.4.16.1: +1050 -0 lines
Diff to previous 1.4.16.1 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.4.14.2 / (download) - annotate - [select for diffs], Mon Sep 3 07:04:22 2007 UTC (16 years, 6 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.4.14.1: +1049 -0 lines
Diff to previous 1.4.14.1 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.4.12.3 / (download) - annotate - [select for diffs], Fri Aug 31 20:21:32 2007 UTC (16 years, 7 months ago) by pavel
Branch: netbsd-4
CVS Tags: netbsd-4-0-RC1
Changes since 1.4.12.2: +11 -7 lines
Diff to previous 1.4.12.2 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #746):
	sys/dev/ic/ahcisata_core.c: revision 1.2
* Add bus_dmamap_sync calls for cmd structure.
* During initialization, use the right port index when setting up the
  physical pointers for a port. Fixes issue with non-contigous ports.
Reviewed by Manuel.

Revision 1.4.12.2 / (download) - annotate - [select for diffs], Fri Aug 31 20:09:23 2007 UTC (16 years, 7 months ago) by pavel
Branch: netbsd-4
Changes since 1.4.12.1: +1045 -0 lines
Diff to previous 1.4.12.1 (colored) to branchpoint 1.4 (colored) to selected 1.15.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #678):
	distrib/sets/lists/man/mi: revision 1.1001
	doc/CHANGES: revision 1.853 via patch
	share/man/man4/Makefile: revision 1.428
	share/man/man4/jmide.4: revision 1.1
	sys/arch/amd64/conf/GENERIC: revision 1.143
	sys/arch/amd64/conf/INSTALL: revision 1.69
	sys/arch/i386/conf/GENERIC: revision 1.827
	sys/arch/i386/conf/INSTALL_LARGE: revision 1.2 via patch
	sys/arch/i386/conf/XEN2_DOM0: revision 1.26
	sys/conf/files: revision 1.844 via patch
	sys/dev/ic/ahcisata_core.c: revision 1.1 via patch
	sys/dev/ic/ahcisata_core.c: revision 1.3
	sys/dev/ic/ahcisatareg.h: revision 1.1
	sys/dev/ic/ahcisatavar.h: revision 1.1
	sys/dev/pci/ahcisata.c: delete
	sys/dev/pci/ahcisatareg.h: delete
	sys/dev/pci/ahcisata_pci.c: revision 1.1
	sys/dev/pci/files.pci: revision 1.287-1.288
	sys/dev/pci/jmide.c: revision 1.1-1.2
	sys/dev/pci/jmide_reg.h: revision 1.1
	sys/dev/pci/pcidevs: revision 1.878
Add JMicron Technology vendor ID, and their current PCIe SATA/PATA
controllers.

Split the ahcisata driver in pci front-end and bus-independant back-end.
add jmide(4), a driver for the JMicron Technology JMB36x PCIe to SATA II/PATA
controllers. These controllers can be found on add-on PCIe cards, or
on some motherboards to provide the PATA connectivity (e.g. some intel
ICH8-based motherboards).
Thanks to JMicron Technology for providing me documentation and
different sample boards for this work.

Move mapping of AHCI register so that jmide knows if it fails, and avoids
calling ahci_intr() (which would cause a panic).
Try to use the pciide function for SATA drives if attaching ahci fails (this
doesn't seems to work though, it may be BIOS dependant).
Thanks to Gary Duzan for testing multiple pacthes.

We're not ready to handle ATAPI yet so just claim there's no drive to the
upper layer. This should work around a NULL pointer dereference when
an ATAPI device is detected on a AHCI device.

Revision 1.4.8.1 / (download) - annotate - [select for diffs], Sat Aug 4 18:20:50 2007 UTC (16 years, 7 months ago) by he
Branch: jmcneill-pm
Changes since 1.4: +95 -23 lines
Diff to previous 1.4 (colored) to selected 1.15.2.2 (colored)

Factor out the hardware initialization code in ahcisata_core.c,
and provide them to the pci frontend, which has now grown its own
softc and a power management handler.

There may be one too many re-initializations done on resume (witness
the multiple kernel messages from ahcisata), but at least this is
sufficient to get the Lenovo T60 to come out of resume with a
working disk controller and disk.

Revision 1.1.4.4 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:44 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.1.4.3: +16 -10 lines
Diff to previous 1.1.4.3 (colored) to branchpoint 1.1 (colored) to selected 1.15.2.2 (colored)

Sync with head.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Wed Jul 11 20:05:38 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.4.2.1: +1050 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.15.2.2 (colored)

Sync with head.

Revision 1.4.16.1, Mon Jul 9 21:00:34 2007 UTC (16 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.4: +0 -1050 lines
FILE REMOVED

file ahcisata_core.c was added on branch yamt-lazymbuf on 2007-09-03 14:34:13 +0000

Revision 1.4.14.1, Mon Jul 9 21:00:34 2007 UTC (16 years, 8 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.4: +0 -1050 lines
FILE REMOVED

file ahcisata_core.c was added on branch wrstuden-fixsa on 2007-09-03 07:04:22 +0000

Revision 1.4.12.1, Mon Jul 9 21:00:34 2007 UTC (16 years, 8 months ago) by pavel
Branch: netbsd-4
Changes since 1.4: +0 -1050 lines
FILE REMOVED

file ahcisata_core.c was added on branch netbsd-4 on 2007-08-31 20:09:23 +0000

Revision 1.4.2.1, Mon Jul 9 21:00:34 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.4: +0 -1050 lines
FILE REMOVED

file ahcisata_core.c was added on branch mjf-ufs-trans on 2007-07-11 20:05:37 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jul 9 21:00:34 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: yamt-lazymbuf, wrstuden-fixsa, netbsd-4, mjf-ufs-trans, matt-armv6, jmcneill-pm
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored) to selected 1.15.2.2 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 25 20:58:07 2007 UTC (16 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.2: +7 -5 lines
Diff to previous 1.2 (colored) to selected 1.15.2.2 (colored)

We're not ready to handle ATAPI yet so just claim there's no drive to the
upper layer. This should work around a NULL pointer dereference when
an ATAPI device is detected on a AHCI device.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jun 21 11:32:54 2007 UTC (16 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.1: +11 -7 lines
Diff to previous 1.1 (colored) to selected 1.15.2.2 (colored)

* Add bus_dmamap_sync calls for cmd structure.
* During initialization, use the right port index when setting up the
  physical pointers for a port. Fixes issue with non-contigous ports.

Reviewed by Manuel.

Revision 1.1.4.3 / (download) - annotate - [select for diffs], Sat Jun 9 23:57:50 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.4.2: +3 -2 lines
Diff to previous 1.1.4.2 (colored) to branchpoint 1.1 (colored) to selected 1.15.2.2 (colored)

Sync with head.

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Sat Jun 9 21:37:13 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.1.4.1: +1043 -0 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored) to selected 1.15.2.2 (colored)

Sync with head.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Thu May 17 13:41:24 2007 UTC (16 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.1.2.1: +1043 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.15.2.2 (colored)

sync with head.

Revision 1.1.4.1, Sat May 12 11:04:58 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.1: +0 -1043 lines
FILE REMOVED

file ahcisata_core.c was added on branch vmlocking on 2007-06-09 21:37:13 +0000

Revision 1.1.2.1, Sat May 12 11:04:58 2007 UTC (16 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.1: +0 -1043 lines
FILE REMOVED

file ahcisata_core.c was added on branch yamt-idlelwp on 2007-05-17 13:41:24 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Sat May 12 11:04:58 2007 UTC (16 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Branch point for: yamt-idlelwp, vmlocking
Diff to selected 1.15.2.2 (colored)

Split the ahcisata driver in pci front-end and bus-independant back-end.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>