Re: [PATCH v4 1/2] char: xillybus: Move class-related functions to new xillybus_class.c

2021-03-23 Thread Eli Billauer
On 22/03/21 13:11, Greg KH wrote: XILLYBUS and XILLYBUS_PCIE are currently enabled as M in several Linux distributions. Making them depend on, rather than select XILLYBUS_CLASS is likely to disable the driver in those distributions. That's not an issue here, depends-on will allow those d

Re: [PATCH v4 1/2] char: xillybus: Move class-related functions to new xillybus_class.c

2021-03-22 Thread Eli Billauer
On 21/03/21 14:24, Greg KH wrote: +config XILLYBUS_CLASS > + tristate > + >config XILLYBUS >tristate "Xillybus generic FPGA interface" >depends on PCI || OF >select CRC32 > + select XILLYBUS_CLASS depends on, do not select. XILLYBUS and XILLY

Re: [PATCH v4 2/2] staging: Add driver for XillyUSB (Xillybus variant for USB)

2021-03-22 Thread Eli Billauer
Hello, Greg. Thanks for your comments. I'd like to address a couple of them. First, there's the lockless FIFO that is implemented in the driver: On 21/03/21 14:23, Greg KH wrote: + +static unsigned int fifo_read(struct xillyfifo *fifo, + void *data, unsigned int l

[PATCH v4 2/2] staging: Add driver for XillyUSB (Xillybus variant for USB)

2021-03-11 Thread eli . billauer
From: Eli Billauer The XillyUSB driver is the USB variant for the Xillybus FPGA IP core. Even though it presents a nearly identical API on the FPGA and host, it's almost a complete rewrite of the driver: The framework for exchanging data on a USB bus is fundamentally different from doin

[PATCH v4 1/2] char: xillybus: Move class-related functions to new xillybus_class.c

2021-03-11 Thread eli . billauer
From: Eli Billauer This patch is a preparation for adding another related driver, XillyUSB. In order to share some code between the existing Xillybus driver and the one to be added, some functions are moved to xillybus_class.c The header file, xillybus_class.h, is temporarily placed in include

[PATCH v4 0/2] Submission of XillyUSB driver

2021-03-11 Thread eli . billauer
From: Eli Billauer This is a resubmission of the XillyUSB driver, which is the USB variant of the existing Xillybus driver. Because these driver share some API related functions, this submission consists of two patches: (1) A patch moving away Xillybus' class related functions

Re: [kbuild] Re: [PATCH v3 1/2] char: xillybus: Move class-related functions to new xillybus_class.c

2021-03-10 Thread Eli Billauer
On 09/03/21 18:03, Dan Carpenter wrote: url:https://github.com/0day-ci/linux/commits/eli-billauer-gmail-com/Submission-of-XillyUSB-driver/20210309-193645 base:https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 080951f99de1e483a9a48f34c079b634f2912a54 config: x86_64

[PATCH v3 2/2] staging: Add driver for XillyUSB (Xillybus variant for USB)

2021-03-09 Thread eli . billauer
From: Eli Billauer The XillyUSB driver is the USB variant for the Xillybus FPGA IP core. Even though it presents a nearly identical API on the FPGA and host, it's almost a complete rewrite of the driver: The framework for exchanging data on a USB bus is fundamentally different from doin

[PATCH v3 1/2] char: xillybus: Move class-related functions to new xillybus_class.c

2021-03-09 Thread eli . billauer
From: Eli Billauer This patch is a preparation for adding another related driver, XillyUSB. In order to share some code between the existing Xillybus driver and the one to be added, some functions are moved to xillybus_class.c The header file, xillybus_class.h, is temporarily placed in include

[PATCH v3 0/2] Submission of XillyUSB driver

2021-03-09 Thread eli . billauer
From: Eli Billauer This is a resubmission of the XillyUSB driver, which is the USB variant of the existing Xillybus driver. Because these driver share some API related functions, this submission consists of two patches: (1) A patch moving away Xillybus' class related functions

Re: [PATCH] staging: Add xillyusb driver (Xillybus variant for USB)

2020-12-13 Thread Eli Billauer
Hello Greg, There's no TODO file because it would have been empty: There is nothing to do, as far as I know. I submitted this to staging because I failed to push the Xillybus driver to non-staging back in 2013. In the end, the way in was through staging + a review that got it out a year late

[PATCH] staging: Add xillyusb driver (Xillybus variant for USB)

2020-12-13 Thread eli . billauer
From: Eli Billauer Xillybus is a means for exchanging data between an FPGA and a Linux host, which helps making the task easier on both sides. The already existing driver resides in drivers/char/xillybus/ and it supports communication with the FPGA over the PCIe bus. For Xilinx' Zynq

[PATCH] MAINTAINERS: Move Xillybus out of staging

2014-09-08 Thread Eli Billauer
Signed-off-by: Eli Billauer --- MAINTAINERS | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f040e7f..95bcdee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8789,12 +8789,6 @@ M: Arnaud Patard S: Odd Fixes F

Re: [PATCH 14/18] staging: xillybus: Fix incorrect cast

2014-09-05 Thread Eli Billauer
On 05/09/14 12:26, Dan Carpenter wrote: Sorry, I was just wrong on here. I misread the code and also my review comments were too vague and must have puzzled you. (Feel free to call me out on this if I'm wrong next time.) I beg to differ on this one: Your comments were crystal clear. The fac

[PATCH] staging: xillybus: Removed unnecessary cast

2014-09-05 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 30bb7ac..b827fa0 100644 --- a

Re: [PATCH] staging: xillybus: Move out of staging

2014-09-04 Thread Eli Billauer
Hello Dan. I've just submitted the patches for the staging git tree (yourself Cc'ed). I didn't have any objections on your comments, so there isn't much to add -- except for thank you. :) Regards, Eli On 01/09/14 15:13, Dan Carpenter wrote: Pretty nice. This is very special purpose hard

[PATCH 18/18] staging: xillybus: Blank lines add/remove

2014-09-04 Thread Eli Billauer
* Blank lines between a function call and its return status check were removed. * Double blank lines were removed. * Blank lines were added and removed as to silence checkpatch.pl --strict Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h

[PATCH 12/18] staging: xillybus: Added curly brackets as required

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |8 +--- drivers/staging/xillybus/xillybus_pcie.c |4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging

[PATCH 15/18] staging: xillybus: Reorganize line breaks for clarity

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 29 + 1 files changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index

[PATCH 17/18] staging: xillybus: Fix indentations

2014-09-04 Thread Eli Billauer
Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 58 +++--- drivers/staging/xillybus/xillybus_pcie.c |2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging

[PATCH 13/18] staging: xillybus: Fix comments

2014-09-04 Thread Eli Billauer
Trivial comments removed, and one comment clarified Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 15 --- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers

[PATCH 16/18] staging: xillybus: Trivial coding style fixes

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 65bbebb..c678b6c 100644

[PATCH 14/18] staging: xillybus: Fix incorrect cast

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 04c60c6..5ed89ce 100644 --- a

[PATCH 05/18] staging: xillybus: Removed unnecessary error message

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 3050815..222457f

[PATCH 04/18] staging: xillybus: Removed unnecessary warning message

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 3e14198..3050815

[PATCH 11/18] staging: xillybus: Clarified the stop condition for a loop

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 63c2c14..1b63197 100644

[PATCH 08/18] staging: xillybus: EAGAIN status handling improvement

2014-09-04 Thread Eli Billauer
The -EAGAIN status is passed through an "rc" variable instead of a less common flow. Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drive

[PATCH 03/18] staging: xillybus: Non-interruptible mutex_lock() on release method

2014-09-04 Thread Eli Billauer
: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 16 ++-- 1 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 61699fa..3e14198 100644 --- a/

[PATCH 01/18] staging: xillybus: Use devm_kcalloc() for arrays

2014-09-04 Thread Eli Billauer
Replace devm_kzalloc where it applies. Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging

[PATCH 07/18] staging: xillybus: Improved goto flow for error handling

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index fc14b14..45dbf07

[PATCH 10/18] staging: xillybus: Use the return value of wait_event_interruptible

2014-09-04 Thread Eli Billauer
Rather than checking the wait condition, the return value of wait_event_interruptible() and wait_event_interruptible_timeout() is used. Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 38 +++--- 1 files changed

[PATCH 00/18] staging: xillybus: Coding style fixes

2014-09-04 Thread Eli Billauer
hing silly stands out in these patches, odds are it's me, not Dan. :) Regards, Eli Eli Billauer (18): staging: xillybus: Use devm_kcalloc() for arrays staging: xillybus: Use SEEK_* predefined constants staging: xillybus: Non-interruptible mutex_lock() on release method staging: xi

[PATCH 09/18] staging: xillybus: Fixes related to "rc" variable

2014-09-04 Thread Eli Billauer
"rc" is often used to hold the return value of a function call. This patch removes unnecessary assignments to this variable, and makes a few related execution flow improvements. Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_cor

[PATCH 02/18] staging: xillybus: Use SEEK_* predefined constants

2014-09-04 Thread Eli Billauer
Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index cacd560..61699fa 100644

[PATCH 06/18] staging: xillybus: Improved error handling

2014-09-04 Thread Eli Billauer
xilly_scan_idt() now returns an error status code, rather than being a void function and hint the status through an entry in a data structure. Suggested-by: Dan Carpenter Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 20 1 files changed, 8

[PATCH] MAINTAINERS: Add an entry for staging/xillybus

2014-09-02 Thread Eli Billauer
Suggested-by: Greg Kroah-Hartman Signed-off-by: Eli Billauer --- MAINTAINERS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 57e8c3d..acf1a27 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8789,6 +8789,12 @@ M: Arnaud Patard

Re: [PATCH] staging: xillybus: Move out of staging

2014-09-02 Thread Eli Billauer
Hello, Arend. On 01/09/14 16:08, Arend van Spriel wrote: Maybe it would be better to use the DMA-API instead of the PCI wrappers. I just found out that the PCI wrappers were indeed removed from the DMA-API.txt documentation back in 2010, saying that "driver writers are always able to use the

Re: [PATCH] staging: xillybus: Move out of staging

2014-09-01 Thread Eli Billauer
Hello Tobias, Thanks for that heads-up. I'll make a separate patch for MAINTAINERS if and when the driver goes out of staging. No point risking the failure to apply the major patch because of a clash on MAINTAINERS. Regards, Eli On 01/09/14 15:33, Tobias Klauser wrote: I shall continue b

Re: [PATCH] staging: xillybus: Move out of staging

2014-09-01 Thread Eli Billauer
Hello, Dan. Thanks a lot for reviewing the driver. There are indeed a few things that need fixing. I'll be back with patches and responses in a matter of a few days. As for the --strict option, I wasn't aware of it. I learn something new every time. :) Thanks again, Eli On 01/09/14 15:

[PATCH] documentation: devicetree: Added xillybus to vendor-prefixes

2014-08-17 Thread Eli Billauer
Signed-off-by: Eli Billauer --- .../devicetree/bindings/vendor-prefixes.txt|1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index ac7269f..06e698a

[PATCH 2/6] staging: xillybus: Removed mmiowb() before mutex_unlock()

2014-08-16 Thread Eli Billauer
nnecessary. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index 93a3c61..138c069 100644 --- a/drivers/stagin

[PATCH 6/6] staging: xillybus: Removed read barrier at beginning of ISR

2014-08-16 Thread Eli Billauer
The comment (also removed) explains why it was there in the first place, but that doesn't make much sense. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/drivers/staging/xil

[PATCH 3/6] staging: xillybus: Removed mmiowb() as iowrite32() is ordered

2014-08-16 Thread Eli Billauer
mmiowb() was used to make sure that iowrite32() take place in the correct order, which is an unnecessary precuation. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 17 ++--- 1 files changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/staging

[PATCH 1/6] staging: xillybus: Remove mmiowb() before wait_event_*() calls

2014-08-16 Thread Eli Billauer
According to Documentation/memory-barriers.txt, a memory barrier is put in place by wait_event_*() Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b

[PATCH 4/6] staging: xillybus: Removed write memory barriers before wait_event_*()

2014-08-16 Thread Eli Billauer
According to Documentation/memory-barriers.txt, a memory barrier is put in place by wait_event_*() Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b

[PATCH 0/6] staging: xillybus: Removal of memory barriers

2014-08-16 Thread Eli Billauer
lify their review. Even though the driver has been tested on both platforms that are relevant today (arm and x86), this doesn't guarantee that I haven't done something foolish that will cause problems in some new platform. Reviews and comments on these patches are therefore most welcome.

[PATCH 5/6] staging: xillybus: Removed unnecessary smp_wmb()

2014-08-16 Thread Eli Billauer
These memory barriers were added "just to be safe". Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_co

[PATCH 2/2] staging: xillybus: Removed outdated part in README

2014-07-17 Thread Eli Billauer
The dedicated memory management routines have been replaced with devres API, so the related part is removed from the doc. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/README | 23 --- 1 files changed, 0 insertions(+), 23 deletions(-) diff --git a/drivers

[PATCH 1/2] staging: xillybus: Fix if-else coding style errors

2014-07-17 Thread Eli Billauer
According to Documentation/CodingStyle, when one branch of an if-else statement has multiple statements, both branches should be enclosed in curly brackets. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |7 --- 1 files changed, 4 insertions(+), 3 deletions

Re: [PATCH] xillybus: place 'else' on same line as '}'

2014-07-13 Thread Eli Billauer
Hi, Thanks for this. And since I looked at the part in Codingstyle that deals with if-else, I found another few mistakes regarding braces around a single statement. The rules say, it turns out, that if one of the clauses in an if-else is longer than one statement, both clauses should be wrapp

Re: [PATCH 4/4] staging: xillybus: Remove sparse error on IS_ERR()

2014-07-08 Thread Eli Billauer
Sat, Jul 05, 2014 at 12:45:10PM +0300, Eli Billauer wrote: IS_ERR() expects a non-__iomem pointer. This should be fixed in the latest versions of Sparse. Don't make the code worse to work around bugs in the tools. regards, dan carpenter

[PATCH 4/4] staging: xillybus: Remove sparse error on IS_ERR()

2014-07-05 Thread Eli Billauer
IS_ERR() expects a non-__iomem pointer. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c index e0ae234..fb97845

[PATCH 1/4] staging: xillybus: Add sanity check in interrupt handler

2014-07-05 Thread Eli Billauer
Data arriving from the hardware is verified prior to its use. The lack of this check has never been reported to cause a problem, but it's necessary nevertheless. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c |6 ++ 1 files changed, 6 insertions(+), 0 dele

[PATCH 2/4] staging: xillybus: Reorganizing xilly_setupchannels()

2014-07-05 Thread Eli Billauer
Duplicate code in this function was moved into a new function, xilly_get_dma_buffers(). There is no change in functionality. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 345 -- 1 files changed, 138 insertions(+), 207 deletions

[PATCH 3/4] staging: xillybus: Register's address offset notation update

2014-07-05 Thread Eli Billauer
In iowrite32() calls, the address of registers was expressed as e.g. &ep->registers[fpga_msg_ctrl_reg]. This changes to the more common format e.g. ep->registers + fpga_msg_ctrl_reg. There is no functional change. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h

[PATCH v3] staging: xillybus: Use devm_ API for memory allocation and DMA mapping

2014-06-21 Thread Eli Billauer
that it may cause an unnecessary waste of resources. Suggested-by: Baruch Siach Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h | 46 ++-- drivers/staging/xillybus/xillybus_core.c | 186 +- drivers/staging/xillybus/xillybus_of.c

Re: [PATCH] staging: xillybus: Consolidate return statements in xilly_probe()

2014-06-18 Thread Eli Billauer
Hello, Thanks for the patch. However in the patch I'm trying to push, xillybus_do_cleanup() is eliminated completely from the code (with no success so far, because it depends on inserting a patch that adds a devres version of dma_map_single). See https://lkml.org/lkml/2014/6/1/10 So your pa

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-07 Thread Eli Billauer
Hello Shuah, We agree that the streaming API was originally *intended* for short map-unmap DMA sessions, and that dma_alloc_noncoherent() was the *intended* API for those who want to hold the DMA during a device's lifetime. We also agree that on some platforms, DMA mappings are precious, an

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-06 Thread Eli Billauer
On 06/06/14 19:01, Greg KH wrote: Please try to put yourself in my position: I have a driver that I care > about, which works fine for a few years. It's based upon dma_map_single(), > which seems to be the common way to get non-coherent memory, even for the > driver's entire lifespan. I realiz

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-06 Thread Eli Billauer
Hello Joerg. On 05/06/14 00:25, Joerg Roedel wrote: What you are trying to do should work with dma_alloc_noncoherent(). The API allows partial syncs on this memory, so you should be fine. Please try to put yourself in my position: I have a driver that I care about, which works fine for a

Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-04 Thread Eli Billauer
Hi, I believe that I need a managed dma_map_single() my own driver, which doesn't fall in the case of a single use: The driver allocates its buffers with __get_free_pages() (or the to-be managed version of it). Then it cuts the allocated memory into smaller buffers (in some cases, and with ce

[PATCH v2 2/4] dma-mapping: Add devm_ interface for dma_map_single_attrs()

2014-06-01 Thread Eli Billauer
dmam_map_single_attrs() and dmam_unmap_single_attrs() replace the non-*_attrs functions, which are implemented as defines instead. The case of a non-NULL @attrs parameter has not been tested. Suggested-by: Tejun Heo Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt

[PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()

2014-06-01 Thread Eli Billauer
lways returns success. Thanks to Tejun Heo for suggesting this API. Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt |2 + drivers/base/dma-mapping.c| 86 + include/linux/dma-mapping.h |6 ++- 3 files change

[PATCH v2 3/4] dma-mapping: pci: Add devm_ interface for pci_map_single

2014-06-01 Thread Eli Billauer
Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt |2 ++ include/asm-generic/pci-dma-compat.h | 18 ++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index

[PATCH v2 4/4] staging: xillybus: Use devm_ API for memory allocation and DMA mapping

2014-06-01 Thread Eli Billauer
Managed device resource API replaces code that reinvents it for memory allocation, page allocation and DMA mapping. Suggested-by: Baruch Siach Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h | 38 +-- drivers/staging/xillybus/xillybus_core.c | 186

[PATCH v2 0/4] devres: dma-mapping: Introducing new functions

2014-06-01 Thread Eli Billauer
() into dma_map_single_attrs(), and implements the former as a macro. Functions added: * dmam_map_single_attrs() * dmam_unmap_single_attrs() Xillybus' driver works with and without this patch (depends on patches #1 and #3 only). Thanks, Eli Eli Billauer (4): dma-mapping: Add devm_ interfac

Re: [PATCH 2/5] dma-mapping: Add devm_ interface for dma_map_single()

2014-05-20 Thread Eli Billauer
Hello, Tejun. On 19/05/14 23:17, Tejun Heo wrote: What can't it just do the following? if (dma_mapping_error(dev, dma_handle)) { devres_free(dr); return dma_handle; } The caller would have to invoke dma_mapping_error() again but is that a proble

Re: [PATCH 2/5] dma-mapping: Add devm_ interface for dma_map_single()

2014-05-17 Thread Eli Billauer
Hello Tejun, On 17/05/14 00:08, Tejun Heo wrote: Don't we wanna map the underlying operation - dma_map_single_attrs() - instead? I'll resubmit this patch promptly, with a follow-up patch for the diff to implement dmam_map_single_attrs() instead. Plus a define-statement for dmam_map_sing

[PATCH 3/3] dma-mapping: pci: Add devm_ interface for pci_map_single

2014-05-17 Thread Eli Billauer
Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt |2 ++ include/asm-generic/pci-dma-compat.h | 17 + 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index

[PATCH 1/3] dma-mapping: Add devm_ interface for dma_map_single()

2014-05-17 Thread Eli Billauer
that failed. Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt |2 + drivers/base/dma-mapping.c| 80 + include/linux/dma-mapping.h |5 ++- 3 files changed, 86 insertions(+), 1 deletions(-) diff --git a

[PATCH 2/3] dma-mapping: Add devm_ interface for dma_map_single_attrs()

2014-05-17 Thread Eli Billauer
dmam_map_single_attrs() and dmam_unmap_single_attrs() replace the non-*_attrs functions, which are implemented as defines instead. The case of a non-NULL @attrs parameter has not been tested. Suggested-by: Tejun Heo Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt

[PATCH 0/5] devres: Add functions + migrate Xillybus driver

2014-05-16 Thread Eli Billauer
. Dependencies: Patch #3 relies on patch #2 (quite obviously). Patch #5 relies on all previous patches. Thanks, Eli Eli Billauer (5): devres: Add devm_get_free_pages API dma-mapping: Add devm_ interface for dma_map_single() dma-mapping: pci: Add devm_ interface for pci_map_single

[PATCH 5/5] staging: xillybus: Use devm_ API for memory allocation and DMA mapping

2014-05-16 Thread Eli Billauer
Managed device resource API replaces code that reinvents it for memory allocation, page allocation and DMA mapping. Suggested-by: Baruch Siach Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h | 31 +-- drivers/staging/xillybus/xillybus_core.c | 160

[PATCH 1/5] devres: Add devm_get_free_pages API

2014-05-16 Thread Eli Billauer
devm_get_free_pages() and devm_free_pages() are the managed counterparts for __get_free_pages() and free_pages(). Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt |2 + drivers/base/devres.c | 76 + include/linux

[PATCH 2/5] dma-mapping: Add devm_ interface for dma_map_single()

2014-05-16 Thread Eli Billauer
that failed. Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt |2 + drivers/base/dma-mapping.c| 80 + include/linux/dma-mapping.h |5 ++- 3 files changed, 86 insertions(+), 1 deletions(-) diff --git a

[PATCH 4/5] staging: xillybus: Use devm_ API on probe and remove

2014-05-16 Thread Eli Billauer
Suggested-by: Baruch Siach Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h |1 - drivers/staging/xillybus/xillybus_core.c |2 +- drivers/staging/xillybus/xillybus_of.c | 47 - drivers/staging/xillybus/xillybus_pcie.c | 65

[PATCH 3/5] dma-mapping: pci: Add devm_ interface for pci_map_single

2014-05-16 Thread Eli Billauer
Signed-off-by: Eli Billauer --- Documentation/driver-model/devres.txt |2 ++ include/asm-generic/pci-dma-compat.h | 17 + 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index

[PATCH] staging: xillybus: Use devm_ API on probe and remove

2014-05-11 Thread Eli Billauer
Suggested-by: Baruch Siach Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h |1 - drivers/staging/xillybus/xillybus_core.c |2 +- drivers/staging/xillybus/xillybus_of.c | 47 - drivers/staging/xillybus/xillybus_pcie.c | 65

[PATCH 1/2] staging: xillybus: Added "select CRC32" for XILLYBUS in Kconfig

2014-03-21 Thread Eli Billauer
Reason: xillybus_core.c uses crc32_le() Reported-by: Fengguang Wu Signed-off-by: Eli Billauer --- drivers/staging/xillybus/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/xillybus/Kconfig b/drivers/staging/xillybus/Kconfig index 75c38c8..1b88330

[PATCH 2/2] staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI

2014-03-21 Thread Eli Billauer
xillybus_pcie.c will compile and load properly on PCI only, but will do nothing useful without PCI_MSI. PCI_MSI depends on PCI, so depending on PCI_MSI covers both. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions

Re: [PATCH] staging/xillybus: Handle OOM in xillybus_init()

2014-03-18 Thread Eli Billauer
Hi, I stand (shamefully) corrected. Thanks. Eli On 19/03/14 01:07, Richard Weinberger wrote: alloc_workqueue() can fail and returns NULL in case of OOM. Handle this case and undo class_create(). Signed-off-by: Richard Weinberger --- drivers/staging/xillybus/xillybus_core.c | 6 +- 1

[PATCH 3/3] staging: xillybus: Open Firmware driver supporting coherent DMA

2013-12-30 Thread Eli Billauer
If the "dma-coherent" property is present in the device tree, the driver will not perform cache invalidations. This feature significantly improves data throughput and reduces CPU load. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c | 21

[PATCH 1/3] staging: xillybus: Added documentation on device tree bindings

2013-12-30 Thread Eli Billauer
Signed-off-by: Eli Billauer --- .../devicetree/bindings/staging/xillybus.txt | 20 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/staging/xillybus.txt diff --git a/Documentation/devicetree/bindings/staging

[PATCH 2/3] staging: xillybus: Changed Open Firmware "compatible" property

2013-12-30 Thread Eli Billauer
The previous "compatible" string was poorly chosen, but remains in the match list to support existing DTBs. There is no risk for a naming clash. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) di

[PATCH] staging: xillybus: Return -EIO if *_iomap fails, instead of 0

2013-12-17 Thread Eli Billauer
: Wei Yongjun Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c index 394bfea..3b25b0e 100644 --- a/drivers/staging/xil

[PATCH] staging: xillybus: Return -ENOMEM if *_iomap fails instead of 0

2013-12-16 Thread Eli Billauer
Bug fix: The error code was not set, so the error condition wasn't reflected in the return value. Reported-by: Wei Yongjun Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c |2 +- drivers/staging/xillybus/xillybus_pcie.c |2 +- 2 files changed, 2 insertions(

Re: [PATCH -next] staging: xillybus: fix error return code in xilly_probe()

2013-12-16 Thread Eli Billauer
Thanks for reporting this bug. The same bug exists in the driver for OF (xillybus_of.c). As for the choice of -EIO, I've surveyed several drivers calling of_iomap() and pci_iomap(), and it turns out that some fail on -ENOMEM, some on -EIO and some on -EBUSY. Personally, I'm inclined towards

[PATCH] staging: xillybus: Removed force to be a module

2013-12-09 Thread Eli Billauer
The driver was forced to "module only" following a previous failure to build into the kernel. The problem was resolved several months ago. This has been successfully tested with "make allyesconfig" on x86_64. Reported-by: Stephen Rothwell Signed-off-by: Eli Billauer

[PATCH 2/4] staging: xillybus: Use dev_* functions instead of pr_* in xillybus_pcie

2013-10-18 Thread Eli Billauer
Suggested-by: Greg Kroah-Hartman Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_pcie.c | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_pcie.c b/drivers/staging/xillybus/xillybus_pcie.c index

[PATCH 3/4] staging: xillybus: Use dev_* functions instead of pr_* in xillybus_of

2013-10-18 Thread Eli Billauer
Suggested-by: Greg Kroah-Hartman Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_of.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_of.c b/drivers/staging/xillybus/xillybus_of.c index 2ae045e..394bfea

[PATCH 4/4] staging: xillybus: Use dev_* functions instead of pr_* in xillybus_core

2013-10-18 Thread Eli Billauer
Suggested-by: Greg Kroah-Hartman Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_core.c | 115 ++ 1 files changed, 69 insertions(+), 46 deletions(-) diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c

[PATCH 1/4] staging: xillybus: Remember device pointer for use with dev_* functions

2013-10-18 Thread Eli Billauer
This is necessary so that xillybus_core uses the correct device pointer for PCIe devices in diagnostic message calls (dev_err, dev_warn and dev_info) Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus_pcie.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 2/2] Staging: xillybus: fix for quoted string split across lines

2013-10-16 Thread Eli Billauer
Hello Greg, On 16/10/13 21:06, Greg KH wrote: rc = of_address_to_resource(dev->of_node, 0,&endpoint->res); >if (rc) { > - pr_warn("xillybus: Failed to obtain device tree " > - "resource\n"); > + pr_warn("xillybus: Failed to obtain device tre

[PATCH 1/2] staging: xillybus: Removed dependency on OF_DEVICE in Kconfig

2013-07-31 Thread Eli Billauer
This variable was removed from the kernel a while ago. Signed-off-by: Eli Billauer --- drivers/staging/xillybus/Kconfig |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xillybus/Kconfig b/drivers/staging/xillybus/Kconfig index 459d050..8a4181f 100644

[PATCH 2/2] staging: xillybus: Fixed sparse errors

2013-07-31 Thread Eli Billauer
,device} were changed to something that won't look like the well-known functions. * All *.c files: Variables and functions made static as required. Reported-by: Greg Kroah-Hartman Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h |6 +++--- drivers/staging/xillyb

[PATCH] staging: xillybus: Multiple definition of xillyname resolved (bug fix)

2013-07-26 Thread Eli Billauer
Signed-off-by: Eli Billauer --- drivers/staging/xillybus/xillybus.h |2 -- drivers/staging/xillybus/xillybus_core.c |2 ++ drivers/staging/xillybus/xillybus_of.c |2 ++ drivers/staging/xillybus/xillybus_pcie.c |2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff