Hi all, I'd like to report a bug using the at91_udc driver, starting from the v3.5-rc1 to the latest v3.5-rc5-98-g9e85a6f, the v3.4.0 was working fine. I'm encountering a kernel oops when using the at91_udc driver and connecting the usb device cable. I'm using the Atmel AT91SAM9260EK, i'm building on Ubuntu 12.04 using buildroot 2012.05: If useful i can provide more information, like the defconfig and try to bisect to find the commit to blame. Oops text: # Unable to handle kernel NULL pointer dereference at virtual address 0000001a pgd = c0004000 [0000001a] *pgd=00000000 Internal error: Oops: 17 [#1] ARM Modules linked in: CPU: 0 Not tainted (3.5.0-rc5+ #2) PC is at composite_setup+0x20/0xba0 LR is at composite_setup+0x18/0xba0 pc : [<c01e285c>] lr : [<c01e2854>] psr: a0000093 sp : c0363e70 ip : c4878030 fp : c0363ed8 r10: 000888cf r9 : ffffff80 r8 : 00000000 r7 : c0385800 r6 : 00000005 r5 : 00000001 r4 : 00000000 r3 : c01df90c r2 : 00000080 r1 : c0363ed8 r0 : c0385b2c Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 0005317f Table: 23ae0000 DAC: 00000017 Process swapper (pid: 0, stack limit = 0xc0362270) Stack: (0xc0363e70 to 0xc0364000) 3e60: 00009b44 00000000 c036a070 c0371e28 3e80: c036c210 c004aea4 c036e560 c003e2b8 c0377d58 c0363e94 c0363e94 c004aea4 3ea0: c036e560 c0385800 00000001 00000005 40000093 00000000 ffffff80 000888cf 3ec0: 00088884 c01df060 00000000 c0385928 c4878030 00000006 01000680 00400000 3ee0: c0363ee0 c396b6e0 0000000a 00000000 00000000 0000000a c0389940 c0372c78 3f00: 00000001 c0054964 00000004 c0023f68 00000000 c0372c78 0000000a 00000000 3f20: c0363f94 20004000 41069265 2035abe4 00000000 c0054b08 c0372c78 c0056c30 3f40: c0379de0 c00542e0 000000c0 c000fe0c c000ff64 a0000013 fefff000 c000ebb8 3f60: 00000000 0005317f 0005217f a0000013 c0362000 c0389a88 c036cbbc c000ff40 3f80: 20004000 41069265 2035abe4 00000000 a00000d3 c0363fa8 c000ff58 c000ff64 3fa0: a0000013 ffffffff 60000093 c001012c c037065c c036a0a0 c03899e0 c035c2bc 3fc0: c0421320 c034071c ffffffff ffffffff c0340278 00000000 00000000 c035c2bc 3fe0: 00000000 00053175 c036a01c c035c2b8 c036cbb4 20008040 00000000 00000000 [<c01e285c>] (composite_setup+0x20/0xba0) from [<c01df060>] (at91_udc_irq+0x4a0/0x86c) [<c01df060>] (at91_udc_irq+0x4a0/0x86c) from [<c0054964>] (handle_irq_event_percpu+0x50/0x1cc) [<c0054964>] (handle_irq_event_percpu+0x50/0x1cc) from [<c0054b08>] (handle_irq_event+0x28/0x38) [<c0054b08>] (handle_irq_event+0x28/0x38) from [<c0056c30>] (handle_level_irq+0x80/0xdc) [<c0056c30>] (handle_level_irq+0x80/0xdc) from [<c00542e0>] (generic_handle_irq+0x28/0x3c) [<c00542e0>] (generic_handle_irq+0x28/0x3c) from [<c000fe0c>] (handle_IRQ+0x30/0x98) [<c000fe0c>] (handle_IRQ+0x30/0x98) from [<c000ebb8>] (__irq_svc+0x38/0x60) [<c000ebb8>] (__irq_svc+0x38/0x60) from [<c000ff64>] (default_idle+0x24/0x40) [<c000ff64>] (default_idle+0x24/0x40) from [<c001012c>] (cpu_idle+0x8c/0xcc) [<c001012c>] (cpu_idle+0x8c/0xcc) from [<c034071c>] (start_kernel+0x280/0x2d0) Code: e1a0b001 ebfe6b0d e5904004 e59f3b54 (e5d4101a) ---[ end trace 89acdf8be1f12346 ]--- Kernel panic - not syncing: Fatal exception in interrupt Boot log: RomBOOT >Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz registered netconsole as cs1 atmel_nand: Use On Flash BBT NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit) Bad block table found at page 131008, version 0x01 Bad block table found at page 130944, version 0x01 at91_udc@at91_udc0: at91_udc version 3 May 2006 atmel_mci@mci0: registered as mci0 atmel_mci@atmel_mci0: command/data timeout atmel_mci@atmel_mci0: command/data timeout atmel_mci@atmel_mci0: command/data timeout Malloc space: 0x23b00000 -> 0x23efffff (size 4 MB) Stack space : 0x23af8000 -> 0x23b00000 (size 32 kB) running /env/bin/init... No USB Device cable plugged, normal boot Hit any key to stop autoboot: 0 booting kernel from /dev/nand0.kernel.bb Image Name: Linux-3.5.0-rc5+ Created: 2012-07-04 9:08:40 UTC OS: Linux Architecture: ARM Type: Kernel Image Compression: uncompressed Data Size: 1979376 Bytes = 1.9 MB Load Address: 20008000 Entry Point: 20008000 commandline: console=ttyS0,115200 ip=none root=ubi0:rootfs ubi.mtd=6 rootfstype=ubifs noinitrd mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data) arch_number: 1099 Uncompressing Linux... done, booting the kernel. Booting Linux on physical CPU 0 Linux version 3.5.0-rc5+ (fabiopo@ld2036) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-70) ) #2 Wed Jul 4 11:08:37 CEST 2012 CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 CPU: VIVT data cache, VIVT instruction cache Machine: Atmel AT91SAM9260-EK Memory policy: ECC disabled, Data cache writeback AT91: Detected soc type: at91sam9260 AT91: Detected soc subtype: Unknown AT91: sram at 0x2ff000 of 0x2000 mapped at 0xfef76000 Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: console=ttyS0,115200 ip=none root=ubi0:rootfs ubi.mtd=6 rootfstype=ubifs noinitrd mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data) PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 61212k/61212k available, 4324k reserved, 0K highmem Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) vmalloc : 0xc4800000 - 0xff000000 ( 936 MB) lowmem : 0xc0000000 - 0xc4000000 ( 64 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .text : 0xc0008000 - 0xc033fc90 (3296 kB) .init : 0xc0340000 - 0xc0360af4 ( 131 kB) .data : 0xc0362000 - 0xc03899a0 ( 159 kB) .bss : 0xc03899c4 - 0xc03a0004 ( 90 kB) NR_IRQS:192 AT91: 96 gpio irqs in 3 banks sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms Console: colour dummy device 80x30 pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 Setting up static identity map for 0x2027e448 - 0x2027e4a0 NET: Registered protocol family 16 AT91: Power Management AT91: Starting after user reset bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb i2c-gpio i2c-gpio: using pins 23 (SDA) and 24 (SCL) Switching to clocksource pit NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 2, 16384 bytes) TCP bind hash table entries: 2048 (order: 1, 8192 bytes) TCP: Hash tables configured (established 2048 bind 2048) TCP: reno registered UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 NetWinder Floating Point Emulator V0.97 (double precision) msgmni has been set to 119 io scheduler noop registered (default) atmel_usart.0: ttyS0 at MMIO 0xfffff200 (irq = 1) is a ATMEL_SERIAL console [ttyS0] enabled atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL brd: module loaded atmel_nand: Use On Flash BBT atmel_nand atmel_nand: No DMA support for NAND access. NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit), page size: 2048, OOB size: 64 Bad block table found at page 131008, version 0x01 Bad block table found at page 130944, version 0x01 nand_bbt: corrected error in BBT at 0x00000ffe0000 Bad block table written to 0x00000ffe0000, version 0x01 Bad block table written to 0x00000ffc0000, version 0x01 8 cmdlinepart partitions found on MTD device atmel_nand Creating 8 MTD partitions on "atmel_nand": 0x000000000000-0x000000020000 : "at91bootstrap" 0x000000020000-0x000000060000 : "barebox" 0x000000060000-0x000000080000 : "bareboxenv" 0x000000080000-0x0000000a0000 : "bareboxenv2" 0x0000000a0000-0x0000000c0000 : "oftree" 0x0000000c0000-0x0000004c0000 : "kernel" 0x0000004c0000-0x000007cc0000 : "rootfs" 0x000007cc0000-0x000010000000 : "data" UBI: attaching mtd6 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: max. sequence number: 5 UBI: attached mtd6 to ubi0 UBI: MTD device name: "rootfs" UBI: MTD device size: 120 MiB UBI: number of good PEBs: 960 UBI: number of bad PEBs: 0 UBI: number of corrupted PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 960 UBI: number of PEBs reserved for bad PEB handling: 9 UBI: max/mean erase counter: 1/0 UBI: image sequence number: 1488281736 macb macb: (unregistered net_device): invalid hw address, using random UBI: background thread "ubi_bgt0d" started, PID 806 MACB_mii_bus: probed macb macb: eth0: Cadence MACB at 0xfffc4000 irq 21 (aa:29:2a:0e:6b:9c) macb macb: eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=macb-ffffffff:00, irq=-1) ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver at91_ohci at91_ohci: can't request overcurrent gpio 0 at91_ohci at91_ohci: AT91 OHCI at91_ohci at91_ohci: new USB bus registered, assigned bus number 1 at91_ohci at91_ohci: irq 20, io mem 0x00500000 hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. udc: at91_udc version 3 May 2006 gadget: using random self ethernet address gadget: using random host ethernet address usb0: MAC 0e:6c:55:91:aa:33 usb0: HOST MAC f2:ad:44:6c:f6:6e gadget: Ethernet Gadget, version: Memorial Day 2008 gadget: g_ether ready mousedev: PS/2 mouse device common for all mice rtc-at91sam9 rtc-at91sam9.0: rtc core: registered rtc-at91sam9 as rtc0 rtc-at91sam9 rtc-at91sam9.0: rtc0: SET TIME! i2c /dev entries driver at91sam9_wdt: sorry, watchdog is disabled at91_wdt: probe of at91_wdt failed with error -5 TCP: cubic registered NET: Registered protocol family 17 rtc-at91sam9 rtc-at91sam9.0: hctosys: unable to read the hardware clock UBIFS: recovery needed UBIFS: recovery completed UBIFS: mounted UBI device 0, volume 0, name "rootfs" UBIFS: file system size: 120766464 bytes (117936 KiB, 115 MiB, 936 LEBs) UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs) UBIFS: media format: w4/r0 (latest is w4/r0) UBIFS: default compressor: lzo UBIFS: reserved for root: 0 bytes (0 KiB) VFS: Mounted root (ubifs filesystem) on device 0:9. Freeing init memory: 128K Starting logging: OK Initializing random number generator... done. Starting network... Welcome to Buildroot buildroot login: Best regards -- Fabio Porcedda -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html