aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-04-26 17:01:06 +0000
committerWarner Losh <imp@FreeBSD.org>2022-04-26 17:01:39 +0000
commitae1955cd67c293dd402d9d007b368ef88c6eb1d9 (patch)
tree59d27a538e4ea1b71a01c1f041c2c2f1f7379387
parentfe2c9f83a6dc1cc62da177a765ce8a265894b2cd (diff)
downloadsrc-ae1955cd67c293dd402d9d007b368ef88c6eb1d9.tar.gz
src-ae1955cd67c293dd402d9d007b368ef88c6eb1d9.zip
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
-rw-r--r--sys/cam/ata/ata_da.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index a83c5a50c5f3..b82671315138 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -1352,8 +1352,6 @@ adaasync(void *callback_arg, u_int32_t code,
adasetflags(softc, &cgd);
adasetgeom(softc, &cgd);
disk_resize(softc->disk, M_NOWAIT);
-
- cam_periph_async(periph, code, path, arg);
break;
}
case AC_ADVINFO_CHANGED:
@@ -1374,7 +1372,6 @@ adaasync(void *callback_arg, u_int32_t code,
case AC_BUS_RESET:
{
softc = (struct ada_softc *)periph->softc;
- cam_periph_async(periph, code, path, arg);
if (softc->state != ADA_STATE_NORMAL)
break;
if (ADA_RA >= 0 && softc->flags & ADA_FLAG_CAN_RAHEAD)
@@ -1385,16 +1382,17 @@ adaasync(void *callback_arg, u_int32_t code,
&& (softc->zone_mode != ADA_ZONE_NONE))
softc->state = ADA_STATE_LOGDIR;
else
- break;
+ break;
if (cam_periph_acquire(periph) != 0)
softc->state = ADA_STATE_NORMAL;
else
xpt_schedule(periph, CAM_PRIORITY_DEV);
+ break;
}
default:
- cam_periph_async(periph, code, path, arg);
break;
}
+ cam_periph_async(periph, code, path, arg);
}
static int