From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 9 12:10:04 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B5F2106567C for ; Thu, 9 Aug 2012 12:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 096E88FC17 for ; Thu, 9 Aug 2012 12:10:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q79CA3GJ066487 for ; Thu, 9 Aug 2012 12:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q79CA3BX066486; Thu, 9 Aug 2012 12:10:03 GMT (envelope-from gnats) Resent-Date: Thu, 9 Aug 2012 12:10:03 GMT Resent-Message-Id: <201208091210.q79CA3BX066486@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Naylor Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0F1710656DD for ; Thu, 9 Aug 2012 12:04:15 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id C16D58FC15 for ; Thu, 9 Aug 2012 12:04:15 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q79C4Fu9012248 for ; Thu, 9 Aug 2012 12:04:15 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q79C4FTA012247; Thu, 9 Aug 2012 12:04:15 GMT (envelope-from nobody) Message-Id: <201208091204.q79C4FTA012247@red.freebsd.org> Date: Thu, 9 Aug 2012 12:04:15 GMT From: David Naylor To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/170501: modular kernel fails to reattach usb-mass storage and shutdown of usb controller X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2012 12:10:04 -0000 >Number: 170501 >Category: kern >Synopsis: modular kernel fails to reattach usb-mass storage and shutdown of usb controller >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 09 12:10:03 UTC 2012 >Closed-Date: >Last-Modified: >Originator: David Naylor >Release: FreeBSD 9.1 >Organization: >Environment: FreeBSD dragon.dg 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1: Wed Aug 8 11:26:29 SAST 2012 root@dragon.dg:/tmp/home/freebsd9/src/sys/MODULAR amd64 >Description: When using a kernel with minimal compiled in modules (i.e. only the bare minimum) and loading cam(4) and usb(4) during the boot time then: If a usb-mass storage device (da0) is inserted: - on shutdown (`shutdown -p now`) the usb controllers fail to shutdown and the computer is not powered off - if the usb-device is removed the kernel spams the console with: """ xptioctl: pass driver is not in the kernel xptioctl: put "device pass" in your kernel config file """ even though cam(4) is still loaded by the kernel and the pass device was locatable on first connection - thereafter no usb-mass storage devices are recognised by the computer >How-To-Repeat: Compile computer with attached kernel config, load the appropriate drivers from loader.conf and rc.conf: ahci_load="YES" kld_list="random pty firmware agp ehci xhci usb" the insert usb-mass storage device (flash), and remove. Observe above conditions. >Fix: Add """ device scbus device da device pass """ to MODULAR kernel config file Patch attached with submission follows: # # MODULAR -- Modular kernel configuration file for FreeBSD/amd64 # cpu HAMMER ident MODULAR makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_FREEBSD32 # Compatible with i386 binaries options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework #options KDTRACE_FRAME # Ensure frames are compiled in #options KDTRACE_HOOKS # Kernel DTrace hooks options INCLUDE_CONFIG_FILE # Include this file in kernel # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq # Bus support. device acpi device pci # ATA controllers options ATA_CAM # Handle legacy controllers with CAM options ATA_STATIC_ID # Static device numbering # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver options VESA # Add VESA BIOS support to the driver options X86BIOS # x86 real mode BIOS emulator device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc options SC_PIXEL_MODE # add support for the raster text mode # Wireless NIC cards options IEEE80211_DEBUG # enable debug msgs options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's options IEEE80211_SUPPORT_MESH # enable 802.11s draft support options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors # Pseudo devices. device loop # Network loopback device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter # USB support options USB_DEBUG # enable debug msgs >Release-Note: >Audit-Trail: >Unformatted: