public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* usb+sysfs: duplicate filename 'bInterfaceNumber'
@ 2007-10-14 15:15 Borislav Petkov
  2007-10-15  5:57 ` Dave Young
  0 siblings, 1 reply; 20+ messages in thread
From: Borislav Petkov @ 2007-10-14 15:15 UTC (permalink / raw)
  To: linux-kernel, linux-usb-devel, Greg KH

[-- Attachment #1: Type: text/plain, Size: 2651 bytes --]

Hi,

i get the following warning on yesterday's git tree (v2.6.23-2840-g752097c):

Oct 14 09:07:15 zmei kernel: [   49.368030] sysfs: duplicate filename 'bInterfaceNumber' can not be created
Oct 14 09:07:15 zmei kernel: [   49.368086] WARNING: at fs/sysfs/dir.c:425 sysfs_add_one()
Oct 14 09:07:15 zmei kernel: [   49.368134]  [<c010527c>] show_trace_log_lvl+0x1a/0x2f
Oct 14 09:07:15 zmei kernel: [   49.368220]  [<c0105da0>] show_trace+0x12/0x14
Oct 14 09:07:15 zmei kernel: [   49.368300]  [<c0105db8>] dump_stack+0x16/0x18
Oct 14 09:07:15 zmei kernel: [   49.368379]  [<c019f2ee>] sysfs_add_one+0x57/0xbc
Oct 14 09:07:15 zmei kernel: [   49.368461]  [<c019edeb>] sysfs_add_file+0x49/0x71
Oct 14 09:07:15 zmei kernel: [   49.368541]  [<c01a05c2>] sysfs_create_group+0x86/0xe8
Oct 14 09:07:15 zmei kernel: [   49.368621]  [<c024f5da>] usb_create_sysfs_intf_files+0x27/0x9b
Oct 14 09:07:15 zmei kernel: [   49.368704]  [<c024c28b>] usb_set_configuration+0x454/0x466
Oct 14 09:07:15 zmei kernel: [   49.368787]  [<c0252b97>] generic_probe+0x53/0x94
Oct 14 09:07:15 zmei kernel: [   49.368867]  [<c024d4f7>] usb_probe_device+0x35/0x3b
Oct 14 09:07:15 zmei kernel: [   49.368947]  [<c022a46c>] driver_probe_device+0xcb/0x14f
Oct 14 09:07:15 zmei kernel: [   49.369039]  [<c022a4f8>] __device_attach+0x8/0xa
Oct 14 09:07:15 zmei kernel: [   49.369119]  [<c02298d5>] bus_for_each_drv+0x3b/0x63
Oct 14 09:07:15 zmei kernel: [   49.369199]  [<c022a589>] device_attach+0x70/0x85
Oct 14 09:07:15 zmei kernel: [   49.369279]  [<c022984c>] bus_attach_device+0x29/0x77
Oct 14 09:07:15 zmei kernel: [   49.369359]  [<c0228abc>] device_add+0x28c/0x445
Oct 14 09:07:15 zmei kernel: [   49.369439]  [<c0247c7a>] usb_new_device+0x44/0x82
Oct 14 09:07:15 zmei kernel: [   49.369519]  [<c02486ec>] hub_thread+0x666/0x9c2
Oct 14 09:07:15 zmei kernel: [   49.369598]  [<c01370e9>] kthread+0x3b/0x62
Oct 14 09:07:15 zmei kernel: [   49.369679]  [<c0104eaf>] kernel_thread_helper+0x7/0x10
Oct 14 09:07:15 zmei kernel: [   49.369759]  =======================

The usb hub in question is named 4-1:1.0 and it has an extension connected to it
which is used to activate the 2 usb connectors at the side of the pc's monitor.
Correct me if i'm wrong but from what i've understood so far from reading the code,
i think, it adds the bInterfaceNumber-file after calling usb_create_sysfs_intf_files(intf).
However, the currently active usbhost interface alternate setting is the only one active
so the bInterfaceNumber exists already and therefore the warning, but this is
just a guess since i'm not that fluent in the usb internals.

.config attached.

-- 
Regards/Gruß,
    Boris.

[-- Attachment #2: config-2.6.23-2840-g752097c --]
[-- Type: text/plain, Size: 44646 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.23-2840-g752097c
# Sun Oct 14 11:10:57 2007
#
CONFIG_X86_32=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_USER_NS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
# CONFIG_CPUSETS is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set
# CONFIG_BLK_DEV_BSG is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_AS is not set
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_DEFAULT_AS is not set
CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
CONFIG_PARAVIRT=y
# CONFIG_XEN is not set
# CONFIG_VMI is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MCORE2 is not set
CONFIG_MPENTIUM4=y
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_X86_XADD=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=4
CONFIG_HPET_TIMER=y
CONFIG_NR_CPUS=2
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
CONFIG_X86_MCE_P4THERMAL=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_X86_REBOOTFIXUPS is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_X86_PAE is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_NR_QUICK=1
CONFIG_VIRT_TO_BUS=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_IRQBALANCE=y
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
# CONFIG_KEXEC is not set
CONFIG_PHYSICAL_START=0x100000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_SMP_POSSIBLE=y
CONFIG_SUSPEND=y
CONFIG_HIBERNATION_SMP_POSSIBLE=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION="/dev/hda2"
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS is not set
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=m
# CONFIG_ACPI_SBS is not set
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set

#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
# CONFIG_PCI_DEBUG is not set
# CONFIG_HT_IRQ is not set
CONFIG_ISA_DMA_API=y
CONFIG_ISA=y
# CONFIG_EISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set

#
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=m
CONFIG_BINFMT_MISC=m

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=m
CONFIG_NET_IPGRE=m
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
CONFIG_INET_TUNNEL=m
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IP_VS is not set
CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
# CONFIG_IPV6_ROUTE_INFO is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
# CONFIG_IPV6_MIP6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
CONFIG_INET6_TUNNEL=m
# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_BEET is not set
# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
CONFIG_IPV6_SIT=m
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_NETLABEL is not set
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_BRIDGE_NETFILTER=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CONNTRACK_ENABLED=m
CONFIG_NF_CONNTRACK=m
CONFIG_NF_CT_ACCT=y
CONFIG_NF_CONNTRACK_MARK=y
# CONFIG_NF_CONNTRACK_EVENTS is not set
# CONFIG_NF_CT_PROTO_SCTP is not set
# CONFIG_NF_CT_PROTO_UDPLITE is not set
# CONFIG_NF_CONNTRACK_AMANDA is not set
# CONFIG_NF_CONNTRACK_FTP is not set
# CONFIG_NF_CONNTRACK_H323 is not set
# CONFIG_NF_CONNTRACK_IRC is not set
# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
# CONFIG_NF_CONNTRACK_PPTP is not set
CONFIG_NF_CONNTRACK_SANE=m
# CONFIG_NF_CONNTRACK_SIP is not set
# CONFIG_NF_CONNTRACK_TFTP is not set
# CONFIG_NF_CT_NETLINK is not set
CONFIG_NETFILTER_XTABLES=m
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
CONFIG_NETFILTER_XT_MATCH_DCCP=m
# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
# CONFIG_NETFILTER_XT_MATCH_ESP is not set
# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_REALM=m
CONFIG_NETFILTER_XT_MATCH_SCTP=m
# CONFIG_NETFILTER_XT_MATCH_STATE is not set
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
# CONFIG_NETFILTER_XT_MATCH_TIME is not set
# CONFIG_NETFILTER_XT_MATCH_U32 is not set
# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set

#
# IP: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV4=m
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_IPRANGE=m
CONFIG_IP_NF_MATCH_TOS=m
CONFIG_IP_NF_MATCH_RECENT=m
CONFIG_IP_NF_MATCH_ECN=m
# CONFIG_IP_NF_MATCH_AH is not set
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_OWNER=m
CONFIG_IP_NF_MATCH_ADDRTYPE=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_SAME=m
CONFIG_NF_NAT_SNMP_BASIC=m
# CONFIG_NF_NAT_FTP is not set
# CONFIG_NF_NAT_IRC is not set
# CONFIG_NF_NAT_TFTP is not set
# CONFIG_NF_NAT_AMANDA is not set
# CONFIG_NF_NAT_PPTP is not set
# CONFIG_NF_NAT_H323 is not set
# CONFIG_NF_NAT_SIP is not set
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_TOS=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_TTL=m
# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m

#
# IPv6: Netfilter Configuration (EXPERIMENTAL)
#
# CONFIG_NF_CONNTRACK_IPV6 is not set
# CONFIG_IP6_NF_QUEUE is not set
# CONFIG_IP6_NF_IPTABLES is not set

#
# Bridge: Netfilter Configuration
#
# CONFIG_BRIDGE_NF_EBTABLES is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
CONFIG_BRIDGE=m
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
CONFIG_LLC=m
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
CONFIG_NET_CLS_ROUTE=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set

#
# Wireless
#
# CONFIG_CFG80211 is not set
# CONFIG_WIRELESS_EXT is not set
# CONFIG_MAC80211 is not set
CONFIG_IEEE80211=m
# CONFIG_IEEE80211_DEBUG is not set
CONFIG_IEEE80211_CRYPT_WEP=m
CONFIG_IEEE80211_CRYPT_CCMP=m
# CONFIG_IEEE80211_CRYPT_TKIP is not set
# CONFIG_IEEE80211_SOFTMAC is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set

#
# Protocols
#
# CONFIG_ISAPNP is not set
# CONFIG_PNPBIOS is not set
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_MISC_DEVICES=y
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_THINKPAD_ACPI is not set
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
CONFIG_BLK_DEV_IDEACPI=y
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_IDEPCI_PCIBUS_ORDER=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_CS5535 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
# CONFIG_IDE_ARM is not set

#
# Other IDE chipsets support
#

#
# Note: most of these also require special kernel boot parameters
#
# CONFIG_BLK_DEV_4DRIVES is not set
# CONFIG_BLK_DEV_ALI14XX is not set
# CONFIG_BLK_DEV_DTC2278 is not set
# CONFIG_BLK_DEV_HT6560B is not set
# CONFIG_BLK_DEV_QD65XX is not set
# CONFIG_BLK_DEV_UMC8672 is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=m
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
CONFIG_SCSI_NETLINK=y
# CONFIG_SCSI_PROC_FS is not set

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
CONFIG_SCSI_FC_ATTRS=m
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_SEAGATE is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
# CONFIG_FUSION_SPI is not set
# CONFIG_FUSION_FC is not set
# CONFIG_FUSION_SAS is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_IP1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_NET_TULIP is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_CS89x0 is not set
# CONFIG_EEPRO100 is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
CONFIG_8139TOO=y
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
# CONFIG_NET_POCKET is not set
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET_MII is not set
# CONFIG_USB_USBNET is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
CONFIG_PPP=m
# CONFIG_PPP_MULTILINK is not set
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
# CONFIG_PPP_MPPE is not set
CONFIG_PPPOE=m
# CONFIG_PPPOL2TP is not set
# CONFIG_SLIP is not set
CONFIG_SLHC=m
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=m
# CONFIG_NETCONSOLE_DYNAMIC is not set
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_SERIAL=m
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_INPORT is not set
# CONFIG_MOUSE_LOGIBM is not set
# CONFIG_MOUSE_PC110PAD is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=m
# CONFIG_INPUT_WISTRON_BTNS is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_UINPUT is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_TIPAR is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=m
# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
CONFIG_AGP_INTEL=m
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=m
# CONFIG_DRM_I810 is not set
# CONFIG_DRM_I830 is not set
# CONFIG_DRM_I915 is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HPET is not set
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
# CONFIG_I2C_CHARDEV is not set

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m

#
# I2C Hardware Bus support
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_TINY_USB is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
# CONFIG_I2C_PCA_ISA is not set

#
# Miscellaneous I2C Chip support
#
# CONFIG_SENSORS_DS1337 is not set
# CONFIG_SENSORS_DS1374 is not set
# CONFIG_DS1682 is not set
# CONFIG_SENSORS_EEPROM is not set
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set

#
# SPI support
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_HWMON is not set

#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set

#
# Multimedia devices
#
CONFIG_VIDEO_DEV=m
# CONFIG_VIDEO_V4L1 is not set
# CONFIG_VIDEO_V4L1_COMPAT is not set
CONFIG_VIDEO_V4L2=y
# CONFIG_VIDEO_CAPTURE_DRIVERS is not set
# CONFIG_RADIO_ADAPTERS is not set
# CONFIG_DVB_CORE is not set
# CONFIG_DAB is not set

#
# Graphics support
#
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
# CONFIG_FB is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
# CONFIG_VIDEO_SELECT is not set
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_SEQUENCER=y
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
# CONFIG_SND_VERBOSE_PROCFS is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

#
# Generic devices
#
CONFIG_SND_MPU401_UART=y
CONFIG_SND_OPL3_LIB=y
CONFIG_SND_AC97_CODEC=y
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_MTS64 is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
# CONFIG_SND_PORTMAN2X4 is not set

#
# ISA devices
#
# CONFIG_SND_ADLIB is not set
# CONFIG_SND_AD1816A is not set
# CONFIG_SND_AD1848 is not set
# CONFIG_SND_ALS100 is not set
# CONFIG_SND_AZT2320 is not set
# CONFIG_SND_CMI8330 is not set
# CONFIG_SND_CS4231 is not set
# CONFIG_SND_CS4232 is not set
# CONFIG_SND_CS4236 is not set
# CONFIG_SND_DT019X is not set
# CONFIG_SND_ES968 is not set
# CONFIG_SND_ES1688 is not set
# CONFIG_SND_ES18XX is not set
# CONFIG_SND_GUSCLASSIC is not set
# CONFIG_SND_GUSEXTREME is not set
# CONFIG_SND_GUSMAX is not set
# CONFIG_SND_INTERWAVE is not set
# CONFIG_SND_INTERWAVE_STB is not set
# CONFIG_SND_OPL3SA2 is not set
# CONFIG_SND_OPTI92X_AD1848 is not set
# CONFIG_SND_OPTI92X_CS4231 is not set
# CONFIG_SND_OPTI93X is not set
# CONFIG_SND_MIRO is not set
# CONFIG_SND_SB8 is not set
# CONFIG_SND_SB16 is not set
# CONFIG_SND_SBAWE is not set
# CONFIG_SND_SGALAXY is not set
# CONFIG_SND_SSCAPE is not set
# CONFIG_SND_WAVEFRONT is not set

#
# PCI devices
#
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
CONFIG_SND_BT87X=m
# CONFIG_SND_BT87X_OVERCLOCK is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDA_INTEL is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set
CONFIG_SND_YMFPCI=y
CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y
# CONFIG_SND_AC97_POWER_SAVE is not set

#
# USB devices
#
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
# CONFIG_SND_USB_CAIAQ is not set

#
# System on Chip audio support
#
# CONFIG_SND_SOC is not set

#
# SoC Audio support for SuperH
#

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=y
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set

#
# USB Input Devices
#
CONFIG_USB_HID=m
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set

#
# USB HID Boot Protocol drivers
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
CONFIG_USB_DEBUG=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_PERSIST is not set
# CONFIG_USB_OTG is not set

#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_SPLIT_ISO=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set

#
# USB Device Class drivers
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_LIBUSUAL is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
CONFIG_USB_MON=y

#
# USB port drivers
#
# CONFIG_USB_USS720 is not set

#
# USB Serial Converter support
#
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
# CONFIG_USB_SERIAL_AIRCABLE is not set
# CONFIG_USB_SERIAL_AIRPRIME is not set
# CONFIG_USB_SERIAL_ARK3116 is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_CH341 is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_CP2101 is not set
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
# CONFIG_USB_SERIAL_FUNSOFT is not set
# CONFIG_USB_SERIAL_VISOR is not set
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
# CONFIG_USB_SERIAL_GARMIN is not set
# CONFIG_USB_SERIAL_IPW is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_MOS7720 is not set
# CONFIG_USB_SERIAL_MOS7840 is not set
# CONFIG_USB_SERIAL_NAVMAN is not set
# CONFIG_USB_SERIAL_PL2303 is not set
# CONFIG_USB_SERIAL_OTI6858 is not set
# CONFIG_USB_SERIAL_HP4X is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
# CONFIG_USB_SERIAL_TI is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
CONFIG_USB_SERIAL_OPTION=m
# CONFIG_USB_SERIAL_OMNINET is not set
# CONFIG_USB_SERIAL_DEBUG is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set

#
# USB DSL modem support
#

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
# CONFIG_RTC_CLASS is not set

#
# DMA Engine support
#
# CONFIG_DMA_ENGINE is not set

#
# DMA Clients
#

#
# DMA Devices
#
# CONFIG_AUXDISPLAY is not set
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=m
CONFIG_KVM_INTEL=m
# CONFIG_KVM_AMD is not set

#
# Userspace I/O
#
# CONFIG_UIO is not set
# CONFIG_LGUEST is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4DEV_FS=m
CONFIG_EXT4DEV_FS_XATTR=y
CONFIG_EXT4DEV_FS_POSIX_ACL=y
# CONFIG_EXT4DEV_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=m
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
CONFIG_NTFS_DEBUG=y
CONFIG_NTFS_RW=y

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y
# CONFIG_CONFIGFS_FS is not set

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
# CONFIG_SUNRPC_BIND34 is not set
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
CONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not set
CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_XATTR is not set
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-15"
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m
CONFIG_NLS_CODEPAGE_1251=m
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m

#
# Distributed Lock Manager
#
# CONFIG_DLM is not set
CONFIG_INSTRUMENTATION=y
# CONFIG_PROFILING is not set
# CONFIG_KPROBES is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
# CONFIG_TIMER_STATS is not set
# CONFIG_SLUB_DEBUG_ON is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCKDEP=y
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_LOCKDEP is not set
CONFIG_TRACE_IRQFLAGS=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
CONFIG_FRAME_POINTER=y
CONFIG_FORCED_INLINING=y
CONFIG_RCU_TORTURE_TEST=m
# CONFIG_FAULT_INJECTION is not set
CONFIG_EARLY_PRINTK=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_STACK_USAGE=y

#
# Page alloc debug is incompatible with Software Suspend on i386
#
# CONFIG_DEBUG_RODATA is not set
# CONFIG_4KSTACKS is not set
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
CONFIG_DOUBLEFAULT=y

#
# Security options
#
# CONFIG_KEYS is not set
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_CAPABILITIES=y
# CONFIG_SECURITY_ROOTPLUG is not set
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
# CONFIG_CRYPTO_HMAC is not set
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_LRW=m
# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
# CONFIG_CRYPTO_TWOFISH_586 is not set
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_586=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
# CONFIG_CRYPTO_SEED is not set
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CAMELLIA is not set
CONFIG_CRYPTO_TEST=m
# CONFIG_CRYPTO_AUTHENC is not set
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_PADLOCK=m
CONFIG_CRYPTO_DEV_PADLOCK_AES=m
CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
CONFIG_CRYPTO_DEV_GEODE=m

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_X86_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_KTIME_SCALAR=y

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-14 15:15 usb+sysfs: duplicate filename 'bInterfaceNumber' Borislav Petkov
@ 2007-10-15  5:57 ` Dave Young
  2007-10-15 18:38   ` [linux-usb-devel] " Alan Stern
  0 siblings, 1 reply; 20+ messages in thread
From: Dave Young @ 2007-10-15  5:57 UTC (permalink / raw)
  To: bbpetkov; +Cc: linux-kernel, linux-usb-devel, Greg KH

On 10/14/07, Borislav Petkov <bbpetkov@yahoo.de> wrote:
> Hi,
>
> i get the following warning on yesterday's git tree (v2.6.23-2840-g752097c):
>
> Oct 14 09:07:15 zmei kernel: [   49.368030] sysfs: duplicate filename 'bInterfaceNumber' can not be created
> Oct 14 09:07:15 zmei kernel: [   49.368086] WARNING: at fs/sysfs/dir.c:425 sysfs_add_one()
> Oct 14 09:07:15 zmei kernel: [   49.368134]  [<c010527c>] show_trace_log_lvl+0x1a/0x2f
> Oct 14 09:07:15 zmei kernel: [   49.368220]  [<c0105da0>] show_trace+0x12/0x14
> Oct 14 09:07:15 zmei kernel: [   49.368300]  [<c0105db8>] dump_stack+0x16/0x18
> Oct 14 09:07:15 zmei kernel: [   49.368379]  [<c019f2ee>] sysfs_add_one+0x57/0xbc
> Oct 14 09:07:15 zmei kernel: [   49.368461]  [<c019edeb>] sysfs_add_file+0x49/0x71
> Oct 14 09:07:15 zmei kernel: [   49.368541]  [<c01a05c2>] sysfs_create_group+0x86/0xe8
> Oct 14 09:07:15 zmei kernel: [   49.368621]  [<c024f5da>] usb_create_sysfs_intf_files+0x27/0x9b
> Oct 14 09:07:15 zmei kernel: [   49.368704]  [<c024c28b>] usb_set_configuration+0x454/0x466
> Oct 14 09:07:15 zmei kernel: [   49.368787]  [<c0252b97>] generic_probe+0x53/0x94
> Oct 14 09:07:15 zmei kernel: [   49.368867]  [<c024d4f7>] usb_probe_device+0x35/0x3b
> Oct 14 09:07:15 zmei kernel: [   49.368947]  [<c022a46c>] driver_probe_device+0xcb/0x14f
> Oct 14 09:07:15 zmei kernel: [   49.369039]  [<c022a4f8>] __device_attach+0x8/0xa
> Oct 14 09:07:15 zmei kernel: [   49.369119]  [<c02298d5>] bus_for_each_drv+0x3b/0x63
> Oct 14 09:07:15 zmei kernel: [   49.369199]  [<c022a589>] device_attach+0x70/0x85
> Oct 14 09:07:15 zmei kernel: [   49.369279]  [<c022984c>] bus_attach_device+0x29/0x77
> Oct 14 09:07:15 zmei kernel: [   49.369359]  [<c0228abc>] device_add+0x28c/0x445
> Oct 14 09:07:15 zmei kernel: [   49.369439]  [<c0247c7a>] usb_new_device+0x44/0x82
> Oct 14 09:07:15 zmei kernel: [   49.369519]  [<c02486ec>] hub_thread+0x666/0x9c2
> Oct 14 09:07:15 zmei kernel: [   49.369598]  [<c01370e9>] kthread+0x3b/0x62
> Oct 14 09:07:15 zmei kernel: [   49.369679]  [<c0104eaf>] kernel_thread_helper+0x7/0x10
> Oct 14 09:07:15 zmei kernel: [   49.369759]  =======================
>
> The usb hub in question is named 4-1:1.0 and it has an extension connected to it
> which is used to activate the 2 usb connectors at the side of the pc's monitor.
> Correct me if i'm wrong but from what i've understood so far from reading the code,
> i think, it adds the bInterfaceNumber-file after calling usb_create_sysfs_intf_files(intf).
> However, the currently active usbhost interface alternate setting is the only one active
> so the bInterfaceNumber exists already and therefore the warning, but this is
> just a guess since i'm not that fluent in the usb internals.
Hi,
I have encountered the same problem which was  reported in
http://lkml.org/lkml/2007/9/29/45

For the first one "usbcore duplicated sysfs filename" , I have submit
a patch to fix it.

For the "bInterfaceNumber" one, I have no idea, the same problem still
exist in the latest 23-mm1 tree.


>
> .config attached.
>
> --
> Regards/Gruß,
>     Boris.
>
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-15  5:57 ` Dave Young
@ 2007-10-15 18:38   ` Alan Stern
  2007-10-16  4:48     ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Alan Stern @ 2007-10-15 18:38 UTC (permalink / raw)
  To: Dave Young; +Cc: bbpetkov, Greg KH, linux-kernel, linux-usb-devel

On Mon, 15 Oct 2007, Dave Young wrote:

> On 10/14/07, Borislav Petkov <bbpetkov@yahoo.de> wrote:
> > Hi,
> >
> > i get the following warning on yesterday's git tree (v2.6.23-2840-g752097c):
> >
> > Oct 14 09:07:15 zmei kernel: [   49.368030] sysfs: duplicate filename 'bInterfaceNumber' can not be created
> > Oct 14 09:07:15 zmei kernel: [   49.368086] WARNING: at fs/sysfs/dir.c:425 sysfs_add_one()
> > Oct 14 09:07:15 zmei kernel: [   49.368134]  [<c010527c>] show_trace_log_lvl+0x1a/0x2f
> > Oct 14 09:07:15 zmei kernel: [   49.368220]  [<c0105da0>] show_trace+0x12/0x14
> > Oct 14 09:07:15 zmei kernel: [   49.368300]  [<c0105db8>] dump_stack+0x16/0x18
> > Oct 14 09:07:15 zmei kernel: [   49.368379]  [<c019f2ee>] sysfs_add_one+0x57/0xbc
> > Oct 14 09:07:15 zmei kernel: [   49.368461]  [<c019edeb>] sysfs_add_file+0x49/0x71
> > Oct 14 09:07:15 zmei kernel: [   49.368541]  [<c01a05c2>] sysfs_create_group+0x86/0xe8
> > Oct 14 09:07:15 zmei kernel: [   49.368621]  [<c024f5da>] usb_create_sysfs_intf_files+0x27/0x9b
> > Oct 14 09:07:15 zmei kernel: [   49.368704]  [<c024c28b>] usb_set_configuration+0x454/0x466
> > Oct 14 09:07:15 zmei kernel: [   49.368787]  [<c0252b97>] generic_probe+0x53/0x94
> > Oct 14 09:07:15 zmei kernel: [   49.368867]  [<c024d4f7>] usb_probe_device+0x35/0x3b
> > Oct 14 09:07:15 zmei kernel: [   49.368947]  [<c022a46c>] driver_probe_device+0xcb/0x14f
> > Oct 14 09:07:15 zmei kernel: [   49.369039]  [<c022a4f8>] __device_attach+0x8/0xa
> > Oct 14 09:07:15 zmei kernel: [   49.369119]  [<c02298d5>] bus_for_each_drv+0x3b/0x63
> > Oct 14 09:07:15 zmei kernel: [   49.369199]  [<c022a589>] device_attach+0x70/0x85
> > Oct 14 09:07:15 zmei kernel: [   49.369279]  [<c022984c>] bus_attach_device+0x29/0x77
> > Oct 14 09:07:15 zmei kernel: [   49.369359]  [<c0228abc>] device_add+0x28c/0x445
> > Oct 14 09:07:15 zmei kernel: [   49.369439]  [<c0247c7a>] usb_new_device+0x44/0x82
> > Oct 14 09:07:15 zmei kernel: [   49.369519]  [<c02486ec>] hub_thread+0x666/0x9c2
> > Oct 14 09:07:15 zmei kernel: [   49.369598]  [<c01370e9>] kthread+0x3b/0x62
> > Oct 14 09:07:15 zmei kernel: [   49.369679]  [<c0104eaf>] kernel_thread_helper+0x7/0x10
> > Oct 14 09:07:15 zmei kernel: [   49.369759]  =======================
> >
> > The usb hub in question is named 4-1:1.0 and it has an extension connected to it
> > which is used to activate the 2 usb connectors at the side of the pc's monitor.
> > Correct me if i'm wrong but from what i've understood so far from reading the code,
> > i think, it adds the bInterfaceNumber-file after calling usb_create_sysfs_intf_files(intf).
> > However, the currently active usbhost interface alternate setting is the only one active
> > so the bInterfaceNumber exists already and therefore the warning, but this is
> > just a guess since i'm not that fluent in the usb internals.
> Hi,
> I have encountered the same problem which was  reported in
> http://lkml.org/lkml/2007/9/29/45
> 
> For the first one "usbcore duplicated sysfs filename" , I have submit
> a patch to fix it.
> 
> For the "bInterfaceNumber" one, I have no idea, the same problem still
> exist in the latest 23-mm1 tree.

I have tried several times to duplicate this, most recently under 
2.6.23-mm1.  But nothing goes wrong; the error messages don't appear.

You may have to do your own debugging.  Try adding printk statements to
usb_create_sysfs_intf_files() and usb_remove_sysfs_intf_files() so you
can tell when they get called.

Alan Stern


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-15 18:38   ` [linux-usb-devel] " Alan Stern
@ 2007-10-16  4:48     ` Greg KH
  2007-10-16  5:22       ` Dave Young
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2007-10-16  4:48 UTC (permalink / raw)
  To: Alan Stern; +Cc: Dave Young, bbpetkov, linux-kernel, linux-usb-devel

