05 Dec, 2013

1 commit

  • Reproduce:
    ray@hr-bak:~/usb$ make -C tools/usb/
    make: Entering directory `/home/ray/usb/tools/usb'
    gcc -Wall -Wextra -g -lpthread -I../include -o testusb testusb.c
    /tmp/cc0EMxfy.o: In function `main':
    /home/ray/usb/tools/usb/testusb.c:508: undefined reference to `pthread_create'
    /home/ray/usb/tools/usb/testusb.c:531: undefined reference to `pthread_join'
    collect2: error: ld returned 1 exit status
    make: *** [testusb] Error 1
    make: Leaving directory `/home/ray/usb/tools/usb'

    Comments:
    In the latest version (4.7.3) of gcc compiler, it requres that
    libraries must follow the object or source files like below:

    "gcc hello.c -lpthread" instead of "gcc -lpthread hello.c"

    And it isn't encountered at gcc version 4.7.2.
    So this patch fix to move the pthread option after testusb.c.

    Signed-off-by: Huang Rui
    Signed-off-by: Greg Kroah-Hartman

    Huang Rui
     

07 Mar, 2013

1 commit

  • Fixes this build failure:
    gcc -Wall -Wextra -g -lpthread -I../include -o testusb testusb.c
    gcc -Wall -Wextra -g -lpthread -I../include -o ffs-test ffs-test.c
    In file included from ffs-test.c:41:0:
    ../../include/linux/usb/functionfs.h:4:39: fatal error:
    uapi/linux/usb/functionfs.h: No such file or directory
    compilation terminated.
    make: *** [ffs-test] Error 1

    Signed-off-by: Maxin B. John
    Acked-by: Michal Nazarewicz
    Cc: stable # 3.7+
    Signed-off-by: Greg Kroah-Hartman

    Maxin B. John
     

09 Feb, 2013

1 commit

  • Commit 8a424bf40d772fedacc91862ecc86f10541fabb3 (tools/usb: remove last USBFS
    user) removed 'usbfs' files from the source but retained mentions of 'usbfs'
    all over the place, most importantly in the misleading error messages printed
    in case USB device files are not there. Remove all the mentions of 'usbfs'
    for good now!

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Greg Kroah-Hartman

    Sergei Shtylyov
     

12 Jan, 2013

1 commit


11 Sep, 2012

1 commit


14 Jun, 2012

1 commit

  • The testusb.c tool has support for looping forever implemented, which
    may be useful for stress test, yet it is not exposed to the user, so
    even though the code is there, it cannot be used. This commit adds
    "l" to the set of options handled by the application which enables
    the feature.

    Also, I collate help information for each command line option to make
    it easier to use for novice.

    Signed-off-by: Du Changbin
    Acked-by: Michal Nazarewicz
    Signed-off-by: Greg Kroah-Hartman

    Du, ChangbinX
     

15 May, 2012

1 commit


08 May, 2012

1 commit

  • The out functions should only handle actual available data instead of the complete buffer.
    Otherwise for example the ep0_consume function will report ghost events since it tries to decode
    the complete buffer - which may contain partly invalid data.

    Signed-off-by: Matthias Fend
    Cc: stable
    Acked-by: Michal Nazarewicz
    Signed-off-by: Greg Kroah-Hartman

    Matthias Fend
     

23 Mar, 2012

1 commit

  • Pull x86/build changes from Ingo Molnar.

    * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, build: Fix portability issues when cross-building
    x86, tools: Remove unneeded header files from tools/build.c
    USB: ffs-test: Don't duplicate {get,put}_unaligned*() functions
    x86, efi: Fix endian issues and unaligned accesses
    x86, boot: Restrict CFLAGS for hostprogs
    x86, mkpiggy: Don't open code put_unaligned_le32()
    x86, relocs: Don't open code put_unaligned_le32()
    tools/include: Add byteshift headers for endian access

    Linus Torvalds
     

29 Feb, 2012

1 commit


24 Jan, 2012

1 commit


01 Mar, 2011

1 commit

  • When compiling this program the functionfs.h header cannot be found, producing:
    ffs-test.c:40: fatal error: linux/usb/functionfs.h: No such file or directory

    This patch also fixes the following warning:
    ffs-test.c:453: warning: format ‘%4d’ expects type ‘int’, but argument 3 has type ‘size_t’

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Greg Kroah-Hartman

    Davidlohr Bueso
     

18 Feb, 2011

1 commit


23 Jan, 2011

2 commits


21 May, 2010

3 commits

  • The FunctionFS gadget may provide the source/sink interface
    not as the first interface (with id == 0) but some different
    interface hence a code to find the interface number is
    required.

    (Note that you will still configure the gadget to report
    idProduct == 0xa4a4 (an "echo 0xa4a4
    >/sys/module/g_ffs/parameters/usb_product" should suffice) or
    configure host to handle 0x0525:0xa4ac devices using the
    usbtest driver.)

    Signed-off-by: Michal Nazarewicz
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     
  • The testusb program just issues ioctls to perform the tests
    implemented by the kernel driver. It can generate a variety
    of transfer patterns; you should make sure to test both regular
    streaming and mixes of transfer sizes (including short transfers).

    For more information on how this can be used and on USB testing
    refer to .

    Signed-off-by: Michal Nazarewicz
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • This adds an example user-space FunctionFS driver which
    implements a source/sink interface used for testing.

    Signed-off-by: Michal Nazarewicz
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz