RE: usb device implemented with functionfs - must app run as root?

2017-12-06 Thread andy_purcell
Hello, Suggestion from GKH is to write a udev rule to change ownership, group, permissions of the functionfs created endpoint files: /dev/usbffs/ep1 /dev/usbffs/ep2 /dev/usbffs/ep3 I tried all morning to create a udev rule, but no success. My attempts are documented below. I don't

usb device implemented with functionfs - must app run as root?

2017-12-05 Thread andy_purcell
I have implemented a USB device using functionfs. A colleague now says our app must run as a normal user, not as root. I tried it and it does not work. The problem is this - the endpoint files created by the OS are owned by root. These ep files are created after I write the descriptors and

RE: stopping and starting a functionfs USB-device causes panic

2017-11-03 Thread andy_purcell
Hello Felipe, > > > > I have a second issue with a functionfs USB-device implementation. > > > > The scenario is this: > > 1) USB-device app starts up, runs fine > > 2) ssh to the device, kill the app with CTRL-C > > 3) try to start the USB-device app 2nd time > > > > PANIC > > > > dmesg output:

RE: Linux and usb device drivers using functionfs

2017-11-02 Thread andy_purcell
Greg, > > > > > > > > And where is your swap? What happens if you just do not have swap at all? > > Our system has no swap. Running 'top' says 0 total, 0 free, 0 used > > then your program can not get swapped out, so this whole thing is crazy. Colleague says when there is memory pressure,

RE: Linux and usb device drivers using functionfs

2017-11-02 Thread andy_purcell
Hello, > > And where is your swap? What happens if you just do not have swap at all? Our system has no swap. Running 'top' says 0 total, 0 free, 0 used > > > A colleague claims mlockall() does not help, and says it is not a good > > idea anyway. > > That's not true, have you tried it?

stopping and starting a functionfs USB-device causes panic

2017-11-02 Thread andy_purcell
Hello, I have a second issue with a functionfs USB-device implementation. The scenario is this: 1) USB-device app starts up, runs fine 2) ssh to the device, kill the app with CTRL-C 3) try to start the USB-device app 2nd time PANIC dmesg output: [ 2553.87] [ cut here

RE: Linux and usb device drivers using functionfs

2017-11-02 Thread andy_purcell
> What do you mean by "device app runs to completion"? What is the "device > app"? Is it the functionfs application you're talking about? And by > "completion" > do you mean that it completely stops running or is it just sleeping waiting > for > some input? "device app runs to completion" means

RE: Linux and usb device drivers using functionfs

2017-10-31 Thread andy_purcell
Hello Felipe, I am not using DWC3. I have new information about the problem. The context was this: 1) device boots 2) some usb transfers happen, all are OK 3) a device app runs to completion (USB quiescent during this time, no USB transfers required) 4) the controlling PC starts a

Linux and usb device drivers using functionfs

2017-10-30 Thread andy_purcell
Hello, I have implemented a USB device function using Linux functionfs and now there is a problem being reported. I need to ask this group for advice. The problem is this: 1) device boots 2) some usb transfers happen, all are OK 3) a device app runs to completion (USB quiescent during

RE: linux USB dwc3 not working

2017-01-31 Thread andy_purcell
Felipe, > okay, good. RUN/STOP bit is set. So it still doesn't work? The only thing I > can > think of, is that VBUS_VALID bit in the Mux register isn't set properly. I'm > not in > the office now, but I'll try to get you more info on that. > OK, I have no information about a VBUS_VALID bit

RE: linux USB dwc3 not working

2017-01-31 Thread andy_purcell
Hello Felipe, See responses below. > -Original Message- > From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] > Sent: Tuesday, January 31, 2017 5:10 AM > To: PURCELL,ANDY (K-Loveland,ex1) ; linux- > u...@vger.kernel.org > Subject: Re: linux USB dwc3 not

linux USB dwc3 not working

2017-01-30 Thread andy_purcell
Hello, I am starting work on a board that has the Intel Skylake chipset, which has hardware for doing USB-device. The Intel chipset USB-device hardware is the Synopsys DesignWare Controller 3, aka "dwc3". The Linux source tree has code for dwc3, so I thought to try running Linux on this