On Mon, Oct 15, 2007 at 02:38:25PM -0400, Alan Stern wrote:
> On Mon, 15 Oct 2007, Dave Young wrote:
> 
> > On 10/14/07, Borislav Petkov <bbpetkov@yahoo.de> wrote:
> > > Hi,
> > >
> > > i get the following warning on yesterday's git tree (v2.6.23-2840-g752097c):
> > >
> > > Oct 14 09:07:15 zmei kernel: [   49.368030] sysfs: duplicate filename 'bInterfaceNumber' can not be created
> > > Oct 14 09:07:15 zmei kernel: [   49.368086] WARNING: at fs/sysfs/dir.c:425 sysfs_add_one()
> > > Oct 14 09:07:15 zmei kernel: [   49.368134]  [<c010527c>] show_trace_log_lvl+0x1a/0x2f
> > > Oct 14 09:07:15 zmei kernel: [   49.368220]  [<c0105da0>] show_trace+0x12/0x14
> > > Oct 14 09:07:15 zmei kernel: [   49.368300]  [<c0105db8>] dump_stack+0x16/0x18
> > > Oct 14 09:07:15 zmei kernel: [   49.368379]  [<c019f2ee>] sysfs_add_one+0x57/0xbc
> > > Oct 14 09:07:15 zmei kernel: [   49.368461]  [<c019edeb>] sysfs_add_file+0x49/0x71
> > > Oct 14 09:07:15 zmei kernel: [   49.368541]  [<c01a05c2>] sysfs_create_group+0x86/0xe8
> > > Oct 14 09:07:15 zmei kernel: [   49.368621]  [<c024f5da>] usb_create_sysfs_intf_files+0x27/0x9b
> > > Oct 14 09:07:15 zmei kernel: [   49.368704]  [<c024c28b>] usb_set_configuration+0x454/0x466
> > > Oct 14 09:07:15 zmei kernel: [   49.368787]  [<c0252b97>] generic_probe+0x53/0x94
> > > Oct 14 09:07:15 zmei kernel: [   49.368867]  [<c024d4f7>] usb_probe_device+0x35/0x3b
> > > Oct 14 09:07:15 zmei kernel: [   49.368947]  [<c022a46c>] driver_probe_device+0xcb/0x14f
> > > Oct 14 09:07:15 zmei kernel: [   49.369039]  [<c022a4f8>] __device_attach+0x8/0xa
> > > Oct 14 09:07:15 zmei kernel: [   49.369119]  [<c02298d5>] bus_for_each_drv+0x3b/0x63
> > > Oct 14 09:07:15 zmei kernel: [   49.369199]  [<c022a589>] device_attach+0x70/0x85
> > > Oct 14 09:07:15 zmei kernel: [   49.369279]  [<c022984c>] bus_attach_device+0x29/0x77
> > > Oct 14 09:07:15 zmei kernel: [   49.369359]  [<c0228abc>] device_add+0x28c/0x445
> > > Oct 14 09:07:15 zmei kernel: [   49.369439]  [<c0247c7a>] usb_new_device+0x44/0x82
> > > Oct 14 09:07:15 zmei kernel: [   49.369519]  [<c02486ec>] hub_thread+0x666/0x9c2
> > > Oct 14 09:07:15 zmei kernel: [   49.369598]  [<c01370e9>] kthread+0x3b/0x62
> > > Oct 14 09:07:15 zmei kernel: [   49.369679]  [<c0104eaf>] kernel_thread_helper+0x7/0x10
> > > Oct 14 09:07:15 zmei kernel: [   49.369759]  =======================
> > >
> > > The usb hub in question is named 4-1:1.0 and it has an extension connected to it
> > > which is used to activate the 2 usb connectors at the side of the pc's monitor.
> > > Correct me if i'm wrong but from what i've understood so far from reading the code,
> > > i think, it adds the bInterfaceNumber-file after calling usb_create_sysfs_intf_files(intf).
> > > However, the currently active usbhost interface alternate setting is the only one active
> > > so the bInterfaceNumber exists already and therefore the warning, but this is
> > > just a guess since i'm not that fluent in the usb internals.
> > Hi,
> > I have encountered the same problem which was  reported in
> > http://lkml.org/lkml/2007/9/29/45
> > 
> > For the first one "usbcore duplicated sysfs filename" , I have submit
> > a patch to fix it.
> > 
> > For the "bInterfaceNumber" one, I have no idea, the same problem still
> > exist in the latest 23-mm1 tree.
> 
> I have tried several times to duplicate this, most recently under 
> 2.6.23-mm1.  But nothing goes wrong; the error messages don't appear.
> 
> You may have to do your own debugging.  Try adding printk statements to
> usb_create_sysfs_intf_files() and usb_remove_sysfs_intf_files() so you
> can tell when they get called.

I finally duplicated this on one of my machines here at boot time, with
USB built into the kernel.  I'll work tomorrow on tracking this down
further...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-16  4:48     ` Greg KH
@ 2007-10-16  5:22       ` Dave Young
  2007-10-16 14:55         ` Alan Stern
  0 siblings, 1 reply; 20+ messages in thread
From: Dave Young @ 2007-10-16  5:22 UTC (permalink / raw)
  To: Greg KH; +Cc: Alan Stern, bbpetkov, linux-kernel, linux-usb-devel

>On 10/16/07, Greg KH <greg@kroah.com> wrote:
> On Mon, Oct 15, 2007 at 02:38:25PM -0400, Alan Stern wrote:
> > On Mon, 15 Oct 2007, Dave Young wrote:
> >
> > > On 10/14/07, Borislav Petkov <bbpetkov@yahoo.de> wrote:
> > > > Hi,
> > > >
> > > > i get the following warning on yesterday's git tree (v2.6.23-2840-g752097c):
> > > >
> > > > Oct 14 09:07:15 zmei kernel: [   49.368030] sysfs: duplicate filename 'bInterfaceNumber' can not be created
> > > > Oct 14 09:07:15 zmei kernel: [   49.368086] WARNING: at fs/sysfs/dir.c:425 sysfs_add_one()
> > > > Oct 14 09:07:15 zmei kernel: [   49.368134]  [<c010527c>] show_trace_log_lvl+0x1a/0x2f
> > > > Oct 14 09:07:15 zmei kernel: [   49.368220]  [<c0105da0>] show_trace+0x12/0x14
> > > > Oct 14 09:07:15 zmei kernel: [   49.368300]  [<c0105db8>] dump_stack+0x16/0x18
> > > > Oct 14 09:07:15 zmei kernel: [   49.368379]  [<c019f2ee>] sysfs_add_one+0x57/0xbc
> > > > Oct 14 09:07:15 zmei kernel: [   49.368461]  [<c019edeb>] sysfs_add_file+0x49/0x71
> > > > Oct 14 09:07:15 zmei kernel: [   49.368541]  [<c01a05c2>] sysfs_create_group+0x86/0xe8
> > > > Oct 14 09:07:15 zmei kernel: [   49.368621]  [<c024f5da>] usb_create_sysfs_intf_files+0x27/0x9b
> > > > Oct 14 09:07:15 zmei kernel: [   49.368704]  [<c024c28b>] usb_set_configuration+0x454/0x466
> > > > Oct 14 09:07:15 zmei kernel: [   49.368787]  [<c0252b97>] generic_probe+0x53/0x94
> > > > Oct 14 09:07:15 zmei kernel: [   49.368867]  [<c024d4f7>] usb_probe_device+0x35/0x3b
> > > > Oct 14 09:07:15 zmei kernel: [   49.368947]  [<c022a46c>] driver_probe_device+0xcb/0x14f
> > > > Oct 14 09:07:15 zmei kernel: [   49.369039]  [<c022a4f8>] __device_attach+0x8/0xa
> > > > Oct 14 09:07:15 zmei kernel: [   49.369119]  [<c02298d5>] bus_for_each_drv+0x3b/0x63
> > > > Oct 14 09:07:15 zmei kernel: [   49.369199]  [<c022a589>] device_attach+0x70/0x85
> > > > Oct 14 09:07:15 zmei kernel: [   49.369279]  [<c022984c>] bus_attach_device+0x29/0x77
> > > > Oct 14 09:07:15 zmei kernel: [   49.369359]  [<c0228abc>] device_add+0x28c/0x445
> > > > Oct 14 09:07:15 zmei kernel: [   49.369439]  [<c0247c7a>] usb_new_device+0x44/0x82
> > > > Oct 14 09:07:15 zmei kernel: [   49.369519]  [<c02486ec>] hub_thread+0x666/0x9c2
> > > > Oct 14 09:07:15 zmei kernel: [   49.369598]  [<c01370e9>] kthread+0x3b/0x62
> > > > Oct 14 09:07:15 zmei kernel: [   49.369679]  [<c0104eaf>] kernel_thread_helper+0x7/0x10
> > > > Oct 14 09:07:15 zmei kernel: [   49.369759]  =======================
> > > >
> > > > The usb hub in question is named 4-1:1.0 and it has an extension connected to it
> > > > which is used to activate the 2 usb connectors at the side of the pc's monitor.
> > > > Correct me if i'm wrong but from what i've understood so far from reading the code,
> > > > i think, it adds the bInterfaceNumber-file after calling usb_create_sysfs_intf_files(intf).
> > > > However, the currently active usbhost interface alternate setting is the only one active
> > > > so the bInterfaceNumber exists already and therefore the warning, but this is
> > > > just a guess since i'm not that fluent in the usb internals.
> > > Hi,
> > > I have encountered the same problem which was  reported in
> > > http://lkml.org/lkml/2007/9/29/45
> > >
> > > For the first one "usbcore duplicated sysfs filename" , I have submit
> > > a patch to fix it.
> > >
> > > For the "bInterfaceNumber" one, I have no idea, the same problem still
> > > exist in the latest 23-mm1 tree.
> >
> > I have tried several times to duplicate this, most recently under
> > 2.6.23-mm1.  But nothing goes wrong; the error messages don't appear.
> >
> > You may have to do your own debugging.  Try adding printk statements to
> > usb_create_sysfs_intf_files() and usb_remove_sysfs_intf_files() so you
> > can tell when they get called.
>
> I finally duplicated this on one of my machines here at boot time, with
> USB built into the kernel.  I'll work tomorrow on tracking this down
> further...
Hi,
I add some printk messages, dump_stack and some others, here is the
dmesg dump with debug info(lines begin with "hidave"):

Linux version 2.6.23-mm1 (dave@darkstar) (gcc version 3.4.6) #4 SMP
PREEMPT Tue Oct 16 11:14:10 CST 2007
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003fe88c00 (usable)
 BIOS-e820: 000000003fe88c00 - 000000003fe8ac00 (ACPI NVS)
 BIOS-e820: 000000003fe8ac00 - 000000003fe8cc00 (ACPI data)
 BIOS-e820: 000000003fe8cc00 - 0000000040000000 (reserved)
 BIOS-e820: 00000000f0000000 - 00000000f4000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fed00400 (reserved)
 BIOS-e820: 00000000fed20000 - 00000000feda0000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fef00000 (reserved)
 BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
126MB HIGHMEM available.
896MB LOWMEM available.
found SMP MP-table at 000fe710
Entering add_active_range(0, 0, 261768) 0 entries of 256 used
sizeof(struct page) = 32
Zone PFN ranges:
  DMA             0 ->     4096
  Normal       4096 ->   229376
  HighMem    229376 ->   261768
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->   261768
On node 0 totalpages: 261768
Node 0 memmap at 0xc1000000 size 8388608 first pfn 0xc1000000
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 1760 pages used for memmap
  Normal zone: 223520 pages, LIFO batch:31
  HighMem zone: 253 pages used for memmap
  HighMem zone: 32139 pages, LIFO batch:7
  Movable zone: 0 pages used for memmap
DMI 2.3 present.
ACPI: RSDP 000FEB00, 0024 (r2 DELL  )
ACPI: XSDT 000FD267, 005C (r1 DELL    DM051          7 ASL        61)
ACPI: FACP 000FD35F, 00F4 (r3 DELL    DM051          7 ASL        61)
ACPI: DSDT FFFC755F, 2D0E (r1   DELL    dt_ex     1000 INTL 20050309)
ACPI: FACS 3FE88C00, 0040
ACPI: SSDT FFFCA38E, 00AC (r1   DELL    st_ex     1000 INTL 20050309)
ACPI: APIC 000FD453, 0072 (r1 DELL    DM051          7 ASL        61)
ACPI: BOOT 000FD4C5, 0028 (r1 DELL    DM051          7 ASL        61)
ACPI: ASF! 000FD4ED, 0067 (r16 DELL    DM051          7 ASL        61)
ACPI: MCFG 000FD554, 003E (r1 DELL    DM051          7 ASL        61)
ACPI: HPET 000FD592, 0038 (r1 DELL    DM051          7 ASL        61)
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 15:4 APIC version 20
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 15:4 APIC version 20
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x05] disabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x07] disabled)
ACPI: LAPIC_NMI (acpi_id[0xff] high level lint[0x1])
ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ACPI: HPET id: 0x8086a201 base: 0xfed00000
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 50000000 (gap: 40000000:b0000000)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 259723
Kernel command line: BOOT_IMAGE=test ro root=805
mapped APIC to ffffb000 (fee00000)
mapped IOAPIC to ffffa000 (fec00000)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 2793.166 MHz processor.
Console: colour VGA+ 80x25
console [tty0] enabled
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1032480k/1047072k available (3129k kernel code, 13984k
reserved, 1108k data, 252k init, 129568k highmem)
virtual kernel memory layout:
    fixmap  : 0xfff4d000 - 0xfffff000   ( 712 kB)
    pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
    vmalloc : 0xf8800000 - 0xff7fe000   ( 111 MB)
    lowmem  : 0xc0000000 - 0xf8000000   ( 896 MB)
      .init : 0xc052a000 - 0xc0569000   ( 252 kB)
      .data : 0xc040e517 - 0xc0523560   (1108 kB)
      .text : 0xc0100000 - 0xc040e517   (3129 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
SLUB: Genslabs=11, HWalign=64, Order=0-1, MinObjects=4, CPUs=2, Nodes=1
hpet clockevent registered
Calibrating delay using timer specific routine.. 5592.00 BogoMIPS (lpj=9316807)
Security Framework initialized
Mount-cache hash table entries: 512
CPU: After generic identify, caps: bfebfbff 20100000 00000000 00000000
0000641d 00000000 00000001 00000000
monitor/mwait feature present.
using mwait in idle threads.
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU: After all inits, caps: bfebfbff 20100000 00000000 0000b180
0000641d 00000000 00000001 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (24) available
Compat vDSO mapped to ffffe000.
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
ACPI: Core revision 20070126
CPU0: Intel(R) Pentium(R) D CPU 2.80GHz stepping 07
SMP alternatives: switching to SMP code
Booting processor 1/1 eip 3000
Initializing CPU#1
Calibrating delay using timer specific routine.. 5588.88 BogoMIPS (lpj=9310208)
CPU: After generic identify, caps: bfebfbff 20100000 00000000 00000000
0000641d 00000000 00000001 00000000
monitor/mwait feature present.
CPU: Trace cache: 12K uops, L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 1
CPU: After all inits, caps: bfebfbff 20100000 00000000 0000b180
0000641d 00000000 00000001 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#1.
CPU1: Intel P4/Xeon Extended MCE MSRs (24) available
CPU1: Intel(R) Pentium(R) D CPU 2.80GHz stepping 07
Total of 2 processors activated (11180.88 BogoMIPS).
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
net_namespace: 64 bytes
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: PCI BIOS revision 2.10 entry at 0xfb93e, last bus=3
PCI: Using configuration type 1
Setting up standard PCI resources
ACPI: EC: Look up EC in DSDT
ACPI: System BIOS is requesting _OSI(Linux)
ACPI: If "acpi_osi=Linux" works better,
Please send dmidecode to linux-acpi@vger.kernel.org
ACPI: Interpreter enabled
ACPI: (supports S0 S1 S3 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: Found Intel Corporation 945G/GZ/P/PL Express Memory Controller
Hub without MMCONFIG support.
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI quirk: region 0800-087f claimed by ICH6 ACPI/GPIO/TCO
PCI quirk: region 0880-08bf claimed by ICH6 GPIO
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI4._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI2._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 12 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 9 10 11 12 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 11 12 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKE] (IRQs *3 4 5 6 7 9 10 11 12 15)
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 *10 11 12 15)
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 *9 10 11 12 15)
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 *4 5 6 7 9 10 11 12 15)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 8 devices
ACPI: ACPI bus type pnp unregistered
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
ACPI: RTC can wake from S4
Time: tsc clocksource has been installed.
Switched to high resolution mode on CPU 0
Switched to high resolution mode on CPU 1
system 00:01: ioport range 0x800-0x85f has been reserved
system 00:01: ioport range 0xc00-0xc7f has been reserved
system 00:01: ioport range 0x860-0x8ff could not be reserved
system 00:06: iomem range 0x0-0x9ffff could not be reserved
system 00:06: iomem range 0x100000-0xffffff could not be reserved
system 00:06: iomem range 0x1000000-0x3fe88bff could not be reserved
system 00:06: iomem range 0xf0000-0xfffff could not be reserved
system 00:07: ioport range 0x100-0x1fe could not be reserved
system 00:07: ioport range 0x200-0x277 has been reserved
system 00:07: ioport range 0x280-0x2e7 has been reserved
system 00:07: ioport range 0x2e8-0x2ef has been reserved
system 00:07: ioport range 0x2f0-0x2f7 has been reserved
system 00:07: ioport range 0x2f8-0x2ff has been reserved
system 00:07: ioport range 0x300-0x377 could not be reserved
system 00:07: ioport range 0x380-0x3bb has been reserved
system 00:07: iomem range 0xf0000000-0xf3ffffff could not be reserved
system 00:07: iomem range 0xfeda0000-0xfedacfff has been reserved
PCI: Bridge: 0000:00:01.0
  IO window: d000-dfff
  MEM window: efd00000-efefffff
  PREFETCH window: e0000000-e7ffffff
PCI: Bridge: 0000:00:1c.0
  IO window: disabled.
  MEM window: efc00000-efcfffff
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:1e.0
  IO window: c000-cfff
  MEM window: efb00000-efbfffff
  PREFETCH window: disabled.
ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:01.0 to 64
ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.0 to 64
PCI: Setting latency timer of device 0000:00:1e.0 to 64
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
Simple Boot Flag at 0x7a set to 0x1
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
apm: disabled - APM is not SMP safe.
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NTFS driver 2.1.28 [Flags: R/W].
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
pci 0000:00:1d.0: uhci_check_and_reset_hc: cmd = 0x0081
pci 0000:00:1d.0: Performing full reset
pci 0000:00:1d.1: uhci_check_and_reset_hc: cmd = 0x0081
pci 0000:00:1d.1: Performing full reset
pci 0000:00:1d.2: uhci_check_and_reset_hc: cmd = 0x0081
pci 0000:00:1d.2: Performing full reset
pci 0000:00:1d.3: uhci_check_and_reset_hc: cmd = 0x0081
pci 0000:00:1d.3: Performing full reset
Boot video device is 0000:01:00.0
PCI: Firmware left 0000:03:08.0 e100 interrupts enabled, disabling
PCI: Setting latency timer of device 0000:00:01.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:01.0:pcie00]
PCI: Setting latency timer of device 0000:00:1c.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.0:pcie00]
Allocate Port Service[0000:00:1c.0:pcie02]
Real Time Clock Driver v1.12ac
intel_rng: Firmware space is locked read-only. If you can't or
intel_rng: don't want to disable this in firmware setup, and if
intel_rng: you are certain that your system has a functional
intel_rng: RNG, try using the 'no_fwh_detect' option.
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
Floppy drive(s): fd0 is 1.44M
floppy0: no floppy controllers found
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
console [netcon0] enabled
netconsole: network logging started
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH7: IDE controller (0x8086:0x27df rev 0x01) at  PCI slot 0000:00:1f.1
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 16 (level, low) -> IRQ 16
ICH7: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio
ICH7: IDE port disabled
Probing IDE interface ide0...
hda: TSSTcorp CD-RW/DVD-ROM TS-H492C, ATAPI CD/DVD-ROM drive
hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hda: selected mode 0x42
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hda: ATAPI 48X DVD-ROM CD-R/RW drive, 1536kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
ata_piix 0000:00:1f.2: version 2.12
ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
ACPI: PCI Interrupt 0000:00:1f.2[C] -> GSI 20 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1f.2 to 64
scsi0 : ata_piix
scsi1 : ata_piix
ata1: SATA max UDMA/133 cmd 0xfe00 ctl 0xfe10 bmdma 0xfea0 irq 17
ata2: SATA max UDMA/133 cmd 0xfe20 ctl 0xfe30 bmdma 0xfea8 irq 17
ata1.00: ATA-7: SAMSUNG HD160JJ/P, ZM100-34, max UDMA7
ata1.00: 312500000 sectors, multi 8: LBA48 NCQ (depth 0/32)
ata1.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access     ATA      SAMSUNG HD160JJ/ ZM10 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 312500000 512-byte hardware sectors (160000 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
sd 0:0:0:0: [sda] 312500000 512-byte hardware sectors (160000 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
sd 0:0:0:0: [sda] Attached SCSI disk
ehci_hcd: block sizes: qh 128 qtd 96 itd 192 sitd 96
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 21 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
drivers/usb/core/inode.c: creating file 'devices'
drivers/usb/core/inode.c: creating file '001'
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: reset hcs_params 0x104208 dbg=1 cc=4 pcc=2
ordered !ppc ports=8
ehci_hcd 0000:00:1d.7: reset hcc_params 6871 thresh 7 uframes 1024 64 bit addr
ehci_hcd 0000:00:1d.7: reset command 000002 (park)=0 ithresh=0
period=1024 Reset HALT
ehci_hcd 0000:00:1d.7: debug port 1
PCI: cache line size of 128 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: supports USB remote wakeup
ehci_hcd 0000:00:1d.7: irq 18, io mem 0xffa80800
ehci_hcd 0000:00:1d.7: reset command 080002 (park)=0 ithresh=8
period=1024 Reset HALT
ehci_hcd 0000:00:1d.7: init command 010001 (park)=0 ithresh=1 period=1024 RUN
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: default language 0x0409
usb usb1: uevent
usb usb1: usb_probe_device
usb usb1: configuration #1 chosen from 1 choice
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: uevent
usb 1-0:1.0: uevent
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: no power switching (usb 1.0)
hub 1-0:1.0: individual port over-current protection
hub 1-0:1.0: Single TT
hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
hub 1-0:1.0: power on to power good time: 20ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: trying to enable port power on non-switchable hub
hub 1-0:1.0: state 7 ports 8 chg 0000 evt 0000
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 1-0:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033ee4f>] usb_get_device_descriptor+0x7f/0xa0
 [<c033c04f>] register_root_hub+0xcf/0x160
 [<c033d03c>] usb_add_hcd+0x16c/0x420
 [<c03480f3>] usb_hcd_pci_probe+0x233/0x3a0
 [<c01c5414>] sysfs_create_link+0xa4/0x170
 [<c025ca2a>] pci_call_probe+0xa/0x10
 [<c025ca7e>] __pci_device_probe+0x4e/0x60
 [<c025cab6>] pci_device_probe+0x26/0x60
 [<c02b8454>] really_probe+0xa4/0x160
 [<c025ca08>] pci_match_device+0xa8/0xc0
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b8690>] __driver_attach+0x80/0x90
 [<c02b74fa>] bus_for_each_dev+0x3a/0x60
 [<c02b86b6>] driver_attach+0x16/0x20
 [<c02b8610>] __driver_attach+0x0/0x90
 [<c02b7c5a>] bus_add_driver+0x7a/0x160
 [<c025ce0c>] __pci_register_driver+0x5c/0x90
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c0549a8d>] ehci_hcd_init+0x4d/0x60
 [<c052a856>] do_initcalls+0x46/0x1e0
 [<c01bdb12>] create_proc_entry+0x52/0x90
 [<c0158d4c>] register_irq_proc+0x9c/0xc0
 [<c01bda94>] proc_mkdir_mode+0x34/0x50
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052aa92>] kernel_init+0x62/0xb0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '001'
ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001803 POWER sig=j CSC CONNECT
hub 1-0:1.0: port 1, status 0501, change 0001, 480 Mb/s
usb usb1: new device found, idVendor=0000, idProduct=0000
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.23-mm1 ehci_hcd
usb usb1: SerialNumber: 0000:00:1d.7
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd: block sizes: ed 64 td 64
USB Universal Host Controller Interface driver v3.0
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 21 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1d.0 to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
drivers/usb/core/inode.c: creating file '002'
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.0: detected 2 ports
uhci_hcd 0000:00:1d.0: uhci_check_and_reset_hc: cmd = 0x0000
uhci_hcd 0000:00:1d.0: Performing full reset
uhci_hcd 0000:00:1d.0: irq 18, io base 0x0000ff80
usb usb2: default language 0x0409
usb usb2: uevent
usb usb2: usb_probe_device
usb usb2: configuration #1 chosen from 1 choice
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: uevent
usb 2-0:1.0: uevent
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
hub 2-0:1.0: standalone hub
hub 2-0:1.0: no power switching (usb 1.0)
hub 2-0:1.0: individual port over-current protection
hub 2-0:1.0: power on to power good time: 2ms
hub 2-0:1.0: local power source is good
hub 2-0:1.0: trying to enable port power on non-switchable hub
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 2-0:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033ee4f>] usb_get_device_descriptor+0x7f/0xa0
 [<c033c04f>] register_root_hub+0xcf/0x160
 [<c035d580>] uhci_start+0x1d0/0x330
 [<c033d03c>] usb_add_hcd+0x16c/0x420
 [<c03480f3>] usb_hcd_pci_probe+0x233/0x3a0
 [<c01c5414>] sysfs_create_link+0xa4/0x170
 [<c025ca2a>] pci_call_probe+0xa/0x10
 [<c025ca7e>] __pci_device_probe+0x4e/0x60
 [<c025cab6>] pci_device_probe+0x26/0x60
 [<c02b8454>] really_probe+0xa4/0x160
 [<c025ca08>] pci_match_device+0xa8/0xc0
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b8690>] __driver_attach+0x80/0x90
 [<c02b74fa>] bus_for_each_dev+0x3a/0x60
 [<c02b86b6>] driver_attach+0x16/0x20
 [<c02b8610>] __driver_attach+0x0/0x90
 [<c02b7c5a>] bus_add_driver+0x7a/0x160
 [<c025ce0c>] __pci_register_driver+0x5c/0x90
 [<c0549bba>] uhci_hcd_init+0xaa/0xe0
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052a856>] do_initcalls+0x46/0x1e0
 [<c01bdb12>] create_proc_entry+0x52/0x90
 [<c0158d4c>] register_irq_proc+0x9c/0xc0
 [<c01bda94>] proc_mkdir_mode+0x34/0x50
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052aa92>] kernel_init+0x62/0xb0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '001'
usb usb2: new device found, idVendor=0000, idProduct=0000
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.23-mm1 uhci_hcd
usb usb2: SerialNumber: 0000:00:1d.0
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 22 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1d.1 to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
drivers/usb/core/inode.c: creating file '003'
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.1: detected 2 ports
uhci_hcd 0000:00:1d.1: uhci_check_and_reset_hc: cmd = 0x0000
uhci_hcd 0000:00:1d.1: Performing full reset
uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000ff60
usb usb3: default language 0x0409
usb usb3: uevent
usb usb3: usb_probe_device
usb usb3: configuration #1 chosen from 1 choice
usb usb3: adding 3-0:1.0 (config #1, interface 0)
usb 3-0:1.0: uevent
usb 3-0:1.0: uevent
hub 3-0:1.0: usb_probe_interface
hub 3-0:1.0: usb_probe_interface - got id
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
hub 3-0:1.0: standalone hub
hub 3-0:1.0: no power switching (usb 1.0)
hub 3-0:1.0: individual port over-current protection
hub 3-0:1.0: power on to power good time: 2ms
hub 3-0:1.0: local power source is good
hub 3-0:1.0: trying to enable port power on non-switchable hub
hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x501
ehci_hcd 0000:00:1d.7: port 1 high speed
ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 3-0:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033ee4f>] usb_get_device_descriptor+0x7f/0xa0
 [<c033c04f>] register_root_hub+0xcf/0x160
 [<c035d580>] uhci_start+0x1d0/0x330
 [<c033d03c>] usb_add_hcd+0x16c/0x420
 [<c03480f3>] usb_hcd_pci_probe+0x233/0x3a0
 [<c01c5414>] sysfs_create_link+0xa4/0x170
 [<c025ca2a>] pci_call_probe+0xa/0x10
 [<c025ca7e>] __pci_device_probe+0x4e/0x60
 [<c025cab6>] pci_device_probe+0x26/0x60
 [<c02b8454>] really_probe+0xa4/0x160
 [<c025ca08>] pci_match_device+0xa8/0xc0
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b8690>] __driver_attach+0x80/0x90
 [<c02b74fa>] bus_for_each_dev+0x3a/0x60
 [<c02b86b6>] driver_attach+0x16/0x20
 [<c02b8610>] __driver_attach+0x0/0x90
 [<c02b7c5a>] bus_add_driver+0x7a/0x160
 [<c025ce0c>] __pci_register_driver+0x5c/0x90
 [<c0549bba>] uhci_hcd_init+0xaa/0xe0
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052a856>] do_initcalls+0x46/0x1e0
 [<c01bdb12>] create_proc_entry+0x52/0x90
 [<c0158d4c>] register_irq_proc+0x9c/0xc0
 [<c01bda94>] proc_mkdir_mode+0x34/0x50
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052aa92>] kernel_init+0x62/0xb0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '001'
usb usb3: new device found, idVendor=0000, idProduct=0000
usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.23-mm1 uhci_hcd
usb usb3: SerialNumber: 0000:00:1d.1
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.2 to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
drivers/usb/core/inode.c: creating file '004'
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.2: detected 2 ports
uhci_hcd 0000:00:1d.2: uhci_check_and_reset_hc: cmd = 0x0000
uhci_hcd 0000:00:1d.2: Performing full reset
uhci_hcd 0000:00:1d.2: irq 20, io base 0x0000ff40
usb usb4: default language 0x0409
usb usb4: uevent
usb usb4: usb_probe_device
usb usb4: configuration #1 chosen from 1 choice
usb usb4: adding 4-0:1.0 (config #1, interface 0)
usb 4-0:1.0: uevent
usb 4-0:1.0: uevent
hub 4-0:1.0: usb_probe_interface
hub 4-0:1.0: usb_probe_interface - got id
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
hub 4-0:1.0: standalone hub
hub 4-0:1.0: no power switching (usb 1.0)
hub 4-0:1.0: individual port over-current protection
hub 4-0:1.0: power on to power good time: 2ms
hub 4-0:1.0: local power source is good
hub 4-0:1.0: trying to enable port power on non-switchable hub
usb 1-1: new high speed USB device using ehci_hcd and address 2
ehci_hcd 0000:00:1d.7: port 1 high speed
ehci_hcd 0000:00:1d.7: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 4-0:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033ee4f>] usb_get_device_descriptor+0x7f/0xa0
 [<c033c04f>] register_root_hub+0xcf/0x160
 [<c035d580>] uhci_start+0x1d0/0x330
 [<c033d03c>] usb_add_hcd+0x16c/0x420
 [<c03480f3>] usb_hcd_pci_probe+0x233/0x3a0
 [<c01c5414>] sysfs_create_link+0xa4/0x170
 [<c025ca2a>] pci_call_probe+0xa/0x10
 [<c025ca7e>] __pci_device_probe+0x4e/0x60
 [<c025cab6>] pci_device_probe+0x26/0x60
 [<c02b8454>] really_probe+0xa4/0x160
 [<c025ca08>] pci_match_device+0xa8/0xc0
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b8690>] __driver_attach+0x80/0x90
 [<c02b74fa>] bus_for_each_dev+0x3a/0x60
 [<c02b86b6>] driver_attach+0x16/0x20
 [<c02b8610>] __driver_attach+0x0/0x90
 [<c02b7c5a>] bus_add_driver+0x7a/0x160
 [<c025ce0c>] __pci_register_driver+0x5c/0x90
 [<c0549bba>] uhci_hcd_init+0xaa/0xe0
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052a856>] do_initcalls+0x46/0x1e0
 [<c01bdb12>] create_proc_entry+0x52/0x90
 [<c0158d4c>] register_irq_proc+0x9c/0xc0
 [<c01bda94>] proc_mkdir_mode+0x34/0x50
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052aa92>] kernel_init+0x62/0xb0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '001'
usb usb4: new device found, idVendor=0000, idProduct=0000
usb usb4: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.23-mm1 uhci_hcd
usb usb4: SerialNumber: 0000:00:1d.2
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 23 (level, low) -> IRQ 21
PCI: Setting latency timer of device 0000:00:1d.3 to 64
uhci_hcd 0000:00:1d.3: UHCI Host Controller
drivers/usb/core/inode.c: creating file '005'
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:1d.3: detected 2 ports
uhci_hcd 0000:00:1d.3: uhci_check_and_reset_hc: cmd = 0x0000
uhci_hcd 0000:00:1d.3: Performing full reset
uhci_hcd 0000:00:1d.3: irq 21, io base 0x0000ff20
usb usb5: default language 0x0409
usb usb5: uevent
usb usb5: usb_probe_device
usb usb5: configuration #1 chosen from 1 choice
usb usb5: adding 5-0:1.0 (config #1, interface 0)
usb 5-0:1.0: uevent
usb 5-0:1.0: uevent
hub 5-0:1.0: usb_probe_interface
hub 5-0:1.0: usb_probe_interface - got id
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
hub 5-0:1.0: standalone hub
hub 5-0:1.0: no power switching (usb 1.0)
hub 5-0:1.0: individual port over-current protection
hub 5-0:1.0: power on to power good time: 2ms
hub 5-0:1.0: local power source is good
hub 5-0:1.0: trying to enable port power on non-switchable hub
usb 1-1: uevent
usb 1-1: usb_probe_device
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: uevent
usb 1-1:1.0: uevent
hub 1-1:1.0: usb_probe_interface
hub 1-1:1.0: usb_probe_interface - got id
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
hub 1-1:1.0: standalone hub
hub 1-1:1.0: individual port power switching
hub 1-1:1.0: individual port over-current protection
hidave: #################################
hidave: called from usb_set_interface
hidave: about to adding 1-1:1.0 (interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033f499>] usb_set_interface+0x1e9/0x250
 [<c0337e03>] hub_configure+0x8c3/0x9b0
 [<c033807e>] hub_probe+0xbe/0x190
 [<c024e85f>] kobject_get+0xf/0x20
 [<c0338106>] hub_probe+0x146/0x190
 [<c03402c4>] usb_probe_interface+0x114/0x1b0
 [<c02b8454>] really_probe+0xa4/0x160
 [<c0340749>] usb_match_id+0x19/0x50
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c033fcc5>] usb_set_configuration+0x425/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033a244>] hub_port_connect_change+0x224/0x490
 [<c033a783>] hub_events+0x2d3/0x620
 [<c033aaf1>] hub_thread+0x21/0x190
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c012586d>] complete+0x3d/0x60
 [<c033aad0>] hub_thread+0x0/0x190
 [<c013fef9>] kthread+0x59/0xa0
 [<c013fea0>] kthread+0x0/0xa0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
hub 1-1:1.0: TT per port
hub 1-1:1.0: TT requires at most 8 FS bit times (666 ns)
hub 1-1:1.0: power on to power good time: 100ms
hub 1-1:1.0: local power source is good
hub 1-1:1.0: enabling power on all ports
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 5-0:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033ee4f>] usb_get_device_descriptor+0x7f/0xa0
 [<c033c04f>] register_root_hub+0xcf/0x160
 [<c035d580>] uhci_start+0x1d0/0x330
 [<c033d03c>] usb_add_hcd+0x16c/0x420
 [<c03480f3>] usb_hcd_pci_probe+0x233/0x3a0
 [<c01c5414>] sysfs_create_link+0xa4/0x170
 [<c025ca2a>] pci_call_probe+0xa/0x10
 [<c025ca7e>] __pci_device_probe+0x4e/0x60
 [<c025cab6>] pci_device_probe+0x26/0x60
 [<c02b8454>] really_probe+0xa4/0x160
 [<c025ca08>] pci_match_device+0xa8/0xc0
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b8690>] __driver_attach+0x80/0x90
 [<c02b74fa>] bus_for_each_dev+0x3a/0x60
 [<c02b86b6>] driver_attach+0x16/0x20
 [<c02b8610>] __driver_attach+0x0/0x90
 [<c02b7c5a>] bus_add_driver+0x7a/0x160
 [<c025ce0c>] __pci_register_driver+0x5c/0x90
 [<c0549bba>] uhci_hcd_init+0xaa/0xe0
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052a856>] do_initcalls+0x46/0x1e0
 [<c01bdb12>] create_proc_entry+0x52/0x90
 [<c0158d4c>] register_irq_proc+0x9c/0xc0
 [<c01bda94>] proc_mkdir_mode+0x34/0x50
 [<c052aa30>] kernel_init+0x0/0xb0
 [<c052aa92>] kernel_init+0x62/0xb0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '001'
usb usb5: new device found, idVendor=0000, idProduct=0000
usb usb5: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb5: Product: UHCI Host Controller
usb usb5: Manufacturer: Linux 2.6.23-mm1 uhci_hcd
usb usb5: SerialNumber: 0000:00:1d.3
usb 1-1: link qh256-0001/c24d0100 start 255 [1/0 us]
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 1-1:1.0 (config #1, interface 0)
sysfs: duplicate filename 'bInterfaceNumber' can not be created
WARNING: at fs/sysfs/dir.c:416 sysfs_add_one()
 [<c01c4750>] sysfs_add_one+0xa0/0xe0
 [<c01c3d6e>] sysfs_add_file+0x4e/0xb0
 [<c01c5d31>] create_files+0x31/0x60
 [<c01c5d94>] sysfs_create_group+0x34/0xf0
 [<c040b3e6>] klist_node_init+0x46/0x60
 [<c040b373>] add_tail+0x13/0x40
 [<c0343fff>] usb_create_sysfs_intf_files+0x2f/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033a244>] hub_port_connect_change+0x224/0x490
 [<c033a783>] hub_events+0x2d3/0x620
 [<c033aaf1>] hub_thread+0x21/0x190
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c012586d>] complete+0x3d/0x60
 [<c033aad0>] hub_thread+0x0/0x190
 [<c013fef9>] kthread+0x59/0xa0
 [<c013fea0>] kthread+0x0/0xa0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033a244>] hub_port_connect_change+0x224/0x490
 [<c033a783>] hub_events+0x2d3/0x620
 [<c033aaf1>] hub_thread+0x21/0x190
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c012586d>] complete+0x3d/0x60
 [<c033aad0>] hub_thread+0x0/0x190
 [<c013fef9>] kthread+0x59/0xa0
 [<c013fea0>] kthread+0x0/0xa0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '002'
usb 1-1: new device found, idVendor=0424, idProduct=2504
usb 1-1: new device strings: Mfr=0, Product=0, SerialNumber=0
ehci_hcd 0000:00:1d.7: GetStatus port 5 status 001403 POWER sig=k CSC CONNECT
hub 1-0:1.0: port 5, status 0501, change 0001, 480 Mb/s
hub 1-0:1.0: debounce: port 5: total 100ms stable 100ms status 0x501
ehci_hcd 0000:00:1d.7: port 5 low speed --> companion
ehci_hcd 0000:00:1d.7: GetStatus port 5 status 003002 POWER OWNER sig=se0 CSC
ehci_hcd 0000:00:1d.7: GetStatus port 6 status 001403 POWER sig=k CSC CONNECT
hub 1-0:1.0: port 6, status 0501, change 0001, 480 Mb/s
hub 1-0:1.0: debounce: port 6: total 100ms stable 100ms status 0x501
ehci_hcd 0000:00:1d.7: port 6 low speed --> companion
ehci_hcd 0000:00:1d.7: GetStatus port 6 status 003002 POWER OWNER sig=se0 CSC
ehci_hcd 0000:00:1d.7: GetStatus port 7 status 001803 POWER sig=j CSC CONNECT
hub 1-0:1.0: port 7, status 0501, change 0001, 480 Mb/s
hub 1-0:1.0: debounce: port 7: total 100ms stable 100ms status 0x501
ehci_hcd 0000:00:1d.7: port 7 full speed --> companion
ehci_hcd 0000:00:1d.7: GetStatus port 7 status 003801 POWER OWNER sig=j CONNECT
hub 1-0:1.0: port 7 not reset yet, waiting 50ms
ehci_hcd 0000:00:1d.7: GetStatus port 7 status 003002 POWER OWNER sig=se0 CSC
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0002
uhci_hcd 0000:00:1d.0: port 1 portsc 0082,00
hub 2-0:1.0: port 1, status 0100, change 0001, 12 Mb/s
hub 2-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x100
hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0006
uhci_hcd 0000:00:1d.2: port 1 portsc 01ab,00
hub 4-0:1.0: port 1, status 0301, change 0003, 1.5 Mb/s
hub 4-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x301
usb usb3: suspend_rh (auto-stop)
usb 4-1: new low speed USB device using uhci_hcd and address 2
usb 4-1: skipped 1 descriptor after interface
usb 4-1: default language 0x0409
usb 4-1: uevent
usb 4-1: usb_probe_device
usb 4-1: configuration #1 chosen from 1 choice
usb 4-1: adding 4-1:1.0 (config #1, interface 0)
usb 4-1:1.0: uevent
usb 4-1:1.0: uevent
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 4-1:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033a244>] hub_port_connect_change+0x224/0x490
 [<c033a783>] hub_events+0x2d3/0x620
 [<c033aaf1>] hub_thread+0x21/0x190
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c012586d>] complete+0x3d/0x60
 [<c033aad0>] hub_thread+0x0/0x190
 [<c013fef9>] kthread+0x59/0xa0
 [<c013fea0>] kthread+0x0/0xa0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '002'
usb 4-1: new device found, idVendor=0461, idProduct=4d15
usb 4-1: new device strings: Mfr=0, Product=2, SerialNumber=0
usb 4-1: Product: USB Optical Mouse
uhci_hcd 0000:00:1d.2: port 2 portsc 01ab,00
hub 4-0:1.0: port 2, status 0301, change 0003, 1.5 Mb/s
hub 4-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x301
usb 4-2: new low speed USB device using uhci_hcd and address 3
usb 4-2: skipped 1 descriptor after interface
usb 4-2: default language 0x0409
usb 4-2: uevent
usb 4-2: usb_probe_device
usb 4-2: configuration #1 chosen from 1 choice
usb 4-2: adding 4-2:1.0 (config #1, interface 0)
usb 4-2:1.0: uevent
usb 4-2:1.0: uevent
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 4-2:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033a244>] hub_port_connect_change+0x224/0x490
 [<c033a783>] hub_events+0x2d3/0x620
 [<c033aaf1>] hub_thread+0x21/0x190
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c012586d>] complete+0x3d/0x60
 [<c033aad0>] hub_thread+0x0/0x190
 [<c013fef9>] kthread+0x59/0xa0
 [<c013fea0>] kthread+0x0/0xa0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '003'
usb 4-2: new device found, idVendor=413c, idProduct=2003
usb 4-2: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-2: Product: Dell USB Keyboard
usb 4-2: Manufacturer: Dell
hub 5-0:1.0: state 7 ports 2 chg 0000 evt 0002
uhci_hcd 0000:00:1d.3: port 1 portsc 009b,00
hub 5-0:1.0: port 1, status 0101, change 0003, 12 Mb/s
hub 5-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
usb usb2: suspend_rh (auto-stop)
usb 5-1: new full speed USB device using uhci_hcd and address 2
usb 5-1: default language 0x0409
usb 5-1: uevent
usb 5-1: usb_probe_device
usb 5-1: configuration #1 chosen from 1 choice
usb 5-1: adding 5-1:1.0 (config #1, interface 0)
usb 5-1:1.0: uevent
usb 5-1:1.0: uevent
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 5-1:1.0 (config #1, interface 0)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033a244>] hub_port_connect_change+0x224/0x490
 [<c033a783>] hub_events+0x2d3/0x620
 [<c033aaf1>] hub_thread+0x21/0x190
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c012586d>] complete+0x3d/0x60
 [<c033aad0>] hub_thread+0x0/0x190
 [<c013fef9>] kthread+0x59/0xa0
 [<c013fea0>] kthread+0x0/0xa0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
usb 5-1: adding 5-1:1.1 (config #1, interface 1)
usb 5-1:1.1: uevent
usb 5-1:1.1: uevent
hidave: #################################
hidave: called from usb_set_configuration
hidave: about to adding 5-1:1.1 (config #1, interface 1)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033fd12>] usb_set_configuration+0x472/0x580
 [<c0347d06>] generic_probe+0x76/0xb0
 [<c0340178>] usb_probe_device+0x78/0x90
 [<c02b8454>] really_probe+0xa4/0x160
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b75ea>] bus_for_each_drv+0x3a/0x60
 [<c02b85dc>] device_attach+0x4c/0x80
 [<c02b8580>] __device_attach+0x0/0x10
 [<c02b78b5>] bus_attach_device+0x75/0xb0
 [<c02b5d66>] device_add+0x136/0x350
 [<c0338700>] usb_new_device+0x50/0x160
 [<c033a244>] hub_port_connect_change+0x224/0x490
 [<c033a783>] hub_events+0x2d3/0x620
 [<c033aaf1>] hub_thread+0x21/0x190
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c01404f0>] autoremove_wake_function+0x0/0x50
 [<c012586d>] complete+0x3d/0x60
 [<c033aad0>] hub_thread+0x0/0x190
 [<c013fef9>] kthread+0x59/0xa0
 [<c013fea0>] kthread+0x0/0xa0
 [<c0104f83>] kernel_thread_helper+0x7/0x14
 =======================
drivers/usb/core/inode.c: creating file '002'
usb 5-1: new device found, idVendor=0c10, idProduct=0000
usb 5-1: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 5-1: Product: SiW
usb 5-1: Manufacturer: SiW
usb 5-1: SerialNumber: AD5A00000000
hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0000
hub 1-0:1.0: state 7 ports 8 chg 0000 evt fe80
hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0000
usbcore: registered new interface driver libusual
PNP: No PS/2 controller found. Probing ports directly.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
I2O subsystem v1.325
i2o: max drivers = 8
I2O Configuration OSM v1.323
I2O Bus Adapter OSM v1.317
I2O Block Device OSM v1.325
I2O SCSI Peripheral OSM v1.316
I2O ProcFS OSM v1.316
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver hiddev
usbhid 4-1:1.0: usb_probe_interface
usbhid 4-1:1.0: usb_probe_interface - got id
input: USB Optical Mouse as /class/input/input0
input: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:00:1d.2-1
usbhid 4-2:1.0: usb_probe_interface
usbhid 4-2:1.0: usb_probe_interface - got id
input: Dell Dell USB Keyboard as /class/input/input1
uhci_hcd 0000:00:1d.2: reserve dev 3 ep81-INT, period 16, phase 8, 118 us
input: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-0000:00:1d.2-2
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Starting balanced_irq
Using IPI No-Shortcut mode
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 252k freed
hub 2-0:1.0: hub_suspend
usb usb2: bus auto-suspend
usb usb2: suspend_rh
hub 3-0:1.0: hub_suspend
usb usb3: bus auto-suspend
usb usb3: suspend_rh
EXT3 FS on sda5, internal journal
hub 1-1:1.0: hub_suspend
usb 1-1: unlink qh256-0001/c24d0100 start 255 [1/0 us]
usb 1-1: usb auto-suspend
usb usb1: uevent
usb 1-0:1.0: uevent
usb 1-0:1.0: uevent
usb usb2: uevent
usb 2-0:1.0: uevent
usb 2-0:1.0: uevent
usb usb3: uevent
usb 3-0:1.0: uevent
usb 3-0:1.0: uevent
usb usb4: uevent
usb 4-0:1.0: uevent
usb 4-0:1.0: uevent
usb usb5: uevent
usb 5-0:1.0: uevent
usb 5-0:1.0: uevent
usb 1-1: uevent
usb 1-1:1.0: uevent
usb 1-1:1.0: uevent
usb 4-1: uevent
usb 4-1:1.0: uevent
usb 4-1:1.0: uevent
usb 4-2: uevent
usb 4-2:1.0: uevent
usb 4-2:1.0: uevent
usb 5-1: uevent
usb 5-1:1.0: uevent
usb 5-1:1.0: uevent
usb 5-1:1.1: uevent
usb 5-1:1.1: uevent
hub 1-0:1.0: hub_suspend
usb usb1: bus auto-suspend
ehci_hcd 0000:00:1d.7: suspend root hub
input: PC Speaker as /class/input/input2
Linux agpgart interface v0.102
ACPI: PCI Interrupt 0000:00:1f.3[B] -> GSI 17 (level, low) -> IRQ 22
ACPI Exception (processor_core-0813): AE_NOT_FOUND, Processor Device
is not present [20070126]
ACPI Exception (processor_core-0813): AE_NOT_FOUND, Processor Device
is not present [20070126]
agpgart: suspend/resume problematic: resume with 3D/DRI active may lockup X.Org
on some chipset/BIOS combos (see DEBUG_AGP_PM in intel-agp.c)
input: Power Button (FF) as /class/input/input3
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /class/input/input4
ACPI: Power Button (CM) [VBTN]
rtc_cmos: probe of 00:05 failed with error -16
ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1b.0 to 64
sd 0:0:0:0: Attached scsi generic sg0 type 0
Bluetooth: Core ver 2.11
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: HCI USB driver ver 2.9
hci_usb 5-1:1.0: usb_probe_interface
hci_usb 5-1:1.0: usb_probe_interface - got id
hidave: #################################
hidave: called from usb_set_interface
hidave: about to adding 5-1:1.1 (interface 1)
 [<c0344006>] usb_create_sysfs_intf_files+0x36/0xc0
 [<c033f499>] usb_set_interface+0x1e9/0x250
 [<f88a154a>] hci_usb_probe+0x55a/0x5d0 [hci_usb]
 [<c0193406>] ifind+0x46/0xa0
 [<c03402c4>] usb_probe_interface+0x114/0x1b0
 [<c02b8454>] really_probe+0xa4/0x160
 [<c0340749>] usb_match_id+0x19/0x50
 [<c02b8562>] driver_probe_device+0x42/0x60
 [<c02b8690>] __driver_attach+0x80/0x90
 [<c02b74fa>] bus_for_each_dev+0x3a/0x60
 [<c02b86b6>] driver_attach+0x16/0x20
 [<c02b8610>] __driver_attach+0x0/0x90
 [<c02b7c5a>] bus_add_driver+0x7a/0x160
 [<c0340adc>] usb_register_driver+0x7c/0xf0
 [<f882f02d>] hci_usb_init+0x2d/0x5c [hci_usb]
 [<c0152033>] sys_init_module+0xd3/0x160
 [<c01043ca>] syscall_call+0x7/0xb
 =======================
usbcore: registered new interface driver hci_usb
e100: Intel(R) PRO/100 Network Driver, 3.5.23-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
ACPI: PCI Interrupt 0000:03:08.0[A] -> GSI 20 (level, low) -> IRQ 17
e100: eth0: e100_probe: addr 0xefbff000, irq 17, MAC addr 00:13:72:e7:4d:66
usb 2-0:1.0: uevent
usb 2-0:1.0: uevent
usb 3-0:1.0: uevent
usb 3-0:1.0: uevent
usb 4-0:1.0: uevent
usb 4-0:1.0: uevent
usb 4-1:1.0: uevent
usb 4-1:1.0: uevent
usb 4-2:1.0: uevent
usb 4-2:1.0: uevent
usb 5-0:1.0: uevent
usb 5-0:1.0: uevent
usb 1-0:1.0: uevent
usb 1-0:1.0: uevent
usb 1-1:1.0: uevent
usb 1-1:1.0: uevent

>
> thanks,
>
> greg k-h
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-16  5:22       ` Dave Young
@ 2007-10-16 14:55         ` Alan Stern
  2007-10-16 16:33           ` Matthew Dharm
  0 siblings, 1 reply; 20+ messages in thread
From: Alan Stern @ 2007-10-16 14:55 UTC (permalink / raw)
  To: Greg KH, Dave Young
  Cc: bbpetkov, Kernel development list, USB development list

On Tue, 16 Oct 2007, Dave Young wrote:

> > I finally duplicated this on one of my machines here at boot time, with
> > USB built into the kernel.  I'll work tomorrow on tracking this down
> > further...
> Hi,
> I add some printk messages, dump_stack and some others, here is the
> dmesg dump with debug info(lines begin with "hidave"):

Okay, good, the extra printk messages show exactly where the problem 
lies.

In usb_set_configuration(), each new interfaces is registered and then
usb_create_sysfs_intf_files() gets called for that interface.  This
makes sense, because obviously we can't create sysfs files for an
interface before it is registered.

The problem is that during registration drivers get probed, and drivers 
sometimes call usb_set_interface() from their probe method.  This 
routine also calls usb_create_sysfs_intf_files(), and the result is 
that the sysfs files get created twice:

	First by usb_set_interface, from the driver probe;

	Then by usb_set_configuration, when registration is
	finished.

I can think of two possible ways around the problem.  One is to add a 
bit to the usb_interface structure, recording whether the sysfs files 
have been created.  The other is always to remove the files just before 
trying to create them.

The first seems more workable, although it is slightly awkward.  Greg, 
what do you think?

