CVS log for src/sys/dev/pci/vioscsi.c
Up to [cvs.NetBSD.org] / src / sys / dev / pci
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.30.2.2: download - view: text, markup, annotated - select for diffs
Wed Oct 2 18:20:48 2024 UTC (3 months, 3 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE
Diff to: previous 1.30.2.1: preferred, colored; branchpoint 1.30: preferred, colored; next MAIN 1.31: preferred, colored
Changes since revision 1.30.2.1: +4 -6
lines
Pull up following revision(s) (requested by rin in ticket #914):
sys/dev/pci/virtio_pci.c: revision 1.50
sys/dev/pci/virtio_pci.c: revision 1.51
sys/dev/pci/virtio_pci.c: revision 1.52
sys/dev/pci/virtio_pci.c: revision 1.53
sys/dev/pci/virtio_pci.c: revision 1.54
sys/dev/pci/vioscsi.c: revision 1.35
sys/dev/pci/ld_virtio.c: revision 1.33
sys/dev/pci/ld_virtio.c: revision 1.34
sys/dev/virtio/viocon.c: revision 1.9
sys/dev/pci/ld_virtio.c: revision 1.35
sys/dev/pci/virtio.c: revision 1.80
sys/dev/pci/virtio.c: revision 1.81
sys/dev/pci/virtio.c: revision 1.82
sys/dev/pci/virtio_pci.c: revision 1.45
sys/dev/pci/virtio_pci.c: revision 1.46
sys/dev/pci/virtio_pci.c: revision 1.47
sys/dev/pci/virtio_pci.c: revision 1.48
sys/dev/pci/virtio_pci.c: revision 1.49
sys/dev/pci/virtio.c: revision 1.79
A single SCSI request may require multiple slots in the virtio queue
but the queue isn't sized for the theoretical maximum. So just use
XS_BUSY to pace the scsipi layer.
viocon(4): Show error in assertion failure.
virtio_read_device_config_le_[24]: Fix for {aarch64,arm}eb
Stop byte-swapping for big-endian aarch64 and arm to fix
corrupted read for, e.g., sc_taglen for vio9p(4).
As described as comments in virtio_pci.c, big-endian aarch64 and
armv7 (armeb) are somewhat special. At the moment, all supported
virtual/real machines are configured as little-endian, and only
CPU cores are switched to big-endian mode during early boot stage.
Most peripheral buses for armeb are LSB as a result, and their
default bus_space(9) functions swap byte-order. Therefore, PIOed
data from memory-mapped devices, as well as pci(4) ones, are
actually LSB, but observed as MSB for armeb.
Therefore, we should not swap byte-order further in
virtio_read_device_config_le_[24] on armeb.
See virtio_pci.c and sys/dev/fdt/virtio_mmio_fdt.c also.
fix spelling mistakes, mainly in comments and log messages.
Split KASSERT(A && B) into KASSERT(A); KASSERT(B).
Fix typo in error message.
Modify a confused expression in ld_virtio_attach().
VIRTIO_BLK_MIN_SEGMENTS should be the total number of non-data segments,
so I rename it to VIRTIO_BLK_CTRL_SEGMENTS.
PR kern/57981.
ld@virtio(4): Fix maximum size parameters.
- SEG_MAX is the maximum number of segments.
- SIZE_MAX is the maximum number of bytes in a single segment.
The maximum transfer size is, therefore, SEG_MAX * SIZE_MAX.
=> Don't add two extra segments in the dmamap vr_payload for the
header and status -- we already have a separate dmamap vr_cmdsts
for that.
=> Don't recalculate payload dmamap parameters based on division by
NBPG, just use the ones specified by the host.
=> Allow SIZE_MAX below MAXPHYS as long as SIZE_MAX*SEG_MAX >=
MAXPHYS.
Even though ldattach clamps ld->sc_maxxfer to MAXPHYS, make sure to
clamp it in ld_virtio_attach before ld_virtio_alloc_reqs since it
determines the dmamap sizes and bounce buffer allocation and there's
no sense in allocating those larger than ld will use anyway.
PR kern/58338
virtio_pci.c: Nix trailing whitespace.
virtio@pci: Unmap the BARs we actually mapped on >=1.0 detach.
PR kern/58335
virtio@pci: Nix useless sc_mapped_iosize.
This appears to have been a mistaken attempt to pass the subregion
length through to bus_space_unmap, which doesn't make any sense --
bus_space_subregion does not allocate anything and the resulting
handle must not be passed to bus_space_unmap.
Once we pass the size that was actually returned by pci_mapreg_map to
bus_space_unmap, which matches the size passed internally by
pci_mapreg_map to bus_space_map, sc_mapped_iosize is no longer used
and can be flushed.
Prompted by PR kern/58335.
virtio@pci: Don't detach on shutdown.
The virtio bus does not keep state in memory that needs to flushed to
persistent storage. Typically DVF_DETACH_SHUTDOWN is only needed by,
e.g., disk drivers to flush disk caches (although really, vfs sync
should do that anyway, so maybe we should just nix the option
altogether).
Prompted by PR kern/58335.
virtio@pci: Zero sc_bars_iosize[i] on unmap.
No functional change intended, but this makes the code less brittle.
Prompted by PR kern/58335.
virtio_pci.c: Sort includes.
No functional change intended.
virtio_pci.c: Omit needless blank lines and commented code.
No functional change intended.
virtio_pci.c: Sprinkle KNF.
- No parameter names in function prototypes.
- Fix indentation.
- Break overlong lines.
- Blank line between declarations and rest of block.
virtio_pci.c: Sprinkle const.
No functional change intended.
virtio_pci.c: Use container_of, not cast.
virtio(4): Assert child attach finished before we allow queueing.
Should help catch mistakes like:
PR kern/58555: Kernel panic during boot when using viocon with PCIe
Revision 1.30.2.1: download - view: text, markup, annotated - select for diffs
Sat May 13 10:56:10 2023 UTC (20 months, 2 weeks ago) by martin
Branches: netbsd-10
CVS tags: 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
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +11 -8
lines
Pull up following revision(s) (requested by yamaguchi in ticket #139):
sys/dev/pci/vioscsi.c: revision 1.31
sys/dev/pci/vio9p.c: revision 1.10
sys/dev/pci/vioscsi.c: revision 1.32
sys/dev/pci/vio9p.c: revision 1.11
sys/dev/pci/vioscsi.c: revision 1.33
sys/dev/pci/ld_virtio.c: revision 1.31
sys/dev/virtio/viocon.c: revision 1.6
sys/dev/pci/vioscsi.c: revision 1.34
sys/dev/pci/ld_virtio.c: revision 1.32
sys/dev/virtio/viocon.c: revision 1.7
sys/dev/virtio/viocon.c: revision 1.8
sys/dev/pci/vioscsi.c: revision 1.36
sys/dev/pci/virtioreg.h: revision 1.12
sys/dev/pci/viornd.c: revision 1.19
sys/dev/pci/virtio.c: revision 1.66
sys/dev/pci/virtio.c: revision 1.67
sys/dev/pci/virtio.c: revision 1.68
sys/dev/pci/if_vioif.c: revision 1.103
sys/dev/pci/virtio.c: revision 1.69
sys/dev/pci/if_vioif.c: revision 1.104
sys/dev/pci/virtio_pci.c: revision 1.40
sys/dev/virtio/virtio_mmio.c: revision 1.8
sys/dev/virtio/virtio_mmio.c: revision 1.9
sys/dev/pci/viomb.c: revision 1.14
sys/dev/pci/viomb.c: revision 1.15
sys/dev/pci/viomb.c: revision 1.17
sys/dev/pci/viornd.c: revision 1.20
sys/dev/pci/viornd.c: revision 1.21
sys/dev/pci/virtiovar.h: revision 1.25
sys/dev/pci/virtiovar.h: revision 1.26
sys/dev/pci/virtiovar.h: revision 1.27
sys/dev/pci/virtiovar.h: revision 1.28
sys/dev/pci/virtio.c: revision 1.70
sys/dev/pci/virtio.c: revision 1.71
sys/dev/pci/virtio.c: revision 1.72
sys/dev/pci/virtio.c: revision 1.73
sys/dev/pci/virtio.c: revision 1.74
sys/dev/pci/virtio_pci.c: revision 1.39
Set virtqueues in virtio_child_attach_finish
The number of virtqueue maybe change in a part of VirtIO devices
(e.g. vioif(4)). And it is fixed after negotiation of features.
So the configuration is moved into the function.
viocon(4): fix not to allocate unused virtqueue
viocon(4) allocates 4 virtqueues but it only uses 2 (0 and 1) queues.
Added functions to set interrupt handler and index into virtqueue
Added check of pointer for allocated memory before release of resource
Setup virtqueues after registering them to virtio_softc
restore fetch of qsize.
Mark as MPSAFE.
virtio(4): Avoid name collision with global intrhand on sparc64.
Pacifies -Werror=shadow.
No functional change intended.
Use PRIuBUSSIZE to print bus_size_t variables.
virtio(4): Fix sizing of virtqueue allocation.
vq->vq_avail[0].ring is a zero-length array, and thus sizeof is zero;
likewise vq->vq_used[0].ring.
Use vq->vq_avail[0].ring[0] and vq->vq_used[0].ring[0] to fix this
and restore the previous allocation sizing logic.
XXX We shouldn't use zero-length arrays here -- they are asking for
trouble like this, and C99 has a standard way to express what we're
actually trying to get at it, flexible array members.
PR kern/57304
virtio(4): Use flexible array members, not zero-length arrays.
This enables the compiler to detect sizeof mistakes like
PR kern/57304.
Use descriptor chain for free slots instead of vq_entry list
Descriptors can be chained by themself. And descriptors added to
avail ring or used ring are already chained. But it was not used
for unused descriptors and another linked list structure named
vq_entry was used.
The chain is also used for unused descriptors to make virtio(4)
simpler.
Added flags to store status of attaching a virtio device
This prevents a panic on reboot after a virtio device had called
virtio_child_attach_failed().
Fix wrong variable names
This fixes build errors in virtio_mmio.c
Revision 1.36: download - view: text, markup, annotated - select for diffs
Sat Mar 25 11:04:34 2023 UTC (22 months ago) by mlelstv
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,
HEAD
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -3
lines
Mark as MPSAFE.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Mar 25 09:03:47 2023 UTC (22 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -6
lines
A single SCSI request may require multiple slots in the virtio queue
but the queue isn't sized for the theoretical maximum. So just use
XS_BUSY to pace the scsipi layer.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Mar 25 08:14:00 2023 UTC (22 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -2
lines
restore fetch of qsize.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Mar 24 13:32:19 2023 UTC (22 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +3 -4
lines
Added check of pointer for allocated memory before release of resource
Revision 1.32: download - view: text, markup, annotated - select for diffs
Thu Mar 23 03:55:11 2023 UTC (22 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +6 -6
lines
Added functions to set interrupt handler and index into virtqueue
Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Mar 23 03:27:48 2023 UTC (22 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +6 -5
lines
Set virtqueues in virtio_child_attach_finish
The number of virtqueue maybe change in a part of VirtIO devices
(e.g. vioif(4)). And it is fixed after negotiation of features.
So the configuration is moved into the function.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Oct 11 22:03:37 2022 UTC (2 years, 3 months ago) by andvar
Branches: MAIN
CVS tags: netbsd-10-base
Branch point for: netbsd-10
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -4
lines
fix typos in log messages s/bus_dmamem_create/bus_dmamap_create/ and
s/bus_dmamem_load/bus_dmamap_load/.
Inspired by recent similar fixes in OpenBSD.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Jan 27 18:38:07 2022 UTC (2 years, 11 months ago) by jakllsch
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base,
bouyer-sunxi-drm
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +5 -20
lines
We no need for PQUIRK_FORCELUNS now that we try REPORT LUNS.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Fri Nov 12 07:18:53 2021 UTC (3 years, 2 months ago) by skrll
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +7 -7
lines
Trailing whitespace
Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Aug 7 16:19:14 2021 UTC (3 years, 5 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base,
thorpej-i2c-spi-conf2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -3
lines
Merge thorpej-cfargs2.
Revision 1.26.8.1: download - view: text, markup, annotated - select for diffs
Wed Aug 4 21:27:00 2021 UTC (3 years, 5 months ago) by thorpej
Branches: thorpej-cfargs2
Diff to: previous 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26: +3 -3
lines
Adapt to CFARGS().
Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Apr 24 23:36:57 2021 UTC (3 years, 9 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.25: preferred, colored
Changes since revision 1.25: +3 -3
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.24.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:28:49 2021 UTC (3 years, 9 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +11 -9
lines
Sync with HEAD.
Revision 1.25.2.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 21:09:14 2021 UTC (3 years, 10 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25: +3 -3
lines
Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jan 20 19:46:48 2021 UTC (4 years ago) by reinoud
Branches: MAIN
CVS tags: thorpej-futex-base,
thorpej-cfargs-base
Branch point for: thorpej-cfargs
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +11 -9
lines
Add VirtIO PCI v1.0 attachments and fix the drivers affected.
The vioif, ld, scsi, viornd and viomb devices were adjusted when needed and
tested both in legacy 0.9 and v1.0 attachments trough PCI on amd64, sparc64,
aarch64 and aarch64-eb. ACPI/FDT attachments also tested on
aarch64/aarch64-eb.
Known issues
* viomb on aarch64 works only with ACPI/FDT attachment but not with PCI
attachment. PCI and ACPI/FDT attachment works on aarch64-eb.
* virtio on sparc64 attaches but is it not functioning though not a
regression.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Sep 19 07:30:32 2020 UTC (4 years, 4 months ago) by kim
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +12 -4
lines
Update the Proxmox comment with link to their bugzilla
Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Sep 18 14:55:28 2020 UTC (4 years, 4 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +9 -2
lines
Probe all LUNs on vioscsi(4) until scsi(4) can do REPORT LUNS.
Revision 1.19.2.2: download - view: text, markup, annotated - select for diffs
Mon Jul 13 14:13:12 2020 UTC (4 years, 6 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.19.2.1: preferred, colored; branchpoint 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19.2.1: +4 -4
lines
Pull up following revision(s) (requested by kim in ticket #1572):
sys/dev/pci/vioscsi.c: revision 1.22
Fix off-by-one SCSI target reporting
Use max_target as the controller ID instead of zero, so that the device
located at SCSI ID zero (e.g. a disk) is not obscured through not being
probed by scsi_probe_bus() (which skips the controller ID).
Copy the target requested onto the wire without decrementing it by one.
ok christos@
Revision 1.21.4.1: download - view: text, markup, annotated - select for diffs
Mon Jul 13 14:11:55 2020 UTC (4 years, 6 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE
Diff to: previous 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21: +4 -4
lines
Pull up following revision(s) (requested by kim in ticket #1001):
sys/dev/pci/vioscsi.c: revision 1.22
Fix off-by-one SCSI target reporting
Use max_target as the controller ID instead of zero, so that the device
located at SCSI ID zero (e.g. a disk) is not obscured through not being
probed by scsi_probe_bus() (which skips the controller ID).
Copy the target requested onto the wire without decrementing it by one.
ok christos@
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Jul 12 06:40:11 2020 UTC (4 years, 6 months ago) by kim
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -4
lines
Fix off-by-one SCSI target reporting
Use max_target as the controller ID instead of zero, so that the device
located at SCSI ID zero (e.g. a disk) is not obscured through not being
probed by scsi_probe_bus() (which skips the controller ID).
Copy the target requested onto the wire without decrementing it by one.
ok christos@
Revision 1.19.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 15 08:23:23 2019 UTC (5 years, 6 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-2-RELEASE
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +5 -3
lines
Pull up following revision(s) (requested by maxv in ticket #1289):
sys/dev/pci/vioscsi.c: revision 1.21
Fix use-after-free. If we're not polling, virtio_enqueue_commit() will send
the transaction, and it means 'xs' can be immediately freed. So, save the
value of xs_control beforehand.
Detected by KASAN, ok jdolecek@.
Fixes PR/54008
Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:27 2019 UTC (5 years, 7 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +5 -3
lines
Sync with HEAD
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Apr 13 06:17:33 2019 UTC (5 years, 9 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
phil-wifi-20190609,
netbsd-9-base,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
isaki-audio2-base,
isaki-audio2,
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.20: preferred, colored
Changes since revision 1.20: +5 -3
lines
Fix use-after-free. If we're not polling, virtio_enqueue_commit() will send
the transaction, and it means 'xs' can be immediately freed. So, save the
value of xs_control beforehand.
Detected by KASAN, ok jdolecek@.
Fixes PR/54008
Reported-by: syzbot+6513c4afe66237d7207f@syzkaller.appspotmail.com
Revision 1.19.10.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:26:01 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +2 -6
lines
Sync with HEAD
Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Jun 10 14:59:23 2018 UTC (6 years, 7 months ago) by jakllsch
Branches: MAIN
CVS tags: phil-wifi-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
jdolecek-ncqfixes-base,
jdolecek-ncqfixes
Branch point for: phil-wifi
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -6
lines
remove irrelevant pci(9) #includes from virtio child drivers
Revision 1.19.8.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:29 2017 UTC (7 years, 1 month ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.19.8.1: preferred, colored; branchpoint 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19.8.1: +718 -0
lines
update from HEAD
Revision 1.6.2.4: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:25 2017 UTC (7 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.6.2.3: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.3: +317 -158
lines
Sync with HEAD
Revision 1.16.4.1: download - view: text, markup, annotated - select for diffs
Fri May 19 00:22:57 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16: +29 -23
lines
Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
Revision 1.19.8.1
Mon May 15 21:30:37 2017 UTC (7 years, 8 months ago) by jdolecek
Branches: tls-maxphys
FILE REMOVED
Changes since revision 1.19: +0 -718
lines
file vioscsi.c was added on branch tls-maxphys on 2017-12-03 11:37:29 +0000
Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon May 15 21:30:37 2017 UTC (7 years, 8 months ago) by jdolecek
Branches: MAIN
CVS tags: tls-maxphys-base-20171202,
prg-localcount2-base3,
pgoyette-compat-base,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
nick-nhusb-base-20170825,
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
Branch point for: tls-maxphys,
pgoyette-compat,
netbsd-8
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +7 -7
lines
free the virtio slot _before_ calling scsipi_done(), so that driver is able
to accept another request immediatelly and doesn't trigger spurious
XS_RESOURCE_SHORTAGE
part of fix for PR kern/52199
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat May 13 20:35:20 2017 UTC (7 years, 8 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +23 -17
lines
refactor error handling in vioscsi_scsipi_request() to avoid the goto maze,
and add missing virtio_enqueue_abort() call when bus_dmamap_load() fails;
abort is only done implicitely when virtio_enqueue_reserve() fails,
must do it explicitely if there is other reason
also now always print error when bus_dmamap_load() or virtio_enqueue_reserve()
fail - the former shouldn't fail due to BUS_DMA_ALLOCNOW, and the latter
shouldn't ever fail now after the maxnsegs fix for virtio_alloc_vq(), so
error there means driver bug
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat May 13 20:17:42 2017 UTC (7 years, 8 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3
lines
fix number of maximum segments in the queue allocation so that
MAXPHYS-sized tranfer fits inside the indirect descriptor; avoids the
!indirect path in virtio_enqueue_reserve() for these transfers,
which runs out of the vq_entries and triggers XS_RESOURCE_SHORTAGE for
bigger number of outstanding tranfers
fixes PR kern/52199 by MB
Revision 1.6.4.3: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:22 2017 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.6.4.2: preferred, colored; branchpoint 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.4.2: +213 -89
lines
Sync with HEAD
Revision 1.8.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:51 2017 UTC (7 years, 9 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +295 -142
lines
Sync with HEAD
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Mar 25 23:58:35 2017 UTC (7 years, 10 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
pgoyette-localcount-20170426,
jdolecek-ncq-base,
jdolecek-ncq,
bouyer-socketcan-base1
Branch point for: prg-localcount2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -4
lines
fix printf format.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Mar 25 18:15:31 2017 UTC (7 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +133 -40
lines
add support for loading vioscsi driver dynamically
Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Mar 25 18:13:53 2017 UTC (7 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -6
lines
cap also adapt_nchannels to 1, we only attach one
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Mar 25 18:09:44 2017 UTC (7 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +5 -5
lines
cap adapt_openings to minimum of cmd_per_lun and qsize, so that we don't
overpromise to the upper layer
cap ntargets and nluns to 16 and 1024 as avoid spending excessive time
probing for nonexistent devices; e.g. qemu defaults to 255/16383 causing
the probe to take about a minute
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Mar 25 18:02:06 2017 UTC (7 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +83 -49
lines
reorganize the attachment process for virtio child devices, so that
more common code is shared among the drivers, and it's possible for
the drivers to be correctly dynamically loaded; forbid direct access
to struct virtio_softc from the child driver code
Revision 1.6.4.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:37 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.6.4.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.4.1: +103 -74
lines
Sync with HEAD
Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Mar 13 21:06:50 2017 UTC (7 years, 10 months ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +21 -30
lines
several small tweaks:
- use MSIX if available
- fix off-by-one for nluns/ntargets (code inspection, not actual effect)
- when virtio_enqueue_reserve() fails, do not execute vioscsi_req_put()
and hence virtio_dequeue_commit() as there is nothing to commit, just
unload the xs and return; also report XS_RESOURCE_SHORTAGE, it's
semi-normal situation
- set status/resid in vioscsi_req_done() before the switch, so that
the override for VIRTIO_SCSI_S_BAD_TARGET actually has effect
- g/c vioscsi_req_put(), call the appropriate cleanup routines directly
- stop initializing id/task_attr in vioscsi_req_get(), it's overwritten
in vioscsi_scsipi_request() anyway
Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Mar 13 20:47:38 2017 UTC (7 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +17 -9
lines
replace req queue offset with define, only set & start the req interrupt for
that queue; add some masks for the lun for visibility; use slot as tag number
no actual functional change, just small cleanup
Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Mar 7 22:03:04 2017 UTC (7 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +70 -40
lines
allocate bus dma maps during attachment, rather than creating and destroying
them for each request; besides being faster, bus_dmamap_destroy() is not
safe to be called from interrupt context
adresses PR kern/52034 by Benny Siegert
Revision 1.8.6.2: download - view: text, markup, annotated - select for diffs
Wed Jan 18 08:46:42 2017 UTC (8 years ago) by skrll
Branches: netbsd-7-nhusb
Diff to: previous 1.8.6.1: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.6.1: +559 -0
lines
Sync with netbsd-5
Revision 1.8.2.2: download - view: text, markup, annotated - select for diffs
Fri Dec 23 06:33:56 2016 UTC (8 years, 1 month ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116,
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
Diff to: previous 1.8.2.1: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.2.1: +559 -0
lines
Pull up following revision(s) (requested by bsiegert in ticket #1338):
sys/arch/amd64/conf/GENERIC: revision 1.418
sys/dev/pci/files.pci: revision 1.379
sys/dev/pci/vioscsi.c: revisions 1.1-1.8
sys/dev/pci/vioscsireg.h: revision 1.1
sys/dev/pci/virtioreg.h: revisions 1.5, 1.6
add the common flag bits
--
Add vioscsi, compile tested only (toxic)
--
this is working now, remove debugging.
--
add vioscsi
--
kill some more debugging.
--
Fake mode sense data for illegal targets. qemu reports 256 targets...
--
fix the status return.
--
Use SCSIPI_CHAN_NOSETTLE.
--
vioscsi_req_get()/virtio_enqueue_prep() failing is actually perfectly
normal - observed failures included 10, 27, 61 in-flight commands,
so probably depends on particular command mix; return with
XS_RESOURCE_SHORTAGE rather then panic
do vioscsi_req_put() when initial bus_dmamap_load() fails, as suggested
by the XXX; the vq_done hook is called by virtio, but in that case we
never get to commit the request to it
--
react on ADAPTER_REQ_SET_XFER_MODE so that we set tagged queuing
pass tag type and set id
Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:16 2016 UTC (8 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.6.2.2: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.2: +44 -9
lines
Sync with HEAD
Revision 1.6.4.1: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:15 2016 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +44 -9
lines
Sync with HEAD
Revision 1.8.6.1
Tue Oct 4 18:23:24 2016 UTC (8 years, 3 months ago) by skrll
Branches: netbsd-7-nhusb
FILE REMOVED
Changes since revision 1.8: +0 -559
lines
file vioscsi.c was added on branch netbsd-7-nhusb on 2017-01-18 08:46:42 +0000
Revision 1.8.2.1
Tue Oct 4 18:23:24 2016 UTC (8 years, 3 months ago) by snj
Branches: netbsd-7
FILE REMOVED
Changes since revision 1.8: +0 -559
lines
file vioscsi.c was added on branch netbsd-7 on 2016-12-23 06:33:56 +0000
Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Oct 4 18:23:24 2016 UTC (8 years, 3 months 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: netbsd-7-nhusb,
netbsd-7,
bouyer-socketcan
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +38 -3
lines
react on ADAPTER_REQ_SET_XFER_MODE so that we set tagged queuing
pass tag type and set id
Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Oct 4 18:20:49 2016 UTC (8 years, 3 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +8 -8
lines
vioscsi_req_get()/virtio_enqueue_prep() failing is actually perfectly
normal - observed failures included 10, 27, 61 in-flight commands,
so probably depends on particular command mix; return with
XS_RESOURCE_SHORTAGE rather then panic
do vioscsi_req_put() when initial bus_dmamap_load() fails, as suggested
by the XXX; the vq_done hook is called by virtio, but in that case we never
get to commit the request to it
Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:09:57 2015 UTC (9 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.6.2.1: preferred, colored; branchpoint 1.6: preferred, colored
Changes since revision 1.6.2.1: +524 -0
lines
Sync with HEAD (as of 26th Dec)
Revision 1.6.2.1
Sun Nov 1 08:55:05 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
FILE REMOVED
Changes since revision 1.6: +0 -524
lines
file vioscsi.c was added on branch nick-nhusb on 2015-12-27 12:09:57 +0000
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Nov 1 08:55:05 2015 UTC (9 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: pgoyette-localcount-base,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
nick-nhusb-base-20161004,
nick-nhusb-base-20160907,
nick-nhusb-base-20160529,
nick-nhusb-base-20160422,
nick-nhusb-base-20160319,
nick-nhusb-base-20151226,
localcount-20160914
Branch point for: pgoyette-localcount,
nick-nhusb
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -1
lines
Use SCSIPI_CHAN_NOSETTLE.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Oct 31 00:41:19 2015 UTC (9 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -3
lines
fix the status return.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Oct 30 21:59:25 2015 UTC (9 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +23 -11
lines
Fake mode sense data for illegal targets. qemu reports 256 targets...
Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Oct 30 21:18:16 2015 UTC (9 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -6
lines
kill some more debugging.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Oct 30 21:15:05 2015 UTC (9 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +27 -14
lines
this is working now, remove debugging.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Oct 29 01:56:12 2015 UTC (9 years, 3 months ago) by christos
Branches: MAIN
Add vioscsi, compile tested only (toxic)
CVSweb <webmaster@jp.NetBSD.org>