cam: clear on-stack CCBs in last few drivers

This changes ahc(4), ahd(4), hptiop(4), hptnr(4), hptrr(4),
and ps3cdrom(4).

Reviewed By:	imp
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D30305
This commit is contained in:
Edward Tomasz Napierala 2021-05-21 08:48:27 +01:00
parent 45f57ce122
commit 8dc96b74ed
7 changed files with 8 additions and 0 deletions

View File

@ -267,6 +267,7 @@ ahd_attach(struct ahd_softc *ahd)
goto fail;
}
memset(&csa, 0, sizeof(csa));
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
csa.ccb_h.func_code = XPT_SASYNC_CB;
csa.event_enable = AC_LOST_DEVICE;

View File

@ -215,6 +215,7 @@ ahc_attach(struct ahc_softc *ahc)
goto fail;
}
memset(&csa, 0, sizeof(csa));
xpt_setup_ccb(&csa.ccb_h, path, /*priority*/5);
csa.ccb_h.func_code = XPT_SASYNC_CB;
csa.event_enable = AC_LOST_DEVICE;

View File

@ -1252,6 +1252,7 @@ static void hpt_final_init(void *dummy)
return ;
}
memset(&ccb, 0, sizeof(ccb));
xpt_setup_ccb(&ccb.ccb_h, vbus_ext->path, /*priority*/5);
ccb.ccb_h.func_code = XPT_SASYNC_CB;
ccb.event_enable = AC_LOST_DEVICE;

View File

@ -2046,6 +2046,7 @@ static int hptiop_attach(device_t dev)
goto free_hba_path;
}
memset(&ccb, 0, sizeof(ccb));
xpt_setup_ccb(&ccb.ccb_h, hba->path, /*priority*/5);
ccb.ccb_h.func_code = XPT_SASYNC_CB;
ccb.event_enable = (AC_FOUND_DEVICE | AC_LOST_DEVICE);
@ -2797,6 +2798,7 @@ static void hptiop_release_resource(struct hpt_iop_hba *hba)
if (hba->path) {
struct ccb_setasync ccb;
memset(&ccb, 0, sizeof(ccb));
xpt_setup_ccb(&ccb.ccb_h, hba->path, /*priority*/5);
ccb.ccb_h.func_code = XPT_SASYNC_CB;
ccb.event_enable = 0;

View File

@ -1438,6 +1438,7 @@ static void hpt_final_init(void *dummy)
}
hpt_unlock_vbus(vbus_ext);
memset(&ccb, 0, sizeof(ccb));
xpt_setup_ccb(&ccb.ccb_h, vbus_ext->path, /*priority*/5);
ccb.ccb_h.func_code = XPT_SASYNC_CB;
ccb.event_enable = AC_LOST_DEVICE;

View File

@ -1086,6 +1086,7 @@ static void hpt_final_init(void *dummy)
}
hpt_unlock_vbus(vbus_ext);
memset(&ccb, 0, sizeof(ccb));
xpt_setup_ccb(&ccb.ccb_h, vbus_ext->path, /*priority*/5);
ccb.ccb_h.func_code = XPT_SASYNC_CB;
ccb.event_enable = AC_LOST_DEVICE;

View File

@ -262,6 +262,7 @@ ps3cdrom_attach(device_t dev)
goto fail_unregister_xpt_bus;
}
memset(&csa, 0, sizeof(csa));
xpt_setup_ccb(&csa.ccb_h, sc->sc_path, 5);
csa.ccb_h.func_code = XPT_SASYNC_CB;
csa.event_enable = AC_LOST_DEVICE;