History log of /freebsd/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c (Results 1 – 25 of 143)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 54a3920d 31-Mar-2025 Mark Johnston <markj@FreeBSD.org>

hyperv/storvsc: Avoid conditional asserts in storvsc_xferbuf_prepare()

whu@ cannot reproduce the assertion failure which led to these ifdefs
being added in the first place, and since they appear wro

hyperv/storvsc: Avoid conditional asserts in storvsc_xferbuf_prepare()

whu@ cannot reproduce the assertion failure which led to these ifdefs
being added in the first place, and since they appear wrong, i.e., the
assertions ought to apply to all platforms, let's remove them.

This reverts commits 0af5a0cd2788efce9f444f4f781357d317bb0bb1 and
6f7b1310b6fe36f9bb653d3e97bc257adced3a2b.

PR: 285681
Tested by: whu
MFC after: 2 weeks

show more ...


# a319ba69 31-Mar-2025 Mark Johnston <markj@FreeBSD.org>

hyperv/storvsc: Fix busdma constraints

- The BUS_DMA_KEEP_PG_OFFSET flag is needed, since
storvsc_xferbuf_prepare() assumes that only the first segment may have
a non-zero offset, and that all f

hyperv/storvsc: Fix busdma constraints

- The BUS_DMA_KEEP_PG_OFFSET flag is needed, since
storvsc_xferbuf_prepare() assumes that only the first segment may have
a non-zero offset, and that all following segments are page-sized and
-aligned.
- storvsc_xferbuf_prepare() handles 64-bit bus addresses, so avoid
unneeded bouncing on i386.

PR: 285681
Reported by: dim
Tested by: dim, whu
MFC after: 2 weeks

show more ...


Revision tags: release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remov

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0
# 6f7b1310 08-Sep-2022 Wei Hu <whu@FreeBSD.org>

Hyper-V: storvsc: relax a couple more kasserts

Seems these kasserts don't work well on ARM64

Fixes: 0af5a0cd2788e
Sponsored by: Microsoft


# 0af5a0cd 07-Sep-2022 Wei Hu <whu@FreeBSD.org>

Hyper-V: storvsc: relax a kassert check

On ARM64 this kassert check could cause unnecessary panic.

Sponsored by: Microsoft


# 795a9974 15-Aug-2022 Wei Hu <whu@FreeBSD.org>

Hyper-V: storvsc: Call bus_dmamap_sync() for dma operations

Call bus_dmamap_sync() for related dma operations. This is required
on ARM64 architecture.

Tested by: Souradeep Chakrabarti <schakrabarti

Hyper-V: storvsc: Call bus_dmamap_sync() for dma operations

Call bus_dmamap_sync() for related dma operations. This is required
on ARM64 architecture.

Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
MFC after: 2 weeks
Sponsored by: Microsoft

show more ...


# 35eb9b10 02-Jun-2022 Mitchell Horne <mhorne@FreeBSD.org>

Use KERNEL_PANICKED() in more places

This is slightly more optimized than checking panicstr directly. For
most of these instances performance doesn't matter, but let's make
KERNEL_PANICKED() the com

Use KERNEL_PANICKED() in more places

This is slightly more optimized than checking panicstr directly. For
most of these instances performance doesn't matter, but let's make
KERNEL_PANICKED() the common idiom.

Reviewed by: mjg
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D35373

show more ...


Revision tags: release/13.1.0
# c1cef544 07-May-2022 John Baldwin <jhb@FreeBSD.org>

hyperv: Remove unused devclass arguments to DRIVER_MODULE.


# b024faff 07-Apr-2022 John Baldwin <jhb@FreeBSD.org>

hyperv storvsc: Remove unused variables.


# 53e938e4 01-Feb-2022 John Baldwin <jhb@FreeBSD.org>

hyperv storvsc: Don't abuse struct sglist to hold virtual addresses.

struct sglist is intended for holding S/G lists of physical address
ranges, not virtual address ranges. GCC 9.x issues several w

hyperv storvsc: Don't abuse struct sglist to hold virtual addresses.

struct sglist is intended for holding S/G lists of physical address
ranges, not virtual address ranges. GCC 9.x issues several warnings
due to casts between pointers and integers of different sizes as a
result (vm_paddr_t is 64-bits on i386). Instead, add a local 'struct
hv_sglist' which uses an array of 'struct iovec' to hold the S/G list
of virtual address ranges.

Differential Revision: https://reviews.freebsd.org/D31933

show more ...


# db0ac6de 02-Dec-2021 Cy Schubert <cy@FreeBSD.org>

Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"

This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing
changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.

A mism

Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816"

This reverts commit 266f97b5e9a7958e365e78288616a459b40d924a, reversing
changes made to a10253cffea84c0c980a36ba6776b00ed96c3e3b.

A mismerge of a merge to catch up to main resulted in files being
committed which should not have been.

show more ...


# 266f97b5 02-Dec-2021 Cy Schubert <cy@FreeBSD.org>

wpa: Import wpa_supplicant/hostapd commit 14ab4a816

This is the November update to vendor/wpa committed upstream 2021-11-26.

MFC after: 1 month


Revision tags: release/12.3.0
# 8f82dc8d 30-Apr-2021 Don Morris <dgmorris@earthlink.net>

hyperv: Flag hn and storvsc statistics with CTLFLAG_STATS.

Reviewed by: vangyzen, whu, bdrewery
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D30060


# 8afecefd 07-May-2021 Andriy Gapon <avg@FreeBSD.org>

storvsc: fix auto-sense reporting

I saw a situation where the driver set CAM_AUTOSNS_VALID on a failed ccb
even though SRB_STATUS_AUTOSENSE_VALID was not set in the status.
The actual sense data rem

storvsc: fix auto-sense reporting

I saw a situation where the driver set CAM_AUTOSNS_VALID on a failed ccb
even though SRB_STATUS_AUTOSENSE_VALID was not set in the status.
The actual sense data remained all zeros.
The problem seems to be that create_storvsc_request() always sets
hv_storvsc_request::sense_info_len, so checking for sense_info_len != 0
is not enough to determine if any auto-sense data is actually available.

Reviewed by: whu, imp
MFC after: 2 weeks
Sponsored by: CyberSecure
Differential Revision: https://reviews.freebsd.org/D30124

show more ...


Revision tags: release/13.0.0, release/12.2.0
# 2a0ce39d 31-Aug-2020 Wei Hu <whu@FreeBSD.org>

Hyper-V: storvsc: Enhance srb_status code handling.

In hv_storvsc_io_request() when coring, prevent changing of the send channel
from the base channel to another one. storvsc_poll always probes on t

Hyper-V: storvsc: Enhance srb_status code handling.

In hv_storvsc_io_request() when coring, prevent changing of the send channel
from the base channel to another one. storvsc_poll always probes on the base
channel.

Based upon conversations with Microsoft, changed the handling of srb_status
codes. Most we should never get, others yes. All are treated as retry-able
except for two. We should not get these statuses, but if we ever do, the I/O
state is not known.

Submitted by: Alexander Sideropoulos <Alexander.Sideropoulos@netapp.com>
Reviewed by: trasz, allanjude, whu
MFC after: 1 week
Sponsored by: Netapp Inc
Differential Revision: https://reviews.freebsd.org/D25756

show more ...


Revision tags: release/11.4.0
# efdba95d 14-Jan-2020 Andriy Gapon <avg@FreeBSD.org>

storvsc: port a Linux patch, properly set residual data length on errors

This change is based on Linux commit 40630f462824ee. csio.resid should
account for transfer_len only for success and SRB_STA

storvsc: port a Linux patch, properly set residual data length on errors

This change is based on Linux commit 40630f462824ee. csio.resid should
account for transfer_len only for success and SRB_STATUS_DATA_OVERRUN
condition.

I am not sure how exactly this change works, but I have a report from a
user that they see lots of checksum errors when running a pool scrub
concurrently with iozone -l 1 -s 100G. After applying this patch the
problem cannot be reproduced.

Reviewed by: nobody
Sponsored by: CyberSecure
Differential Revision: https://reviews.freebsd.org/D22312

show more ...


# 97d8f008 19-Nov-2019 Andriy Gapon <avg@FreeBSD.org>

hyperv/storvsc: stash a pointer to hv_storvsc_request in ccb

A SIM-private field is used for that.
The pointer can be useful when examining a state of a queued ccb.
E.g., a ccb on a da_softc.pending

hyperv/storvsc: stash a pointer to hv_storvsc_request in ccb

A SIM-private field is used for that.
The pointer can be useful when examining a state of a queued ccb.
E.g., a ccb on a da_softc.pending_ccbs.

MFC after: 2 weeks

show more ...


Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0
# 0d880ef4 10-Apr-2018 Dexuan Cui <dexuan@FreeBSD.org>

hyperv/storvsc: storvsc_io_done(): do not use CAM_SEL_TIMEOUT

CAM_SEL_TIMEOUT was introduced in
https://reviews.freebsd.org/D7521 (r304251), which claimed:

"VM shall response to CAM layer with CAM_

hyperv/storvsc: storvsc_io_done(): do not use CAM_SEL_TIMEOUT

CAM_SEL_TIMEOUT was introduced in
https://reviews.freebsd.org/D7521 (r304251), which claimed:

"VM shall response to CAM layer with CAM_SEL_TIMEOUT to filter those
invalid LUNs. Never use CAM_DEV_NOT_THERE which will block LUN scan
for LUN number higher than 7."

But it turns out this is not correct:

I think what really filters the invalid LUNs in r304251 is that:
before r304251, we could set the CAM_REQ_CMP without checking
vm_srb->srb_status at all:
ccb->ccb_h.status |= CAM_REQ_CMP.

r304251 checks vm_srb->srb_status and sets ccb->ccb_h.status properly,
so the invalid LUNs are filtered.

I changed my code version to r304251 but replaced the CAM_SEL_TIMEOUT
with CAM_DEV_NOT_THERE, and I confirmed the invalid LUNs can also be
filtered, and I successfully hot-added and hot-removed 8 disks to/from
the VM without any issue.

CAM_SEL_TIMEOUT has an unwanted side effect -- see cam_periph_error():
For a selection timeout, we consider all of the LUNs on
the target to be gone. If the status is CAM_DEV_NOT_THERE,
then we only get rid of the device(s) specified by the
path in the original CCB.

This means: for a VM with a valid LUN on 3:0:0:0, when the VM inquires
3:0:0:1 and the host reports 3:0:0:1 doesn't exist and storvsc returns
CAM_SEL_TIMEOUT to the CAM layer, CAM will detech 3:0:0:0 as well: this
is the bug I reported recently:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226583

PR: 226583
Reviewed by: mav
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D14690

show more ...


# 762a7f4f 07-Dec-2017 Warner Losh <imp@FreeBSD.org>

Define xpt_path_inq.

This provides a nice wrarpper around the XPT_PATH_INQ ccb creation and
calling.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D13387


# 718cf2cc 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

show more ...


Revision tags: release/10.4.0
# 1409e715 21-Aug-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r322398 through r322746.


# 82baa8db 14-Aug-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r322515


# 93b4e111 14-Aug-2017 Sepherosa Ziehau <sephe@FreeBSD.org>

hyperv: Update copyright for the files changed in 2017

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11982


123456