USB Keyboard having problems to be detected

2021-01-14 Thread Daniel Santos
my Linux is booted. Best regards, Daniel Santos jan 14 19:05:03 torre kernel: usb 1-5: device descriptor read/all, error -110 jan 14 19:05:03 torre kernel: usb 1-5: new high-speed USB device number 4 using ehci-pci (...) jan 14 19:05:14 torre kernel: usb 1-5: device descriptor read/all, error -

[PING 2] [PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-11-24 Thread Daniel Santos
Ping 2! On 11/05/2018 03:38 PM, Daniel Santos wrote: > Ping. > > Daniel > > On 10/21/2018 07:32 PM, Hou Tao wrote: >> On 2018/10/19 16:30, Daniel Santos wrote: >>> jffs2_sync_fs makes the assumption that if CONFIG_JFFS2_FS_WRITEBUFFER >>> is defined then a

[PING 2] [PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-11-24 Thread Daniel Santos
Ping 2! On 11/05/2018 03:38 PM, Daniel Santos wrote: > Ping. > > Daniel > > On 10/21/2018 07:32 PM, Hou Tao wrote: >> On 2018/10/19 16:30, Daniel Santos wrote: >>> jffs2_sync_fs makes the assumption that if CONFIG_JFFS2_FS_WRITEBUFFER >>> is defined then a

[PING][PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-11-05 Thread Daniel Santos
Ping. Daniel On 10/21/2018 07:32 PM, Hou Tao wrote: > > On 2018/10/19 16:30, Daniel Santos wrote: >> jffs2_sync_fs makes the assumption that if CONFIG_JFFS2_FS_WRITEBUFFER >> is defined then a write buffer is available and has been initialized. >> However, this does is n

[PING][PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-11-05 Thread Daniel Santos
Ping. Daniel On 10/21/2018 07:32 PM, Hou Tao wrote: > > On 2018/10/19 16:30, Daniel Santos wrote: >> jffs2_sync_fs makes the assumption that if CONFIG_JFFS2_FS_WRITEBUFFER >> is defined then a write buffer is available and has been initialized. >> However, this does is n

How to implement "#interrupt-cells = <2>" for a gpiochip?

2018-10-29 Thread Daniel Santos
Hello, I'm trying to use a GPIO as an interrupt on an mt7620 (using OpenWRT drivers) and I can't seem to figure out how to glue my two-celled interrupt description (including the trigger) to the device tree code.  This is the gpio driver I'm using: 

How to implement "#interrupt-cells = <2>" for a gpiochip?

2018-10-29 Thread Daniel Santos
Hello, I'm trying to use a GPIO as an interrupt on an mt7620 (using OpenWRT drivers) and I can't seem to figure out how to glue my two-celled interrupt description (including the trigger) to the device tree code.  This is the gpio driver I'm using: 

Re: [PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-10-21 Thread Daniel Santos
On 10/21/2018 07:32 PM, Hou Tao wrote: > > On 2018/10/19 16:30, Daniel Santos wrote: >> jffs2_sync_fs makes the assumption that if CONFIG_JFFS2_FS_WRITEBUFFER >> is defined then a write buffer is available and has been initialized. >> However, this does is not the case

Re: [PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-10-21 Thread Daniel Santos
On 10/21/2018 07:32 PM, Hou Tao wrote: > > On 2018/10/19 16:30, Daniel Santos wrote: >> jffs2_sync_fs makes the assumption that if CONFIG_JFFS2_FS_WRITEBUFFER >> is defined then a write buffer is available and has been initialized. >> However, this does is not the case

[PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-10-19 Thread Daniel Santos
supers+0xf4/0x120 [ 90.866729] [<80158fc4>] sys_sync+0x44/0x9c [ 90.875067] [<80014424>] syscall_common+0x34/0x58 Signed-off-by: Daniel Santos --- fs/jffs2/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 793ad

[PATCH] jffs2: Fix use of uninitialized delayed_work, lockdep breakage

2018-10-19 Thread Daniel Santos
supers+0xf4/0x120 [ 90.866729] [<80158fc4>] sys_sync+0x44/0x9c [ 90.875067] [<80014424>] syscall_common+0x34/0x58 Signed-off-by: Daniel Santos --- fs/jffs2/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 793ad

Deadlock in md

2018-08-29 Thread Daniel Santos
I have not rebooted my system since recovering my data off of an old raid5 array with an external journal which broke after a crash in write-back mode (https://www.spinics.net/lists/raid/msg61331.html) and I noticed this in my kernel log.  I had the array assembled in read-only mode without a

Deadlock in md

2018-08-29 Thread Daniel Santos
I have not rebooted my system since recovering my data off of an old raid5 array with an external journal which broke after a crash in write-back mode (https://www.spinics.net/lists/raid/msg61331.html) and I noticed this in my kernel log.  I had the array assembled in read-only mode without a

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Daniel Santos
Hello Nick, On 08/27/2018 03:09 PM, Nick Desaulniers wrote: >> Now we're back to the question of "what do you mean by 'constant'"? If >> you mean a C constant expression (as defined in the C standard) than >> almost none of this code fits that criteria. For these compile-time >> assertions to

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Daniel Santos
Hello Nick, On 08/27/2018 03:09 PM, Nick Desaulniers wrote: >> Now we're back to the question of "what do you mean by 'constant'"? If >> you mean a C constant expression (as defined in the C standard) than >> almost none of this code fits that criteria. For these compile-time >> assertions to

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Daniel Santos
Hello Masahiro, On 08/25/2018 01:16 PM, Masahiro Yamada wrote: > __compiletime_assert_fallback() is supposed to stop building earlier > by using the negative-array-size method in case the compiler does not > support "error" attribute, but has never worked like that. > > You can simply try: > >

Re: [PATCH v2] compiler.h: give up __compiletime_assert_fallback()

2018-08-27 Thread Daniel Santos
Hello Masahiro, On 08/25/2018 01:16 PM, Masahiro Yamada wrote: > __compiletime_assert_fallback() is supposed to stop building earlier > by using the negative-array-size method in case the compiler does not > support "error" attribute, but has never worked like that. > > You can simply try: > >

Re: [RFC PATCH] compiler.h: give up __compiletime_assert_fallback()

2018-08-21 Thread Daniel Santos
On 08/19/2018 03:25 PM, Nick Desaulniers wrote: > + gbiv who wrote this cool paste (showing alternatives to > _Static_assert, which is supported by both compilers in -std=gnu89, > but not until gcc 4.6): https://godbolt.org/g/DuLsxu > > I can't help but think that BUILD_BUG_ON_MSG should use >

Re: [RFC PATCH] compiler.h: give up __compiletime_assert_fallback()

2018-08-21 Thread Daniel Santos
On 08/19/2018 03:25 PM, Nick Desaulniers wrote: > + gbiv who wrote this cool paste (showing alternatives to > _Static_assert, which is supported by both compilers in -std=gnu89, > but not until gcc 4.6): https://godbolt.org/g/DuLsxu > > I can't help but think that BUILD_BUG_ON_MSG should use >

Re: BUILD_BUG_ON_MSG

2018-04-15 Thread Daniel Santos
Hello Julia, I'm CCing LKML on this so that others can be involved. On 04/15/2018 12:43 AM, Julia Lawall wrote: > Hello, > > I saw that you introduced BUILD_BUG_ON_MSG in the Linux kernel a few years > ago. > > BUILD_BUG_ON_MSG is not safe when used in header files. Via > compiletime_assert,

Re: BUILD_BUG_ON_MSG

2018-04-15 Thread Daniel Santos
Hello Julia, I'm CCing LKML on this so that others can be involved. On 04/15/2018 12:43 AM, Julia Lawall wrote: > Hello, > > I saw that you introduced BUILD_BUG_ON_MSG in the Linux kernel a few years > ago. > > BUILD_BUG_ON_MSG is not safe when used in header files. Via > compiletime_assert,

Re: [PATCH 3.5 36/88] spidev: fix hang when transfer_one_message fails

2014-02-07 Thread Daniel Santos
On 02/07/2014 05:22 AM, Luis Henriques wrote: 3.5.7.30 -stable review patch. If anyone has any objections, please let me know. -- From: Daniel Santos commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d upstream. This corrects a problem in spi_pump_messages() that leads

Re: [PATCH 3.5 36/88] spidev: fix hang when transfer_one_message fails

2014-02-07 Thread Daniel Santos
On 02/07/2014 05:22 AM, Luis Henriques wrote: 3.5.7.30 -stable review patch. If anyone has any objections, please let me know. -- From: Daniel Santos daniel.san...@pobox.com commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d upstream. This corrects a problem

Re: spidev: fix hang when transfer_one_message fails

2014-01-27 Thread Daniel Santos
or become broken ( which I'm managing via a #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,99,99) check: https://github.com/daniel-santos/mcp2210-linux/blob/master/mcp2210-spi.c#L143). No, don't do that - it's not sensible. If there's something you need work upstream to get it implemented or underst

Re: spidev: fix hang when transfer_one_message fails

2014-01-27 Thread Daniel Santos
or become broken ( which I'm managing via a #if LINUX_VERSION_CODE = KERNEL_VERSION(4,99,99) check: https://github.com/daniel-santos/mcp2210-linux/blob/master/mcp2210-spi.c#L143). No, don't do that - it's not sensible. If there's something you need work upstream to get it implemented or understand

Re: spidev: fix hang when transfer_one_message fails

2014-01-23 Thread Daniel Santos
,99) check: https://github.com/daniel-santos/mcp2210-linux/blob/master/mcp2210-spi.c#L143). The reason is for this is that the mcp2210 driver has an internal command queue that manages (per its requirements) spi messages as well as other types of commands to the remote (via USB) device (which is b

Re: spidev: fix hang when transfer_one_message fails

2014-01-23 Thread Daniel Santos
) check: https://github.com/daniel-santos/mcp2210-linux/blob/master/mcp2210-spi.c#L143). The reason is for this is that the mcp2210 driver has an internal command queue that manages (per its requirements) spi messages as well as other types of commands to the remote (via USB) device (which is both

Re: *[PATCH]* spidev: fix hang when transfer_one_message fails

2014-01-05 Thread Daniel Santos
Sorry, the "[PATCH]" prefix didn't get in the subject. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at

Re: *[PATCH]* spidev: fix hang when transfer_one_message fails

2014-01-05 Thread Daniel Santos
Sorry, the [PATCH] prefix didn't get in the subject. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-23 Thread Daniel Santos
On 09/20/2013 08:07 AM, David Howells wrote: I suspect he doesn't really need to implement a "strerror()" function but should rather build it straight into printk()/vsprintf(). David Indeed we don't necessarily *need* a strerror() function per-se, but it is an addition to the libc support in

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-23 Thread Daniel Santos
On 09/20/2013 06:45 AM, Joe Perches wrote: On Fri, 2013-09-20 at 00:21 -0500, Daniel Santos wrote: [nice example about bloat] Yeah, I do agree, I just don't see how to do it without introducing unnecessary bloat. I think the code size cost of %pE is pretty trivial compared to the log size

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-23 Thread Daniel Santos
On 09/20/2013 06:45 AM, Joe Perches wrote: On Fri, 2013-09-20 at 00:21 -0500, Daniel Santos wrote: [nice example about bloat] Yeah, I do agree, I just don't see how to do it without introducing unnecessary bloat. I think the code size cost of %pE is pretty trivial compared to the log size

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-23 Thread Daniel Santos
On 09/20/2013 08:07 AM, David Howells wrote: I suspect he doesn't really need to implement a strerror() function but should rather build it straight into printk()/vsprintf(). David Indeed we don't necessarily *need* a strerror() function per-se, but it is an addition to the libc support in

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-19 Thread Daniel Santos
On 09/19/2013 08:07 PM, Joe Perches wrote: On Wed, 2013-09-18 at 20:27 -0500, Daniel Santos wrote: if I use ERR_PTR() on a signed int on a x86_64 where pointer is 64 bits and int is 32, wouldn't that mean a signed conversion instruction where the sign bit has to be moved from bit 31 to 63

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-19 Thread Daniel Santos
On 09/19/2013 05:35 PM, Daniel Santos wrote: Hmm, I cannot reproduce the error. :( I'm using next-20130919 currently (x86_64), and if I try to just "make O=lib" it fails w/o my patches. The only file that should depend upon error_strings.h is lib/string.c. Ahh! I've never seen

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-19 Thread Daniel Santos
On 09/18/2013 06:38 AM, David Howells wrote: danielfsan...@att.net wrote: This is a simple bash script that parses our errno*.h files and formats them into the error_strings.h header that our strerror and strerror_name functions will use later. I presume you haven't tried building with a

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-19 Thread Daniel Santos
On 09/18/2013 06:38 AM, David Howells wrote: danielfsan...@att.net wrote: This is a simple bash script that parses our errno*.h files and formats them into the error_strings.h header that our strerror and strerror_name functions will use later. I presume you haven't tried building with a make

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-19 Thread Daniel Santos
On 09/19/2013 05:35 PM, Daniel Santos wrote: Hmm, I cannot reproduce the error. :( I'm using next-20130919 currently (x86_64), and if I try to just make O=lib it fails w/o my patches. The only file that should depend upon error_strings.h is lib/string.c. Ahh! I've never seen the make O

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-19 Thread Daniel Santos
On 09/19/2013 08:07 PM, Joe Perches wrote: On Wed, 2013-09-18 at 20:27 -0500, Daniel Santos wrote: if I use ERR_PTR() on a signed int on a x86_64 where pointer is 64 bits and int is 32, wouldn't that mean a signed conversion instruction where the sign bit has to be moved from bit 31 to 63

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:04 AM, David Howells wrote: Joe Perches wrote: On Tue, 2013-09-17 at 18:08 -0500, danielfsan...@att.net wrote: This adds an extension for the integral format specifier suffix of 'e', so that the format %[duxXo]e will result in printing an number (as before) in addition to a

Re: [PATCH 0/5] Preliminary: Add error names & descrptions to printks

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:08 AM, David Howells wrote: danielfsan...@att.net wrote: Typically, we don't care about error messages or names in the kernel because userspace will manage that. But sometimes we need to output an error number to printks and that creates a situation where a user, system

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:38 AM, David Howells wrote: danielfsan...@att.net wrote: This is a simple bash script that parses our errno*.h files and formats them into the error_strings.h header that our strerror and strerror_name functions will use later. I presume you haven't tried building with a

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:55 AM, David Howells wrote: David Howells wrote: (1) Why are you double-NUL'ing all your strings? (see the \0 in the strings) Ah... I see what you're doing. I missed the fact that you don't have a comma after each string. Yeah, I was trying to format the code so that

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:55 AM, David Howells wrote: David Howells dhowe...@redhat.com wrote: (1) Why are you double-NUL'ing all your strings? (see the \0 in the strings) Ah... I see what you're doing. I missed the fact that you don't have a comma after each string. Yeah, I was trying to

Re: [PATCH 1/5] scripts: Add mkstrerror.sh

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:38 AM, David Howells wrote: danielfsan...@att.net wrote: This is a simple bash script that parses our errno*.h files and formats them into the error_strings.h header that our strerror and strerror_name functions will use later. I presume you haven't tried building with a make

Re: [PATCH 0/5] Preliminary: Add error names descrptions to printks

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:08 AM, David Howells wrote: danielfsan...@att.net wrote: Typically, we don't care about error messages or names in the kernel because userspace will manage that. But sometimes we need to output an error number to printks and that creates a situation where a user, system

Re: [PATCH 5/5] lib: Add error string support to printks

2013-09-18 Thread Daniel Santos
On 09/18/2013 06:04 AM, David Howells wrote: Joe Perches j...@perches.com wrote: On Tue, 2013-09-17 at 18:08 -0500, danielfsan...@att.net wrote: This adds an extension for the integral format specifier suffix of 'e', so that the format %[duxXo]e will result in printing an number (as before)

Re: [PATCH 2/5] lib: Add .config options for error strings in printks

2013-09-17 Thread Daniel Santos
On 09/17/2013 06:08 PM, danielfsan...@att.net wrote: --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -58,6 +58,7 @@ config DYNAMIC_DEBUG implicitly compiles in all pr_debug() and dev_dbg() calls, which enlarges the kernel text size by about 2%. + If a source

Re: [PATCH 2/5] lib: Add .config options for error strings in printks

2013-09-17 Thread Daniel Santos
On 09/17/2013 06:08 PM, danielfsan...@att.net wrote: --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -58,6 +58,7 @@ config DYNAMIC_DEBUG implicitly compiles in all pr_debug() and dev_dbg() calls, which enlarges the kernel text size by about 2%. + If a source

Re: "Virtual" Interrupts -- Need help please

2013-09-11 Thread Daniel Santos
On 09/10/2013 01:01 PM, Mark Brown wrote: On Mon, Sep 09, 2013 at 04:12:21PM -0500, Daniel Santos wrote: One of my original requirements for this driver is that it is reusable for different devices that use the MCP2210, not just my own hardware. There are a number of ways to accomplish

Re: Virtual Interrupts -- Need help please

2013-09-11 Thread Daniel Santos
On 09/10/2013 01:01 PM, Mark Brown wrote: On Mon, Sep 09, 2013 at 04:12:21PM -0500, Daniel Santos wrote: One of my original requirements for this driver is that it is reusable for different devices that use the MCP2210, not just my own hardware. There are a number of ways to accomplish

Re: "Virtual" Interrupts -- Need help please

2013-09-09 Thread Daniel Santos
On 09/09/2013 06:06 AM, Mark Brown wrote: On Sat, Sep 07, 2013 at 07:19:06PM -0500, Daniel Santos wrote: So do i create an IRQ domain and then call generic_handle_irq() from my URB complete() function? If so, which type of IRQ Domain is appropriate for this? Unlike typical platform devices

Re: Virtual Interrupts -- Need help please

2013-09-09 Thread Daniel Santos
On 09/09/2013 06:06 AM, Mark Brown wrote: On Sat, Sep 07, 2013 at 07:19:06PM -0500, Daniel Santos wrote: So do i create an IRQ domain and then call generic_handle_irq() from my URB complete() function? If so, which type of IRQ Domain is appropriate for this? Unlike typical platform devices

Re: "Virtual" Interrupts -- Need help please

2013-09-08 Thread Daniel Santos
On 09/07/2013 07:52 PM, Guenter Roeck wrote: On 09/07/2013 05:19 PM, Daniel Santos wrote: I've posted a number of requests for aid on this and have gotten very little responses and none that were helpful. I have spent at least 24 hours of research time on this and just a little direction from

Re: Virtual Interrupts -- Need help please

2013-09-08 Thread Daniel Santos
On 09/07/2013 07:52 PM, Guenter Roeck wrote: On 09/07/2013 05:19 PM, Daniel Santos wrote: I've posted a number of requests for aid on this and have gotten very little responses and none that were helpful. I have spent at least 24 hours of research time on this and just a little direction from

"Virtual" Interrupts -- Need help please

2013-09-07 Thread Daniel Santos
), but that can wait. Any help *greatly* appreciated and thank you in advance! Daniel PS: If interested, my current driver here: https://github.com/daniel-santos/mcp2210-linux. I haven't sought review yet because I want to finish it first. -- To unsubscribe from this list: send the line

Virtual Interrupts -- Need help please

2013-09-07 Thread Daniel Santos
), but that can wait. Any help *greatly* appreciated and thank you in advance! Daniel PS: If interested, my current driver here: https://github.com/daniel-santos/mcp2210-linux. I haven't sought review yet because I want to finish it first. -- To unsubscribe from this list: send the line

Re: RESEND: Generating interrupts from a USB device driver? (USB to SPI/GPIO bridge)

2013-09-03 Thread Daniel Santos
On 09/02/2013 06:07 PM, Greg KH wrote: On Mon, Sep 02, 2013 at 05:46:58PM -0500, Daniel Santos wrote: Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while servicing

Re: RESEND: Generating interrupts from a USB device driver?

2013-09-03 Thread Daniel Santos
ivers. https://github.com/daniel-santos/mcp2210-linux/ Anyway, look at the spi core, I think you want to tie into the spi_new_device() call in your usb driver, and start sending/receiving data through the SPI interfaces the spi core provides. I'm actually using the alternative to th

Re: RESEND: Generating interrupts from a USB device driver?

2013-09-03 Thread Daniel Santos
://github.com/daniel-santos/mcp2210-linux/ Anyway, look at the spi core, I think you want to tie into the spi_new_device() call in your usb driver, and start sending/receiving data through the SPI interfaces the spi core provides. I'm actually using the alternative to that call, which

Re: RESEND: Generating interrupts from a USB device driver? (USB to SPI/GPIO bridge)

2013-09-03 Thread Daniel Santos
On 09/02/2013 06:07 PM, Greg KH wrote: On Mon, Sep 02, 2013 at 05:46:58PM -0500, Daniel Santos wrote: Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while servicing

Re: RESEND: Generating interrupts from a USB device driver?

2013-09-02 Thread Daniel Santos
On 09/02/2013 06:07 PM, Greg KH wrote: On Mon, Sep 02, 2013 at 05:46:58PM -0500, Daniel Santos wrote: Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while servicing

RESEND: Generating interrupts from a USB device driver?

2013-09-02 Thread Daniel Santos
Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while servicing the complete() function of an interrupt URB. While I realize that this may seem strange, the purpose is for a

RESEND: Generating interrupts from a USB device driver?

2013-09-02 Thread Daniel Santos
Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while servicing the complete() function of an interrupt URB. While I realize that this may seem strange, the purpose is for a

Re: RESEND: Generating interrupts from a USB device driver?

2013-09-02 Thread Daniel Santos
On 09/02/2013 06:07 PM, Greg KH wrote: On Mon, Sep 02, 2013 at 05:46:58PM -0500, Daniel Santos wrote: Hello guys. I didn't get a response the last time so hopefully with 3.11 out I'll get one this time. I need to be able to generate interrupts from a USB device driver while servicing

USB-to-SPI bridge to spi protocol driver w/ interrupts?

2013-08-30 Thread Daniel Santos
also very nice for prototyping. My current driver is on github: https://github.com/daniel-santos/mcp2210-linux/ Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.

USB-to-SPI bridge to spi protocol driver w/ interrupts?

2013-08-30 Thread Daniel Santos
for prototyping. My current driver is on github: https://github.com/daniel-santos/mcp2210-linux/ Daniel -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH v2] gpiolib: Fix crash when exporting non-existent gpio

2013-08-24 Thread Daniel Santos
hmm, git send-email didn't change my subject on the above message to "[PATCH v2]", not sure what I did wrong. Sorry about that. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH] gpiolib: Fix crash when exporting non-existant gpio

2013-08-24 Thread Daniel Santos
On 08/24/2013 02:57 PM, Guenter Roeck wrote: Looking into calling code, desc_to_gpio() is clearly not supposed to return an error, and it will result in odd behavior if it returns -1. For example, the resulting debug message of "gpio--1 (...) status ..." is not very useful. It would make

Re: [PATCH] gpiolib: Fix crash when exporting non-existant gpio

2013-08-24 Thread Daniel Santos
On 08/24/2013 02:57 PM, Guenter Roeck wrote: Looking into calling code, desc_to_gpio() is clearly not supposed to return an error, and it will result in odd behavior if it returns -1. For example, the resulting debug message of gpio--1 (...) status ... is not very useful. It would make

Re: [PATCH v2] gpiolib: Fix crash when exporting non-existent gpio

2013-08-24 Thread Daniel Santos
hmm, git send-email didn't change my subject on the above message to [PATCH v2], not sure what I did wrong. Sorry about that. Daniel -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v7 1/9] compiler-gcc4.h: Reorder macros based upon gcc ver

2013-01-01 Thread Daniel Santos
On 01/01/2013 03:09 PM, danielfsan...@att.net wrote: #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -#if __GNUC_MINOR__>= 4 +#if GCC_VERSION>= 40400 #define __HAVE_BUILTIN_BSWAP32__ #define __HAVE_BUILTIN_BSWAP64__ #endif -#if __GNUC_MINOR__>= 8 || (defined(__powerpc__)&& __GNUC_MINOR__>= 6)

Re: [PATCH v7 1/9] compiler-gcc4.h: Reorder macros based upon gcc ver

2013-01-01 Thread Daniel Santos
On 01/01/2013 03:09 PM, danielfsan...@att.net wrote: #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -#if __GNUC_MINOR__= 4 +#if GCC_VERSION= 40400 #define __HAVE_BUILTIN_BSWAP32__ #define __HAVE_BUILTIN_BSWAP64__ #endif -#if __GNUC_MINOR__= 8 || (defined(__powerpc__) __GNUC_MINOR__= 6) +#if

Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it

2012-12-13 Thread Daniel Santos
On 12/13/2012 03:43 AM, Jan Beulich wrote: On 13.12.12 at 01:29, Daniel Santos wrote: Wow, it's really easy to miss parallel development on the same issue. Sorry for my late response to this thread. I started another thread addressing these issues (as well as a few others) back in September

Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it

2012-12-13 Thread Daniel Santos
On 12/13/2012 03:43 AM, Jan Beulich wrote: On 13.12.12 at 01:29, Daniel Santosdanielfsan...@att.net wrote: Wow, it's really easy to miss parallel development on the same issue. Sorry for my late response to this thread. I started another thread addressing these issues (as well as a few

Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it

2012-12-12 Thread Daniel Santos
On 11/06/2012 03:23 AM, Jan Beulich wrote: This sort of logic is normally performed via the include/linux/compiler*.h system. And grep __GNUC include/linux/*.h indicates that we've been pretty successful. Can we do that here too? (eg: suppose the Intel compiler supports

Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it

2012-12-12 Thread Daniel Santos
Wow, it's really easy to miss parallel development on the same issue. Sorry for my late response to this thread. I started another thread addressing these issues (as well as a few others) back in September (https://lkml.org/lkml/2012/9/28/1136). I've finally gotten ACKs from maintainers

Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it

2012-12-12 Thread Daniel Santos
Wow, it's really easy to miss parallel development on the same issue. Sorry for my late response to this thread. I started another thread addressing these issues (as well as a few others) back in September (https://lkml.org/lkml/2012/9/28/1136). I've finally gotten ACKs from maintainers

Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it

2012-12-12 Thread Daniel Santos
On 11/06/2012 03:23 AM, Jan Beulich wrote: This sort of logic is normally performed via the include/linux/compiler*.h system. And grep __GNUC include/linux/*.h indicates that we've been pretty successful. Can we do that here too? (eg: suppose the Intel compiler supports

Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-20 Thread Daniel Santos
On 11/17/2012 08:38 AM, Borislav Petkov wrote: > On Thu, Nov 15, 2012 at 01:11:15PM -0600, Daniel Santos wrote: >> Ah yes. I did notice that at one point, but I think it slipped >> my mind. Also, the kernel has introduced me to the usage of the >> !! construct, of which I

Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-20 Thread Daniel Santos
On 11/17/2012 08:38 AM, Borislav Petkov wrote: On Thu, Nov 15, 2012 at 01:11:15PM -0600, Daniel Santos wrote: Ah yes. I did notice that at one point, but I think it slipped my mind. Also, the kernel has introduced me to the usage of the !! construct, of which I'm well versed in its affects

Re: [PATCH v5 9/9] bug.h, compiler.h: Introduce compiletime_assert & BUILD_BUG_ON_MSG

2012-11-16 Thread Daniel Santos
On 11/13/2012 04:13 PM, danielfsan...@att.net wrote: > +#define __compiletime_assert(condition, msg, __func) \ > + do {\ > + bool __cond = !(condition); \ > + extern

Re: [PATCH v5 9/9] bug.h, compiler.h: Introduce compiletime_assert BUILD_BUG_ON_MSG

2012-11-16 Thread Daniel Santos
On 11/13/2012 04:13 PM, danielfsan...@att.net wrote: +#define __compiletime_assert(condition, msg, __func) \ + do {\ + bool __cond = !(condition); \ + extern void

Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-15 Thread Daniel Santos
> code if it were optimized. However, using a negative-sized array with a >> similar value will not result in an false-positive (error). The only >> caveat being that it will also fail to catch valid conditions, which we >> should be expecting in an unoptimized build anyway. >&g

Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-15 Thread Daniel Santos
This patch eliminates that error. >> >> Signed-off-by: Daniel Santos >> --- >> include/linux/bug.h |5 +++-- >> 1 files changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/include/linux/bug.h b/include/linux/bug.h >> index 1b2465d..ccd

Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-15 Thread Daniel Santos
. Signed-off-by: Daniel Santos daniel.san...@pobox.com --- include/linux/bug.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/bug.h b/include/linux/bug.h index 1b2465d..ccd44ce 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -58,8

Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-15 Thread Daniel Santos
conditions, which we should be expecting in an unoptimized build anyway. Signed-off-by: Daniel Santos daniel.san...@pobox.com --- include/linux/bug.h |2 +- include/linux/compiler.h |5 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/include/linux/bug.h b

Re: [PATCH v5 7/9] bug.h: Make BUILD_BUG_ON generate compile-time error

2012-11-13 Thread Daniel Santos
.h will eventually be included to define __linktime_error > (used in BUILD_BUG_ON). This patch includes it directly for clarity and > to avoid the possibility of changes in /*/include/asm/bug.h being > changed or not including linux/compiler.h for some reason. > > Signed-off-b

Re: [PATCH v5 7/9] bug.h: Make BUILD_BUG_ON generate compile-time error

2012-11-13 Thread Daniel Santos
__linktime_error (used in BUILD_BUG_ON). This patch includes it directly for clarity and to avoid the possibility of changes in arch/*/include/asm/bug.h being changed or not including linux/compiler.h for some reason. Signed-off-by: Daniel Santos daniel.san...@pobox.com Acked-by: Borislav Petkov

Re: [PATCH v4 6/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-03 Thread Daniel Santos
On 10/31/2012 06:06 AM, Borislav Petkov wrote: >> Realistically, a single macro could be defined in compiler*.h that >> encapsulates the entirety of this mechanism and only exposes a "black >> box" macro, that will simply expand to something that breaks the build >> in the most appropriate fashion

Re: [PATCH v4 6/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-03 Thread Daniel Santos
On 10/31/2012 06:06 AM, Borislav Petkov wrote: Realistically, a single macro could be defined in compiler*.h that encapsulates the entirety of this mechanism and only exposes a black box macro, that will simply expand to something that breaks the build in the most appropriate fashion based

Re: [PATCH v4 6/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-31 Thread Daniel Santos
On 10/31/2012 06:06 AM, Borislav Petkov wrote: > On Wed, Oct 31, 2012 at 12:34:45AM -0500, Daniel Santos wrote: >> Yes, the __build_bug_on_failed message is much more informative. This >> will only increase with these patches. For example, the line >> >> B

Re: [PATCH v4 6/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-31 Thread Daniel Santos
On 10/31/2012 06:06 AM, Borislav Petkov wrote: On Wed, Oct 31, 2012 at 12:34:45AM -0500, Daniel Santos wrote: Yes, the __build_bug_on_failed message is much more informative. This will only increase with these patches. For example, the line BUILD_BUG_ON(sizeof(*c) != 4); emits this error

Re: [PATCH v4 9/9] bug.h: Convert BUILD_BUG{,_ON} to use BUILD_BUG_ON_MSG

2012-10-30 Thread Daniel Santos
;> call BUILD_BUG_ON_MSG. This not only reduces source code bloat, but >>> also prevents the possibility of code being changed for one macro and >>> not for the other (which was previously the case for BUILD_BUG and >>> BUILD_BUG_ON). >>> >>&g

Re: [PATCH v4 6/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-30 Thread Daniel Santos
ch case it expands to >> do{}while(0), resulting in exactly one compile-time error on all >> versions of gcc. >> >> Signed-off-by: Daniel Santos >> --- >> include/linux/bug.h |4 ++-- >> include/linux/compiler.h |7 +++ >> 2 fil

Re: [PATCH v4 6/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-30 Thread Daniel Santos
-by: Daniel Santos daniel.san...@pobox.com --- include/linux/bug.h |4 ++-- include/linux/compiler.h |7 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/linux/bug.h b/include/linux/bug.h index 03259d7..da03dc1 100644 --- a/include/linux/bug.h

Re: [PATCH v4 9/9] bug.h: Convert BUILD_BUG{,_ON} to use BUILD_BUG_ON_MSG

2012-10-30 Thread Daniel Santos
reduces source code bloat, but also prevents the possibility of code being changed for one macro and not for the other (which was previously the case for BUILD_BUG and BUILD_BUG_ON). Signed-off-by: Daniel Santos daniel.san...@pobox.com --- include/linux/bug.h | 17 +++-- 1 files

Re: [PATCH v3 04/10] bug.h: directly include linux/compiler.h

2012-10-28 Thread Daniel Santos
(used in BUILD_BUG_ON). This patch includes it directly for clarity and >> to avoid the possibility of changes in /*/include/asm/bug.h being >> changed or not including linux/compiler.h for some reason. (Later >> patches will in this set use more macros defined in compiler*

Re: [PATCH v3 04/10] bug.h: directly include linux/compiler.h

2012-10-28 Thread Daniel Santos
includes it directly for clarity and to avoid the possibility of changes in arch/*/include/asm/bug.h being changed or not including linux/compiler.h for some reason. (Later patches will in this set use more macros defined in compiler*.h.) Signed-off-by: Daniel Santos daniel.san...@pobox.com

Re: [PATCH v2 03/10] compiler-gcc{3,4}.h: Use GCC_VERSION macro

2012-10-07 Thread Daniel Santos
On 10/07/2012 02:42 PM, Borislav Petkov wrote: > On Sun, Oct 07, 2012 at 01:27:58PM -0500, Daniel Santos wrote: >>> Did I miss something again? This "error" preprocessor function is >>> commented out here? Why? >> We'll have to ask Andrew. Maybe so

  1   2   3   >