The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.62.10.1: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:21:58 2026 UTC (11 days, 11 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62: +21 -25 lines
Sync with HEAD

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Jul 4 13:07:07 2026 UTC (4 months, 1 week ago) by kre
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +3 -4 lines
bad144 update: ic/mvsata.c - delete duplicate #include

<sys/dkbad.h> was #included twice, leave the one in the
correct lexicographical position.

Remove a trailing space from one line while here.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sat Jul 4 02:05:12 2026 UTC (4 months, 1 week ago) by thorpej
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +4 -3 lines
Include <sys/dkbad.h> directly.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Jul 4 00:14:50 2026 UTC (4 months, 1 week ago) by jakllsch
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +20 -24 lines
catch up to bad144 changes by copying change from ata_wdc.c here

Revision 1.48.2.1: download - view: text, markup, annotated - select for diffs
Fri Dec 30 14:39:09 2022 UTC (3 years, 10 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-5-RELEASE, netbsd-9-4-RELEASE
Diff to: previous 1.48: preferred, colored; next MAIN 1.49: preferred, colored
Changes since revision 1.48: +24 -37 lines
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.62: download - view: text, markup, annotated - select for diffs
Sun Dec 5 04:37:11 2021 UTC (4 years, 11 months ago) by msaitoh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20250801, perseant-exfatfs-base-20240630, perseant-exfatfs-base, netbsd-11-base, netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1, netbsd-11, netbsd-10-base, netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: perseant-exfatfs
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +3 -3 lines
s/coresponding/corresponding/ in comment.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Oct 5 08:01:05 2021 UTC (5 years, 1 month ago) by rin
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +19 -14 lines
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.60: download - view: text, markup, annotated - select for diffs
Sat Aug 7 16:19:12 2021 UTC (5 years, 3 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -4 lines
Merge thorpej-cfargs2.

Revision 1.59.8.1: download - view: text, markup, annotated - select for diffs
Wed Aug 4 20:14:42 2021 UTC (5 years, 3 months ago) by thorpej
Branches: thorpej-cfargs2
Diff to: previous 1.59: preferred, colored; next MAIN 1.60: preferred, colored
Changes since revision 1.59: +3 -4 lines
Adapt to CFARGS().

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Apr 24 23:36:55 2021 UTC (5 years, 6 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-cfargs2
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +5 -4 lines
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.58.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 2 22:17:44 2021 UTC (5 years, 7 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.58: preferred, colored; next MAIN 1.59: preferred, colored
Changes since revision 1.58: +5 -4 lines
config_found_ia() -> config_found() w/ CFARG_IATTR.

Revision 1.57.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 3 16:34:58 2021 UTC (5 years, 10 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.57: preferred, colored; next MAIN 1.58: preferred, colored
Changes since revision 1.57: +12 -12 lines
Sync w/ HEAD.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Fri Dec 25 12:33:03 2020 UTC (5 years, 10 months ago) by skrll
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +12 -12 lines
Use designated initializers for struct ata_bustype

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue May 19 08:08:51 2020 UTC (6 years, 5 months ago) by jdolecek
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +12 -18 lines
only start the timeout machinery once the I/O is completely setup
and successful, particularly after PIO write is finished

fixes crashes in case the setup is so slow that timeout is triggered
e.g. while still waiting in wdc_wait_for_unbusy() or shortly after, without
drive actually having chance to complete the I/O, as seen in some
configuration under QEMU by Paul Ripke

Revision 1.40.2.4: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:16 2020 UTC (6 years, 6 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.40.2.3: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.3: +5 -23 lines
Sync with HEAD

Revision 1.55.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 20 11:29:03 2020 UTC (6 years, 6 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.55: preferred, colored; next MAIN 1.56: preferred, colored
Changes since revision 1.55: +7 -25 lines
Sync with HEAD

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Apr 13 10:49:34 2020 UTC (6 years, 7 months ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +7 -25 lines
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.40.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:21 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.40.2.2: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.2.2: +7 -24 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.40.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:06 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.40.2.1: preferred, colored; branchpoint 1.40: preferred, colored
Changes since revision 1.40.2.1: +37 -58 lines
Merge changes from current as of 20200406

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Apr 4 21:36:15 2020 UTC (6 years, 7 months ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +8 -8 lines
fix deadlock in wdcwait() when xfer timeout happens while the atabus
thread sleeps in wdcwait() - check current lwp rather than relying
on global ATACH_TH_RUN channel flag

should fix the hang part of the problem reported in
http://mail-index.netbsd.org/netbsd-users/2020/03/12/msg024249.html

thanks to Paul Ripke for providing extensive debugging info

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Mar 22 16:46:30 2020 UTC (6 years, 7 months ago) by macallan
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +4 -3 lines
do not assume that a bus_space_handle_t is simply an offset
now this has a fighting chance of working on sparc64

Revision 1.52.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:19:08 2020 UTC (6 years, 8 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52: +8 -8 lines
Sync with head.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Feb 19 16:04:39 2020 UTC (6 years, 8 months ago) by riastradh
Branches: MAIN
CVS tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +8 -8 lines
C99 initializers for scsipi_bustype.  No functional change intended.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Dec 27 09:41:50 2019 UTC (6 years, 10 months ago) by msaitoh
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -3 lines
s/transfered/transferred/

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Dec 22 20:59:42 2019 UTC (6 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +5 -5 lines
don't treat the EDMA self disable as autoconfig error, it's perfectly
normal at least during boot when device connection is reported by controller

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Dec 22 20:54:00 2019 UTC (6 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +19 -41 lines
remove check for idle status when disabling EDMA, and always toggle
the disable regardless of current state - this particularly seems
to fail during error recovery, and on my system this also fails
during regular boot

this matches both FreeBSD and Linux drivers - neither of those checks
the idle status

should help with PR kern/52419 and maybe also the lock spinout part
of PR kern/52126

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Nov 10 21:16:35 2019 UTC (7 years ago) by chs
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +5 -23 lines
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.

Revision 1.35.10.1: download - view: text, markup, annotated - select for diffs
Sun Jun 30 19:00:10 2019 UTC (7 years, 4 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35: +6 -5 lines
Pull up following revision(s) (requested by tsutsui in ticket #1283):

	sys/dev/ic/mvsata.c: revision 1.47
	sys/dev/ic/mvsata.c: revision 1.48

Fix "mvsata:0:0:1: buffer load failed: error=27" failure.  PR/54205
Ok'ed by jdolecek@.
Should be pulled up to netbsd-8.

Add a missing newline in an error message.  Noticed in PR/54205

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:33:17 2019 UTC (7 years, 4 months ago) by tsutsui
Branches: MAIN
CVS tags: netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -3 lines
Add a missing newline in an error message.  Noticed in PR/54205

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:29:22 2019 UTC (7 years, 4 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +5 -4 lines
Fix "mvsata:0:0:1: buffer load failed: error=27" failure.  PR/54205

Ok'ed by jdolecek@.
Should be pulled up to netbsd-8.

Revision 1.40.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:11 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +150 -275 lines
Sync with HEAD

Revision 1.39.2.3: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:31 2018 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.39.2.2: preferred, colored; branchpoint 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.2: +148 -273 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Nov 12 20:54:03 2018 UTC (8 years ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, isaki-audio2-base, isaki-audio2
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +6 -7 lines
pass correct status + error to *_atapi_phase_complete(), so that
the function is actually able to recognize when there was an error;
tested via reading a cd0 device in QEMU with ejected cdrom

bug was introduced with jdolecek-ncq branch

fixes PR kern/53724 by Andreas Gustafsson

Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Nov 12 18:51:01 2018 UTC (8 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +9 -9 lines
hold channel lock during whole ata_dmaerr()/ata_downgrade_mode() -
according to code inspection this is safe, none of the set_modes
hooks execute anything which would be taking the lock

adresses PR kern/53714 by Andreas Gustafsson

Revision 1.44: download - view: text, markup, annotated - select for diffs
Mon Oct 22 20:30:52 2018 UTC (8 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +12 -2 lines
move mvsata(4) related items from ata/TODO.ncq to dev/ic/mvsata.c, it's
unlikely this will ever be done, but still good to note somewhere

Revision 1.43: download - view: text, markup, annotated - select for diffs
Mon Oct 22 20:13:47 2018 UTC (8 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +127 -261 lines
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.41.2.11: download - view: text, markup, annotated - select for diffs
Mon Oct 15 21:18:53 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.10: preferred, colored; branchpoint 1.41: preferred, colored; next MAIN 1.42: preferred, colored
Changes since revision 1.41.2.10: +18 -19 lines
change the SATA/NCQ recovery to run in the atabus thread

Revision 1.41.2.10: download - view: text, markup, annotated - select for diffs
Sun Oct 14 14:50:55 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.9: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.9: +30 -23 lines
adjust mvsata_bio_intr() so it recognizes the 'tfd' parameter as passed
by recovery and hence works; use it also for passing state from
mvsata_edma_handle()

Revision 1.41.2.9: download - view: text, markup, annotated - select for diffs
Sat Oct 13 09:31:46 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.8: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.8: +5 -14 lines
make compile again with MVSATA_WITHOUTDMA

Revision 1.41.2.8: download - view: text, markup, annotated - select for diffs
Sat Oct 13 07:23:34 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.7: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.7: +5 -3 lines
add C_TIMEOUT KASSERT() on fail path of mvsata_bio_poll() for clarity

Revision 1.41.2.7: download - view: text, markup, annotated - select for diffs
Thu Oct 11 20:57:51 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.6: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.6: +27 -142 lines
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.41.2.6: download - view: text, markup, annotated - select for diffs
Thu Oct 4 17:59:35 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.5: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.5: +4 -2 lines
further channel locking pass for reset

Revision 1.41.2.5: download - view: text, markup, annotated - select for diffs
Wed Oct 3 19:20:48 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.4: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.4: +6 -12 lines
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.41.2.4: download - view: text, markup, annotated - select for diffs
Sat Sep 22 09:22:59 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.3: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.3: +3 -3 lines
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.41.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 17 19:30:25 2018 UTC (8 years, 2 months ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.2: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.2: +11 -10 lines
move ATAPI-only members of ata_xfer to an union struct to further save space

Revision 1.41.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 17 18:36:14 2018 UTC (8 years, 2 months ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41.2.1: preferred, colored; branchpoint 1.41: preferred, colored
Changes since revision 1.41.2.1: +33 -21 lines
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.39.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:55:49 2018 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.39.2.1: preferred, colored; branchpoint 1.39: preferred, colored
Changes since revision 1.39.2.1: +4 -4 lines
Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:29:31 2018 UTC (8 years, 2 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +3 -3 lines
Rename min/max -> uimin/uimax for better honesty.

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

HOWEVER!  Some subsystems have

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

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

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

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

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

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

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

Revision 1.41.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 31 19:08:03 2018 UTC (8 years, 2 months ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +28 -55 lines
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.41: download - view: text, markup, annotated - select for diffs
Fri Aug 31 18:43:29 2018 UTC (8 years, 2 months ago) by jdolecek
Branches: MAIN
CVS tags: jdolecek-ncqfixes-base
Branch point for: jdolecek-ncqfixes
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
constify mvsata_pci_products[]

Revision 1.39.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 16 01:59:57 2018 UTC (8 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +20 -12 lines
Sync with HEAD, resolve some conflicts

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Apr 8 11:57:43 2018 UTC (8 years, 7 months ago) by mlelstv
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415
Branch point for: phil-wifi
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +20 -12 lines
Avoid rounding errors for timeout values.

Revision 1.24.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:03 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.24.2.3: preferred, colored; branchpoint 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.2.3: +954 -708 lines
update from HEAD

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Oct 17 16:24:14 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -16 lines
no need to clear DMA WAIT flag in mvsata_edma_handle(), it's not needed
by atabus layer

Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Oct 10 16:30:23 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
make compile with ATAPI_DEBUG_PROBE (by copying over the code from
atapi_wdc.c), which is on e.g. for i386/amd64 ALL kernels
problem found by hannken@, thanks

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Oct 8 21:18:14 2017 UTC (9 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
Initialize tfd even when not waiting for DSC.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Oct 7 16:05:32 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +949 -692 lines
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.35.6.32: download - view: text, markup, annotated - select for diffs
Sat Sep 30 21:32:31 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.31: preferred, colored; branchpoint 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35.6.31: +13 -9 lines
must drop channel lock before calling ata_dmaerr() to avoid 'locking against
myself' in case of consecutive errors from ata_reset_channel() called via
ata_downgrade_mode()

Revision 1.35.6.31: download - view: text, markup, annotated - select for diffs
Wed Sep 27 07:19:34 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.30: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.30: +3 -3 lines
change wdc_init_shadow_regs() to accept only struct wdc_regs, it doesn't
touch anything else

factor out the probe-only struct ata_channel initialization to wdcprobe(), to
reduce duplication of logic in individual drivers, and to actually work now
that more init is needed beyond the memset()

Revision 1.35.6.30: download - view: text, markup, annotated - select for diffs
Tue Sep 26 17:05:37 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.29: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.29: +4 -4 lines
make compile without MVSATA_DEBUG

Revision 1.35.6.29: download - view: text, markup, annotated - select for diffs
Mon Sep 25 22:50:20 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.28: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.28: +26 -13 lines
move mvsata_quetag_get() to the start routines, so that it always matches
the active list of ata queue; important during error recovery, fixes
panics when calling

in mvsata_edma_handle() ignore events for non-active xfers

fix some missing ata_channel_unlock() on error path in mvsata_bio_intr()
and mvsata_atapi_intr(), fixes 'locking against myself' with LOCKDEBUG

with this, mvsata(4) finally survives full fio run with wdcdebug_wd_cnt == 200

Revision 1.35.6.28: download - view: text, markup, annotated - select for diffs
Fri Sep 22 20:19:08 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.27: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.27: +4 -4 lines
fix inverted logic for calling atastart()

Revision 1.35.6.27: download - view: text, markup, annotated - select for diffs
Wed Sep 20 18:35:37 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.26: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.26: +8 -4 lines
make compile again with MVSATA_WITHOUTDMA

Revision 1.35.6.26: download - view: text, markup, annotated - select for diffs
Tue Sep 19 21:06:25 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.25: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.25: +33 -9 lines
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.35.6.25: download - view: text, markup, annotated - select for diffs
Sun Sep 10 19:31:15 2017 UTC (9 years, 2 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.24: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.24: +172 -85 lines
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.35.6.24: download - view: text, markup, annotated - select for diffs
Sun Sep 10 18:37:21 2017 UTC (9 years, 2 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.23: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.23: +145 -145 lines
move mvsata_bio(), mvsata_exec_command() and mvsata_atapi_scsipi_request()
just before their respective hook functions

Revision 1.35.6.23: download - view: text, markup, annotated - select for diffs
Sun Aug 13 11:48:53 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.22: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.22: +3 -2 lines
put the non-NCQ KASSERT() before edma disable for bio PIO, we are not supposed
to get there with NCQ command even on retries any more

Revision 1.35.6.22: download - view: text, markup, annotated - select for diffs
Sat Aug 12 22:43:22 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.21: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.21: +234 -66 lines
add NCQ error recovery for mvsata(4)

fix wait flags for mvsata_bio_start(), AT_* constants are only valid for cmd

change the debug logging to similar form as ahcisata/siisata, so it's
easier to selectively show

Revision 1.35.6.21: download - view: text, markup, annotated - select for diffs
Sat Aug 12 14:41:54 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.20: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.20: +4 -6 lines
convert the atabus thread to use the channel lock and a condvar, adjust
code which sets the relevant channel flags to take the lock while doing so

Revision 1.35.6.20: download - view: text, markup, annotated - select for diffs
Sat Aug 12 09:52:28 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.19: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.19: +124 -116 lines
remove all logic around ATACH_IRQ_WAIT and channel-global ch_error/ch_status,
so that there is less hidden state shared by commands; primary intent is
to make the NCQ and non-NCQ paths more similar, and remove possibility
of incorrect handling for the NCQ commands

tested both disk and ATAPI - piixide(4) on QEMU, and siisata(4),
ahcisata(4), mvsata(4) on real hw

Revision 1.35.6.19: download - view: text, markup, annotated - select for diffs
Sat Aug 12 09:38:58 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.18: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.18: +6 -4 lines
fix condition for switching to kernel thread for ATAPI and bio reset recovery
to match atapi_wdc.c, __wdcwait() postpones to the thread whenever neither
AT_POLL nor AT_WAIT flags are present

fixes spurious 'timeout' for the command on mvsata, followed by 'unexpected'
interrupt

Revision 1.35.6.18: download - view: text, markup, annotated - select for diffs
Wed Jun 28 19:59:36 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.17: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.17: +2 -4 lines
enable ATAPI on mvsata(4); it seems to work fine for my cdrom

Revision 1.35.6.17: download - view: text, markup, annotated - select for diffs
Tue Jun 27 18:36:03 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.16: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.16: +43 -28 lines
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.35.6.16: download - view: text, markup, annotated - select for diffs
Sat Jun 24 14:59:10 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.15: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.15: +10 -26 lines
fix confusion around AT_WAIT vs AT_POLL for mvsata_edma_disable(), and switch
all the tsleep()/delay() ifs to just use ata_delay()

Revision 1.35.6.15: download - view: text, markup, annotated - select for diffs
Sat Jun 24 14:33:06 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.14: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.14: +26 -22 lines
fix dump on mvsata - there was misplaced mvsata_bio_intr() call causing
diagnostic panic, and we also need to switch controller to appropriate
DMA mode (NCQ vs. non-NCQ DMA)

while here, also reduce delay for the polled command wait to 100 us, same
as siisata(4) and ahcisata(4)

Revision 1.35.6.14: download - view: text, markup, annotated - select for diffs
Wed Jun 21 19:38:43 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.13: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.13: +5 -5 lines
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.35.6.13: download - view: text, markup, annotated - select for diffs
Tue Jun 20 20:58:22 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.12: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.12: +5 -5 lines
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.35.6.12: download - view: text, markup, annotated - select for diffs
Mon Jun 19 21:00:00 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.11: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.11: +3 -3 lines
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.35.6.11: download - view: text, markup, annotated - select for diffs
Fri Jun 16 20:40:49 2017 UTC (9 years, 5 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.10: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.10: +13 -18 lines
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.35.6.10: download - view: text, markup, annotated - select for diffs
Tue Jun 13 19:15:32 2017 UTC (9 years, 5 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.9: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.9: +3 -3 lines
use MVSATA_EDMAQ_LEN instead of magic number for number of queue slots

Revision 1.35.6.9: download - view: text, markup, annotated - select for diffs
Mon Jun 12 21:38:50 2017 UTC (9 years, 5 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.8: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.8: +68 -28 lines
add support for NCQ on Gen IIe hardware

mvsata_quetag_get()/put() pairs adjusted to work also for non-DMA code paths,
i.e. during probe; replaced wdcintr() call with local routine which uses
currently active command tag, rather than assuming always tag 0 on that
code path

~55MB/s -> ~80MB/s sequential read using fio(1) on a test HDD, quite nice

Revision 1.35.6.8: download - view: text, markup, annotated - select for diffs
Sat Jun 10 13:25:51 2017 UTC (9 years, 5 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.7: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.7: +13 -40 lines
use satafis routine to build the command block for Gen IIe to reduce code
duplication

Revision 1.35.6.7: download - view: text, markup, annotated - select for diffs
Fri Jun 9 20:18:58 2017 UTC (9 years, 5 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.6: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.6: +108 -161 lines
fix the driver to work again - switch to using tag from xfer, adjust
to framework changes (queue dynamically allocated), and do not store
pointer to xfer inside internal structures

unhide the ATAPI code and fix to compile, keep it disabled however

no indended functional changes, logic kept as close as possible to what was
there before; tested with Adaptec 1430SA (88SX7042)

Revision 1.35.6.6: download - view: text, markup, annotated - select for diffs
Wed Apr 19 20:49:17 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.5: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.5: +13 -13 lines
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.35.6.5: download - view: text, markup, annotated - select for diffs
Sat Apr 15 17:14:11 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.4: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.4: +24 -30 lines
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.35.6.4: download - view: text, markup, annotated - select for diffs
Sat Apr 15 12:01:23 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.3: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.3: +29 -34 lines
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.35.6.3: download - view: text, markup, annotated - select for diffs
Tue Apr 11 18:14:47 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.2: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.2: +3 -3 lines
remove left-over curly brace

Revision 1.35.6.2: download - view: text, markup, annotated - select for diffs
Tue Apr 11 18:13:17 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35.6.1: preferred, colored; branchpoint 1.35: preferred, colored
Changes since revision 1.35.6.1: +21 -21 lines
fix to not access active_xfer directly

Revision 1.35.6.1: download - view: text, markup, annotated - select for diffs
Mon Apr 10 22:57:02 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +23 -20 lines
ATA infrastructure improvements to eventually support more outstanding
commands

patch by Matt Thomas

Revision 1.33.6.2: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:21 2016 UTC (10 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.33.6.1: preferred, colored; branchpoint 1.33: preferred, colored; next MAIN 1.34: preferred, colored
Changes since revision 1.33.6.1: +8 -6 lines
Sync with HEAD

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon May 2 19:18:29 2016 UTC (10 years, 6 months ago) by christos
Branches: 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, nick-nhusb-base-20160529, netbsd-8-base, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8, jdolecek-ncq
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +8 -6 lines
move scsipi_strvis -> libkern:strnvisx()
change the prototype to match userland
fix sizes of strings passed to it

Revision 1.33.6.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:09 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -4 lines
Sync with HEAD

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Jan 2 19:42:07 2015 UTC (11 years, 10 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -4 lines
We have three sets of DTYPE_ constants in the kernel:
	altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.

Revision 1.24.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:38 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.24.2.2: preferred, colored; branchpoint 1.24: preferred, colored
Changes since revision 1.24.2.2: +2 -2 lines
Rebase to HEAD as of a few days ago.

Revision 1.11.2.4: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:22 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.11.2.3: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.2.3: +162 -79 lines
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.31.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:37 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31: +4 -4 lines
sync with head

Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Feb 17 13:41:20 2014 UTC (12 years, 9 months ago) by kiyohara
Branches: 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, nick-nhusb-base, 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
Branch point for: nick-nhusb
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -3 lines
More delay() for some drives.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Sep 1 11:14:46 2013 UTC (13 years, 2 months ago) by kiyohara
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -4 lines
Declare mvsata_probe_drive() when defined MVSATA_WITHOUTDMA.
And more delay() for some machines.

Revision 1.24.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:17 2013 UTC (13 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.24.2.1: preferred, colored; branchpoint 1.24: preferred, colored
Changes since revision 1.24.2.1: +9 -6 lines
resync from head

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon May 6 14:52:51 2013 UTC (13 years, 6 months ago) by jakllsch
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -2 lines
Put back AT_POLL hack in mvsata_bio_ready().  Without it 1.5Gbps
SATA WD800JD drives cause the kernel to stall during autoconf on
Orion.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Apr 3 17:15:07 2013 UTC (13 years, 7 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +7 -6 lines
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.24.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:29:15 2013 UTC (13 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +157 -77 lines
resync with head

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Feb 10 21:21:29 2013 UTC (13 years, 9 months ago) by jakllsch
Branches: MAIN
CVS tags: agc-symver-base, agc-symver
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +135 -64 lines
This change adds SATA port multiplier support to mvsata(4).

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Feb 10 20:13:53 2013 UTC (13 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +10 -10 lines
Timeouts have priority over panicing.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Feb 10 19:22:23 2013 UTC (13 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3 lines
The device queue tag and the host queue tag are not the same thing.
We don't support device queueing yet, so write that tag as zero.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Feb 10 19:20:19 2013 UTC (13 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +12 -4 lines
We can't (well, actually we can, but we still can't) assume that all
ata_bios are LBA.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Feb 3 20:13:28 2013 UTC (13 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +5 -4 lines
Add argument to wdccommandext() to allow the entire contents of the
device/head register to be specified.  Needed for upcoming port multipler
support in mvsata(4).

Revision 1.11.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:21:06 2012 UTC (14 years ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.11.2.2: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.2: +46 -40 lines
sync with head

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Jul 31 15:50:34 2012 UTC (14 years, 3 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +46 -40 lines
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.23: download - view: text, markup, annotated - select for diffs
Thu Jul 26 20:49:48 2012 UTC (14 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +21 -27 lines
Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@

Revision 1.22: download - view: text, markup, annotated - select for diffs
Tue Jul 24 14:04:30 2012 UTC (14 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +29 -29 lines
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.21: download - view: text, markup, annotated - select for diffs
Thu Jul 19 12:39:08 2012 UTC (14 years, 4 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +11 -7 lines
Fix MVSATA_WDC_* macros to actually access the Shadow Register Block.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Jul 15 10:55:30 2012 UTC (14 years, 4 months ago) by dsl
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +29 -29 lines
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.19: download - view: text, markup, annotated - select for diffs
Sun Jul 15 01:15:03 2012 UTC (14 years, 4 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
Fix obvious copy/paste-induced error (my fault) that would clobber
the bottom 24-bits of r_lba during a LBA48 command with AT_READREG.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Jul 12 14:17:03 2012 UTC (14 years, 4 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -3 lines
Fix surplus ( that was forgotten to remove in the DRIVE_ to DRIVET_ rototol.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Jul 2 18:15:46 2012 UTC (14 years, 4 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +17 -15 lines
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.11.2.2: download - view: text, markup, annotated - select for diffs
Wed May 23 10:07:56 2012 UTC (14 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.11.2.1: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.2.1: +3 -2 lines
sync with head.

Revision 1.11.6.2: download - view: text, markup, annotated - select for diffs
Sun Apr 29 23:04:50 2012 UTC (14 years, 6 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.11.6.1: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.6.1: +3 -2 lines
sync to latest -current.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Apr 20 20:23:20 2012 UTC (14 years, 6 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -2 lines
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.11.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:07:35 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +57 -15 lines
sync with head

Revision 1.11.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:34:22 2012 UTC (14 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +57 -15 lines
merge to -current.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Tue Jan 24 20:04:08 2012 UTC (14 years, 9 months ago) by jakllsch
Branches: 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, matt-nb6-plus, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +53 -11 lines
Rework struct ata_command to support LBA28 and LBA48-protocol commands.
Implement 28- and 48-bit command issuance and parameter read-back in the
various ATA host drivers. Add LBA28-protocol support to ATAIOCCOMMAND ioctl.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Jan 22 16:09:08 2012 UTC (14 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
Trailing whitespace.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Jan 21 18:33:17 2012 UTC (14 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4 lines
Correct some typos in comments, as was done in wdc.c 1.266.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Jan 9 01:01:49 2012 UTC (14 years, 10 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
Instead of assume that 'features' is 0 in wdccommandext(),
pass it as an argument, as is done for wdccommand().

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Sep 1 14:55:58 2011 UTC (15 years, 2 months ago) by jakllsch
Branches: 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
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -6 lines
It seems mvsata_bio_ready() is actually needed, and it seems
to work better if we always poll for completion for the
duration of this function.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Aug 15 01:04:04 2011 UTC (15 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +19 -11 lines
Even if the hardware can handle concurrent transfers, ata(4) can't.
Also, completely rework mvsata_bio_ready().

Seems to make mvsata(4) usable on 5182.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Aug 14 16:50:49 2011 UTC (15 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +7 -7 lines
Spell enqueue correctly.

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:07:54 2011 UTC (15 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +7 -7 lines
Sync with HEAD.

Revision 1.3.4.3: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:41:47 2011 UTC (15 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.3.4.2: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.4.2: +1 -1 lines
sync with head

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Mar 10 03:35:37 2011 UTC (15 years, 8 months ago) by jakllsch
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -3 lines
Shorten infinite loop.  Tames atactl(8) atabus reset on mvsata(4).

Revision 1.3.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:53:18 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.3.4.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.4.1: +13 -55 lines
sync with head

Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:10:19 2011 UTC (15 years, 8 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +6 -6 lines
Sync with HEAD

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Feb 20 01:26:22 2011 UTC (15 years, 8 months ago) by riz
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +6 -6 lines
Use PRId64 instead of lld, and PRIx64 instead of llx when compiling
with MVSATA_DEBUG.

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:46:10 2010 UTC (16 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.1: +7 -49 lines
Sync with HEAD.

Revision 1.2.2.4: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:53:28 2010 UTC (16 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2.2.3: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.3: +11 -53 lines
sync with head.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Jul 13 12:57:22 2010 UTC (16 years, 4 months ago) by kiyohara
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -5 lines
Fix wrong ifdef.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Jul 13 12:53:42 2010 UTC (16 years, 4 months ago) by kiyohara
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +8 -48 lines
Move to pci/mvsata_pci.c (marvell/mvsata_mv.c) splitting mvsata_products[].
mvsata(4) uses these to match.

Revision 1.3.4.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:24 2010 UTC (16 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
sync with head

Revision 1.3.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:19 2010 UTC (16 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
Sync with HEAD.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Mar 28 20:46:18 2010 UTC (16 years, 7 months ago) by snj
Branches: MAIN
CVS tags: uebayasi-xip-base1
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -4 lines
Spell "enough" properly.

Revision 1.2.2.3: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:33 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2.2.2: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.2: +3 -3 lines
sync with head

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Jan 5 13:30:10 2010 UTC (16 years, 10 months ago) by mbalmer
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
Remove extra semicolons.

Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 19 18:47:07 2009 UTC (17 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.1: +3699 -0 lines
sync with head.

Revision 1.2.2.1
Mon Aug 3 20:06:36 2009 UTC (17 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
FILE REMOVED
Changes since revision 1.2: +0 -3699 lines
file mvsata.c was added on branch yamt-nfs-mp on 2009-08-19 18:47:07 +0000

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Aug 3 20:06:36 2009 UTC (17 years, 3 months ago) by snj
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: yamt-nfs-mp
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3 lines
Fix a typo inside a comment.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Jul 27 12:34:14 2009 UTC (17 years, 3 months ago) by kiyohara
Branches: MAIN
Support Marvell Hercules-I/II SATA Controllers.

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>