Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb umass(4): Use an empty function callback, not nu...
details: https://anonhg.NetBSD.org/src/rev/4f40e59db570
branches: trunk
changeset: 1021279:4f40e59db570
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun May 23 08:42:32 2021 +0000
description:
umass(4): Use an empty function callback, not null pointer.
This stupid bug, with an `XXX Broken!' comment right above, has been
preventing NetBSD from suspend/resume with a USB drive plugged in for
longer than I want to even think about admitting. *sigh*
diffstat:
sys/dev/usb/umass_scsipi.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (49 lines):
diff -r d9d87684bc47 -r 4f40e59db570 sys/dev/usb/umass_scsipi.c
--- a/sys/dev/usb/umass_scsipi.c Sun May 23 07:17:50 2021 +0000
+++ b/sys/dev/usb/umass_scsipi.c Sun May 23 08:42:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umass_scsipi.c,v 1.67 2021/04/24 23:36:59 thorpej Exp $ */
+/* $NetBSD: umass_scsipi.c,v 1.68 2021/05/23 08:42:32 riastradh Exp $ */
/*
* Copyright (c) 2001, 2003, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.67 2021/04/24 23:36:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.68 2021/05/23 08:42:32 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -101,6 +101,8 @@
Static int umass_scsipi_getgeom(struct scsipi_periph *,
struct disk_parms *, u_long);
+Static void umass_null_cb(struct umass_softc *, void *,
+ int, int);
Static void umass_scsipi_cb(struct umass_softc *, void *,
int, int);
Static void umass_scsipi_sense_cb(struct umass_softc *, void *,
@@ -321,7 +323,7 @@
cmdlen, xs->data,
xs->datalen, dir,
xs->timeout, USBD_SYNCHRONOUS,
- 0, xs);
+ umass_null_cb, xs);
DPRINTFM(UDMASS_SCSI, "done err=%jd",
scbus->sc_sync_status, 0, 0, 0);
switch (scbus->sc_sync_status) {
@@ -421,6 +423,12 @@
}
Static void
+umass_null_cb(struct umass_softc *sc, void *priv, int residue, int status)
+{
+ UMASSHIST_FUNC(); UMASSHIST_CALLED();
+}
+
+Static void
umass_scsipi_cb(struct umass_softc *sc, void *priv, int residue, int status)
{
UMASSHIST_FUNC(); UMASSHIST_CALLED();
Home |
Main Index |
Thread Index |
Old Index