Alan Stern


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-16 14:55         ` Alan Stern
@ 2007-10-16 16:33           ` Matthew Dharm
  2007-10-16 18:04             ` Alan Stern
  0 siblings, 1 reply; 20+ messages in thread
From: Matthew Dharm @ 2007-10-16 16:33 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Dave Young, bbpetkov, Kernel development list,
	USB development list

[-- Attachment #1: Type: text/plain, Size: 2101 bytes --]

On Tue, Oct 16, 2007 at 10:55:54AM -0400, Alan Stern wrote:
> On Tue, 16 Oct 2007, Dave Young wrote:
> 
> > > I finally duplicated this on one of my machines here at boot time, with
> > > USB built into the kernel.  I'll work tomorrow on tracking this down
> > > further...
> > Hi,
> > I add some printk messages, dump_stack and some others, here is the
> > dmesg dump with debug info(lines begin with "hidave"):
> 
> Okay, good, the extra printk messages show exactly where the problem 
> lies.
> 
> In usb_set_configuration(), each new interfaces is registered and then
> usb_create_sysfs_intf_files() gets called for that interface.  This
> makes sense, because obviously we can't create sysfs files for an
> interface before it is registered.
> 
> The problem is that during registration drivers get probed, and drivers 
> sometimes call usb_set_interface() from their probe method.  This 
> routine also calls usb_create_sysfs_intf_files(), and the result is 
> that the sysfs files get created twice:
> 
> 	First by usb_set_interface, from the driver probe;
> 
> 	Then by usb_set_configuration, when registration is
> 	finished.
> 
> I can think of two possible ways around the problem.  One is to add a 
> bit to the usb_interface structure, recording whether the sysfs files 
> have been created.  The other is always to remove the files just before 
> trying to create them.

I haven't looked at this code at all, but neither approach feels right to
me.

How does this work at all?  Even if you load a driver later, wouldn't it
call usb_set_interface(), which would call usb_create_sysfs_intf_files()
and hit the same issue?

Heck, why do both call usb_create_sysfs_intf_file()?  I would guess if
you're *changing* the active configuration you would need to do that, but
why in usb_set_interface() at all?

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

I say, what are all those naked people doing?
					-- Big client to Stef
User Friendly, 12/14/1997

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-16 16:33           ` Matthew Dharm
@ 2007-10-16 18:04             ` Alan Stern
  2007-10-16 19:13               ` Matthew Dharm
  0 siblings, 1 reply; 20+ messages in thread
From: Alan Stern @ 2007-10-16 18:04 UTC (permalink / raw)
  To: Matthew Dharm
  Cc: Greg KH, Dave Young, bbpetkov, Kernel development list,
	USB development list

On Tue, 16 Oct 2007, Matthew Dharm wrote:

> I haven't looked at this code at all, but neither approach feels right to
> me.
> 
> How does this work at all?  Even if you load a driver later, wouldn't it
> call usb_set_interface(), which would call usb_create_sysfs_intf_files()
> and hit the same issue?

usb_set_interface() is smart enough to remove the old interface files
before creating new ones, since it expects them to exist already.  
Hence there's no problem in that scenario.

But usb_set_configuration doesn't expect there to be any pre-existing
interface files, because there isn't even an interface until the
registration is performed.

> Heck, why do both call usb_create_sysfs_intf_file()?  I would guess if
> you're *changing* the active configuration you would need to do that, but
> why in usb_set_interface() at all?

For a couple of reasons.  The "interface" attribute file contains the
iInterface string descriptor, and that file is present only if such a
descriptor exists.  Since different altsettings might not agree on
whether or not iInterface exists, the attribute has to be created anew
for each altsetting.  (Yes, we could let the file always be present and
just be blank if there is no descriptor.)

The most important reason has to do with the endpoint pseudo-devices.  
Different altsettings can have different endpoints, so those have to be
removed and re-created whenever the altsetting changes.

Alan Stern


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-16 18:04             ` Alan Stern
@ 2007-10-16 19:13               ` Matthew Dharm
  2007-10-17  1:31                 ` Dave Young
  2007-10-17 14:48                 ` Alan Stern
  0 siblings, 2 replies; 20+ messages in thread
From: Matthew Dharm @ 2007-10-16 19:13 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, Dave Young, bbpetkov, Kernel development list,
	USB development list

[-- Attachment #1: Type: text/plain, Size: 1716 bytes --]

On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> On Tue, 16 Oct 2007, Matthew Dharm wrote:
> 
> > I haven't looked at this code at all, but neither approach feels right to
> > me.
> > 
> > How does this work at all?  Even if you load a driver later, wouldn't it
> > call usb_set_interface(), which would call usb_create_sysfs_intf_files()
> > and hit the same issue?
> 
> usb_set_interface() is smart enough to remove the old interface files
> before creating new ones, since it expects them to exist already.  
> Hence there's no problem in that scenario.
> 
> But usb_set_configuration doesn't expect there to be any pre-existing
> interface files, because there isn't even an interface until the
> registration is performed.

And I'm guessing that you can't call usb_create_sysfs_intf_files() until
registration is performed, right?

> The most important reason has to do with the endpoint pseudo-devices.  
> Different altsettings can have different endpoints, so those have to be
> removed and re-created whenever the altsetting changes.

Right, altsettings.  I forgot about those.  I only ever think in terms of
multiple configurations.

*grumble*

If usb_set_interface() has to be smart enough to remove existing files
first already, then I guess it's reasonably symmetric to have
usb_set_configuration() have the same smarts.  Maybe they can share some
common code, even.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

C:  Why are you upgrading to NT?
AJ: It must be the sick, sadistic streak that runs through me.
					-- Chief and A.J.
User Friendly, 5/12/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-16 19:13               ` Matthew Dharm
@ 2007-10-17  1:31                 ` Dave Young
  2007-10-17 14:48                 ` Alan Stern
  1 sibling, 0 replies; 20+ messages in thread
From: Dave Young @ 2007-10-17  1:31 UTC (permalink / raw)
  To: Alan Stern, Greg KH, Dave Young, bbpetkov,
	Kernel development list, USB development list

>On 10/17/07, Matthew Dharm <mdharm-kernel@one-eyed-alien.net> wrote:
> On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> >
> > > I haven't looked at this code at all, but neither approach feels right to
> > > me.
> > >
> > > How does this work at all?  Even if you load a driver later, wouldn't it
> > > call usb_set_interface(), which would call usb_create_sysfs_intf_files()
> > > and hit the same issue?
> >
> > usb_set_interface() is smart enough to remove the old interface files
> > before creating new ones, since it expects them to exist already.
> > Hence there's no problem in that scenario.
> >
> > But usb_set_configuration doesn't expect there to be any pre-existing
> > interface files, because there isn't even an interface until the
> > registration is performed.
>
> And I'm guessing that you can't call usb_create_sysfs_intf_files() until
> registration is performed, right?
>
> > The most important reason has to do with the endpoint pseudo-devices.
> > Different altsettings can have different endpoints, so those have to be
> > removed and re-created whenever the altsetting changes.
>
> Right, altsettings.  I forgot about those.  I only ever think in terms of
> multiple configurations.
>
> *grumble*
>
> If usb_set_interface() has to be smart enough to remove existing files
> first already, then I guess it's reasonably symmetric to have
> usb_set_configuration() have the same smarts.  Maybe they can share some
> common code, even.
>
> Matt
>
> --
> Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net
> Maintainer, Linux USB Mass Storage Driver
>
> C:  Why are you upgrading to NT?
> AJ: It must be the sick, sadistic streak that runs through me.
>                                         -- Chief and A.J.
> User Friendly, 5/12/1998
>

Hi,
I prefer "remove then create".

But IMHO the sysfs or driver core layer should have such  functions to
set some bit for the sysfs files creating.

Regards
dave

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-16 19:13               ` Matthew Dharm
  2007-10-17  1:31                 ` Dave Young
@ 2007-10-17 14:48                 ` Alan Stern
  2007-10-18  1:52                   ` Dave Young
  2007-10-18 22:48                   ` Greg KH
  1 sibling, 2 replies; 20+ messages in thread
From: Alan Stern @ 2007-10-17 14:48 UTC (permalink / raw)
  To: Matthew Dharm
  Cc: Greg KH, Dave Young, bbpetkov, Kernel development list,
	USB development list

On Tue, 16 Oct 2007, Matthew Dharm wrote:

> On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > 
> > > I haven't looked at this code at all, but neither approach feels right to
> > > me.
> > > 
> > > How does this work at all?  Even if you load a driver later, wouldn't it
> > > call usb_set_interface(), which would call usb_create_sysfs_intf_files()
> > > and hit the same issue?
> > 
> > usb_set_interface() is smart enough to remove the old interface files
> > before creating new ones, since it expects them to exist already.  
> > Hence there's no problem in that scenario.
> > 
> > But usb_set_configuration doesn't expect there to be any pre-existing
> > interface files, because there isn't even an interface until the
> > registration is performed.
> 
> And I'm guessing that you can't call usb_create_sysfs_intf_files() until
> registration is performed, right?

Right.

> > The most important reason has to do with the endpoint pseudo-devices.  
> > Different altsettings can have different endpoints, so those have to be
> > removed and re-created whenever the altsetting changes.
> 
> Right, altsettings.  I forgot about those.  I only ever think in terms of
> multiple configurations.
> 
> *grumble*
> 
> If usb_set_interface() has to be smart enough to remove existing files
> first already, then I guess it's reasonably symmetric to have
> usb_set_configuration() have the same smarts.  Maybe they can share some
> common code, even.

It's not a big deal to remove the files first.  In fact, here's a patch 
to do it.  Dave, see if this doesn't fix your problem.  I don't like it 
much because it does an unnecessary remove/create cycle, but that's 
better than doing something wrong.

It's slightly odd that the sysfs core logs an error when you try to 
create the same file twice but it doesn't when you try to remove a 
non-existent file (or try to remove an existing file twice).  Oh 
well...

Alan Stern



Index: usb-2.6/drivers/usb/core/message.c
===================================================================
--- usb-2.6.orig/drivers/usb/core/message.c
+++ usb-2.6/drivers/usb/core/message.c
@@ -1643,7 +1643,13 @@ free_interfaces:
 				intf->dev.bus_id, ret);
 			continue;
 		}
-		usb_create_sysfs_intf_files (intf);
+
+		/* The driver's probe method can call usb_set_interface(),
+		 * which would mean the interface's sysfs files are already
+		 * created.  Just in case, we'll remove them first.
+		 */
+		usb_remove_sysfs_intf_files(intf);
+		usb_create_sysfs_intf_files(intf);
 	}
 
 	usb_autosuspend_device(dev);


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-17 14:48                 ` Alan Stern
@ 2007-10-18  1:52                   ` Dave Young
  2007-10-18 22:48                   ` Greg KH
  1 sibling, 0 replies; 20+ messages in thread
From: Dave Young @ 2007-10-18  1:52 UTC (permalink / raw)
  To: Alan Stern
  Cc: Matthew Dharm, Greg KH, bbpetkov, Kernel development list,
	USB development list

On 10/17/07, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Tue, 16 Oct 2007, Matthew Dharm wrote:
>
> > On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> > > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > >
> > > > I haven't looked at this code at all, but neither approach feels right to
> > > > me.
> > > >
> > > > How does this work at all?  Even if you load a driver later, wouldn't it
> > > > call usb_set_interface(), which would call usb_create_sysfs_intf_files()
> > > > and hit the same issue?
> > >
> > > usb_set_interface() is smart enough to remove the old interface files
> > > before creating new ones, since it expects them to exist already.
> > > Hence there's no problem in that scenario.
> > >
> > > But usb_set_configuration doesn't expect there to be any pre-existing
> > > interface files, because there isn't even an interface until the
> > > registration is performed.
> >
> > And I'm guessing that you can't call usb_create_sysfs_intf_files() until
> > registration is performed, right?
>
> Right.
>
> > > The most important reason has to do with the endpoint pseudo-devices.
> > > Different altsettings can have different endpoints, so those have to be
> > > removed and re-created whenever the altsetting changes.
> >
> > Right, altsettings.  I forgot about those.  I only ever think in terms of
> > multiple configurations.
> >
> > *grumble*
> >
> > If usb_set_interface() has to be smart enough to remove existing files
> > first already, then I guess it's reasonably symmetric to have
> > usb_set_configuration() have the same smarts.  Maybe they can share some
> > common code, even.
>
> It's not a big deal to remove the files first.  In fact, here's a patch
> to do it.  Dave, see if this doesn't fix your problem.  I don't like it
> much because it does an unnecessary remove/create cycle, but that's
> better than doing something wrong.

Although it's not the best fix, the problem is fixed, Thanks.

>
> It's slightly odd that the sysfs core logs an error when you try to
> create the same file twice but it doesn't when you try to remove a
> non-existent file (or try to remove an existing file twice).  Oh
> well...
>
> Alan Stern
>
>
>
> Index: usb-2.6/drivers/usb/core/message.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/core/message.c
> +++ usb-2.6/drivers/usb/core/message.c
> @@ -1643,7 +1643,13 @@ free_interfaces:
>                                 intf->dev.bus_id, ret);
>                         continue;
>                 }
> -               usb_create_sysfs_intf_files (intf);
> +
> +               /* The driver's probe method can call usb_set_interface(),
> +                * which would mean the interface's sysfs files are already
> +                * created.  Just in case, we'll remove them first.
> +                */
> +               usb_remove_sysfs_intf_files(intf);
> +               usb_create_sysfs_intf_files(intf);
>         }
>
>         usb_autosuspend_device(dev);
>
>

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-17 14:48                 ` Alan Stern
  2007-10-18  1:52                   ` Dave Young
@ 2007-10-18 22:48                   ` Greg KH
  1 sibling, 0 replies; 20+ messages in thread
From: Greg KH @ 2007-10-18 22:48 UTC (permalink / raw)
  To: Alan Stern
  Cc: Matthew Dharm, Dave Young, bbpetkov, Kernel development list,
	USB development list

On Wed, Oct 17, 2007 at 10:48:52AM -0400, Alan Stern wrote:
> On Tue, 16 Oct 2007, Matthew Dharm wrote:
> 
> > On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> > > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > > 
> > > > I haven't looked at this code at all, but neither approach feels right to
> > > > me.
> > > > 
> > > > How does this work at all?  Even if you load a driver later, wouldn't it
> > > > call usb_set_interface(), which would call usb_create_sysfs_intf_files()
> > > > and hit the same issue?
> > > 
> > > usb_set_interface() is smart enough to remove the old interface files
> > > before creating new ones, since it expects them to exist already.  
> > > Hence there's no problem in that scenario.
> > > 
> > > But usb_set_configuration doesn't expect there to be any pre-existing
> > > interface files, because there isn't even an interface until the
> > > registration is performed.
> > 
> > And I'm guessing that you can't call usb_create_sysfs_intf_files() until
> > registration is performed, right?
> 
> Right.
> 
> > > The most important reason has to do with the endpoint pseudo-devices.  
> > > Different altsettings can have different endpoints, so those have to be
> > > removed and re-created whenever the altsetting changes.
> > 
> > Right, altsettings.  I forgot about those.  I only ever think in terms of
> > multiple configurations.
> > 
> > *grumble*
> > 
> > If usb_set_interface() has to be smart enough to remove existing files
> > first already, then I guess it's reasonably symmetric to have
> > usb_set_configuration() have the same smarts.  Maybe they can share some
> > common code, even.
> 
> It's not a big deal to remove the files first.  In fact, here's a patch 
> to do it.  Dave, see if this doesn't fix your problem.  I don't like it 
> much because it does an unnecessary remove/create cycle, but that's 
> better than doing something wrong.
> 
> It's slightly odd that the sysfs core logs an error when you try to 
> create the same file twice but it doesn't when you try to remove a 
> non-existent file (or try to remove an existing file twice).  Oh 
> well...

I used to have the 'remove a non-existant file' warning, but that just
triggered _way_ too many responses :)


> Index: usb-2.6/drivers/usb/core/message.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/core/message.c
> +++ usb-2.6/drivers/usb/core/message.c
> @@ -1643,7 +1643,13 @@ free_interfaces:
>  				intf->dev.bus_id, ret);
>  			continue;
>  		}
> -		usb_create_sysfs_intf_files (intf);
> +
> +		/* The driver's probe method can call usb_set_interface(),
> +		 * which would mean the interface's sysfs files are already
> +		 * created.  Just in case, we'll remove them first.
> +		 */
> +		usb_remove_sysfs_intf_files(intf);
> +		usb_create_sysfs_intf_files(intf);
>  	}

If this fixes the problem, care to resend it with a signed-off-by:?

Yeah, it's not the nicest solution, but I can't think of any other one
either right now :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
@ 2007-10-25  9:06 Dave Young
  2007-10-25 18:11 ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Dave Young @ 2007-10-25  9:06 UTC (permalink / raw)
  To: Greg KH
  Cc: Alan Stern, Matthew Dharm, bbpetkov, Kernel development list,
	USB development list

On 10/19/07, Greg KH <greg@kroah.com> wrote:
>On Wed, Oct 17, 2007 at 10:48:52AM -0400, Alan Stern wrote:
>> On Tue, 16 Oct 2007, Matthew Dharm wrote:
>>
>> > On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
>> > > On Tue, 16 Oct 2007, Matthew Dharm wrote:
>> > >
>> > > > I haven't looked at this code at all, but neither approach feels
>> > > > right to
>> > > > me.
>> > > >
>> > > > How does this work at all?  Even if you load a driver later,
>> > > > wouldn't it
>> > > > call usb_set_interface(), which would call
>> > > > usb_create_sysfs_intf_files()
>> > > > and hit the same issue?
>> > >
>> > > usb_set_interface() is smart enough to remove the old interface
>> > > files
>> > > before creating new ones, since it expects them to exist already.
>> > > Hence there's no problem in that scenario.
>> > >
>> > > But usb_set_configuration doesn't expect there to be any
>> > > pre-existing
>> > > interface files, because there isn't even an interface until the
>> > > registration is performed.
>> >
>> > And I'm guessing that you can't call usb_create_sysfs_intf_files()
>> > until
>> > registration is performed, right?
>>
>> Right.
>>
>> > > The most important reason has to do with the endpoint
>> > > pseudo-devices.
>> > > Different altsettings can have different endpoints, so those have
>> > > to be
>> > > removed and re-created whenever the altsetting changes.
>> >
>> > Right, altsettings.  I forgot about those.  I only ever think in
>> > terms of
>> > multiple configurations.
>> >
>> > *grumble*
>> >
>> > If usb_set_interface() has to be smart enough to remove existing
>> > files
>> > first already, then I guess it's reasonably symmetric to have
>> > usb_set_configuration() have the same smarts.  Maybe they can share
>> > some
>> > common code, even.
>>
>> It's not a big deal to remove the files first.  In fact, here's a
>> patch
>> to do it.  Dave, see if this doesn't fix your problem.  I don't like
>> it
>> much because it does an unnecessary remove/create cycle, but that's
>> better than doing something wrong.
>>
>> It's slightly odd that the sysfs core logs an error when you try to
>> create the same file twice but it doesn't when you try to remove a
>> non-existent file (or try to remove an existing file twice).  Oh
>> well...
>
>I used to have the 'remove a non-existant file' warning, but that just
>triggered _way_ too many responses :)
>
>
>> Index: usb-2.6/drivers/usb/core/message.c
>> ===================================================================
>> --- usb-2.6.orig/drivers/usb/core/message.c
>> +++ usb-2.6/drivers/usb/core/message.c
>> @@ -1643,7 +1643,13 @@ free_interfaces:
>>                               intf->dev.bus_id, ret);
>>                       continue;
>>               }
>> -             usb_create_sysfs_intf_files (intf);
>> +
>> +             /* The driver's probe method can call
>> usb_set_interface(),
>> +              * which would mean the interface's sysfs files are
>> already
>> +              * created.  Just in case, we'll remove them first.
>> +              */
>> +             usb_remove_sysfs_intf_files(intf);
>> +             usb_create_sysfs_intf_files(intf);
>>       }
>
>If this fixes the problem, care to resend it with a signed-off-by:?
>
>Yeah, it's not the nicest solution, but I can't think of any other one
>either right now :(
Hi, greg

How about this patch (based on 2.6.24-rc1):

diff -upr linux/drivers/usb/core/message.c linux.new/drivers/usb/core/message.c
--- linux/drivers/usb/core/message.c	2007-10-25 16:41:32.000000000 +0800
+++ linux.new/drivers/usb/core/message.c	2007-10-25 16:39:38.000000000 +0800
@@ -1641,7 +1641,8 @@ free_interfaces:
 				intf->dev.bus_id, ret);
 			continue;
 		}
-		usb_create_sysfs_intf_files (intf);
+		if(!usb_sysfs_intf_exist(intf))
+			usb_create_sysfs_intf_files (intf);
 	}
 
 	usb_autosuspend_device(dev);
diff -upr linux/drivers/usb/core/sysfs.c linux.new/drivers/usb/core/sysfs.c
--- linux/drivers/usb/core/sysfs.c	2007-10-25 16:40:16.000000000 +0800
+++ linux.new/drivers/usb/core/sysfs.c	2007-10-25 16:39:32.000000000 +0800
@@ -728,6 +728,13 @@ static inline void usb_remove_intf_ep_fi
 		usb_remove_ep_files(&iface_desc->endpoint[i]);
 }
 
+int usb_sysfs_intf_exist(struct usb_interface *intf)
+{
+	struct device *dev = &intf->dev;
+	
+	return sysfs_dirent_exist(&dev->kobj, intf_attrs[0]->name);
+}
+
 int usb_create_sysfs_intf_files(struct usb_interface *intf)
 {
 	struct device *dev = &intf->dev;
diff -upr linux/drivers/usb/core/usb.h linux.new/drivers/usb/core/usb.h
--- linux/drivers/usb/core/usb.h	2007-10-25 16:41:02.000000000 +0800
+++ linux.new/drivers/usb/core/usb.h	2007-10-25 16:39:19.000000000 +0800
@@ -1,5 +1,6 @@
 /* Functions local to drivers/usb/core/ */
 
+extern int usb_sysfs_intf_exist(struct usb_interface *intf);
 extern int usb_create_sysfs_dev_files (struct usb_device *dev);
 extern void usb_remove_sysfs_dev_files (struct usb_device *dev);
 extern int usb_create_sysfs_intf_files (struct usb_interface *intf);
diff -upr linux/fs/sysfs/dir.c linux.new/fs/sysfs/dir.c
--- linux/fs/sysfs/dir.c	2007-10-25 16:40:43.000000000 +0800
+++ linux.new/fs/sysfs/dir.c	2007-10-25 16:39:00.000000000 +0800
@@ -583,6 +583,16 @@ struct sysfs_dirent *sysfs_find_dirent(s
 	return NULL;
 }
 
+int sysfs_dirent_exist(struct kobject *kobj, const unsigned char *name)
+{
+	struct sysfs_dirent *sd = kobj->sd;
+	
+	if (sysfs_find_dirent(sd, name))
+		return 1;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(sysfs_dirent_exist);
+
 /**
  *	sysfs_get_dirent - find and get sysfs_dirent with the given name
  *	@parent_sd: sysfs_dirent to search under
diff -upr linux/inclue/linux/sysfs.h linux.new/inclue/linux/sysfs.h
--- linux/inclue/linux/sysfs.h	2007-10-25 16:40:02.000000000 +0800
+++ linux.new/inclue/linux/sysfs.h	2007-10-25 16:38:40.000000000 +0800
@@ -112,6 +112,8 @@ void sysfs_remove_file_from_group(struct
 
 void sysfs_notify(struct kobject *kobj, char *dir, char *attr);
 
+int sysfs_dirent_exist(struct kobject *kobj, const unsigned char *name);
+
 extern int __must_check sysfs_init(void);
 
 #else /* CONFIG_SYSFS */
@@ -211,6 +213,11 @@ static inline void sysfs_notify(struct k
 {
 }
 
+static int sysfs_dirent_exist(struct kobject *kobj, const unsigned char *name)
+{
+	return 0;
+}
+
 static inline int __must_check sysfs_init(void)
 {
 	return 0;

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-25  9:06 Dave Young
@ 2007-10-25 18:11 ` Greg KH
  2007-10-26  2:01   ` Dave Young
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2007-10-25 18:11 UTC (permalink / raw)
  To: Dave Young
  Cc: Alan Stern, Matthew Dharm, bbpetkov, Kernel development list,
	USB development list

On Thu, Oct 25, 2007 at 05:06:59PM +0800, Dave Young wrote:
> On 10/19/07, Greg KH <greg@kroah.com> wrote:
> >On Wed, Oct 17, 2007 at 10:48:52AM -0400, Alan Stern wrote:
> >> On Tue, 16 Oct 2007, Matthew Dharm wrote:
> >>
> >> > On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> >> > > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> >> > >
> >> > > > I haven't looked at this code at all, but neither approach feels
> >> > > > right to
> >> > > > me.
> >> > > >
> >> > > > How does this work at all?  Even if you load a driver later,
> >> > > > wouldn't it
> >> > > > call usb_set_interface(), which would call
> >> > > > usb_create_sysfs_intf_files()
> >> > > > and hit the same issue?
> >> > >
> >> > > usb_set_interface() is smart enough to remove the old interface
> >> > > files
> >> > > before creating new ones, since it expects them to exist already.
> >> > > Hence there's no problem in that scenario.
> >> > >
> >> > > But usb_set_configuration doesn't expect there to be any
> >> > > pre-existing
> >> > > interface files, because there isn't even an interface until the
> >> > > registration is performed.
> >> >
> >> > And I'm guessing that you can't call usb_create_sysfs_intf_files()
> >> > until
> >> > registration is performed, right?
> >>
> >> Right.
> >>
> >> > > The most important reason has to do with the endpoint
> >> > > pseudo-devices.
> >> > > Different altsettings can have different endpoints, so those have
> >> > > to be
> >> > > removed and re-created whenever the altsetting changes.
> >> >
> >> > Right, altsettings.  I forgot about those.  I only ever think in
> >> > terms of
> >> > multiple configurations.
> >> >
> >> > *grumble*
> >> >
> >> > If usb_set_interface() has to be smart enough to remove existing
> >> > files
> >> > first already, then I guess it's reasonably symmetric to have
> >> > usb_set_configuration() have the same smarts.  Maybe they can share
> >> > some
> >> > common code, even.
> >>
> >> It's not a big deal to remove the files first.  In fact, here's a
> >> patch
> >> to do it.  Dave, see if this doesn't fix your problem.  I don't like
> >> it
> >> much because it does an unnecessary remove/create cycle, but that's
> >> better than doing something wrong.
> >>
> >> It's slightly odd that the sysfs core logs an error when you try to
> >> create the same file twice but it doesn't when you try to remove a
> >> non-existent file (or try to remove an existing file twice).  Oh
> >> well...
> >
> >I used to have the 'remove a non-existant file' warning, but that just
> >triggered _way_ too many responses :)
> >
> >
> >> Index: usb-2.6/drivers/usb/core/message.c
> >> ===================================================================
> >> --- usb-2.6.orig/drivers/usb/core/message.c
> >> +++ usb-2.6/drivers/usb/core/message.c
> >> @@ -1643,7 +1643,13 @@ free_interfaces:
> >>                               intf->dev.bus_id, ret);
> >>                       continue;
> >>               }
> >> -             usb_create_sysfs_intf_files (intf);
> >> +
> >> +             /* The driver's probe method can call
> >> usb_set_interface(),
> >> +              * which would mean the interface's sysfs files are
> >> already
> >> +              * created.  Just in case, we'll remove them first.
> >> +              */
> >> +             usb_remove_sysfs_intf_files(intf);
> >> +             usb_create_sysfs_intf_files(intf);
> >>       }
> >
> >If this fixes the problem, care to resend it with a signed-off-by:?
> >
> >Yeah, it's not the nicest solution, but I can't think of any other one
> >either right now :(
> Hi, greg
> 
> How about this patch (based on 2.6.24-rc1):
> 
> diff -upr linux/drivers/usb/core/message.c linux.new/drivers/usb/core/message.c
> --- linux/drivers/usb/core/message.c	2007-10-25 16:41:32.000000000 +0800
> +++ linux.new/drivers/usb/core/message.c	2007-10-25 16:39:38.000000000 +0800
> @@ -1641,7 +1641,8 @@ free_interfaces:
>  				intf->dev.bus_id, ret);
>  			continue;
>  		}
> -		usb_create_sysfs_intf_files (intf);
> +		if(!usb_sysfs_intf_exist(intf))
> +			usb_create_sysfs_intf_files (intf);
>  	}
>  
>  	usb_autosuspend_device(dev);
> diff -upr linux/drivers/usb/core/sysfs.c linux.new/drivers/usb/core/sysfs.c
> --- linux/drivers/usb/core/sysfs.c	2007-10-25 16:40:16.000000000 +0800
> +++ linux.new/drivers/usb/core/sysfs.c	2007-10-25 16:39:32.000000000 +0800
> @@ -728,6 +728,13 @@ static inline void usb_remove_intf_ep_fi
>  		usb_remove_ep_files(&iface_desc->endpoint[i]);
>  }
>  
> +int usb_sysfs_intf_exist(struct usb_interface *intf)
> +{
> +	struct device *dev = &intf->dev;
> +	
> +	return sysfs_dirent_exist(&dev->kobj, intf_attrs[0]->name);

The issue is that you can't just test for the first file.  If you look
at the logic in the usb_create_sysfs_intf_file() code, we do create
different files based on the current interface.  So this might not
always end up with the proper files in userspace, from what I can tell.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-25 18:11 ` Greg KH
@ 2007-10-26  2:01   ` Dave Young
  2007-10-26  2:42     ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Dave Young @ 2007-10-26  2:01 UTC (permalink / raw)
  To: Greg KH
  Cc: Alan Stern, Matthew Dharm, bbpetkov, Kernel development list,
	USB development list

On 10/26/07, Greg KH <greg@kroah.com> wrote:
> On Thu, Oct 25, 2007 at 05:06:59PM +0800, Dave Young wrote:
> > On 10/19/07, Greg KH <greg@kroah.com> wrote:
> > >On Wed, Oct 17, 2007 at 10:48:52AM -0400, Alan Stern wrote:
> > >> On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > >>
> > >> > On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> > >> > > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > >> > >
> > >> > > > I haven't looked at this code at all, but neither approach feels
> > >> > > > right to
> > >> > > > me.
> > >> > > >
> > >> > > > How does this work at all?  Even if you load a driver later,
> > >> > > > wouldn't it
> > >> > > > call usb_set_interface(), which would call
> > >> > > > usb_create_sysfs_intf_files()
> > >> > > > and hit the same issue?
> > >> > >
> > >> > > usb_set_interface() is smart enough to remove the old interface
> > >> > > files
> > >> > > before creating new ones, since it expects them to exist already.
> > >> > > Hence there's no problem in that scenario.
> > >> > >
> > >> > > But usb_set_configuration doesn't expect there to be any
> > >> > > pre-existing
> > >> > > interface files, because there isn't even an interface until the
> > >> > > registration is performed.
> > >> >
> > >> > And I'm guessing that you can't call usb_create_sysfs_intf_files()
> > >> > until
> > >> > registration is performed, right?
> > >>
> > >> Right.
> > >>
> > >> > > The most important reason has to do with the endpoint
> > >> > > pseudo-devices.
> > >> > > Different altsettings can have different endpoints, so those have
> > >> > > to be
> > >> > > removed and re-created whenever the altsetting changes.
> > >> >
> > >> > Right, altsettings.  I forgot about those.  I only ever think in
> > >> > terms of
> > >> > multiple configurations.
> > >> >
> > >> > *grumble*
> > >> >
> > >> > If usb_set_interface() has to be smart enough to remove existing
> > >> > files
> > >> > first already, then I guess it's reasonably symmetric to have
> > >> > usb_set_configuration() have the same smarts.  Maybe they can share
> > >> > some
> > >> > common code, even.
> > >>
> > >> It's not a big deal to remove the files first.  In fact, here's a
> > >> patch
> > >> to do it.  Dave, see if this doesn't fix your problem.  I don't like
> > >> it
> > >> much because it does an unnecessary remove/create cycle, but that's
> > >> better than doing something wrong.
> > >>
> > >> It's slightly odd that the sysfs core logs an error when you try to
> > >> create the same file twice but it doesn't when you try to remove a
> > >> non-existent file (or try to remove an existing file twice).  Oh
> > >> well...
> > >
> > >I used to have the 'remove a non-existant file' warning, but that just
> > >triggered _way_ too many responses :)
> > >
> > >
> > >> Index: usb-2.6/drivers/usb/core/message.c
> > >> ===================================================================
> > >> --- usb-2.6.orig/drivers/usb/core/message.c
> > >> +++ usb-2.6/drivers/usb/core/message.c
> > >> @@ -1643,7 +1643,13 @@ free_interfaces:
> > >>                               intf->dev.bus_id, ret);
> > >>                       continue;
> > >>               }
> > >> -             usb_create_sysfs_intf_files (intf);
> > >> +
> > >> +             /* The driver's probe method can call
> > >> usb_set_interface(),
> > >> +              * which would mean the interface's sysfs files are
> > >> already
> > >> +              * created.  Just in case, we'll remove them first.
> > >> +              */
> > >> +             usb_remove_sysfs_intf_files(intf);
> > >> +             usb_create_sysfs_intf_files(intf);
> > >>       }
> > >
> > >If this fixes the problem, care to resend it with a signed-off-by:?
> > >
> > >Yeah, it's not the nicest solution, but I can't think of any other one
> > >either right now :(
> > Hi, greg
> >
> > How about this patch (based on 2.6.24-rc1):
> >
> > diff -upr linux/drivers/usb/core/message.c linux.new/drivers/usb/core/message.c
> > --- linux/drivers/usb/core/message.c  2007-10-25 16:41:32.000000000 +0800
> > +++ linux.new/drivers/usb/core/message.c      2007-10-25 16:39:38.000000000 +0800
> > @@ -1641,7 +1641,8 @@ free_interfaces:
> >                               intf->dev.bus_id, ret);
> >                       continue;
> >               }
> > -             usb_create_sysfs_intf_files (intf);
> > +             if(!usb_sysfs_intf_exist(intf))
> > +                     usb_create_sysfs_intf_files (intf);
> >       }
> >
> >       usb_autosuspend_device(dev);
> > diff -upr linux/drivers/usb/core/sysfs.c linux.new/drivers/usb/core/sysfs.c
> > --- linux/drivers/usb/core/sysfs.c    2007-10-25 16:40:16.000000000 +0800
> > +++ linux.new/drivers/usb/core/sysfs.c        2007-10-25 16:39:32.000000000 +0800
> > @@ -728,6 +728,13 @@ static inline void usb_remove_intf_ep_fi
> >               usb_remove_ep_files(&iface_desc->endpoint[i]);
> >  }
> >
> > +int usb_sysfs_intf_exist(struct usb_interface *intf)
> > +{
> > +     struct device *dev = &intf->dev;
> > +
> > +     return sysfs_dirent_exist(&dev->kobj, intf_attrs[0]->name);
>
> The issue is that you can't just test for the first file.  If you look
> at the logic in the usb_create_sysfs_intf_file() code, we do create
> different files based on the current interface.  So this might not
> always end up with the proper files in userspace, from what I can tell.
>
Yes, I know this is not good, it just fixed the bug for me. It's hard
to test all files simply.

The duplicate file issue is still there,  what to do then?
Alan, could you send the "remove before create" patch with your signed-off?

Anyway the sysfs_dirent_exist is useful for extern use, How about add
and export this function? Greg, If you agree, I would send it as
another patch.


Regards
dave

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-26  2:01   ` Dave Young
@ 2007-10-26  2:42     ` Greg KH
  2007-10-26  3:11       ` Dave Young
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2007-10-26  2:42 UTC (permalink / raw)
  To: Dave Young
  Cc: Alan Stern, Matthew Dharm, bbpetkov, Kernel development list,
	USB development list

On Fri, Oct 26, 2007 at 10:01:49AM +0800, Dave Young wrote:
> On 10/26/07, Greg KH <greg@kroah.com> wrote:
> > On Thu, Oct 25, 2007 at 05:06:59PM +0800, Dave Young wrote:
> > > On 10/19/07, Greg KH <greg@kroah.com> wrote:
> > > >On Wed, Oct 17, 2007 at 10:48:52AM -0400, Alan Stern wrote:
> > > >> On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > > >>
> > > >> > On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> > > >> > > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > > >> > >
> > > >> > > > I haven't looked at this code at all, but neither approach feels
> > > >> > > > right to
> > > >> > > > me.
> > > >> > > >
> > > >> > > > How does this work at all?  Even if you load a driver later,
> > > >> > > > wouldn't it
> > > >> > > > call usb_set_interface(), which would call
> > > >> > > > usb_create_sysfs_intf_files()
> > > >> > > > and hit the same issue?
> > > >> > >
> > > >> > > usb_set_interface() is smart enough to remove the old interface
> > > >> > > files
> > > >> > > before creating new ones, since it expects them to exist already.
> > > >> > > Hence there's no problem in that scenario.
> > > >> > >
> > > >> > > But usb_set_configuration doesn't expect there to be any
> > > >> > > pre-existing
> > > >> > > interface files, because there isn't even an interface until the
> > > >> > > registration is performed.
> > > >> >
> > > >> > And I'm guessing that you can't call usb_create_sysfs_intf_files()
> > > >> > until
> > > >> > registration is performed, right?
> > > >>
> > > >> Right.
> > > >>
> > > >> > > The most important reason has to do with the endpoint
> > > >> > > pseudo-devices.
> > > >> > > Different altsettings can have different endpoints, so those have
> > > >> > > to be
> > > >> > > removed and re-created whenever the altsetting changes.
> > > >> >
> > > >> > Right, altsettings.  I forgot about those.  I only ever think in
> > > >> > terms of
> > > >> > multiple configurations.
> > > >> >
> > > >> > *grumble*
> > > >> >
> > > >> > If usb_set_interface() has to be smart enough to remove existing
> > > >> > files
> > > >> > first already, then I guess it's reasonably symmetric to have
> > > >> > usb_set_configuration() have the same smarts.  Maybe they can share
> > > >> > some
> > > >> > common code, even.
> > > >>
> > > >> It's not a big deal to remove the files first.  In fact, here's a
> > > >> patch
> > > >> to do it.  Dave, see if this doesn't fix your problem.  I don't like
> > > >> it
> > > >> much because it does an unnecessary remove/create cycle, but that's
> > > >> better than doing something wrong.
> > > >>
> > > >> It's slightly odd that the sysfs core logs an error when you try to
> > > >> create the same file twice but it doesn't when you try to remove a
> > > >> non-existent file (or try to remove an existing file twice).  Oh
> > > >> well...
> > > >
> > > >I used to have the 'remove a non-existant file' warning, but that just
> > > >triggered _way_ too many responses :)
> > > >
> > > >
> > > >> Index: usb-2.6/drivers/usb/core/message.c
> > > >> ===================================================================
> > > >> --- usb-2.6.orig/drivers/usb/core/message.c
> > > >> +++ usb-2.6/drivers/usb/core/message.c
> > > >> @@ -1643,7 +1643,13 @@ free_interfaces:
> > > >>                               intf->dev.bus_id, ret);
> > > >>                       continue;
> > > >>               }
> > > >> -             usb_create_sysfs_intf_files (intf);
> > > >> +
> > > >> +             /* The driver's probe method can call
> > > >> usb_set_interface(),
> > > >> +              * which would mean the interface's sysfs files are
> > > >> already
> > > >> +              * created.  Just in case, we'll remove them first.
> > > >> +              */
> > > >> +             usb_remove_sysfs_intf_files(intf);
> > > >> +             usb_create_sysfs_intf_files(intf);
> > > >>       }
> > > >
> > > >If this fixes the problem, care to resend it with a signed-off-by:?
> > > >
> > > >Yeah, it's not the nicest solution, but I can't think of any other one
> > > >either right now :(
> > > Hi, greg
> > >
> > > How about this patch (based on 2.6.24-rc1):
> > >
> > > diff -upr linux/drivers/usb/core/message.c linux.new/drivers/usb/core/message.c
> > > --- linux/drivers/usb/core/message.c  2007-10-25 16:41:32.000000000 +0800
> > > +++ linux.new/drivers/usb/core/message.c      2007-10-25 16:39:38.000000000 +0800
> > > @@ -1641,7 +1641,8 @@ free_interfaces:
> > >                               intf->dev.bus_id, ret);
> > >                       continue;
> > >               }
> > > -             usb_create_sysfs_intf_files (intf);
> > > +             if(!usb_sysfs_intf_exist(intf))
> > > +                     usb_create_sysfs_intf_files (intf);
> > >       }
> > >
> > >       usb_autosuspend_device(dev);
> > > diff -upr linux/drivers/usb/core/sysfs.c linux.new/drivers/usb/core/sysfs.c
> > > --- linux/drivers/usb/core/sysfs.c    2007-10-25 16:40:16.000000000 +0800
> > > +++ linux.new/drivers/usb/core/sysfs.c        2007-10-25 16:39:32.000000000 +0800
> > > @@ -728,6 +728,13 @@ static inline void usb_remove_intf_ep_fi
> > >               usb_remove_ep_files(&iface_desc->endpoint[i]);
> > >  }
> > >
> > > +int usb_sysfs_intf_exist(struct usb_interface *intf)
> > > +{
> > > +     struct device *dev = &intf->dev;
> > > +
> > > +     return sysfs_dirent_exist(&dev->kobj, intf_attrs[0]->name);
> >
> > The issue is that you can't just test for the first file.  If you look
> > at the logic in the usb_create_sysfs_intf_file() code, we do create
> > different files based on the current interface.  So this might not
> > always end up with the proper files in userspace, from what I can tell.
> >
> Yes, I know this is not good, it just fixed the bug for me. It's hard
> to test all files simply.
> 
> The duplicate file issue is still there,  what to do then?
> Alan, could you send the "remove before create" patch with your signed-off?

I sent that patch to Linus a few hours ago :)

> Anyway the sysfs_dirent_exist is useful for extern use, How about add
> and export this function? Greg, If you agree, I would send it as
> another patch.

What would need that function?  And what ensures that if you check that
the file exists, it doesn't go away right after that?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-26  2:42     ` Greg KH
@ 2007-10-26  3:11       ` Dave Young
  2007-10-26  3:28         ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Dave Young @ 2007-10-26  3:11 UTC (permalink / raw)
  To: Greg KH
  Cc: Alan Stern, Matthew Dharm, bbpetkov, Kernel development list,
	USB development list

On 10/26/07, Greg KH <greg@kroah.com> wrote:
> On Fri, Oct 26, 2007 at 10:01:49AM +0800, Dave Young wrote:
> > On 10/26/07, Greg KH <greg@kroah.com> wrote:
> > > On Thu, Oct 25, 2007 at 05:06:59PM +0800, Dave Young wrote:
> > > > On 10/19/07, Greg KH <greg@kroah.com> wrote:
> > > > >On Wed, Oct 17, 2007 at 10:48:52AM -0400, Alan Stern wrote:
> > > > >> On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > > > >>
> > > > >> > On Tue, Oct 16, 2007 at 02:04:43PM -0400, Alan Stern wrote:
> > > > >> > > On Tue, 16 Oct 2007, Matthew Dharm wrote:
> > > > >> > >
> > > > >> > > > I haven't looked at this code at all, but neither approach feels
> > > > >> > > > right to
> > > > >> > > > me.
> > > > >> > > >
> > > > >> > > > How does this work at all?  Even if you load a driver later,
> > > > >> > > > wouldn't it
> > > > >> > > > call usb_set_interface(), which would call
> > > > >> > > > usb_create_sysfs_intf_files()
> > > > >> > > > and hit the same issue?
> > > > >> > >
> > > > >> > > usb_set_interface() is smart enough to remove the old interface
> > > > >> > > files
> > > > >> > > before creating new ones, since it expects them to exist already.
> > > > >> > > Hence there's no problem in that scenario.
> > > > >> > >
> > > > >> > > But usb_set_configuration doesn't expect there to be any
> > > > >> > > pre-existing
> > > > >> > > interface files, because there isn't even an interface until the
> > > > >> > > registration is performed.
> > > > >> >
> > > > >> > And I'm guessing that you can't call usb_create_sysfs_intf_files()
> > > > >> > until
> > > > >> > registration is performed, right?
> > > > >>
> > > > >> Right.
> > > > >>
> > > > >> > > The most important reason has to do with the endpoint
> > > > >> > > pseudo-devices.
> > > > >> > > Different altsettings can have different endpoints, so those have
> > > > >> > > to be
> > > > >> > > removed and re-created whenever the altsetting changes.
> > > > >> >
> > > > >> > Right, altsettings.  I forgot about those.  I only ever think in
> > > > >> > terms of
> > > > >> > multiple configurations.
> > > > >> >
> > > > >> > *grumble*
> > > > >> >
> > > > >> > If usb_set_interface() has to be smart enough to remove existing
> > > > >> > files
> > > > >> > first already, then I guess it's reasonably symmetric to have
> > > > >> > usb_set_configuration() have the same smarts.  Maybe they can share
> > > > >> > some
> > > > >> > common code, even.
> > > > >>
> > > > >> It's not a big deal to remove the files first.  In fact, here's a
> > > > >> patch
> > > > >> to do it.  Dave, see if this doesn't fix your problem.  I don't like
> > > > >> it
> > > > >> much because it does an unnecessary remove/create cycle, but that's
> > > > >> better than doing something wrong.
> > > > >>
> > > > >> It's slightly odd that the sysfs core logs an error when you try to
> > > > >> create the same file twice but it doesn't when you try to remove a
> > > > >> non-existent file (or try to remove an existing file twice).  Oh
> > > > >> well...
> > > > >
> > > > >I used to have the 'remove a non-existant file' warning, but that just
> > > > >triggered _way_ too many responses :)
> > > > >
> > > > >
> > > > >> Index: usb-2.6/drivers/usb/core/message.c
> > > > >> ===================================================================
> > > > >> --- usb-2.6.orig/drivers/usb/core/message.c
> > > > >> +++ usb-2.6/drivers/usb/core/message.c
> > > > >> @@ -1643,7 +1643,13 @@ free_interfaces:
> > > > >>                               intf->dev.bus_id, ret);
> > > > >>                       continue;
> > > > >>               }
> > > > >> -             usb_create_sysfs_intf_files (intf);
> > > > >> +
> > > > >> +             /* The driver's probe method can call
> > > > >> usb_set_interface(),
> > > > >> +              * which would mean the interface's sysfs files are
> > > > >> already
> > > > >> +              * created.  Just in case, we'll remove them first.
> > > > >> +              */
> > > > >> +             usb_remove_sysfs_intf_files(intf);
> > > > >> +             usb_create_sysfs_intf_files(intf);
> > > > >>       }
> > > > >
> > > > >If this fixes the problem, care to resend it with a signed-off-by:?
> > > > >
> > > > >Yeah, it's not the nicest solution, but I can't think of any other one
> > > > >either right now :(
> > > > Hi, greg
> > > >
> > > > How about this patch (based on 2.6.24-rc1):
> > > >
> > > > diff -upr linux/drivers/usb/core/message.c linux.new/drivers/usb/core/message.c
> > > > --- linux/drivers/usb/core/message.c  2007-10-25 16:41:32.000000000 +0800
> > > > +++ linux.new/drivers/usb/core/message.c      2007-10-25 16:39:38.000000000 +0800
> > > > @@ -1641,7 +1641,8 @@ free_interfaces:
> > > >                               intf->dev.bus_id, ret);
> > > >                       continue;
> > > >               }
> > > > -             usb_create_sysfs_intf_files (intf);
> > > > +             if(!usb_sysfs_intf_exist(intf))
> > > > +                     usb_create_sysfs_intf_files (intf);
> > > >       }
> > > >
> > > >       usb_autosuspend_device(dev);
> > > > diff -upr linux/drivers/usb/core/sysfs.c linux.new/drivers/usb/core/sysfs.c
> > > > --- linux/drivers/usb/core/sysfs.c    2007-10-25 16:40:16.000000000 +0800
> > > > +++ linux.new/drivers/usb/core/sysfs.c        2007-10-25 16:39:32.000000000 +0800
> > > > @@ -728,6 +728,13 @@ static inline void usb_remove_intf_ep_fi
> > > >               usb_remove_ep_files(&iface_desc->endpoint[i]);
> > > >  }
> > > >
> > > > +int usb_sysfs_intf_exist(struct usb_interface *intf)
> > > > +{
> > > > +     struct device *dev = &intf->dev;
> > > > +
> > > > +     return sysfs_dirent_exist(&dev->kobj, intf_attrs[0]->name);
> > >
> > > The issue is that you can't just test for the first file.  If you look
> > > at the logic in the usb_create_sysfs_intf_file() code, we do create
> > > different files based on the current interface.  So this might not
> > > always end up with the proper files in userspace, from what I can tell.
> > >
> > Yes, I know this is not good, it just fixed the bug for me. It's hard
> > to test all files simply.
> >
> > The duplicate file issue is still there,  what to do then?
> > Alan, could you send the "remove before create" patch with your signed-off?
>
> I sent that patch to Linus a few hours ago :)
>
> > Anyway the sysfs_dirent_exist is useful for extern use, How about add
> > and export this function? Greg, If you agree, I would send it as
> > another patch.
>
> What would need that function?
I think the function is needed sometimes except for files related to
devices like usb and others that could be removed suddenly.

> And what ensures that if you check that
> the file exists, it doesn't go away right after that?
Yes for usb devices, this test is useless.

Regards
dave

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-26  3:11       ` Dave Young
@ 2007-10-26  3:28         ` Greg KH
  2007-10-26  4:43           ` Dave Young
  0 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2007-10-26  3:28 UTC (permalink / raw)
  To: Dave Young
  Cc: Alan Stern, Matthew Dharm, bbpetkov, Kernel development list,
	USB development list

On Fri, Oct 26, 2007 at 11:11:22AM +0800, Dave Young wrote:
> On 10/26/07, Greg KH <greg@kroah.com> wrote:
> > > Anyway the sysfs_dirent_exist is useful for extern use, How about add
> > > and export this function? Greg, If you agree, I would send it as
> > > another patch.
> >
> > What would need that function?
> I think the function is needed sometimes except for files related to
> devices like usb and others that could be removed suddenly.

Almost all types of devices can now be removed "suddenly" from a system.
Hm, I almost don't know of a type that can _not_ be removed anymore...

But if you have a patch that needs this function, I'd be glad to
reconsider.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [linux-usb-devel] usb+sysfs: duplicate filename 'bInterfaceNumber'
  2007-10-26  3:28         ` Greg KH
@ 2007-10-26  4:43           ` Dave Young
  0 siblings, 0 replies; 20+ messages in thread
From: Dave Young @ 2007-10-26  4:43 UTC (permalink / raw)
  To: Greg KH
  Cc: Alan Stern, Matthew Dharm, bbpetkov, Kernel development list,
	USB development list

On 10/26/07, Greg KH <greg@kroah.com> wrote:
> On Fri, Oct 26, 2007 at 11:11:22AM +0800, Dave Young wrote:
> > On 10/26/07, Greg KH <greg@kroah.com> wrote:
> > > > Anyway the sysfs_dirent_exist is useful for extern use, How about add
> > > > and export this function? Greg, If you agree, I would send it as
> > > > another patch.
> > >
> > > What would need that function?
> > I think the function is needed sometimes except for files related to
> > devices like usb and others that could be removed suddenly.
>
> Almost all types of devices can now be removed "suddenly" from a system.
> Hm, I almost don't know of a type that can _not_ be removed anymore...
>
> But if you have a patch that needs this function, I'd be glad to
> reconsider.
Not yet,  anyway thank you very much :)

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-10-26  4:43 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-14 15:15 usb+sysfs: duplicate filename 'bInterfaceNumber' Borislav Petkov
2007-10-15  5:57 ` Dave Young
2007-10-15 18:38   ` [linux-usb-devel] " Alan Stern
2007-10-16  4:48     ` Greg KH
2007-10-16  5:22       ` Dave Young
2007-10-16 14:55         ` Alan Stern
2007-10-16 16:33           ` Matthew Dharm
2007-10-16 18:04             ` Alan Stern
2007-10-16 19:13               ` Matthew Dharm
2007-10-17  1:31                 ` Dave Young
2007-10-17 14:48                 ` Alan Stern
2007-10-18  1:52                   ` Dave Young
2007-10-18 22:48                   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2007-10-25  9:06 Dave Young
2007-10-25 18:11 ` Greg KH
2007-10-26  2:01   ` Dave Young
2007-10-26  2:42     ` Greg KH
2007-10-26  3:11       ` Dave Young
2007-10-26  3:28         ` Greg KH
2007-10-26  4:43           ` Dave Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox