Yes, those are “per-CPT allocations”. So the allocator ends up allocating an
array of pointers to the given data type.
Doug
On Mar 22, 2016, at 10:39 PM, Dilger, Andreas
mailto:andreas.dil...@intel.com>> wrote:
On 2016/03/22, 19:49, "lustre-devel on behalf of Greg Kroah-Hartman"
mailto:lustre
On 2016/03/22, 19:49, "lustre-devel on behalf of Greg Kroah-Hartman"
wrote:
>On Tue, Mar 22, 2016 at 06:21:04PM -0400, James Simmons wrote:
>> Latest testing fails when using ko2iblnd. It was tracked down
>> to commit 4671a026616df26000f7d8ad2f2ea4b6de79263c.
>>
>> This reverts commit 4671a02661
fix checkpatch.pl warning about CamelCase.
Signed-off-by: Daeseok Youn
---
drivers/staging/dgnc/dgnc_driver.c | 52 +++---
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c
b/drivers/staging/dgnc/dgnc_driver.c
inde
On Tue, Mar 22, 2016 at 03:33:51PM -0700, Moritz Fischer wrote:
> +struct ion_device *of_ion_device_get(struct device_node *node)
> +{
> + struct miscdevice *mdev = of_misc_get(node);
> +
> + if (IS_ERR(mdev))
> + return ERR_PTR(PTR_ERR(mdev));
Use ERR_CAST() for this.
regarda
On Fri, Mar 18, 2016 at 06:29:01PM -0700, Guenter Roeck wrote:
> The first parameter to dev_dbg() and dev_err() is struct device *,
> not struct device **.
>
> Fixes: de71daf5c839 ("Staging: fsl-mc: Replace pr_debug with dev_dbg")
> Fixes: 454b0ec8bf99 ("Staging: fsl-mc: Replace pr_err with dev_er
This is a note to let you know that I've just added the patch titled
staging: refresh TODO for rtl8712
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of
On Tue, Mar 22, 2016 at 06:21:04PM -0400, James Simmons wrote:
> Latest testing fails when using ko2iblnd. It was tracked down
> to commit 4671a026616df26000f7d8ad2f2ea4b6de79263c.
>
> This reverts commit 4671a026616df26000f7d8ad2f2ea4b6de79263c.
> ---
> .../staging/lustre/lnet/klnds/o2iblnd/o2ib
2016-03-22 22:02 GMT+09:00 Greg KH :
> On Tue, Mar 22, 2016 at 04:40:24PM +0900, DaeSeok Youn wrote:
>> 2016-03-22 6:05 GMT+09:00 Greg KH :
>> > On Mon, Mar 14, 2016 at 01:29:00PM +0900, Daeseok Youn wrote:
>> >> the tty_alloc_driver() can allocate memory for ttys and termios.
>> >> And also it can
2016-03-22 21:21 GMT+09:00 walter harms :
>
> You have send this patch before, right ?
> then it is a good custom to have something like: [Patch V2] in the
> subject line. In the comment you should write somethink like
>
> v2: fix withspace damage
> v1: fix issue
>
> Otherwise none of the reviewe
On Tue, Mar 22, 2016 at 4:20 PM, Laura Abbott wrote:
> If allocation is coming from userspace and drivers are only importing
> you should be using the dma_buf APIs instead of Ion APIs directly.
> Ion is a dma_buf exporter and dma_buf APIs are the preferred API.
Ok, thanks. Sounds reasonable.
Th
On Tue, Mar 22, 2016 at 4:20 PM, Laura Abbott wrote:
> On 03/22/2016 04:08 PM, Moritz Fischer wrote:
>>
>> Hi Laura,
>>
>> On Tue, Mar 22, 2016 at 3:51 PM, Laura Abbott wrote:
>>
>>> In the past what drivers have done is a foo_ion_client_create which has
>>> the
>>> reference
>>> to the ion_devic
On 03/22/2016 04:08 PM, Moritz Fischer wrote:
Hi Laura,
On Tue, Mar 22, 2016 at 3:51 PM, Laura Abbott wrote:
In the past what drivers have done is a foo_ion_client_create which has the
reference
to the ion_device created from ion_device_create. Drivers then call the
foo_ion_client_create func
Hi Laura,
On Tue, Mar 22, 2016 at 3:51 PM, Laura Abbott wrote:
> In the past what drivers have done is a foo_ion_client_create which has the
> reference
> to the ion_device created from ion_device_create. Drivers then call the
> foo_ion_client_create function.
Oh, so you mean you add a function
From: Parinay Kondekar
With struct libcfs_device_userstate gone we can remove
the remaining code of libcfs_psdev_ops.p_[open|close]
as well as the libcfs_psdev_[open|release] functions.
Signed-off-by: Parinay Kondekar
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/brows
Fix up all thw whitescapes and line up the IOCTL defines
so it is readable.
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman
Reviewed-by: John L. Hammond
Reviewed-by: Dmitry Eremin
Rev
From: John L. Hammond
Move all the libcfs_ioctl_handler code from libcfs_ioctl.h to
libcfs.h. The header libcfs_ioctl.h is a uapi header so their
is no reason to keep kernel internals in that header.
Signed-off-by: John L. Hammond
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.in
From: Parinay Kondekar
A few pieces still exist for the IOC_LIBCFS_PANIC ioctl. Remove
these last bits to prevent old tools from using them. The latest
lustre utilities no longer use this ioctl.
Signed-off-by: Parinay Kondekar
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.
From: Liang Zhen
Fail to compile if largest LNet user land data structures passed
to kernel are larger than LIBCFS_IOC_DATA_MAX
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: J
From: John L. Hammond
The header libcfsutil.h has been long gone in the upstream
client. Replace libcfsutil.h reference to the current user
land header instead.
Signed-off-by: John L. Hammond
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: htt
From: Parinay Kondekar
With the libcfs ioctl cleanup we no longer need the libcfs
pseudo device abstraction.
Signed-off-by: Parinay Kondekar
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844
Reviewed-on: http://review.whamcloud.com/17492
Reviewed-by: Andreas
Need a few uapi headers to make libcfs_ioctl.h compilable in
userland.
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman
Reviewed-by: John L. Hammond
Reviewed-by: Dmitry Eremin
Reviewed
From: Liang Zhen
Ensure that user land data is at least the smallest size.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: Johann Lombardi
Reviewed-by: Oleg Drokin
---
.../lu
Move the function declartions that are used only by
kernel space to libcfs.h This makes libcfs_ioctl.h
a offical uapi header now.
Move large inline functions out of libcfs_ioctl.h to
the source file linux-module.c belonging to libcfs.
This code is only used by the core of libcfs and such
inline fun
Return real bool values for libcfs_ioctl_is_invalid().
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman
Reviewed-by: John L. Hammond
Reviewed-by: Dmitry Eremin
Reviewed-by: Oleg Drokin
Use the proper BIT macro for libcfs_ioctl_is_invalid().
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman
Reviewed-by: John L. Hammond
Reviewed-by: Dmitry Eremin
Reviewed-by: Oleg Droki
Change return value to size_t.
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman
Reviewed-by: John L. Hammond
Reviewed-by: Dmitry Eremin
Reviewed-by: Oleg Drokin
---
.../lustre/lnet/l
From: Liang Zhen
Move the comment about libcfs_ioctl_data_adjust to the
section where libcfs_ioctl_data_adjust is actually called.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by
From: Liang Zhen
Code simplification for obd_ioctl_popdata.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: Johann Lombardi
Reviewed-by: Oleg Drokin
---
.../lustre/lustre/obd
From: Liang Zhen
Added some lustre debugging to track down potential future
bugs.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: Johann Lombardi
Reviewed-by: Oleg Drokin
---
From: Liang Zhen
This is apart of the cleanup of libcfs_ioctl* code. In this
part we turn libcfs_ioctl_handle into libcfs_ioctl since
libcfs_ioctl is now a skeleton function.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.
From: Parinay Kondekar
No reason to go through the cfs_psdev_ops abstract
to call libcfs_ioctl. Just call libcfs_ioctl directly.
Signed-off-by: Parinay Kondekar
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844
Reviewed-on: http://review.whamcloud.com/17492
Move large inline functions out of libcfs_ioctl.h to
the source file linux-module.c belonging to libcfs.
This code is only used by the core of libcfs and such
inline functions don't belong in a uapi header file.
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
From: Liang Zhen
This is apart of the cleanup of libcfs_ioctl* code. In this
part some of the code in libcfs_ioctl is migrated into
libcfs_ioctl_getdata_len() which is renamed libcfs_ioctl_getdata()
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on:
From: Liang Zhen
The error message are for libcfs layer not LNet.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: Johann Lombardi
Reviewed-by: Oleg Drokin
---
.../lustre/lnet
Change arg to uparam name for libcfs_ioctl().
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: Johann Lombardi
Reviewed-by: Oleg Drokin
---
drivers/staging/lustre/lnet/libcfs/mo
All the macros in libcfs_ioctl.h that is needed by user
land have been moved into the lustre utilities software
stack.
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/17643
Reviewed-by: Bob Glossman
Reviewed-by: John
From: Liang Zhen
Instead of just returning for each switch condition use a break.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: Johann Lombardi
Reviewed-by: Oleg Drokin
---
From: John L. Hammond
Lets just use copy_to_user() directly instead of having a
wrapper function.
Signed-off-by: John L. Hammond
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/14180
Reviewed-by: Dmitry Eremin
Revi
From: Liang Zhen
Invert the test of error returned by the handle_ioctl pointer.
This reduces the code by one indentation level.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: J
From: Parinay Kondekar
The IOC_LIBCFS_MEMHOG is not needed so remove the last bits.
Signed-off-by: Parinay Kondekar
Signed-off-by: James Simmons
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844
Reviewed-on: http://review.whamcloud.com/17492
Reviewed-by: Andreas Dilger
Reviewed-by: Dmi
From: Liang Zhen
The size of LNET_MAX_IOCTL_BUF_LEN restricts the size of
libcfs ioctl to the maximum needs of the LNet layer. Since
libcfs also handles things like debugging we might need
to let user land pass more data to or from the kernel than
what is possible
Signed-off-by: Liang Zhen
Inte
From: Liang Zhen
Make sure data is not NULL otherwise we get an oops
when using the IOC_LIBCFS_MARK_DEBUG ioctl.
Signed-off-by: Liang Zhen
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313
Reviewed-by: Bobi Jam
Reviewed-by: Johann Lombardi
This brings the upstream libcfs ioctl handling up to date with
the latest production code. Most of the work was to make libcfs_ioctl.h
a simple uapi header that can be used by user land utilities.
Lots of ioctl code cleanup and simplification.
James Simmons (9):
staging: lustre: libcfs: change v
Meh,
On Tue, Mar 22, 2016 at 3:33 PM, Moritz Fischer
wrote:
>
> +
> +err_dev:
> + put_device(dev);
> + return ERR_PTR(ret);
> +}
> +#else
> +struct misc_device *of_misc_get(struct device_node *)
Ok, that one is broken
Sorry,
Moritz
Derp,
On Tue, Mar 22, 2016 at 3:33 PM, Moritz Fischer
wrote:
> Allows to obtain a reference to the global /dev/ion backing
> struct ion_device via devicetree.
>
> Signed-off-by: Moritz Fischer
> ---
> drivers/staging/android/ion/ion.c | 10 ++
> 1 file changed, 10 insertions(+)
>
> diff
On 03/22/2016 03:33 PM, Moritz Fischer wrote:
Hi all,
probably I'm doing this all wrong. I'm playing around with a bunch of
accelerators
and I need to share buffers between them. I have my heaps implemented as a
platform device and from what I understand I'll need a reference to the
struct ion_
Allows to obtain a reference to the global /dev/ion backing
struct ion_device via devicetree.
Signed-off-by: Moritz Fischer
---
drivers/staging/android/ion/ion.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/staging/android/ion/ion.c
b/drivers/staging/android/ion/ion.c
This commit enables access to a miscdevice via a reference
obtained from devicetree.
This allows to implement a of_ion_device_get() in the next step.
Signed-off-by: Moritz Fischer
---
drivers/char/misc.c| 38 ++
include/linux/miscdevice.h | 3 +++
2 f
Hi all,
probably I'm doing this all wrong. I'm playing around with a bunch of
accelerators
and I need to share buffers between them. I have my heaps implemented as a
platform device and from what I understand I'll need a reference to the
struct ion_device in each of them.
I couldn't find a way to
On error platform_device_register_simple() returns ERR_PTR() value,
check for NULL always fails. The change corrects the check itself and
propagates the returned error upwards.
Fixes: 81fb0b901397 ("staging: android: ion_test: unregister the platform
device")
Signed-off-by: Vladimir Zapolskiy
--
Latest testing fails when using ko2iblnd. It was tracked down
to commit 4671a026616df26000f7d8ad2f2ea4b6de79263c.
This reverts commit 4671a026616df26000f7d8ad2f2ea4b6de79263c.
---
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c|4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
dif
> -Original Message-
> From: KY Srinivasan
> Sent: Sunday, March 20, 2016 11:59 AM
> To: 'James Bottomley' ; Martin
> K. Petersen
> Cc: Christoph Hellwig ; gre...@linuxfoundation.org;
> linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
> oher...@suse.com; jbottom...@parallels.c
Fix the checkpatch.pl issues:
CHECK: Prefer using the BIT macro
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/plx9052.h | 87
1 file changed, 44 insertions(+), 43 deletions(-)
diff --git a/drivers/sta
Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/plx9052.h | 35
1 file changed, 17 insertions(+), 18 deletions(-)
diff --g
Fix the checkpatch.pl issues.
H Hartley Sweeten (2):
staging: comedi: plx9052.h: tidy up bit defines
staging: comedi: plx9052.h: fix block comment issues
drivers/staging/comedi/drivers/plx9052.h | 122 +++
1 file changed, 61 insertions(+), 61 deletions(-)
--
2.6
Fix the checkpatch.pl issues:
CHECK: Prefer using the BIT macro
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/z8536.h | 89 ++
1 file changed, 48 insertions(+), 41 deletions(-)
diff --git a/drivers/sta
As suggested by checkpatch.pl:
CHECK: Prefer using the BIT macro
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_regs.h | 82 +-
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/drivers/st
Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines
WARNING: line over 80 characters
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_cs.c | 95 +---
1 file changed, 44 inserti
Fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc.h | 30 ++
1 file changed, 14 insertions(+), 16 deletions(-)
diff --gi
The EEPROM_SIZE and NUM_AO_CHAN defines are only used once and they
don't add any significant clarity to the driver. They are also pretty
generic symbol names. Remove them and just open code the values.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/
Fix the checkpatch.pl issues:
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_common.c | 59 +++-
1 file changed, 37 insertions(+), 22 deletions(-
As suggested by checkpatch.pl:
CHECK: Prefer using the BIT macro
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_labpc_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_la
Fix all the checkpatch.pl issues.
v2: remove the changes to z8536.h
H Hartley Sweeten (6):
staging: comedi: ni_labpc: remove some unnecessary defines
staging: comedi: ni_labpc_regs.h: tidy up bit defines
staging: comedi: ni_labpc_common: tidy up block comments
staging: comedi: ni_labpc_cs
Tidy up this function to fix the checkpatch.pl issues:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
For aesthetics, remove the static const local variables.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 54 ++
The (*auto_attach) initializes all the DIO channels to a default state.
Add a comment for clarity.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/comedi
Rename this function to help shorten some of the long lines.
Remove the inline, let the compiler figure it out.
Change the 'unsigned' parameters to 'unsigned int' to fix the
checkpatch.pl issues:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: H Hartley Sweeten
Cc: Ian
Use some local variables to clarify this function.
This (*insn_bits) function is a bit different from most comedi drivers.
Add some comments to clarify why the shifts are used.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c
Rename this CamelCase struct and the associated 'registerData' variable.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/d
Hard-coding the subdevice order is normally a bad idea. If a new subdevice
is added, or removed, it could potentially break pretty badly.
Remove the enum and associated NI_660X_GPCT_SUBDEV() helper that hard-code
the subdevice order.
Fix the (*auto_attach) so it initializes all the subdevices wit
This driver has a lot of checkpatch.pl issues:
total: 0 errors, 71 warnings, 27 checks, 1222 lines checked
There is also a lot of cruft that bloats the driver and makes it harder
to follow.
This series fixes all the checkpatch.pl issues:
total: 0 errors, 0 warnings, 0 checks, 944 lines checked
A
On Tuesday, March 22, 2016 10:51 AM, H Hartley Sweeten wrote:
> Fix the checkpatch.pl issues:
> WARNING: Block comments use a trailing */ on a separate line
>
> Signed-off-by: H Hartley Sweeten
> Cc: Ian Abbott
> Cc: Greg Kroah-Hartman
> ---
> drivers/staging/comedi/drivers/ni_labpc_common.c |
For aesthetics, move the initialization of the default routing for the
DIO channels so it happens when the subdevice is initialized.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 27 +--
1 file chan
Change the generic MODULE_DESCRIPTION text to something more useful.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/ni_660x.c
Reformat the multi-line comment in the kernel CodingStyle.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/comedi/
Convert this big switch into an array and refactor ni_660x_gpct_{write,read}()
functions to use the array to find the register offset.
All the TIO (GPCT) registers are included in the array except for NITIO_G0_ABZ
and NITIO_G1_ABZ. These registers only exist on the ni_pcimio m-series boards
and th
This driver supports boards that have 1 or 2 TIO chips with base
addresses 0x800 apart. Replace the static const array 'GPCT_OFFSET'
with a define and calculate the base address based on the chip index.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/
Fix the checkpatch.pl issue. Move the memory barrier to a better place.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/ni_6
Remove enum ni_660x_constants and just #define the value.
Move all the constant #defines so they are in one place and rename
them so they are more conesistent.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 49
This spinlock is only used to protect changes to the private data 'dma_cfg'.
Before calling any function that would change the 'dma_cfg' the spinlock
'mite_channel_lock' is also locked. That spinlock is not unlocked until
after the 'dma_cfg' change.
Remove the redundant spinlock.
Signed-off-by:
All the registers are defined struct NI_660xRegisterData and they are
either 2 or 4 bytes in size. Remove the enum and just use a char member
to define the size as 2 or 4 bytes.
Simplify the ni_660x_{write,read}_register() functions and remove the
unnecessary BUG() in each.
Signed-off-by: H Hartl
The BUG_ON() checks in the helper functions are not necessary. The mite
driver quiries the PCI chip to determine the number of DMA channels.
This is then used when a DMA channel is requested so the channel will
always be in range.
Convert the inline functions used to set the bits in the NI600X_DMA
Remove the extra for loop and just initialize the counter as the subdevices
are created.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/
Rename this function to help shorten some of the long lines.
Remove the inline, let the compiler figure it out.
Change the 'unsigned' parameters to 'unsigned int' to fix the
checkpatch.pl issues:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: H Hartley Sweeten
Cc: Ian
This BUG_ON() happens if a mite DMA channel is already requested when an
ansynchronous command is started for one of the counter subdevices.
The comedi core will only call the (*do_cmd) if the subdevice is not busy.
In this driver, the (*cancel) for the subdevice will always release any
requested
Convert the inline functions used to set the bits in the NI600X_IO_CFG
registers into macros. Also convert the enum ni_660x_pfi_output_select
into defines. This clarifies the association with the register.
This also fixes a number of checkpatch.pl issues about:
WARNING: Prefer 'unsigned int' to b
Sort this enum so that it has a 1:1 relationship with the ni_tio.h
enum ni_gpct_register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 95
1 file changed, 48 insertions(+), 47 deletions(-)
Rename these functions so they have namespace associated with the
driver.
Fix the checkpatch.pl issues:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 16 +++---
Add some whitespace to the Digital I/O subdevice init and add a
comment about the channels. This driver is a bit goofy, only 32 of
the 40 channels can actually be used for Digital I/Os and 32 of
them can be routed to the counters for alternate use.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
enum ni_gpct_register and enum ni_660x_register now have a 1:1
relationship for the NITIO_* registers. The static const array
is no longer necessary to find the proper NI660X_* register for
a given NITIO_*. Remove it and refactor the register read/write
functions.
Use the NITIO_* values to init th
Fix the checkpatch.pl issues:
CHECK: spinlock_t definition without comment
For aesthetics, rename the 'soft_reg_copy_lock' to clarify what it's
used for.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 16 +---
Make sure the interrupts are disabled before freeing the irq.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/ni_660x.c
b/d
Use the comedi.h provided constants (enum ni_660x_pfi_routing) instead
of defining new ones for the output sources.
Use a switch to clarify the channel/source validation.
For aesthetics, rename the private data members 'pfi_output_selects' and
'pfi_direction_bits'.
Remove the 'min_counter_pfi_ch
Remove the unnecessary NULL pointer check.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_mio_common.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c
b/drive
This inline function is only used by the (*auto_attach). Remove it
and just use a local variable for the calculation.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 16 +---
1 file changed, 5 insertions(+), 11 d
The ni_gpct_device_construct() could fail allocating the memory for
device and its counters. For aesthetics, call the function before
initializing the subdevices.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 20 ++
For aesthetics, add some whitespace to the subdevice init and use
a couple local variables to make the code easier to follow.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 59 +---
1 file change
Fix the checkpatch.pl issues.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 40
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_660x.c
b/d
Remove the enums global_interrupt_{status,config}_register_bits and
add defines for the CamelCase values.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_660x.c | 27 ++-
1 file changed, 10 insertions(+), 17 d
Modify the pointer check to make this function NULL pointer safe.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_tio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/ni_tio.c
b/dr
For aesthetics, initialize the TIO chips before the subdevices are
allocated and initialized.
Refactor the function to initialize all the TIO chips and move it
to a better place in the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/dr
1 - 100 of 144 matches
Mail list logo