From: Greg KH <greg@kroah.com>
To: Wolfgang Wilhelm <wilhelm@fastcomtec.com>
Cc: linux-usb@vger.kernel.org,
Austin S Hemmelgarn <ahferroin7@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: Problem with USB driver using two devices
Date: Wed, 23 Nov 2016 15:57:47 +0100 [thread overview]
Message-ID: <20161123145747.GA4137@kroah.com> (raw)
In-Reply-To: <5835962F.20615.B8710F6@wilhelm.fastcomtec.com>
On Wed, Nov 23, 2016 at 02:14:23PM +0100, Wolfgang Wilhelm wrote:
> Dear Sir,
Hi!
<adding the linux-usb@vger.kernel.org mailing list, as that is the
proper place for Linux USB things to be discussed> and putting stable@
in bcc: as this has nothing to do with stable kernel releases.>
>
> we are a small company FAST ComTec GmbH
> (www.fastcomtec.com) and produce multichannel analyzers
> with Windows software. I am the software developer and
> would like to get our software working also under Linux
> with the help of WINE.
>
> I was already successfull with our USB devices and most
> of our PCI cards, but now we have found that our USB
> driver does not work with the second device if more than
> one USB device is connected. The "read" function does
> not work with the second device, all other functions work.
> (tested with Debian v 8, kernel 3.16.0)
>
> The driver is based on a skeleton source provided by you.
> The driver source can be downloaded here:
>
> https://www.fastcomtec.com/ftp/usb1mcs6.zip
>
> Please could you have a look on it if you can see an error?
> Or do you think it could be an error in the Linux kernel?
This isn't a limitation in the kernel at all, something must be odd with
the driver. We can review it a bit better if you want us to.
At first glance, the driver looks fine, I don't see anything obvious
that is making it only work for one device and not others.
But, it's a bit hard to tell, what type of error messages do you get
when you plug two devices in? What is your userspace program expecting
to have happen that is not working properly here?
But, let's step back a bit, why do you need a kernel driver at all for
this device? Can you just use libusb and a userspace program to control
your device instead? That would get you a solution that worked on all
operating systems, without a need for a kernel driver for any of them.
If you really do want this to be a kernel driver, we will be glad to
review it in further detail if you wish for us to merge it into the main
kernel source tree, so that users don't have to download anything, and
then your device would "just work" with all future Linux kernel
releases.
Also note, I do see some security problems with your driver code, but
they aren't things that would cause multiple devices to not work, but
could cause problems for users with this driver loaded as you could tie
up resources in bad ways, or potentially crash the kernel easily.
thanks,
greg k-h
prev parent reply other threads:[~2016-11-23 14:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 13:24 problem with "serial" driver in kernel 3.16.0 Wolfgang Wilhelm
2015-09-17 13:54 ` Greg KH
2015-09-17 20:03 ` Austin S Hemmelgarn
2015-09-18 9:24 ` Wolfgang Wilhelm
2015-09-18 16:23 ` Greg KH
2015-09-18 17:52 ` Dr. Wolfgang Wilhelm
2016-11-23 13:14 ` Problem with USB driver using two devices Wolfgang Wilhelm
2016-11-23 14:57 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161123145747.GA4137@kroah.com \
--to=greg@kroah.com \
--cc=ahferroin7@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=wilhelm@fastcomtec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).