From: dave p. <dpe...@gm...> - 2024-07-17 07:54:36
|
Hi Michael, We have no guidelines for submitting patches, we are very flexible. Smaller patches are of course preferred. A lot of work has been done to avoid missing or double interrupts, although we had not seen buffer overrun. See also workaround <https://forums.raspberrypi.com/viewtopic.php?t=350295> for a hardware issue. What kernel version are you using? What was your test setup when you encountered the problems you mentioned? cheers, -Dave On Sun, 14 Jul 2024 at 19:07, Michael Schwingen <mi...@sc...> wrote: > Hi, > > are there any guidelines on how to submit patches, and the formatting style > preferred? > > I have built another GPIO-based GPIB adapter: > > https://www.schwingen.org/yoga-gpib/ > > I did the first development/testing on a simple adapter using only series > resistors and noticed several problems - mostly hangs due to missing > interrupts, but also kernel crashes due to the interrupt handlers sometimes > transferring more bytes than the buffer size. While this mostly occurred on > a non-working bus (device powered down), I got hangs and lost interrupts > even on a simple setup with only 1 working device attached. > > After some search with a logic analyzer, I came to the conclusion that the > use of edge-triggered interrupts on an asynchronous bus with slow edges > does > not really work reliably. I re-wrote the interrupt handlers in > gpib_bitbang.c to be level-sensitive, enabling/disabling them as required > on > the fly. > > The resulting code works reliably in my tests both with the simple > series-resistor-based adapter as well as my YOGA adapter with level > shifters, and has been in use for some weeks now in our EMC lab at work. > > As a RFQ, the current code is at > > > https://github.com/mschwingen/hardware/blob/master/YOGA_GPIB/software/gpib_bitbang.c > > I can provide patches as required. Currently, this is one big patch that > contains > - the interrupt rewrite > - modified GPIO setup, since my adapter needs a different GPIO pin layout, > with gaps in the used GPIOs > - LED handling is changed from direct GPIO access to using kernel LED > triggers, allowing to use the LED from system bootup and then switching > to GPIB function as required. > > I am unsure about SRQ interrupt handling, as I don't understand how this is > supposed to work and I can't test it, so I left that as-is. > > I am looking for guidance on how to go forward with this. > > thanks, > Michael Schwingen > > > _______________________________________________ > Linux-gpib-general mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linux-gpib-general > |