Module Name: src
Committed By: riastradh
Date: Sun May 23 08:42:32 UTC 2021
Modified Files:
src/sys/dev/usb: umass_scsipi.c
Log Message:
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*
To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/usb/umass_scsipi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/umass_scsipi.c
diff -u src/sys/dev/usb/umass_scsipi.c:1.67 src/sys/dev/usb/umass_scsipi.c:1.68
--- src/sys/dev/usb/umass_scsipi.c:1.67 Sat Apr 24 23:36:59 2021
+++ src/sys/dev/usb/umass_scsipi.c Sun May 23 08:42:32 2021
@@ -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_ioctl(struct scs
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 @@ umass_scsipi_request(struct scsipi_chann
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 @@ umass_scsipi_getgeom(struct scsipi_perip
}
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();