Hi Fabio, I tried 3.4 and you were right, it still works fine. For the 'struct at91_ep' has no member named 'desc' error I tried commenting the offending declaration (|| ep->desc) and it builds without any error. During the bisect run this happened several times and I think, but am not sure, that some of this attempts worked fine without displaying the original error. I will try and check if the second error you mention will also happen to me if I apply commit 5eaee54b1c52a83dc74445792cf49900a8050da8 Best regards, Mário Isidoro -----Original Message----- From: Fabio Porcedda [mailto:fabio.porcedda@xxxxxxxxx] Sent: sexta-feira, 6 de Julho de 2012 17:10 To: Mario Jorge Isidoro Cc: balbi@xxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; Nicolas Ferre; Ido Shayevitz Subject: Re: NULL pointer dereference in at91_udc on start of connection On Thu, Jul 5, 2012 at 6:05 PM, Mario Jorge Isidoro <Mario.Isidoro@xxxxxxxxx> wrote: > Hi, > > I'm using a at91sam9260 processor on custom made board based on the > sam9260ek. > With the latest kernels (3.4-rc4 seem to be the last one working well) > whenever I try to connect the usb device port of the at91 processor to a > host I get the following error: > Hi Mario, I've the same issue, I'm using the Atmel AT91SAM9260EK board, see my already submitted email: http://marc.info/?l=linux-usb&m=134139521606528&w=2 The latest working release for me is the v3.4, The first not working release for me is the v3.5-rc1. > I've tracked the error to line 1099 of the file > drivers/usb/gadget/composite.c > This line is in the function "static int composite_setup(struct > usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)" > line 1099: req->zero = 0; // req is NULL, this is where it blows up > > The function is called from the function "static void > handle_setup(struct at91_udc *udc, struct at91_ep *ep, u32 csr)" in > drivers/usb/gadget/at91_udc.c on line 1246 > line 1246: status = udc->driver->setup(&udc->gadget, &pkt.r); > > So, from at91_udc_irq to composite_setup the path seems to be: > at91_udc_irq (line 1490) -> handle_ep0 (line 1289) -> handle_setup (line > 1264) -> composite_setup > > I've tried bisecting and it points to this commit: > f3d8bf34c2c925867322197096ed501ceab8085a I can confirm that the kernel panic oops start from the commit: f3d8bf34c2c925867322197096ed501ceab8085a. But before that commit and until that commit, i have another issue, maybe it's connected with the kernel oops. After the commit 5a6506f00efa4b38b181152b69a072e766c7ce92 the driver don't build anymore, with the following error: drivers/usb/gadget/at91_udc.c:478:18: error: 'struct at91_ep' has no member named 'desc' I was able to build the driver applying the fix: commit 5eaee54b1c52a83dc74445792cf49900a8050da8, with that fix i can build the driver again, but it doesn't work anymore, when i connect the usb cable i got the following error: ------------[ cut here ]------------ WARNING: at drivers/usb/gadget/u_ether.c:939 ecm_set_alt+0x48/0x1a8() Modules linked in: [<c0014624>] (unwind_backtrace+0x0/0xf0) from [<c001d6a4>] (warn_slowpath_common+0x4c/0x64) [<c001d6a4>] (warn_slowpath_common+0x4c/0x64) from [<c001d6d8>] (warn_slowpath_null+0x1c/0x24) [<c001d6d8>] (warn_slowpath_null+0x1c/0x24) from [<c01c9afc>] (ecm_set_alt+0x48/0x1a8) [<c01c9afc>] (ecm_set_alt+0x48/0x1a8) from [<c01c700c>] (composite_setup+0x190/0xb90) [<c01c700c>] (composite_setup+0x190/0xb90) from [<c01c3640>] (at91_udc_irq+0x4a0/0x86c) [<c01c3640>] (at91_udc_irq+0x4a0/0x86c) from [<c0052dd0>] (handle_irq_event_percpu+0x50/0x1cc) [<c0052dd0>] (handle_irq_event_percpu+0x50/0x1cc) from [<c0052f74>] (handle_irq_event+0x28/0x38) [<c0052f74>] (handle_irq_event+0x28/0x38) from [<c0054e6c>] (handle_level_irq+0x80/0xcc) [<c0054e6c>] (handle_level_irq+0x80/0xcc) from [<c005274c>] (generic_handle_irq+0x28/0x3c) [<c005274c>] (generic_handle_irq+0x28/0x3c) from [<c000fe0c>] (handle_IRQ+0x30/0x98) [<c000fe0c>] (handle_IRQ+0x30/0x98) from [<c000ed3c>] (__irq_usr+0x3c/0x80) ---[ end trace 97ebd3ed3b0cba42 ]--- It's different for you? I'm doing wrong something? commit 5a6506f00efa4b38b181152b69a072e766c7ce92 Author: Ido Shayevitz <idos@xxxxxxxxxxxxxx> Date: Mon Mar 12 20:25:26 2012 +0200 usb: gadget: Update at91_udc to use usb_endpoint_descriptor inside the struct usb_ep commit 5eaee54b1c52a83dc74445792cf49900a8050da8 Author: Nicolas Ferre <nicolas.ferre@xxxxxxxxx> Date: Wed May 16 10:23:07 2012 +0200 usb: gadget: at91_udc: fix endpoint descriptor dereference My defconfig: CONFIG_EXPERIMENTAL=y # CONFIG_LOCALVERSION_AUTO is not set # CONFIG_SWAP is not set CONFIG_SYSVIPC=y CONFIG_LOG_BUF_SHIFT=14 CONFIG_BLK_DEV_INITRD=y CONFIG_SLAB=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set CONFIG_ARCH_AT91=y CONFIG_ARCH_AT91SAM9260=y CONFIG_MACH_AT91SAM9260EK=y CONFIG_MACH_CAM60=y CONFIG_MACH_SAM9_L9260=y CONFIG_MACH_AFEB9260=y CONFIG_MACH_USB_A9260=y CONFIG_MACH_QIL_A9260=y CONFIG_MACH_CPU9260=y CONFIG_MACH_FLEXIBITY=y CONFIG_MACH_SNAPPER_9260=y CONFIG_MACH_AT91SAM_DT=y CONFIG_AT91_PROGRAMMABLE_CLOCKS=y # CONFIG_ARM_THUMB is not set CONFIG_AEABI=y CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_ARM_APPENDED_DTB=y CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" CONFIG_FPE_NWFPE=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y CONFIG_INET=y CONFIG_IP_PNP=y CONFIG_IP_PNP_BOOTP=y # 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_IPV6 is not set CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_MTD=y CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_BLOCK=y CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ATMEL=y CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y CONFIG_MTD_UBI=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=8192 CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_SCSI_MULTI_LUN=y CONFIG_NETDEVICES=y CONFIG_MII=y CONFIG_MACB=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_SERIO is not set CONFIG_SERIAL_ATMEL=y CONFIG_SERIAL_ATMEL_CONSOLE=y # CONFIG_HW_RANDOM is not set CONFIG_I2C=y CONFIG_I2C_CHARDEV=y CONFIG_I2C_GPIO=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y CONFIG_WATCHDOG_NOWAYOUT=y CONFIG_AT91SAM9X_WATCHDOG=y # CONFIG_USB_HID is not set CONFIG_USB=y CONFIG_USB_MON=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE_DEBUG=y CONFIG_USB_GADGET=y CONFIG_USB_AT91=y CONFIG_USB_ETH=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_AT91SAM9=y CONFIG_EXT2_FS=y CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_UBIFS_FS=y CONFIG_CRAMFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_ISO8859_1=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_USER=y CONFIG_DEBUG_LL=y 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