The NetBSD Project

CVS log for src/sys/dev/ic/nvmevar.h

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Aug 14 12:08:57 2022 UTC (2 years, 3 months ago) by jmcneill
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, 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, HEAD
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +3 -14 lines
nvme: Make sure that q_ccb_list is always accessed with the q lock held.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Aug 1 08:09:30 2022 UTC (2 years, 4 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +65 -4 lines
Now really restore 1.24.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Aug 1 07:37:18 2022 UTC (2 years, 4 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -75 lines
Revert last accidental commits.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Aug 1 07:34:28 2022 UTC (2 years, 4 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +22 -12 lines
Also fix shift values for SCT constants.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat May 7 08:20:04 2022 UTC (2 years, 7 months ago) by skrll
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +42 -1 lines
Add support for Apple silicon NVME.  Ported from OpenBSD.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Nov 16 06:58:33 2021 UTC (3 years ago) by skrll
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -2 lines
Trailing whitespace

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 17:25:48 2021 UTC (3 years, 5 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +4 -1 lines
Pull up following revision(s) (requested by riastradh in ticket #1305):

	sys/dev/ic/nvmevar.h: revision 1.22
	sys/dev/ic/nvme.c: revision 1.56
	sys/dev/ic/nvme.c: revision 1.57
	sys/dev/pci/nvme_pci.c: revision 1.30

nvme(4): Add suspend/resume, derived from OpenBSD.

nvme(4): Move disestablishment of admin q interrupt to nvme_detach.

Nothing re-established this after suspend/resume, so attempting
suspend/resume/suspend would crash, and presumably we would miss
interrupts after resume.  This keeps the establish/disestablish more
symmetric in attach/detach.

Revision 1.21.6.1: download - view: text, markup, annotated - select for diffs
Thu Jun 17 04:46:28 2021 UTC (3 years, 5 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21: +4 -1 lines
Sync w/ HEAD.

Revision 1.21.8.1: download - view: text, markup, annotated - select for diffs
Mon May 31 22:15:18 2021 UTC (3 years, 6 months ago) by cjep
Branches: cjep_staticlib_x
Diff to: previous 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21: +4 -1 lines
sync with head

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat May 29 08:46:38 2021 UTC (3 years, 6 months ago) by riastradh
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -1 lines
nvme(4): Add suspend/resume, derived from OpenBSD.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Jul 28 09:36:05 2020 UTC (4 years, 4 months ago) by jdolecek
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_staticlib_x-base
Branch point for: thorpej-i2c-spi-conf, cjep_staticlib_x
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -1 lines
add a quirk to disable MSI, and enable it for Intel SSD DC P4500

this device seems to cause serious system responsiveness issues when configured
to use MSI, while it works fine when configured for either INTx or MSI-X

this is important so this works well under Xen Dom0, which doesn't
support MSI-X yet

fixes another issue reported as feedback for PR port-xen/55285 by Frank Kardel

Revision 1.17.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:21 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.1: +15 -3 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Jun 28 15:08:47 2019 UTC (5 years, 5 months ago) by jmcneill
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +15 -3 lines
Fix a performance issue where one busy queue can starve all other queues.

In normal operations with multiple queues, the nvme driver will attempt
to schedule I/O requests on the submitting CPU. This breaks down when any
one of the queues becomes full; the driver returns EAGAIN to the disk
layer, which causes the disk layer to stop submitting more requests until
the blocked request is consumed. When space becomes available in the full
queue, it pulls the next buffer from the bufq and fills the queue again,
until finally hitting EAGAIN and preventing other queues from processing
requests.

Two changes here to fix the problem:

 - When processing requests from the bufq, attempt to assign them to the
   queue associated with the CPU that originated the request.
 - If that queue is busy, try to find another queue with available space
   before returning EAGAIN. This way, only when all queues are full will
   the disk layer stop submitting more requests.

Now for some real numbers. On a Rockchip RK3399 board (6 CPUs), with 6
concurrent readers:

Old code:
	4294967296 bytes transferred in 52.420 secs (81933752 bytes/sec)
	4294967296 bytes transferred in 53.969 secs (79582117 bytes/sec)
	4294967296 bytes transferred in 55.391 secs (77539082 bytes/sec)
	4294967296 bytes transferred in 55.649 secs (77179595 bytes/sec)
	4294967296 bytes transferred in 56.102 secs (76556402 bytes/sec)
	4294967296 bytes transferred in 72.901 secs (58915066 bytes/sec)

New code:
	4294967296 bytes transferred in 37.171 secs (115546186 bytes/sec)
	4294967296 bytes transferred in 37.611 secs (114194445 bytes/sec)
	4294967296 bytes transferred in 37.655 secs (114061009 bytes/sec)
	4294967296 bytes transferred in 38.247 secs (112295534 bytes/sec)
	4294967296 bytes transferred in 38.496 secs (111569183 bytes/sec)
	4294967296 bytes transferred in 38.595 secs (111282997 bytes/sec)

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

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Apr 24 23:39:23 2019 UTC (5 years, 7 months ago) by mlelstv
Branches: MAIN
CVS tags: phil-wifi-20190609
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +4 -1 lines
Expose device type. You can query it with e.g. drvctl -p ld0 disk-info/type.

Revision 1.13.14.3: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:01:48 2018 UTC (5 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.13.14.2: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.14.2: +2 -1 lines
Sync with HEAD, resolve a few conflicts

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Dec 1 15:07:58 2018 UTC (6 years ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, isaki-audio2-base, isaki-audio2
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -1 lines
support DIOCSCACHE + DKCACHE_WRITE if volatile write cache is present

fix the Get Features call for DIOCGCACHE to actually retrieve the current
value properly

Revision 1.13.14.2: download - view: text, markup, annotated - select for diffs
Sun Apr 22 07:20:20 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.13.14.1: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.14.1: +6 -3 lines
Sync with HEAD

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Apr 19 21:50:08 2018 UTC (6 years, 7 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3 lines
s/static inline/static __inline/g for consistency.

Revision 1.13.6.3: download - view: text, markup, annotated - select for diffs
Thu Apr 19 15:37:56 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.13.6.2: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.6.2: +4 -1 lines
Pull up following revision(s) (requested by nonaka in ticket #781):

	sbin/nvmectl/Makefile				1.4
	sbin/nvmectl/bignum.c				1.2
	sbin/nvmectl/devlist.c				1.3-1.5
	sbin/nvmectl/firmware.c				1.3,1.4
	sbin/nvmectl/identify.c				1.3-1.5
	sbin/nvmectl/logpage.c				1.5-1.7
	sbin/nvmectl/nvme.h				1.3
	sbin/nvmectl/nvmectl.8				1.5
	sbin/nvmectl/nvmectl.c				1.5-1.7
	sbin/nvmectl/nvmectl.h				1.5-1.8
	sbin/nvmectl/perftest.c				1.3-1.5
	sbin/nvmectl/power.c				1.3,1.4
	sbin/nvmectl/reset.c				1.2,1.3
	sbin/nvmectl/util.c				1.1,1.2
	sbin/nvmectl/wdc.c				1.2-1.4
	sys/dev/ic/ld_nvme.c				1.20
	sys/dev/ic/nvme.c				1.38,1.39
	sys/dev/ic/nvmeio.h				1.2
	sys/dev/ic/nvmereg.h				1.10,1.11
	sys/dev/ic/nvmevar.h				1.16
	sys/dev/pci/nvme_pci.c				1.20

nvmectl(8): Sync with FreeBSD nvmecontrol(8) r328763.

nvmectl(8): fix wdc command usage.

nvme(4): Added some delay before check RDY bit quirk when disabling device.
Pick from FreeBSD nvme(4) r326937.

Add some new structure fileds, opcodes and statuses from NVMe 1.3a.

nvmectl(8): Add big-endian support.
from FreeBSD nvmecontolr(8) r329824.

nvmectl(8): fix subcommand usage.

nvmectl(8): Remove some wdc subcommands from man page.
- wdc drive-log
- wdc get-crash-dump
- wdc purge
- wdc purge-monitor

Typos.

use setprogname()/getprogname(), do not hardcode the prognam name in fixed
strings

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Apr 18 10:05:59 2018 UTC (6 years, 7 months ago) by nonaka
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -1 lines
nvme(4): Added some delay before check RDY bit quirk when disabling device.

Pick from FreeBSD nvme(4) r326937.

Revision 1.13.14.1: download - view: text, markup, annotated - select for diffs
Thu Mar 22 01:44:48 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -5 lines
Synch with HEAD, resolve conflicts

Revision 1.13.6.2: download - view: text, markup, annotated - select for diffs
Sun Mar 18 11:05:27 2018 UTC (6 years, 8 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.13.6.1: preferred, colored; branchpoint 1.13: preferred, colored
Changes since revision 1.13.6.1: +5 -4 lines
Pull up following revision(s) (requested by jdolecek in ticket #641):
	sys/dev/ic/nvme.c: revision 1.34
	sys/dev/ic/nvme.c: revision 1.35
	sys/dev/ic/nvme.c: revision 1.36
	sys/dev/ic/nvme.c: revision 1.37
	sys/dev/ic/ld_nvme.c: revision 1.19
	sys/dev/ic/nvmevar.h: revision 1.15

refactor the locking code around DIOCGCACHE handling to be reusable
for other infrequent commands,it uses single condvar for simplicity,
and uses it both when waiting for ccb or command completion - this
is fine, since usually there will be just one such command qeueued anyway
use this to finally properly implement DIOCCACHESYNC - return only after
the command is confirmed as completed by the controller.

switch handling of passthrough commands to use queue, instead of polling
should fix PR kern/53059 by Frank Kardel

fix passthrough command usage also in nvme_get_number_of_queues(), fixes
memory corruption and possible panic on boot

also remove now duplicate nvme_ccb_put() call from
nvme_get_number_of_queues()

Revision 1.13.6.1: download - view: text, markup, annotated - select for diffs
Sat Mar 17 08:11:18 2018 UTC (6 years, 8 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -2 lines
Pull up following revision(s) (requested by jdolecek in ticket #636):
	sys/dev/ic/nvme.c: revision 1.33
	sys/dev/ic/nvmevar.h: revision 1.14
stop using q_nccbs_avail for deciding whether there are available ccbs;
no need to maintain a counter _and_ q_ccb_list
this fixes deadlock when all ccbs happen to be taken before completion
interrupt - nvme_q_complete() increased q_nccbs_avail only after
processing all the completed commands, by then there was nothing
left to actually kick the disk queue again into action
this also fixes ccb leak on command errors e.g. with bus_dmamem_alloc()
or bus_dmamel_load() - q_nccbs_avail was never decreased on the error path
fixes PR kern/52769 by Martin Husemann, thanks to Paul Goyette
for testing

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Mar 16 23:31:19 2018 UTC (6 years, 8 months ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +5 -4 lines
refactor the locking code around DIOCGCACHE handling to be reusable
for other infrequent commands

it uses single condvar for simplicity, and uses it both when waiting
for ccb or command completion - this is fine, since usually there
will be just one such command qeueued anyway

use this to finally properly implement DIOCCACHESYNC - return only after
the command is confirmed as completed by the controller

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Mar 16 18:49:18 2018 UTC (6 years, 8 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +1 -2 lines
stop using q_nccbs_avail for deciding whether there are available ccbs;
no need to maintain a counter _and_ q_ccb_list

this fixes deadlock when all ccbs happen to be taken before completion
interrupt - nvme_q_complete() increased q_nccbs_avail only after
processing all the completed commands, by then there was nothing
left to actually kick the disk queue again into action

this also fixes ccb leak on command errors e.g. with bus_dmamem_alloc()
or bus_dmamel_load() - q_nccbs_avail was never decreased on the error path

fixes PR kern/52769 by Martin Husemann, thanks to Paul Goyette
for testing

Revision 1.13.12.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:03 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.13.12.1: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.12.1: +185 -0 lines
update from HEAD

Revision 1.1.2.6: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:03 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.5: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.5: +5 -2 lines
Sync with HEAD

Revision 1.2.2.3: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:11 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.2.2.2: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.2: +2 -1 lines
Sync with HEAD

Revision 1.11.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:46 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +5 -2 lines
Sync with HEAD

Revision 1.13.12.1
Wed Apr 5 20:15:49 2017 UTC (7 years, 8 months ago) by jdolecek
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.13: +0 -185 lines
file nvmevar.h was added on branch tls-maxphys on 2017-12-03 11:37:03 +0000

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Apr 5 20:15:49 2017 UTC (7 years, 8 months ago) by jdolecek
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-compat-base, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: tls-maxphys, pgoyette-compat, netbsd-8
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -1 lines
expose disk device FUA/DPO support via DIOCGCACHE, and allow the flags
to be set for I/O; implement support in sd(4) and nvme(4)

discussed on tech-kern

Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:28 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.1: +4 -2 lines
Sync with HEAD

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Feb 28 20:53:50 2017 UTC (7 years, 9 months ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +4 -2 lines
implement DIOCGCACHE

Revision 1.1.2.5: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:01 2016 UTC (8 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.4: +14 -10 lines
Sync with HEAD

Revision 1.2.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:09 2016 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +41 -42 lines
Sync with HEAD

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Nov 1 14:39:38 2016 UTC (8 years, 1 month ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -2 lines
pass maxphys from device rather then assuming MAXPHYS; it's clipped in ld(4)
if bigger then MAXPHYS

multiply the queue size by number of queues for ld(4) sc_maxqueuecnt, so
that ld_diskstart() would try to use full capacity, instead of throttling
to one queue worth of commands

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Nov 1 14:24:35 2016 UTC (8 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2 lines
tighter queue control - according to spec actual cap on number of commands
in flight is actually one less then queue size, head == tail means empty
queue

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Oct 20 19:20:40 2016 UTC (8 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +8 -8 lines
revert change from rev. 1.12:
"""
slightly optimize memory access - change struct nvme_queue so that the
struct dmamem members are allocated as part of it, instead of separate
kmem_alloc()s
"""

that change quite curiously caused completion queue corruption on MP systems,
regardless of MPSAFE setting for the pci/softintr interrupt

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Oct 19 19:34:31 2016 UTC (8 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -1 lines
add debug code to check for completion queue corruption

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Oct 19 19:31:23 2016 UTC (8 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -1 lines
follow advice of spec and block interrupts via INTMS/INTMC for intx handler;
this also makes it possible to offload the actual interrupt processing to softintr
handler, similar as for MSI/MSI-X

Revision 1.1.2.4: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:55:41 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.3: +42 -47 lines
Sync with HEAD

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Sep 27 03:33:32 2016 UTC (8 years, 2 months ago) by pgoyette
Branches: MAIN
CVS tags: nick-nhusb-base-20161004
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1 lines
Modularize the ld driver and all of its attachments.  Ensure that all
parents are capable of rescan (or otherwise provide a means of attaching
children post-initialization).

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Sep 19 22:11:41 2016 UTC (8 years, 2 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +8 -8 lines
slightly optimize memory access - change struct nvme_queue so that the
struct dmamem members are allocated as part of it, instead of separate
kmem_alloc()s

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Sep 19 20:33:51 2016 UTC (8 years, 2 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +25 -35 lines
on further thought, just remove the separately allocated nvme_ns_context
altogether and fold into nvme_ccb; allocating this separately just isn't useful

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Sep 18 21:19:39 2016 UTC (8 years, 2 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +17 -13 lines
fix several bugs, make nvme(4) MPSAFE by default and also bump default
number of ioq from 128 to 1024; tested with VirtualBox and QEMU

* remove NVME_INTMC/NVME_INTMS writes in hw intr handler as this is not MPSAFE,
  fortunately they don't seem to be necessary; shaves two register writes
* need to use full mutex_enter() in nvme_q_complete(), to avoid small
  race between one handler exiting the loop and another entering
* for MSI, handover the command result processing to softintr; unfortunately
  can't easily do that for INTx interrupts as they require doorbell write
  to deassert
* unlock/relock q->q_cq_mtx before calling ccb_done to avoid potential deadlocks
* make sure to destroy queue mutexes when destroying the queue (LOCKDEBUG)
* make ns ctx pool per-device, so that it's deallocated properly on module
  unload
* handle ctx allocation failure in ld_nvme_dobio()
* remove splbio() calls in ld_nvme_dobio() and sync, the paths are exercised
  only for dump/shutdown, and that already disables interrupts
* free the ns ctx in ld_nvme_biodone() before calling lddone() to avoid
  memory starvation, as lddone() can trigger another i/o request
* be more careful with using PR_WAITOK, the paths are called from interrupt
  context and there we can't wait

Revision 1.1.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:02 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.2: +4 -1 lines
Sync with HEAD

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Jun 4 16:11:51 2016 UTC (8 years, 6 months ago) by nonaka
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -1 lines
Add NVMe command passthrough support.

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:21 2016 UTC (8 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.2.1: +180 -0 lines
Sync with HEAD

Revision 1.1.2.1
Sun May 1 10:21:02 2016 UTC (8 years, 7 months ago) by skrll
Branches: nick-nhusb
FILE REMOVED
Changes since revision 1.1: +0 -180 lines
file nvmevar.h was added on branch nick-nhusb on 2016-05-29 08:44:21 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun May 1 10:21:02 2016 UTC (8 years, 7 months ago) by nonaka
Branches: MAIN
CVS tags: nick-nhusb-base-20160529
Branch point for: nick-nhusb
Added nvme(4) for Non-Volatile Memory Host Controller Interface devices.
Ported from OpenBSD.

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>