Print this page
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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/usb/usba/hcdi.c
          +++ new/usr/src/uts/common/io/usb/usba/hcdi.c
↓ open down ↓ 335 lines elided ↑ open up ↑
 336  336                  kstat_named_init(&esp->cc_data_underrun,
 337  337                      "Data Underruns", KSTAT_DATA_UINT64);
 338  338                  kstat_named_init(&esp->cc_buffer_overrun,
 339  339                      "Buffer Overruns", KSTAT_DATA_UINT64);
 340  340                  kstat_named_init(&esp->cc_buffer_underrun,
 341  341                      "Buffer Underruns", KSTAT_DATA_UINT64);
 342  342                  kstat_named_init(&esp->cc_timeout,
 343  343                      "Command Timed Out", KSTAT_DATA_UINT64);
 344  344                  kstat_named_init(&esp->cc_not_accessed,
 345  345                      "Not Accessed By Hardware", KSTAT_DATA_UINT64);
      346 +                kstat_named_init(&esp->cc_no_resources,
      347 +                    "No Resources", KSTAT_DATA_UINT64);
 346  348                  kstat_named_init(&esp->cc_unspecified_err,
 347  349                      "Unspecified Error", KSTAT_DATA_UINT64);
 348      -#ifdef  NOTYETNEEDED
 349      -                kstat_named_init(&esp->hcdi_usb_failure,
 350      -                    "USB Failure", KSTAT_DATA_UINT64);
 351      -                kstat_named_init(&esp->hcdi_usb_no_resources,
 352      -                    "No Resources", KSTAT_DATA_UINT64);
 353      -                kstat_named_init(&esp->hcdi_usb_no_bandwidth,
 354      -                    "No Bandwidth", KSTAT_DATA_UINT64);
 355      -                kstat_named_init(&esp->hcdi_usb_pipe_reserved,
 356      -                    "Pipe Reserved", KSTAT_DATA_UINT64);
 357      -                kstat_named_init(&esp->hcdi_usb_pipe_unshareable,
 358      -                    "Pipe Unshareable", KSTAT_DATA_UINT64);
 359      -                kstat_named_init(&esp->hcdi_usb_not_supported,
 360      -                    "Function Not Supported", KSTAT_DATA_UINT64);
 361      -                kstat_named_init(&esp->hcdi_usb_pipe_error,
 362      -                    "Pipe Error", KSTAT_DATA_UINT64);
 363      -                kstat_named_init(&esp->hcdi_usb_pipe_busy,
 364      -                    "Pipe Busy", KSTAT_DATA_UINT64);
 365      -#endif
      350 +                kstat_named_init(&esp->cc_stopped_polling,
      351 +                    "Stopped Polling", KSTAT_DATA_UINT64);
      352 +                kstat_named_init(&esp->cc_pipe_closing,
      353 +                    "Pipe Closing", KSTAT_DATA_UINT64);
      354 +                kstat_named_init(&esp->cc_pipe_reset,
      355 +                    "Pipe Reset", KSTAT_DATA_UINT64);
      356 +                kstat_named_init(&esp->cc_not_supported,
      357 +                    "Command Not Supported", KSTAT_DATA_UINT64);
      358 +                kstat_named_init(&esp->cc_flushed,
      359 +                    "Request Flushed", KSTAT_DATA_UINT64);
 366  360  
 367  361                  HCDI_ERROR_STATS(hcdi)->ks_private = hcdi;
 368  362                  HCDI_ERROR_STATS(hcdi)->ks_update = nulldev;
 369  363                  kstat_install(HCDI_ERROR_STATS(hcdi));
 370  364          }
 371  365  }
 372  366  
 373  367  
 374  368  /*
 375  369   * Do actual error stats
↓ open down ↓ 641 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX