Patch Name: PHKL_30310 Patch Description: s700_800 11.11 Cumulative USB Driver patch Creation Date: 04/03/08 Post Date: 04/03/23 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: Yes PHKL_30310: PANIC HANG PHKL_28197: ABORT PANIC PHKL_24626: PANIC Category Tags: defect_repair hardware_enablement general_release critical panic halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHKL_30310 Symptoms: PHKL_30310: ( SR:8606344991 CR:JAGaf05841 ) The system could hang when a USB device (keyboard or mouse) is closed. The hang is caused by a deadlock between one thread closing the device and another thread trying to detach the device. The following is an example of a stack trace for a thread trying to detach the device. This thread would be running on a processor at the time of the hang. ================ busywait usb_lock_pipe usb_abort_pipe usb_hid_unconfig usb_destroy_dev hub_detach_device hub_probe_device usb_probe wsio_probe ... ================ The following is an example of a kernel stack trace of a thread closing a usb device: ================ sleep sleep_spinunlock remove_ed close_endpoint usb_close_pipe hid_close_pipe usb_hid_close ... ================ ( SR:8606303192 CR:JAGae66548 ) A kernel panic on a MP system is possible when the USB driver completes an IO request on a device. Here is an example of a kernel stack trace leading up to the panic. ============================ panic report_trap_or_int_and_panic interrupt ihandler spinunlock usb_wakeup_synchronous usb_handle_irp hcd_interrupt_service process_sw_triggers sw_service mp_ext_interrupt ihandler ============================ PHKL_28197: ( SR:8606243369 CR:JAGae10599 ) The hub daemon may fail to open the device /dev/hub if multiple hubs are present. The hub daemon is started by rc (see the manpage rc(1M)) as the system boots. The hub daemon supports the hot attach and detach for usb devices. It must be running in order to reconfigure USB devices when they are added to or removed from the system. The hub daemon may be stopped or started when the init run level is changed. ( SR:8606242439 CR:JAGae09689 ) Data page fault in the routine usb_enum_dev() preceeded by the kernel message "ERROR usb_enum_dev_end: Could not assign an address to the device." or the message "ERROR usb_probe: Device enumeration failed." ( SR:8606286051 CR:JAGae49993 ) One of the NEC USB functions may be unclaimed. The other functions may have "Longs Peak" in the ioscan description. PHKL_24626: ( SR:8606186053 CR:JAGad55258 ) The kernel build for the 32bit HP-UX kernel will fail if any of the USB driver components are configured into the kernel. The build will fail with the following error: /usr/ccs/bin/ld: Unsatisfied symbols: wsio_get_service (code) ( SR:8606197569 CR:JAGad66762 ) The kernel will panic with "unselect:null thread". The kernel functions involved are hid_unblock, selwakeup and unselect. Defect Description: PHKL_30310: ( SR:8606344991 CR:JAGaf05841 ) The defect is a deadlock condition in the USB driver that could be encountered if a device is detached (removed) while it is being closed. A USB device (keyboard, mouse) could be closed when the X server is stopped or when the system is shutdown. A USB device is typically detached when it is physically removed from the system. The thread closing the device obtains a lock associated with the device and goes to sleep. Another thread then starts the process of detaching the device. A defect in the USB driver prevents the closing thread from ever being awakened. Resolution: The deadlock is avoided by obtaining and releasing device locks in a coordinated manner. ( SR:8606303192 CR:JAGae66548 ) This defect requires that multiple processors are present. One processor is handling interrupts and completing requests on a USB interface. The other processor is running a thread which is also completing the same request and starting a new IO request. One thread deallocates a data structure being used by the other thread. Resolution: The data structure is only deallocated after both threads have finished using it. PHKL_28197: ( SR:8606243369 CR:JAGae10599 ) When the /dev/hub device file is closed by the hub daemon, a linked list structure may become invalid. More than one hub or root hub must be present in order for this condition to occur. Resolution: The code which manages the linked list was changed to eliminate the problem. ( SR:8606242439 CR:JAGae09689 ) When a new device is initialized, the usb driver must assign an address to the device. If that request fails, then the driver would corrupt the device zero endpoint which would then lead to a kernel panic. It is not known why the set address control request has failed. The keyboard may not be responding after a reset. Resolution: If the request to set the device address fails then the kernel will recover without corrupting the device zero endpoint. At this point the USB keyboard or mouse may not be configured on the system. The customer must unplug the device and plug it back in. ( SR:8606286051 CR:JAGae49993 ) The NEC USB host controller is not recognized by the hcd driver. Resolution: The hcd driver was modified to claim the NEC USB device PHKL_24626: ( SR:8606186053 CR:JAGad55258 ) The USB driver requires that the superio cdio be configured into the kernel. However the superio cdio is not available for 32 bit kernels. Resolution: The USB driver dependency on the superio cdio was eliminated. ( SR:8606197569 CR:JAGad66762 ) The USB keyboard HID driver could call the selwakeup routine with a NULL thread pointer. This is a rare condition which may occur when an data interrupt occurs for that device while the driver is performing a keyrepeat operation. Resolution: The thread pointer is captured in a local variable to ensure that an interrupt condition won't set it to NULL before it can be passed to the selwakeup routine. A code change to the HID driver was made. Enhancement: No SR: 8606186053 8606197569 8606242439 8606243369 8606286051 8606303192 8606344991 Patch Files: ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/include/sys/hidio.h OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libusb.a(hc.o) /usr/conf/lib/libusb.a(hcd.o) /usr/conf/lib/libusb.a(hid.o) /usr/conf/lib/libusb.a(hub.o) /usr/conf/lib/libusb.a(usb.o) /usr/conf/lib/libusb.a(usb_config.o) /usr/conf/lib/libusb.a(usbd.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libusb.a(hc.o) /usr/conf/lib/libusb.a(hcd.o) /usr/conf/lib/libusb.a(hid.o) /usr/conf/lib/libusb.a(hub.o) /usr/conf/lib/libusb.a(usb.o) /usr/conf/lib/libusb.a(usb_config.o) /usr/conf/lib/libusb.a(usbd.o) what(1) Output: ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/include/sys/hidio.h: hidio.h $Date: 2001/07/11 13:01:48 $Revision: r11.11 /1 PATCH_11.11 (PHKL_24626) */ OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: /usr/conf/lib/libusb.a(hc.o): hc.c $Date: 2002/11/12 13:51:56 $Revision: r11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(hcd.o): hcd.c $Date: 2002/11/12 13:52:15 $Revision: r11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(hid.o): hid.c $Date: 2004/01/29 09:43:43 $Revision: r11.11/2 PATCH_11.11 (PHKL_30310) /usr/conf/lib/libusb.a(hub.o): hub.c $Date: 2002/11/12 13:52:25 $Revision: r11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(usb.o): usb.c $Date: 2004/01/30 10:32:20 $Revision: r11.11/2 PATCH_11.11 (PHKL_30310) /usr/conf/lib/libusb.a(usb_config.o): usb_config.c $Date: 2002/11/12 13:52:34 $Revision: r 11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(usbd.o): usbd.c $Date: 2001/07/11 13:02:55 $Revision: r11.11/ 1 PATCH_11.11 (PHKL_24626) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: /usr/conf/lib/libusb.a(hc.o): hc.c $Date: 2002/11/12 13:51:56 $Revision: r11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(hcd.o): hcd.c $Date: 2002/11/12 13:52:15 $Revision: r11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(hid.o): hid.c $Date: 2004/01/29 09:43:43 $Revision: r11.11/2 PATCH_11.11 (PHKL_30310) /usr/conf/lib/libusb.a(hub.o): hub.c $Date: 2002/11/12 13:52:25 $Revision: r11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(usb.o): usb.c $Date: 2004/01/30 10:32:20 $Revision: r11.11/2 PATCH_11.11 (PHKL_30310) /usr/conf/lib/libusb.a(usb_config.o): usb_config.c $Date: 2002/11/12 13:52:34 $Revision: r 11.11/2 PATCH_11.11 (PHKL_28197) /usr/conf/lib/libusb.a(usbd.o): usbd.c $Date: 2001/07/11 13:02:55 $Revision: r11.11/ 1 PATCH_11.11 (PHKL_24626) cksum(1) Output: ProgSupport.C-INC,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 3901425339 12982 /usr/include/sys/hidio.h OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_32,v=HP: 1116026411 26296 /usr/conf/lib/libusb.a(hc.o) 1920774669 27424 /usr/conf/lib/libusb.a(hcd.o) 615273991 40684 /usr/conf/lib/libusb.a(hid.o) 2448483441 12812 /usr/conf/lib/libusb.a(hub.o) 2158472376 18096 /usr/conf/lib/libusb.a(usb.o) 2097033239 11196 /usr/conf/lib/libusb.a(usb_config.o) 523958588 10072 /usr/conf/lib/libusb.a(usbd.o) OS-Core.CORE2-KRN,fr=B.11.11,fa=HP-UX_B.11.11_64,v=HP: 2238665527 44760 /usr/conf/lib/libusb.a(hc.o) 1078808294 60496 /usr/conf/lib/libusb.a(hcd.o) 3898423752 83840 /usr/conf/lib/libusb.a(hid.o) 1370760348 28712 /usr/conf/lib/libusb.a(hub.o) 258451999 47600 /usr/conf/lib/libusb.a(usb.o) 955655544 22832 /usr/conf/lib/libusb.a(usb_config.o) 1292424258 23104 /usr/conf/lib/libusb.a(usbd.o) Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_28197 PHKL_24626 Equivalent Patches: None Patch Package Size: 240 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_30310 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_30310.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_30310. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHKL_30310.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_30310.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_30310.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None