[newbie] Disconnecting of USB-device is not detected on ARM 7 using uClinux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello to all,

I hope everything goes OK, this is the first time I post to a mailing list. After having been tinkering for a long time by now (weeks, though the problem described here was not the only; it is however the only one that I can't seem to solve), including a lot of searching on the web, I decided to ask You for Your help. I am very new to Linux (have been using it for some time on my desktop, at the moment Xubuntu 9.04, but I mean new to the internals and using it for embedded purposes) so I may sound a bit stupid, please forgive me, I do my best.

What I am trying to accomplish is detecting when a USB-stick is inserted or removed on an Embedded Artists LPC2468 board. I am using uClinux distro 081020 along with kernel 2.6.21. The reason I am using these two specifically is that there are patches on the EA website that can be applied to them which add stuff that is specific to this board and the controller on it. I can build a kernel that works well apart from one thing, removing the usb-stick is not being detected. When I insert it, the stick is detected and attached as a scsi drive to /dev/sda1, the messages are the same as on my desktop computer and I can mount and use it on the embedded board, no problems. However, when I pull out the stick from my desktop computer, I get a message saying I just did this, contrary to what happens on the embedded system. Also the led "link OK", connected to GPIO pin 0.13, does not go out. The OHCI is connected to IRQ22. I have inserted a kprint in the function "asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs" in source file /arch/arm/kernel/irq.c. This tells me that when I insert the stick, an int 22 is indeed being generated. But not on removal. When I re-insert the stick or another one, the int is being generated again.

I also put a kprint in /drivers/usb/host/ohci-hcd.c in the function static irqreturn-t ohci_irq (struct usb_hcd *hcd), that also gives a notification on the insertion but not on the removal. I put several printk's in the functions in /drivers/usb/core/notify.c but I don't get any of them. If I have done something that doesn't make sense, that's because I just wanted to solve it and thought this would help.

Once it has happened that I noticed after a long time that the console from the board said that a stick had been removed. Only once.

I have been reading a lot about USB and OHCI but at the moment I really am stuck. A lot of things one finds on the web are of a higher level, meaning that people have hotplug problems or so. I can't find anything that enlightens me anymore, I do have some C programming experience but Linux kernel code is not exactly the easiest C code there is and I have no experience coding at kernel level. I am however very willing to learn but now I have come to a point where I definitely could use some suggestions. Should I have forgotten to include info that is important for You (or when I have done this out of ignorance), please don't hesitate to ask.

Every suggestion will be highly appreciated, thank You in advance!

Yours sincerely,
Rene
--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux