On 17/01/18 11:40 +0100, Martin Pieuchot wrote: > Hello Sebastien, > > On 17/01/18(Wed) 10:19, Sebastien Marie wrote: > > [...] > > kernel modification is desirable in some cases, at least for disabling > > ulpt(4) when using cups with USB printer. > > Sorry to hijack your thread, but if somebody wants to fix this ulpt(4) > problem permanently here's the plan: > > - Add the USBD_EXCLUSIVE_USE to usbd_open_pipe() in ulptopen(). > Actually this flag should be the default everywhere. This should > prevent open(2) on /dev/ulpt? to work if a userland driver is using > your printer. > > - Do some plumbing between libusb/ugen(4)/usb(4) to make it possible > to submit bulk transfer via /dev/usb?. The logic in ugenopen() > should also have the USBD_EXCLUSIVE_USE flag such that it will fail > if the corresponding /dev/ultp? has already been opened. > > That should be enough to have CUPS work with GENERIC kernels without > having to disable anything. I'm here to help/review diffs but since > I don't have a printer myself, I can't do the work. >
Oh yes please.