History log of /freebsd/sys/cam/ata/ata_da.c (Results 1 – 25 of 364)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9cbf3d61 20-Jul-2024 Warner Losh <imp@FreeBSD.org>

cam/iosched: Make each periph driver provide schedule fnp

When we init the iosched instance, require clients to provide a schedule
function. We have almost, but not quite everything to know when it

cam/iosched: Make each periph driver provide schedule fnp

When we init the iosched instance, require clients to provide a schedule
function. We have almost, but not quite everything to know when it is
safe to schedule new I/O. The periph drivers, however, have all the
information, so make them do it when the I/O Scheduler needs to maybe
schedule I/O for rate limiting, etc. and use it to do that.

Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D46038

show more ...


# 6f1dd607 20-Jul-2024 Warner Losh <imp@FreeBSD.org>

cam/iosched: Pass in the disk when initializing

The disk is nice to have at times, especially when you need the sector
size. At present, the only plans for this are related to logging.

Sponsored by

cam/iosched: Pass in the disk when initializing

The disk is nice to have at times, especially when you need the sector
size. At present, the only plans for this are related to logging.

Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D46035

show more ...


Revision tags: release/14.1.0
# 99c14fb9 24-May-2024 Warner Losh <imp@FreeBSD.org>

cam: Drop periph lock when completing I/O with ENOMEM status

When biofinish calls g_io_deliver with an error of ENOMEM, that kicks
off the slowdown protocol, forcing I/O to go through g_down rather

cam: Drop periph lock when completing I/O with ENOMEM status

When biofinish calls g_io_deliver with an error of ENOMEM, that kicks
off the slowdown protocol, forcing I/O to go through g_down rather than
be directly dispatch. One of the side effects is that the I/O is
resubmitted, so the start routines get called recursively, leading to a
recursive lock panic. Rather than make the periph lock recursive, drop
and reacquire the lock around such calls to biofinish.

For nda, this happens only when we can't allocate space to construct a
TRIM. For ada and da, this is only for certain ZONE operations.

Sponsored by: Netflix
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D45310

show more ...


Revision tags: release/13.3.0
# c01af41c 19-Feb-2024 Andriy Gapon <avg@FreeBSD.org>

ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs

NCQ TRIM for Samsung 860/870 SSDs results in data corruption on systems
with some SATA controllers.

This can be easily reproduced usin

ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs

NCQ TRIM for Samsung 860/870 SSDs results in data corruption on systems
with some SATA controllers.

This can be easily reproduced using ZFS which uses TRIM and is able to
detect block content changes.

Linux bug report for this issue:
https://bugzilla.kernel.org/show_bug.cgi?id=201693

Since at present we can not limit a quirk based on the contorller / SIM,
apply the quirk in all cases.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D43961

show more ...


# a6cef617 19-Feb-2024 Warner Losh <imp@FreeBSD.org>

ada: Another NCQ Trim instability drive

The Seagate IronWolf 110 SATA SSD drive has been reported to be unstable
with NCQ trim enabled.

PR: 264139
Sponsored by: Netflix


# 519b24f0 23-Nov-2023 Alexander Motin <mav@FreeBSD.org>

CAM: Replace random sbuf_printf() with cheaper cat/putc.


# 1b440795 22-Nov-2023 Alexander Motin <mav@FreeBSD.org>

CAM: Use sbuf_new_for_sysctl() in more places

There is no need to allocate buffer, worry about overflows, etc.

MFC after: 2 weeks


Revision tags: release/14.0.0
# 2ffd30f7 06-Nov-2023 Warner Losh <imp@FreeBSD.org>

cam: Remove left-over sys/cdefs.h in sys/cam

These weren't removed when $FreeBSD$ was removed. They aren't needed and
now are a style(9) nonconformity.

Sponsored by: Netflix


# d24729b2 02-Nov-2023 Zhenlei Huang <zlei@FreeBSD.org>

cam/ata: Postpone removal of two compat sysctls until 15

Prefer UNMAPPEDIO and ROTATING from flags sysctl. See
1. aeab0812e68c (Add flags sysctl to ada)
2. cf3ff63e55e4 (Convert unmappedio over to

cam/ata: Postpone removal of two compat sysctls until 15

Prefer UNMAPPEDIO and ROTATING from flags sysctl. See
1. aeab0812e68c (Add flags sysctl to ada)
2. cf3ff63e55e4 (Convert unmappedio over to a flag)
3. 96eb32bf0f5a (Convert rotating to a flag bit)

Reviewed by: imp, ken, #cam
MFC after: immediately (we want this in 14.0)
Differential Revision: https://reviews.freebsd.org/D42402

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

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

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


# 9db2db6b 25-Jul-2023 Warner Losh <imp@FreeBSD.org>

cam/ata: Migrate to modern uintXX_t from u_intXX_t

As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html
move to the modern uintXX_t.

MFC After: 3 days
Sponsored by: Netflix


# 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
# 90bcc81b 14-Jul-2022 Alexander Motin <mav@FreeBSD.org>

Delay GEOM disk_create() until CAM periph probe completes.

Before this patch CAM periph drivers called both disk_alloc() and
disk_create() same time on periph creation. But then prevented disks
fro

Delay GEOM disk_create() until CAM periph probe completes.

Before this patch CAM periph drivers called both disk_alloc() and
disk_create() same time on periph creation. But then prevented disks
from opening until the periph probe completion with cam_periph_hold().
As result, especially if disk misbehaves during the probe, GEOM event
thread, triggered to taste the disk, got blocked on open attempt,
potentially for a long time, unable to process other events.

This patch moves disk_create() call from periph creation to the end of
the probe. To allow disk_create() calls from non-sleepable CAM contexts
some of its duties requiring memory allocations are moved either back
to disk_alloc() or forward to g_disk_create(), so now disk_alloc() and
disk_add_alias() are the only disk methods that require sleeping. If
disk fails during the probe disk_create() may just be skipped, going
directly to disk_destroy(). Other method calls during that time are
just ignored. Since GEOM may now see the disks after CAM bus scan is
already completed, introduce per-periph boot hold functions. Enclosure
driver already had such mechanism, so just generalize it.

Reviewed by: imp
MFC after: 1 month
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D35784

show more ...


# 489ba222 13-May-2022 Mitchell Horne <mhorne@FreeBSD.org>

kerneldump: remove physical argument from d_dumper

The physical address argument is essentially ignored by every dumper
method. In addition, the dump routines don't actually pass a real
address; eve

kerneldump: remove physical argument from d_dumper

The physical address argument is essentially ignored by every dumper
method. In addition, the dump routines don't actually pass a real
address; every call to dump_append() passes a value of zero for
physical.

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35173

show more ...


Revision tags: release/13.1.0
# 1907e1c0 05-May-2022 Warner Losh <imp@FreeBSD.org>

ada: Move comment

Move the comment about releasing ccb before periph to adaprobedone()
where it belongs.

Sponsored by: Netflix


# 6c8ab086 01-May-2022 Warner Losh <imp@FreeBSD.org>

ada: Retry commands with retries left on CAM_SEL_TIMEOUT

The AHCI and ATA SIMs will return CAM_SEL_TIMEOUT when an underlying
device has stopped responding. This is usually seen after a timeouted
ou

ada: Retry commands with retries left on CAM_SEL_TIMEOUT

The AHCI and ATA SIMs will return CAM_SEL_TIMEOUT when an underlying
device has stopped responding. This is usually seen after a timeouted
out command and can be a transient event. Rather than fail the
peripheral immediately after seeing this, queue a retry. For transient
events, this allows drives to continue to provide data, though with some
added latency, just like we do when we have some other kind of retriable
error. If the error isn't transient (the drive is truly gone), then
we'll discover that eventually and fail the transaction and invalidate
the drive like we do today.

This helps us avoid a panic at the end of camperiphfree when
CAM_PERIPH_NEW_DEV_FOUND is set. However, the deferred callback should
be queued to xpt_async_td instead of being made inline there. This issue
will be solved in a different patch that does that. PR 263703.

This also helps us avoid another bug where we can drop all references to
the device (causing us to go through camperiphfree and destroy the path)
while we have an I/O pending in the ata_da state machine (usually in
state ADA_STATE_RAHEAD with ATA_SETFEATURES ATA_SF_ENAB_RCACHE
command). It's not clear why the reference that we take out to do the
reprobe isn't effective at blocking this. By retrying this condition,
though we avoid this bug (at least more often, I don't have a good
reproduction test case, I just see this panic a few times a month at
work on systems that have transient disk errors on ahci connected SATA
SSDs). PR 263704. It's too soon to know how much this helps us avoid
this bug.

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

show more ...


# ae1955cd 26-Apr-2022 Warner Losh <imp@FreeBSD.org>

adaasync: Harmonize with daasync

We should call cam_periph_async() always, like SCSI does. This routine
is supposed to be more of a catch-all.

cam_periph_async() only does actions for AC_LOST_DEVIC

adaasync: Harmonize with daasync

We should call cam_periph_async() always, like SCSI does. This routine
is supposed to be more of a catch-all.

cam_periph_async() only does actions for AC_LOST_DEVICE. It ignores all
other events (today), but this may not always be true. So this is a nop
change.

Drop in a 'break' so we don't fall through unnecessarily.

Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D35057

show more ...


# ccaec73d 25-Apr-2022 Warner Losh <imp@FreeBSD.org>

ada: Eliminate dead code

We never use the cgd that we get from the XPT_GDEV_TYPE call. Prior to
9a6844d55fe33 we used it to determine if READ AHEAD or WRITE CACHING was
supported. However, all that

ada: Eliminate dead code

We never use the cgd that we get from the XPT_GDEV_TYPE call. Prior to
9a6844d55fe33 we used it to determine if READ AHEAD or WRITE CACHING was
supported. However, all that information was moved into adasetflags so
we no longer need to this since it's cached in the softc and updated
with the IDENTIFY data changes automatically.

Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D35039

show more ...


# b43cfe71 24-Apr-2022 Warner Losh <imp@FreeBSD.org>

ada/da: Borrow comment from nda about cleanup

Remove a XXX comment and replace it with a more accurate comment about
what happens to I/O queued to the hardware.

Sponsored by: Netflix


# 48ae3f4f 24-Apr-2022 Warner Losh <imp@FreeBSD.org>

ata/nvme: Add comment

Steal the comment from daonninvalidate about the call to disk_gone().

Sponsored by: Netflix


# 38f8adda 24-Apr-2022 Alexander Motin <mav@FreeBSD.org>

CAM: Replicate e0ceec676dc8 from da to ada and nda.

MFC after: 1 week


# 49dace1d 02-Apr-2022 Gordon Bergling <gbe@FreeBSD.org>

cam: Fix typos in source code comments

- s/paniced/panicked/

MFC after: 3 days


# 75bc7150 11-Jan-2022 Andriy Gapon <avg@FreeBSD.org>

add and use defintions for ATA power modes

Those can be returned by CHECK POWER MODE command (0xe5).
Note that some of the definitions duplicate definitions for Extended
Power Conditions.

MFC after

add and use defintions for ATA power modes

Those can be returned by CHECK POWER MODE command (0xe5).
Note that some of the definitions duplicate definitions for Extended
Power Conditions.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33646

show more ...


# 0e5c50bf 07-Jan-2022 Alexander Motin <mav@FreeBSD.org>

cam: Relax callouts precisions.

On large systems even relatively rare callouts may fire many times
per second. This should allow them to aggregate better, since we do
not require any precision when

cam: Relax callouts precisions.

On large systems even relatively rare callouts may fire many times
per second. This should allow them to aggregate better, since we do
not require any precision when polling for media change, etc.

MFC after: 2 weeks

show more ...


# 15910dc0 24-Dec-2021 Andriy Gapon <avg@FreeBSD.org>

adaspindown: check disk power mode before sending IDLE command

If a disk is already in STANDBY mode, then setting IDLE mode can
actually spin it up.

Reviewed by: mav
MFC after: 4 weeks
Differential

adaspindown: check disk power mode before sending IDLE command

If a disk is already in STANDBY mode, then setting IDLE mode can
actually spin it up.

Reviewed by: mav
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D33588

show more ...


12345678910>>...15