Re: Do usb_submit_urb() memory allocation errors really exist in the wild?

2019-02-26 Thread Petr Tesarik
V Tue, 26 Feb 2019 13:09:30 +0100 Nicolas Saenz Julienne napsáno: > Hi, > as I'm sure most of you are aware of, every URB submission triggers a small > memory allocation in the host controller. On top of that it might be run in > atomic context. This has always seemed to me as a possible source o

Re: Do usb_submit_urb() memory allocation errors really exist in the wild?

2019-02-26 Thread Petr Tesarik
On Tue, 26 Feb 2019 13:46:19 +0100 Nicolas Saenz Julienne wrote: >[...] > > USB and "critical" should never be in the same sentance, without the > > word "not" being in there as well. :) > > Fair enough. It might still annoy someone, which computers were never meant > to. > :) I prefer to sa

Re: [PATCH 3/4] cp210x: Store part number

2015-07-26 Thread Petr Tesarik
On Sun, 26 Jul 2015 15:32:54 +0200 Oliver Neukum wrote: > On Fri, 2015-07-24 at 08:48 +0200, Petr Tesarik wrote: > > @@ -872,6 +886,12 @@ static int cp210x_startup(struct usb_serial > > *serial) > > > > usb_set_serial_data(serial, spriv); > > > >

Re: [PATCH 4/4] cp210x: Expose the part number in sysfs

2015-07-24 Thread Petr Tesarik
On Fri, 24 Jul 2015 14:33:23 -0700 Greg Kroah-Hartman wrote: > On Fri, Jul 24, 2015 at 11:00:38PM +0200, Petr Tesarik wrote: > > On Fri, 24 Jul 2015 11:17:55 -0700 > > Greg Kroah-Hartman wrote: > > > > > On Fri, Jul 24, 2015 at 08:48:11AM +0200, Petr Tesarik wro

Re: [PATCH 4/4] cp210x: Expose the part number in sysfs

2015-07-24 Thread Petr Tesarik
On Fri, 24 Jul 2015 11:17:55 -0700 Greg Kroah-Hartman wrote: > On Fri, Jul 24, 2015 at 08:48:11AM +0200, Petr Tesarik wrote: > > From: Petr Tesarik > > > > Make it possible to read the cp210x part number from userspace by making > > it a sysfs attribute. > >

[PATCH 3/4] cp210x: Store part number

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik Query and store the CP210x part number. Signed-off-by: Petr Tesarik --- drivers/usb/serial/cp210x.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 69f03b6..dbfc722 100644 --- a

[PATCH 2/4] cp210x: Unify code for set/get config control messages

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik There is a lot of overlap between the two functions (e.g. calculation of the buffer size), so this removes a bit of code duplication, but most importantly, a more generic function can be easily reused for other message types. Signed-off-by: Petr Tesarik --- drivers/usb

[PATCH 4/4] cp210x: Expose the part number in sysfs

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik Make it possible to read the cp210x part number from userspace by making it a sysfs attribute. Signed-off-by: Petr Tesarik --- drivers/usb/serial/cp210x.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/cp210x.c b

[PATCH 1/4] cp210x: Replace USB magic numbers with symbolic names

2015-07-23 Thread Petr Tesarik
From: Petr Tesarik The request type is in fact made of three fields that already have symbolic constants. While I was rewriting those lines, I also converted the pre-processor defines into an enum, so they are seen by debuggers. Signed-off-by: Petr Tesarik --- drivers/usb/serial/cp210x.c

[PATCH 0/4] Show CP210x part number in sysfs

2015-07-23 Thread Petr Tesarik
set if that's preferred. Petr Tesarik (4): cp210x: Replace USB magic numbers with symbolic names cp210x: Unify code for set/get config control messages cp210x: Store part number cp210x: Expose the part number in sysfs drivers/usb/serial/cp210x.c