sync with OpenBSD -current

This commit is contained in:
purplerain 2025-01-20 18:26:30 +00:00
parent cc53d18db3
commit 6f15bbf720
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
63 changed files with 758 additions and 802 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ufshcivar.h,v 1.11 2025/01/11 20:48:27 mglocker Exp $ */
/* $OpenBSD: ufshcivar.h,v 1.12 2025/01/18 19:42:39 mglocker Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@ -44,14 +44,17 @@ struct ufshci_dmamem {
struct ufshci_softc;
/* SCSI */
enum ccb_status {
CCB_STATUS_FREE,
CCB_STATUS_INPROGRESS,
CCB_STATUS_READY2FREE,
CCB_STATUS_COUNT
};
struct ufshci_ccb {
SIMPLEQ_ENTRY(ufshci_ccb) ccb_entry;
bus_dmamap_t ccb_dmamap;
void *ccb_cookie;
int ccb_slot;
#define CCB_STATUS_FREE 0
#define CCB_STATUS_INPROGRESS 1
#define CCB_STATUS_READY2FREE 2
int ccb_status;
void (*ccb_done)(struct ufshci_softc *,
struct ufshci_ccb *);
@ -89,11 +92,12 @@ struct ufshci_softc {
struct ufshci_ccb_list sc_ccb_list;
struct ufshci_ccb *sc_ccbs;
#ifdef UFSHCI_DEBUG
/* Debugging statistics */
struct timeout sc_stats_timo;
int *sc_stats_slots;
#endif
/* kstat */
uint64_t *sc_stats_slots;
struct mutex sc_kstat_mtx_ccb;
struct mutex sc_kstat_mtx_slot;
struct kstat *sc_kstat_ccb;
struct kstat *sc_kstat_slot;
};
int ufshci_intr(void *);