changeset 13951:0bdd3400c78a

3503 usba doesn't initialize cc_no_resources, causes gibberish output in kstat: Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Dan McDonald <danmcd@nexenta.com>
author David H?ppner <0xffea@gmail.com>
date Mon, 28 Jan 2013 14:05:13 +0000
parents a604ff203021
children 7a22d0770fc8
files usr/src/uts/common/io/usb/usba/hcdi.c usr/src/uts/common/sys/usb/usba/hcdi.h
diffstat 2 files changed, 12 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/usb/usba/hcdi.c	Fri Feb 08 15:07:52 2013 -0500
+++ b/usr/src/uts/common/io/usb/usba/hcdi.c	Mon Jan 28 14:05:13 2013 +0000
@@ -343,26 +343,20 @@
 		    "Command Timed Out", KSTAT_DATA_UINT64);
 		kstat_named_init(&esp->cc_not_accessed,
 		    "Not Accessed By Hardware", KSTAT_DATA_UINT64);
+		kstat_named_init(&esp->cc_no_resources,
+		    "No Resources", KSTAT_DATA_UINT64);
 		kstat_named_init(&esp->cc_unspecified_err,
 		    "Unspecified Error", KSTAT_DATA_UINT64);
-#ifdef	NOTYETNEEDED
-		kstat_named_init(&esp->hcdi_usb_failure,
-		    "USB Failure", KSTAT_DATA_UINT64);
-		kstat_named_init(&esp->hcdi_usb_no_resources,
-		    "No Resources", KSTAT_DATA_UINT64);
-		kstat_named_init(&esp->hcdi_usb_no_bandwidth,
-		    "No Bandwidth", KSTAT_DATA_UINT64);
-		kstat_named_init(&esp->hcdi_usb_pipe_reserved,
-		    "Pipe Reserved", KSTAT_DATA_UINT64);
-		kstat_named_init(&esp->hcdi_usb_pipe_unshareable,
-		    "Pipe Unshareable", KSTAT_DATA_UINT64);
-		kstat_named_init(&esp->hcdi_usb_not_supported,
-		    "Function Not Supported", KSTAT_DATA_UINT64);
-		kstat_named_init(&esp->hcdi_usb_pipe_error,
-		    "Pipe Error", KSTAT_DATA_UINT64);
-		kstat_named_init(&esp->hcdi_usb_pipe_busy,
-		    "Pipe Busy", KSTAT_DATA_UINT64);
-#endif
+		kstat_named_init(&esp->cc_stopped_polling,
+		    "Stopped Polling", KSTAT_DATA_UINT64);
+		kstat_named_init(&esp->cc_pipe_closing,
+		    "Pipe Closing", KSTAT_DATA_UINT64);
+		kstat_named_init(&esp->cc_pipe_reset,
+		    "Pipe Reset", KSTAT_DATA_UINT64);
+		kstat_named_init(&esp->cc_not_supported,
+		    "Command Not Supported", KSTAT_DATA_UINT64);
+		kstat_named_init(&esp->cc_flushed,
+		    "Request Flushed", KSTAT_DATA_UINT64);
 
 		HCDI_ERROR_STATS(hcdi)->ks_private = hcdi;
 		HCDI_ERROR_STATS(hcdi)->ks_update = nulldev;
--- a/usr/src/uts/common/sys/usb/usba/hcdi.h	Fri Feb 08 15:07:52 2013 -0500
+++ b/usr/src/uts/common/sys/usb/usba/hcdi.h	Mon Jan 28 14:05:13 2013 +0000
@@ -325,18 +325,6 @@
 	struct kstat_named	cc_pipe_reset;
 	struct kstat_named	cc_not_supported;
 	struct kstat_named	cc_flushed;
-
-#ifdef	NOTYETNEEDED
-	/* USBA function return values */
-	struct kstat_named	hcdi_usb_failure;
-	struct kstat_named	hcdi_usb_no_resources;
-	struct kstat_named	hcdi_usb_no_bandwidth;
-	struct kstat_named	hcdi_usb_pipe_reserved;
-	struct kstat_named	hcdi_usb_pipe_unshareable;
-	struct kstat_named	hcdi_usb_not_supported;
-	struct kstat_named	hcdi_usb_pipe_error;
-	struct kstat_named	hcdi_usb_pipe_busy;
-#endif
 } hcdi_error_stats_t;
 
 /*