Re: [linux-usb-devel] USB over IP suport in Wireshak, useful?

2007-02-13 Thread Phil Endecott
Greg KH wrote: > On Mon, Feb 12, 2007 at 11:59:46PM +0000, Phil Endecott wrote: >> (BTW, I am curious to know how many Linux USB developers actually have >> access to an analyser: I have considered various hacks that could be >> used to build a homebrew analyser, and wonde

Re: [linux-usb-devel] USB over IP suport in Wireshak, useful?

2007-02-13 Thread Phil Endecott
ronnie sahlberg wrote: > On 2/13/07, Greg KH <[EMAIL PROTECTED]> wrote: >> What devices have USB data travelling over IP? .. > http://www.digi.com/pdf/prd_usb_anywhereusb.pdf Also another hardware device: http://www.keyspan.com/downloads-files/us4a/docs/US4ADocs131.pdf > As far as i can tell th

Re: [linux-usb-devel] USB over IP suport in Wireshak, useful?

2007-02-12 Thread Phil Endecott
> Would it be helpful for linux usb device driver developers to have a > wireshark dissector that could capture and show the USB > data passed between one such windows client and a windows server for > USB over IP? Hi Ronnie, I'm only vaguely involved with Linux USB but I have spent some time ex

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-08 Thread Phil Endecott
Alan Stern wrote: > On Thu, 8 Feb 2007, Phil Endecott wrote: >> > From a >> > higher-level (source code) point of view, the alignment doesn't affect the >> > set of operations which can be applied to the data type. >> >> It affects whether you can

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-08 Thread Phil Endecott
> From a > higher-level (source code) point of view, the alignment doesn't affect the > set of operations which can be applied to the data type. It affects whether you can legally use & to take its address. Phil. - Usi

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-08 Thread Phil Endecott
Oleg Verych wrote: > Your intro pseudo-code: > > | g() { > | char c; > | struct S s; /* packed or not */ > | (s.intfield)++; > | f(&s); > | } > > Due to `c', `s' gets to be unaligned, i.e. light turned before you've > touched a switch: layout of `c' is independed, it's a byt

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-07 Thread Phil Endecott
Oleg Verych wrote: >> From: "Phil Endecott" <[EMAIL PROTECTED]> > Just question. > >> void inc(int __attribute__((aligned(1))) * i) >> void inc(int * __attribute__((aligned(1))) i) >> void inc(int * i __attribute__((aligned(1 > > Why 1, and

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-07 Thread Phil Endecott
David Brownell wrote: On Wednesday 07 February 2007 10:41 am, Phil Endecott wr void inc(int* i) { (*i)++; } here's a quote from Paul Brook (http://gcc.gnu.org/ml/gcc-help/2006-12/msg00115.html): " the compiler is allowed to assume that the low 2 bits of an int* are zero.

Re: [linux-usb-devel] gcc's packed vs hardware

2007-02-07 Thread Phil Endecott
Oleg Verych <[EMAIL PROTECTED]> wrote: > And what Phil Endecott told is just a bug in GCC! I don't know if he > tried with and without optimization. Oleg, I'm just a messenger. I'm just saying that I've encountered these things before, and I've asked th

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-07 Thread Phil Endecott
Just to throw one other factor into the discussion: if you add something like __attribute__((packed)) to the definition of a struct in an include file (e.g. ch9.h), it will affect third-party user-land code that happens to #include it. People writing such code probably don't get any benefit fr

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-07 Thread Phil Endecott
David Brownell wrote: > On Wednesday 07 February 2007 3:04 am, Phil Endecott wrote: >> I won't pretend to understand all the subtleties of >> __attribute__((packed)), but I did learn something about it when I >> hacked USB/IP to run on ARM, for the NSLU2, last year. Th

Re: [linux-usb-devel] usb: descriptor structures have to be packed

2007-02-07 Thread Phil Endecott
I won't pretend to understand all the subtleties of __attribute__((packed)), but I did learn something about it when I hacked USB/IP to run on ARM, for the NSLU2, last year. The issue boiled down to this: struct S { int intfield; char charfield; } /* maybe add: __attribute__((packed)) he

Re: [linux-usb-devel] gadgetfs or kernel module?

2007-01-19 Thread Phil Endecott
Ross wrote: > Can someone tell me what the preferred method for new client USB > drivers is? Is it preferable to create a new loadable module gadget > or use the gadgetfs module and write the driver in user space? > > This is for a proprietary USB protocol that exists in a proprietary > OS, but re

Re: [linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-18 Thread Phil Endecott
David Brownell wrote: > On Thursday 18 January 2007 9:50 am, Phil Endecott wrote: >> David Brownell wrote: >> > With that and the other patches I've sent (notably the race fix, none >> > of the others ought to matter here), I don't see problem any more.

Re: [linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-18 Thread Phil Endecott
Sorry I'm talking rubbish; I'm looking at testusb.c not usb.c. Phil. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & bu

Re: [linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-18 Thread Phil Endecott
David Brownell wrote: > On Thursday 18 January 2007 9:50 am, Phil Endecott wrote: >> David Brownell wrote: >> > I've checked the updated "usb.c" code into CVS; not sure when it'l be >> > visible on the website, presumably tomorrow morning, but

Re: [linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-18 Thread Phil Endecott
David Brownell wrote: > With that and the other patches I've sent (notably the race fix, none > of the others ought to matter here), I don't see problem any more. I still see the problem after applying all of the kernel patches, but I'm still using the original usb.c. > I've checked the updated

Re: [linux-usb-devel] gadgetfs_setup: missing unlock

2007-01-17 Thread Phil Endecott
David Brownell wrote: > On Thursday 14 December 2006 9:34 am, Phil Endecott wrote: >> >> I am really new to this, please forgive me if I am on the wrong track. > > Nope, you were right -- this is a problem. Rare, but a problem. > Fixed by a patch I'm about to s

Re: [linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-15 Thread Phil Endecott
David Brownell wrote: > Further testing on my system turned up more information: > > - The string fetches done during device enumeration fail sometimes too. >This leads to delays, timeouts, resubmissions ... it's not just these >cases in test #10. Do you see messages about khubd timeouts

Re: [linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-15 Thread Phil Endecott
Earlier I wrote: > Jan 15 11:15:18 egypt kernel: drivers/usb/misc/usbtest.c: subtest 12 error, > status -71 > Jan 15 11:15:18 egypt kernel: drivers/usb/misc/usbtest.c: control queue > 80.06, err -71, 28516 left > Jan 15 11:15:18 egypt kernel: drivers/usb/misc/usbtest.c: subcase 13 > completed ou

Re: [linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-15 Thread Phil Endecott
David Brownell wrote: > On Monday 08 January 2007 5:55 am, Phil Endecott wrote: >> # ./testusb -D /proc/bus/usb/004/010 -t10 >> (Never completes, no output) >> dmesg: >> >> Jan 8 12:37:38 egypt kernel: usbtest 4-4:3.0: TEST 10: queue 32 >> control

[linux-usb-devel] [PATCH] Remove gadgetfs endpoint defer mode

2007-01-09 Thread Phil Endecott
Gadgetfs had a mode in which endpoint descriptors were written by the user program before connection. This mode had some bugs, and may never have been used. This patch removes that mode. The only mode of operation now is for the user program to wait for endpoint 0 to report a SET_CONFIGURATI

[linux-usb-devel] usbtest #10 with gadgetfs hangs

2007-01-08 Thread Phil Endecott
Following on from my report in the thread "Gadgetfs: how to ack a control out?": At the host end I have 2.6.19 on VIA hardware and a recently-downloaded testusb.c (it doesn't seem to have a version number). At the device end I have 2.6.19 plus 3 patches: as823.patch, which fixes net2280 to NAK

Re: [linux-usb-devel] Gadgetfs: Propsed removal of deferred endpoint configuration mode

2007-01-05 Thread Phil Endecott
David Brownell wrote: > Should you feel like coming up with a patch to remove that "simple" > config mode from gadgetfs, please do so. That's probably within my abilities. Is anyone using this feature and likely to be inconvenienced? I've changed the subject to hopefully get their attention. Doe

Re: [linux-usb-devel] Gadgetfs: ep file_operations not changed in deferred config case

2007-01-04 Thread Phil Endecott
David Brownell wrote: > On Tuesday 02 January 2007 11:04 am, Phil Endecott wrote: >> Dear All, >> >> I may have found a problem with 'deferred configuration' mode in >> gadgetfs. Or, more likely, I have misunderstood something or found an >> error tha

Re: [linux-usb-devel] Gadgetfs: how to ack a control out?

2007-01-04 Thread Phil Endecott
David Brownell wrote: > On Wednesday 03 January 2007 3:30 am, Phil Endecott wrote: >> With gadgetfs and usb.c, tests 0-9 pass, and it hangs on test 10. Is >> that expected? > > No. It used to work. OK, I'll investigate further and report back. But there'

Re: [linux-usb-devel] Gadgetfs: how to ack a control out?

2007-01-03 Thread Phil Endecott
Hi David, Thanks for your detailed reply. David Brownell wrote: > On Tuesday 02 January 2007 4:35 am, Phil Endecott wrote: >> How should a gadgetfs application cause an ACK to be sent to the host >> in response to a sucessfully received and processed control out transaction? &g

[linux-usb-devel] Gadgetfs: ep file_operations not changed in deferred config case

2007-01-02 Thread Phil Endecott
Dear All, I may have found a problem with 'deferred configuration' mode in gadgetfs. Or, more likely, I have misunderstood something or found an error that you already know about... Normally, activate_ep_files() creates inodes for the per-endpoint files with f_op set to ep_config_operations.

[linux-usb-devel] Gadgetfs: how to ack a control out?

2007-01-02 Thread Phil Endecott
Dear All, How should a gadgetfs application cause an ACK to be sent to the host in response to a sucessfully received and processed control out transaction? My first guess was to send a zero-byte write, but looking at the example gadgetfs program (http://www.linux-usb.org/gadget/usb.c), the on

Re: [linux-usb-devel] [Linux-usb-users] Stable API for USB programming

2006-12-22 Thread Phil Endecott
Greg KH wrote: > try posting follow-up stuff on the linux-usb-devel mailing list, not the > -user list. OK then: > On Wed, Dec 13, 2006 at 03:23:31PM +0000, Phil Endecott wrote: >> Dear USB Experts, >> >> I am trying to understand the relative merits of the various

Re: [linux-usb-devel] Net2280: issue with ZLP responses to ep0 string requests

2006-12-20 Thread Phil Endecott
>> It looks as if the hardware returns a ZLP immediately. > This has been fixed in the current development kernels (-mm or Greg KH's > development patch series). Here is the patch: > > http://marc.theaimsgroup.com/?l=linux-usb-devel&m=116369017318210&w=2 Thanks for that Alan. I should have b

[linux-usb-devel] Net2280: issue with ZLP responses to ep0 string requests

2006-12-20 Thread Phil Endecott
Dear USB Experts, I have a Net2280 PCI card and I'm trying to get the gadgetfs user-mode test program from http://www.linux-usb.org/gadget/usb.c to work. There's a second Linux box at the other end of the USB cable and both ends are running 2.6.19. I have encountered a problem which I think

[linux-usb-devel] gadgetfs_setup: missing unlock

2006-12-14 Thread Phil Endecott
Dear USB experts, I am really new to this, please forgive me if I am on the wrong track. In drivers/usb/gadget/inode.c, gadgetfs_setup(), there is some code like this: spin_lock (&dev->lock); [snip] dev->state = STATE_CONNECTED; if (gadget->spee