Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic When handles returned by the device do not match ...
details: https://anonhg.NetBSD.org/src/rev/3b8137828322
branches: trunk
changeset: 447416:3b8137828322
user: martin <martin%NetBSD.org@localhost>
date: Thu Jan 10 09:12:47 2019 +0000
description:
When handles returned by the device do not match our expectations,
log more details.
diffstat:
sys/dev/ic/isp_library.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 040948e2c52d -r 3b8137828322 sys/dev/ic/isp_library.c
--- a/sys/dev/ic/isp_library.c Thu Jan 10 09:10:31 2019 +0000
+++ b/sys/dev/ic/isp_library.c Thu Jan 10 09:12:47 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_library.c,v 1.7 2011/02/28 17:17:55 mjacob Exp $ */
+/* $NetBSD: isp_library.c,v 1.8 2019/01/10 09:12:47 martin Exp $ */
/*
* Copyright (c) 2006-2007 by Matthew Jacob
* All rights reserved.
@@ -30,7 +30,7 @@
*/
#ifdef __NetBSD__
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp_library.c,v 1.7 2011/02/28 17:17:55 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_library.c,v 1.8 2019/01/10 09:12:47 martin Exp $");
#include <dev/ic/isp_netbsd.h>
#endif
#ifdef __FreeBSD__
@@ -294,7 +294,12 @@
isp_handle_index(ispsoftc_t *isp, uint32_t handle)
{
if (!ISP_VALID_HANDLE(isp, handle)) {
- isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle);
+ int cmd = handle & ISP_HANDLE_CMD_MASK;
+ if (cmd > isp->isp_maxcmds)
+ cmd = 0;
+ isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x (isp_seqno: %d,"
+ " isp_xflist[%d].handle = 0x%x)", __func__,
+ handle, isp->isp_seqno, cmd, isp->isp_xflist[cmd].handle);
return (ISP_BAD_HANDLE_INDEX);
} else {
return (handle & ISP_HANDLE_CMD_MASK);
Home |
Main Index |
Thread Index |
Old Index