Yes, Olav seems to be working on a clean driver for the isp116x (at least as clean as you can make this device). This may in the end be the best approach, but for now I have adapted Lothar's driver to the 116x in the following way different from Olav's last patch:
The way I see it, the isp1362 in essence is an isp116x with improved buffer handling, mainly the random access to its buffer memory. So I have written a module that emulates the 1362's memory access for a 1160. In essence, I am introducing what I call a synchronization buffer. Any 1362 read or write is intercepted and placed in this buffer instead. If the 1362 driver attempts to read from the memory buffer, it gets synchronized (using PIO accesses) with the device and at the end of a SOF interrupt the memory buffer gets written to the device. I am also emulating skip, done, current and last bitmaps. This means that only very little changes are required to Lothar's driver as the logic is very similar and the 1160 stuff is mostly in separate files. This approach may be less efficient than Olav's approach, but it could be improved a bit more if instead of using a memory buffer one would use a type of SG array. For me performance is not a requirement, correct operation is. Also this approach should allow for ISO traffic (not implemented yet) to be handled, provided Lothar's driver handles it (has that been tested?). I also have INTL traffic going to some extend. I am not entirely finished debugging everything yet but I have the following working: (1) USB Storage devices (Flash stick and Hard drive). I can perform all disk drive operations (format, fsck, mount, fdisk, ...), I can transfer large amounts of data (I've tested about 250MB) and I can perform kernel compiles on the hard drive. My transfer rates are about 216 kByte/s for the flash and 242 kByte/s for the HD (including syncing buffers). This seems pretty steady, but I did have to temporarily restrict Lothar's driver to only handle a single TD per interrupt time. I imagine performance will increase once I remove this restriction. (2) I have a FTDI USB to serial driver ~working~ at least when transfering in a single direction. The device often seems to report data toggle errors that I handle by toggling the toggle bit (incorrect?) and resubmitting up to 3 times. The device routinely does so on the first outgoing PTD. I'm thinking this is more of a device problem than a HCD problem. In a single direction I have transferred as much as 500KB. (3) In some limited means I did at one point have INTL traffic going using a USB mouse (haven't tried it lately, so I don't know if it still works). Using the synchronization buffer idea, I can handle INTL traffic by merging it onto the isp1160's ATL buffer. I did receive data from the mouse at it was moving, but since I am on an embedded system, I have not been able to truly verify that this data is sensible. A couple of observations: (a) I find many PTDS have to be resubmitted many times before they get handled by the device even if they are finished submitting early in the frame remaining cycle. (b) I found better results by only using the SOF interrupt for timing (still handle the other ints, but only on a SOF). (c) I'm working on a 9600bps serial console, so I can't easily print debug messages without disrupting the timing behaviour of this driver. So I've setup a memory loging system (similar to __log_buf) that tracks the state of the syncronization buffer in a circular buffer. I can simply dump the kernel memory at that address and view the results in ASCII. Or I have function controls to clear and print the log. To debug issues with this driver, you really need good debugging facilities, since even using KGDB won't help you much, as it again changes the timing behaviour and you need some way to look into the past to deciper what is going on. Outstanding problems: (1) Driver doesn't detect disconnect of a device until new device is reconnected (2) I have intermittent segmentation faults and page faults that seem to point to the dma_pool module, but could easily be a system configuration issue. It's infrequent enough that it won't matter for now, but does need to be addressed. (3) There are problems when in some cases when multiple ATL PTDS are in the sync buffer ... needs investigation. I don't have this code cleaned up or applied to Lothar's patch yet. I really want to review the changes I had to make to Lothar's driver, but I won't be able to do that until after Christmas break. If anyone wants a snapshot of my files, let me know, but some changes may be specific to my arch without warning ;). -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Michael Sent: Tuesday, December 21, 2004 2:43 PM To: Olav Kongas; Dimitris Lampridis Cc: linux-usb-devel@lists.sourceforge.net Subject: [linux-usb-devel] ISP116x / 1362 driver progress Hi guys. I haven't seen anything on the list recently regarding this driver, and I was wondering how you were doing. Olav mentioned perhaps rewriting the driver, based on the new sl811-hcd driver, which I agree is a better solution. I would like to see this, but I can't help much (or, atleast right now) except test it on my hardware. I seem to have the ohci-isp1362 driver finally working enough for my purposes. The biggest change that I made was to limit the PTD buffer setup to use only one ATL buffer, and only one INT buffer. And the INT buffer needed to be 64 bytes. That seemed to do it for me. I've been able to mount, read, and write USB flash drives, use a USB hub in the middle, even use a USB-serial converter. Anyways, that's my status. I'd be interested in hearing how things are going with you. Thanks, Mike ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel