Activity log for bug #981234

Date Who What changed Old value New value Message
2012-04-13 22:44:55 Bernd Porr bug added bug
2012-04-13 22:44:55 Bernd Porr attachment added upstream patch for linux-next kernel https://bugs.launchpad.net/bugs/981234/+attachment/3062218/+files/comedi_buffer_fix_upstream.patch
2012-04-13 22:55:38 Bernd Porr attachment added original patch submission by Ian and myself, part 1 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/981234/+attachment/3062325/+files/%5BPATCH%201_2%5D%20staging%3A%20comedi%3A%20Add%20module%20parameters%20for%20default%20buffer%20size.eml
2012-04-13 22:56:21 Bernd Porr attachment added original patch submission by Ian and myself, part 2 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/981234/+attachment/3062326/+files/%5BPATCH%202_2%5D%20staging%3A%20comedi%3A%20Add%20kernel%20config%20for%20default%20buffer%20sizes.eml
2012-04-13 22:56:51 Bernd Porr attachment removed original patch submission by Ian and myself, part 1 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/981234/+attachment/3062325/+files/%5BPATCH%201_2%5D%20staging%3A%20comedi%3A%20Add%20module%20parameters%20for%20default%20buffer%20size.eml
2012-04-13 22:57:01 Bernd Porr attachment removed original patch submission by Ian and myself, part 2 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/981234/+attachment/3062326/+files/%5BPATCH%202_2%5D%20staging%3A%20comedi%3A%20Add%20kernel%20config%20for%20default%20buffer%20sizes.eml
2012-04-13 22:59:53 Bernd Porr attachment added original patch submission by Ian and myself, part 1 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/981234/+attachment/3062332/+files/%5BPATCH%201_2%5D%20staging%3A%20comedi%3A%20Add%20module%20parameters%20for%20default%20buffer%20size.eml
2012-04-13 23:00:25 Brad Figg linux (Ubuntu): status New Confirmed
2012-04-13 23:00:42 Bernd Porr attachment added original patch submission by Ian and myself, part 2 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/981234/+attachment/3062333/+files/%5BPATCH%202_2%5D%20staging%3A%20comedi%3A%20Add%20kernel%20config%20for%20default%20buffer%20sizes.eml
2012-04-14 00:14:55 Ubuntu Foundations Team Bug Bot tags apport-bug i386 precise apport-bug i386 patch precise
2012-04-14 00:14:56 Ubuntu Foundations Team Bug Bot bug added subscriber Joseph Salisbury
2012-04-14 04:03:56 Leann Ogasawara linux (Ubuntu): importance Undecided Medium
2012-04-14 04:03:56 Leann Ogasawara linux (Ubuntu): status Confirmed In Progress
2012-04-14 04:03:56 Leann Ogasawara linux (Ubuntu): assignee Leann Ogasawara (leannogasawara)
2012-04-14 04:04:18 Leann Ogasawara nominated for series Ubuntu Precise
2012-04-14 04:04:18 Leann Ogasawara bug task added linux (Ubuntu Precise)
2012-04-14 04:13:37 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Review Team
2012-04-14 20:19:01 Leann Ogasawara description There asynchronous buffer for the COMEDI drivers is only 65k and is hard coded in the kernel. With slower computers and slow userspace programs there is virtually always a buffer overflow which makes it impossible to run these programs, especially with DAQ cards which have a high resolution or those with high sampling rate. I'm attaching a patch which has been submitted and accepted upstream. Below the confirmation e-mail from Gregkh: Return-Path: <gregkh@linuxfoundation.org> Delivered-To: berndporr@f2s.com Envelope-To: berndporr@f2s.com Received: (qmail 39856 invoked from network); 13 Apr 2012 18:20:21 -0000 Received: from as001.apm-internet.net (85.119.248.19) by mail003.apm-internet.net with SMTP; 13 Apr 2012 18:20:21 -0000 Received: (qmail 73709 invoked from network); 13 Apr 2012 18:20:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on as001.apm-internet.net X-Spam-Score: -0.1 X-Spam-Report: * -0.1 SPF_PASS SPF database pass X-Spam-Relay-Country: GB GB US US Received: from av002.apm-internet.net (85.119.248.59) by as001.apm-internet.net with SMTP; 13 Apr 2012 18:20:20 -0000 Received: (qmail 98427 invoked from network); 13 Apr 2012 18:20:20 -0000 X-AV-Scan: clean Received: from relay004.apm-internet.net (85.119.248.7) by av002.apm-internet.net with SMTP; 13 Apr 2012 18:20:20 -0000 Received: (qmail 73444 invoked from network); 13 Apr 2012 18:20:19 -0000 Received: from mail-pb0-f41.google.com (209.85.160.41) by relay004.apm-internet.net with ESMTPS (RC4-SHA encrypted); 13 Apr 2012 18:20:20 -0000 X-APM-IP: 209.85.160.41 X-APM-Score: -2 Received-SPF: pass (relay004.apm-internet.net: SPF record at _spf.google.com designates 209.85.160.41 as permitted sender) Received: by pbcup15 with SMTP id up15so3700835pbc.28 for <berndporr@f2s.com>; Fri, 13 Apr 2012 11:20:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:date:message-id:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=F0mM6Wrc1iIO+RcwOJc25lkJE4nAd4Fgxj+5MCNNxDU=; b=SeejiQ22iVQnt8WizuUPzUg9VqmG1DLqH6nB5r3Xcc90PcIxRvsAjMs9/bykNbv1ol lM4/AfL+un7p/R5P1Yv5GcRg8YWaocDMcsFyrTWaMx3BPonEkXK4WT1Lhw+IBiydEIpo 3DLcTivSmAep8yiqfMx4zB+jn4jRyKwNLL5hfYi//YOLAMjKpLFqmMP6G5Dlc/Kp9PTf s27/qyU/uX6wk6PHs4tjmvmX+pV5zcQa77U1CDSoCtj90qJsIwtrODVsqPvh9ZqBD6Mv OR/bRYcKKlMGYYmtnMVs3sp+znE0ZCkXnhlPIVZqy7+rV5K3IpQP14tRgdIZdS8u4FNK VqJw== Received: by 10.68.132.36 with SMTP id or4mr6543286pbb.115.1334341217157; Fri, 13 Apr 2012 11:20:17 -0700 (PDT) Return-Path: <gregkh@linuxfoundation.org> Received: from localhost (c-67-168-183-230.hsd1.wa.comcast.net. [67.168.183.230]) by mx.google.com with ESMTPS id vh10sm9365834pbc.29.2012.04.13.11.20.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Apr 2012 11:20:16 -0700 (PDT) Subject: patch "staging: comedi: Add kernel config for default buffer sizes" added to staging tree To: abbotti@mev.co.uk,berndporr@f2s.com,gregkh@linuxfoundation.org From: <gregkh@linuxfoundation.org> Date: Fri, 13 Apr 2012 11:20:08 -0700 Message-ID: <13343412082918@kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ASCII Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQlEvqUZ2Xtd66ofDeuWg5qV6v8uW82oXq3rGRQDbKuADvj2uoIK3rhnUuQ/d7ByKS81LT8s This is a note to let you know that I've just added the patch titled staging: comedi: Add kernel config for default buffer sizes 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-next branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will also will be merged in the next major kernel release during the merge window. If you have any questions about this process, please let me know. From 234bb3c60f1f1489630750aba4adf40154e0bd70 Mon Sep 17 00:00:00 2001 From: Ian Abbott <abbotti@mev.co.uk> Date: Fri, 13 Apr 2012 14:12:54 +0100 Subject: staging: comedi: Add kernel config for default buffer sizes Allow the default values for the module parameters for the default initial buffer size and default maximum buffer size to be specified in the kernel configuration. I'm not sure what the defaults for the defaults for the defaults should be, but 64 KiB seems to small, so I used values suggested by Bernd Porr, which are 2048 KiB for the default initial buffer size and 20480 for the default maximum buffer size. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: Bernd Porr <berndporr@f2s.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/staging/comedi/Kconfig | 20 ++++++++++++++++++++ drivers/staging/comedi/comedi_fops.c | 12 +++++------- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 9037d02..a1cf0b0 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -14,6 +14,26 @@ config COMEDI_DEBUG This is an option for use by developers; most people should say N here. This enables comedi core and driver debugging. +config COMEDI_DEFAULT_BUF_SIZE_KB + int "Comedi default initial asynchronous buffer size in KiB" + default "2048" + depends on COMEDI != n + ---help--- + This is the default asynchronous buffer size which is used for + commands running in the background in kernel space. This + defaults to 2048 KiB of memory so that a 16 channel card + running at 10 kHz has of 2-4 seconds of buffer. + +config COMEDI_DEFAULT_BUF_MAXSIZE_KB + int "Comedi default maximum asynchronous buffer size in KiB" + default "20480" + depends on COMEDI != n + ---help--- + This is the default maximum asynchronous buffer size which can + be requested by a userspace program without root privileges. + This is set to 20480 KiB so that a fast I/O card with 16 + channels running at 100 kHz has 2-4 seconds of buffer. + menuconfig COMEDI_MISC_DRIVERS tristate "Comedi misc drivers" depends on COMEDI diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index ef7bbe4..3222ac6 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -55,9 +55,6 @@ MODULE_AUTHOR("http://www.comedi.org"); MODULE_DESCRIPTION("Comedi core module"); MODULE_LICENSE("GPL"); -#define DEFAULT_BUF_MAXSIZE_KB 64 -#define DEFAULT_BUF_SIZE_KB 64 - #ifdef CONFIG_COMEDI_DEBUG int comedi_debug; EXPORT_SYMBOL(comedi_debug); @@ -78,17 +75,18 @@ MODULE_PARM_DESC(comedi_num_legacy_minors, "number of comedi minor devices to reserve for non-auto-configured devices (default 0)" ); -unsigned int comedi_default_buf_size_kb = DEFAULT_BUF_SIZE_KB; +unsigned int comedi_default_buf_size_kb = CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB; module_param(comedi_default_buf_size_kb, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(comedi_default_buf_size_kb, "default asynchronous buffer size in KiB (default " - __MODULE_STRING(DEFAULT_BUF_SIZE_KB) ")"); + __MODULE_STRING(CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB) ")"); -unsigned int comedi_default_buf_maxsize_kb = DEFAULT_BUF_MAXSIZE_KB; +unsigned int comedi_default_buf_maxsize_kb + = CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB; module_param(comedi_default_buf_maxsize_kb, uint, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(comedi_default_buf_maxsize_kb, "default maximum size of asynchronous buffer in KiB (default " - __MODULE_STRING(DEFAULT_BUF_MAXSIZE_KB) ")"); + __MODULE_STRING(CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB) ")"); static DEFINE_SPINLOCK(comedi_file_info_table_lock); static struct comedi_device_file_info -- 1.7.10 ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: linux-image-3.2.0-23-generic-pae 3.2.0-23.36 ProcVersionSignature: Ubuntu 3.2.0-23.36-generic-pae 3.2.14 Uname: Linux 3.2.0-23-generic-pae i686 AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24. ApportVersion: 2.0.1-0ubuntu2 Architecture: i386 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: bp1 1761 F.... pulseaudio CRDA: Error: [Errno 2] No such file or directory Card0.Amixer.info: Card hw:0 'Intel'/'HDA Intel at 0xfdff8000 irq 45' Mixer name : 'Realtek ALC888' Components : 'HDA:10ec0888,1019e619,00100001' Controls : 44 Simple ctrls : 21 Date: Fri Apr 13 23:32:26 2012 HibernationDevice: RESUME=UUID=b6911a72-ca8c-451f-980b-5f16df4e94f3 InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120201.2) IwConfig: lo no wireless extensions. eth0 no wireless extensions. MachineType: Acer AcerPower FH ProcEnviron: LANGUAGE=en_GB:en TERM=xterm PATH=(custom, user) LANG=en_GB.UTF-8 SHELL=/bin/bash ProcFB: 0 radeondrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-23-generic-pae root=UUID=2a22481e-fd0f-4a5b-adb8-18566a6f8d65 ro quiet splash vt.handoff=7 RelatedPackageVersions: linux-restricted-modules-3.2.0-23-generic-pae N/A linux-backports-modules-3.2.0-23-generic-pae N/A linux-firmware 1.79 RfKill: SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) UserAsoundrc: pcm.fileout { type empty slave.pcm "tee:default,'/tmp/out.raw',raw" # 48000 S16_LE 2ch (aplay -t raw -f dat) } dmi.bios.date: 03/03/2007 dmi.bios.vendor: Phoenix Technologies, LTD dmi.bios.version: R01-B4 dmi.board.name: E946GZ dmi.board.vendor: Acer dmi.chassis.type: 3 dmi.chassis.vendor: Broadwater dmi.chassis.version: 946GZT-AM dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvrR01-B4:bd03/03/2007:svnAcer:pnAcerPowerFH:pvrR01-B4:rvnAcer:rnE946GZ:rvr:cvnBroadwater:ct3:cvr946GZT-AM: dmi.product.name: AcerPower FH dmi.product.version: R01-B4 dmi.sys.vendor: Acer == Precise SRU Justification == The default and max buffer size are set to inappropriate values for the comedi staging driver. This results in program crashes. Patches have been submitted upstream to resolve this issue and are currently available in: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next I have also received confirmation from the bug reporter and patch author that they intend to submit these to upstream stable as well. The changes are limited to a single staging driver which should minimize the risk of regression. I have also received positive test confirmation from the bug reporter that the patches noted below resolve the issue. == Fix == commit 4d7df821 from staging-next needed very minor fixing up when cherry-picking. commit 234bb3c6 from staging-next cherry-picked cleanly. The last commit updates the configs: commit 4d7df821277e82ebe2fc9c9af07c928a83f572b8 Author: Ian Abbott <abbotti@mev.co.uk> Date: Fri Apr 13 14:12:53 2012 +0100 staging: comedi: Add module parameters for default buffer size commit 234bb3c60f1f1489630750aba4adf40154e0bd70 Author: Ian Abbott <abbotti@mev.co.uk> Date: Fri Apr 13 14:12:54 2012 +0100 staging: comedi: Add kernel config for default buffer sizes commit 96dddbbb8a9071cd1921575f864a5441fd7662a7 Author: Leann Ogasawara <leann.ogasawara@canonical.com> Date: Fri Apr 13 20:40:29 2012 -0700 UBUNTU: [Config] Set CONFIG_COMEDI_DEFAULT_BUF_[SIZE_KB,MAXSIZE_KB] I've also pushed these to a branch if you'd prefer to pull from there: The following changes since commit 4767f8d1efe2d8bc94cf6d6937c0a0d5328e6e08: Linux 3.2.15 (2012-04-14 06:50:30 -0600) are available in the git repository at: git://kernel.ubuntu.com/ogasawara/ubuntu-precise lp981234 for you to fetch changes up to 2bf208c4572e3ac2e7c364c4a26d4ecfd15e0412: UBUNTU: [Config] Set CONFIG_COMEDI_DEFAULT_BUF_[SIZE_KB,MAXSIZE_KB] (2012-04-14 13:05:43 -0700) ---------------------------------------------------------------- Ian Abbott (2): UBUNTU: SAUCE: staging: comedi: Add module parameters for default buffer size UBUNTU: SAUCE: staging: comedi: Add kernel config for default buffer sizes Leann Ogasawara (1): UBUNTU: [Config] Set CONFIG_COMEDI_DEFAULT_BUF_[SIZE_KB,MAXSIZE_KB] debian.master/config/config.common.ubuntu | 2 ++ drivers/staging/comedi/Kconfig | 20 ++++++++++++++++++++ drivers/staging/comedi/comedi_fops.c | 27 ++++++++++++++++++++++++--- drivers/staging/comedi/drivers.c | 15 +++++++++------ drivers/staging/comedi/internal.h | 5 ++++- 5 files changed, 59 insertions(+), 10 deletions(-) == Original Bug Description == There asynchronous buffer for the COMEDI drivers is only 65k and is hard coded in the kernel. With slower computers and slow userspace programs there is virtually always a buffer overflow which makes it impossible to run these programs, especially with DAQ cards which have a high resolution or those with high sampling rate. I'm attaching a patch which has been submitted and accepted upstream. Below the confirmation e-mail from Gregkh: Return-Path: <gregkh@linuxfoundation.org> Delivered-To: berndporr@f2s.com Envelope-To: berndporr@f2s.com Received: (qmail 39856 invoked from network); 13 Apr 2012 18:20:21 -0000 Received: from as001.apm-internet.net (85.119.248.19)   by mail003.apm-internet.net with SMTP; 13 Apr 2012 18:20:21 -0000 Received: (qmail 73709 invoked from network); 13 Apr 2012 18:20:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on  as001.apm-internet.net X-Spam-Score: -0.1 X-Spam-Report:  * -0.1 SPF_PASS SPF database pass X-Spam-Relay-Country: GB GB US US Received: from av002.apm-internet.net (85.119.248.59)   by as001.apm-internet.net with SMTP; 13 Apr 2012 18:20:20 -0000 Received: (qmail 98427 invoked from network); 13 Apr 2012 18:20:20 -0000 X-AV-Scan: clean Received: from relay004.apm-internet.net (85.119.248.7)   by av002.apm-internet.net with SMTP; 13 Apr 2012 18:20:20 -0000 Received: (qmail 73444 invoked from network); 13 Apr 2012 18:20:19 -0000 Received: from mail-pb0-f41.google.com (209.85.160.41)   by relay004.apm-internet.net with ESMTPS (RC4-SHA encrypted); 13 Apr 2012 18:20:20 -0000 X-APM-IP: 209.85.160.41 X-APM-Score: -2 Received-SPF: pass (relay004.apm-internet.net: SPF record at _spf.google.com designates 209.85.160.41 as permitted sender) Received: by pbcup15 with SMTP id up15so3700835pbc.28         for <berndporr@f2s.com>; Fri, 13 Apr 2012 11:20:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;         d=google.com; s=20120113;         h=subject:to:from:date:message-id:mime-version:content-type          :content-transfer-encoding:x-gm-message-state;         bh=F0mM6Wrc1iIO+RcwOJc25lkJE4nAd4Fgxj+5MCNNxDU=;         b=SeejiQ22iVQnt8WizuUPzUg9VqmG1DLqH6nB5r3Xcc90PcIxRvsAjMs9/bykNbv1ol          lM4/AfL+un7p/R5P1Yv5GcRg8YWaocDMcsFyrTWaMx3BPonEkXK4WT1Lhw+IBiydEIpo          3DLcTivSmAep8yiqfMx4zB+jn4jRyKwNLL5hfYi//YOLAMjKpLFqmMP6G5Dlc/Kp9PTf          s27/qyU/uX6wk6PHs4tjmvmX+pV5zcQa77U1CDSoCtj90qJsIwtrODVsqPvh9ZqBD6Mv          OR/bRYcKKlMGYYmtnMVs3sp+znE0ZCkXnhlPIVZqy7+rV5K3IpQP14tRgdIZdS8u4FNK          VqJw== Received: by 10.68.132.36 with SMTP id or4mr6543286pbb.115.1334341217157;         Fri, 13 Apr 2012 11:20:17 -0700 (PDT) Return-Path: <gregkh@linuxfoundation.org> Received: from localhost (c-67-168-183-230.hsd1.wa.comcast.net. [67.168.183.230])         by mx.google.com with ESMTPS id vh10sm9365834pbc.29.2012.04.13.11.20.15         (version=TLSv1/SSLv3 cipher=OTHER);         Fri, 13 Apr 2012 11:20:16 -0700 (PDT) Subject: patch "staging: comedi: Add kernel config for default buffer sizes" added to staging tree To: abbotti@mev.co.uk,berndporr@f2s.com,gregkh@linuxfoundation.org From: <gregkh@linuxfoundation.org> Date: Fri, 13 Apr 2012 11:20:08 -0700 Message-ID: <13343412082918@kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ASCII Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQlEvqUZ2Xtd66ofDeuWg5qV6v8uW82oXq3rGRQDbKuADvj2uoIK3rhnUuQ/d7ByKS81LT8s This is a note to let you know that I've just added the patch titled     staging: comedi: Add kernel config for default buffer sizes 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-next branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will also will be merged in the next major kernel release during the merge window. If you have any questions about this process, please let me know. From 234bb3c60f1f1489630750aba4adf40154e0bd70 Mon Sep 17 00:00:00 2001 From: Ian Abbott <abbotti@mev.co.uk> Date: Fri, 13 Apr 2012 14:12:54 +0100 Subject: staging: comedi: Add kernel config for default buffer sizes Allow the default values for the module parameters for the default initial buffer size and default maximum buffer size to be specified in the kernel configuration. I'm not sure what the defaults for the defaults for the defaults should be, but 64 KiB seems to small, so I used values suggested by Bernd Porr, which are 2048 KiB for the default initial buffer size and 20480 for the default maximum buffer size. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: Bernd Porr <berndporr@f2s.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ---  drivers/staging/comedi/Kconfig | 20 ++++++++++++++++++++  drivers/staging/comedi/comedi_fops.c | 12 +++++-------  2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 9037d02..a1cf0b0 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -14,6 +14,26 @@ config COMEDI_DEBUG     This is an option for use by developers; most people should     say N here. This enables comedi core and driver debugging. +config COMEDI_DEFAULT_BUF_SIZE_KB + int "Comedi default initial asynchronous buffer size in KiB" + default "2048" + depends on COMEDI != n + ---help--- + This is the default asynchronous buffer size which is used for + commands running in the background in kernel space. This + defaults to 2048 KiB of memory so that a 16 channel card + running at 10 kHz has of 2-4 seconds of buffer. + +config COMEDI_DEFAULT_BUF_MAXSIZE_KB + int "Comedi default maximum asynchronous buffer size in KiB" + default "20480" + depends on COMEDI != n + ---help--- + This is the default maximum asynchronous buffer size which can + be requested by a userspace program without root privileges. + This is set to 20480 KiB so that a fast I/O card with 16 + channels running at 100 kHz has 2-4 seconds of buffer. +  menuconfig COMEDI_MISC_DRIVERS   tristate "Comedi misc drivers"   depends on COMEDI diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index ef7bbe4..3222ac6 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -55,9 +55,6 @@ MODULE_AUTHOR("http://www.comedi.org");  MODULE_DESCRIPTION("Comedi core module");  MODULE_LICENSE("GPL"); -#define DEFAULT_BUF_MAXSIZE_KB 64 -#define DEFAULT_BUF_SIZE_KB 64 -  #ifdef CONFIG_COMEDI_DEBUG  int comedi_debug;  EXPORT_SYMBOL(comedi_debug); @@ -78,17 +75,18 @@ MODULE_PARM_DESC(comedi_num_legacy_minors,     "number of comedi minor devices to reserve for non-auto-configured devices (default 0)"    ); -unsigned int comedi_default_buf_size_kb = DEFAULT_BUF_SIZE_KB; +unsigned int comedi_default_buf_size_kb = CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB;  module_param(comedi_default_buf_size_kb, uint, S_IRUGO | S_IWUSR);  MODULE_PARM_DESC(comedi_default_buf_size_kb,     "default asynchronous buffer size in KiB (default " - __MODULE_STRING(DEFAULT_BUF_SIZE_KB) ")"); + __MODULE_STRING(CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB) ")"); -unsigned int comedi_default_buf_maxsize_kb = DEFAULT_BUF_MAXSIZE_KB; +unsigned int comedi_default_buf_maxsize_kb + = CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB;  module_param(comedi_default_buf_maxsize_kb, uint, S_IRUGO | S_IWUSR);  MODULE_PARM_DESC(comedi_default_buf_maxsize_kb,     "default maximum size of asynchronous buffer in KiB (default " - __MODULE_STRING(DEFAULT_BUF_MAXSIZE_KB) ")"); + __MODULE_STRING(CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB) ")");  static DEFINE_SPINLOCK(comedi_file_info_table_lock);  static struct comedi_device_file_info -- 1.7.10 ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: linux-image-3.2.0-23-generic-pae 3.2.0-23.36 ProcVersionSignature: Ubuntu 3.2.0-23.36-generic-pae 3.2.14 Uname: Linux 3.2.0-23-generic-pae i686 AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24. ApportVersion: 2.0.1-0ubuntu2 Architecture: i386 AudioDevicesInUse:  USER PID ACCESS COMMAND  /dev/snd/controlC0: bp1 1761 F.... pulseaudio CRDA: Error: [Errno 2] No such file or directory Card0.Amixer.info:  Card hw:0 'Intel'/'HDA Intel at 0xfdff8000 irq 45'    Mixer name : 'Realtek ALC888'    Components : 'HDA:10ec0888,1019e619,00100001'    Controls : 44    Simple ctrls : 21 Date: Fri Apr 13 23:32:26 2012 HibernationDevice: RESUME=UUID=b6911a72-ca8c-451f-980b-5f16df4e94f3 InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20120201.2) IwConfig:  lo no wireless extensions.  eth0 no wireless extensions. MachineType: Acer AcerPower FH ProcEnviron:  LANGUAGE=en_GB:en  TERM=xterm  PATH=(custom, user)  LANG=en_GB.UTF-8  SHELL=/bin/bash ProcFB: 0 radeondrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-23-generic-pae root=UUID=2a22481e-fd0f-4a5b-adb8-18566a6f8d65 ro quiet splash vt.handoff=7 RelatedPackageVersions:  linux-restricted-modules-3.2.0-23-generic-pae N/A  linux-backports-modules-3.2.0-23-generic-pae N/A  linux-firmware 1.79 RfKill: SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) UserAsoundrc:  pcm.fileout {     type empty     slave.pcm "tee:default,'/tmp/out.raw',raw"     # 48000 S16_LE 2ch (aplay -t raw -f dat)  } dmi.bios.date: 03/03/2007 dmi.bios.vendor: Phoenix Technologies, LTD dmi.bios.version: R01-B4 dmi.board.name: E946GZ dmi.board.vendor: Acer dmi.chassis.type: 3 dmi.chassis.vendor: Broadwater dmi.chassis.version: 946GZT-AM dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvrR01-B4:bd03/03/2007:svnAcer:pnAcerPowerFH:pvrR01-B4:rvnAcer:rnE946GZ:rvr:cvnBroadwater:ct3:cvr946GZT-AM: dmi.product.name: AcerPower FH dmi.product.version: R01-B4 dmi.sys.vendor: Acer
2012-04-25 08:46:08 Martin Pitt linux (Ubuntu Precise): status In Progress Fix Committed
2012-04-25 08:46:11 Martin Pitt bug added subscriber Ubuntu Stable Release Updates Team
2012-04-25 08:46:12 Martin Pitt bug added subscriber SRU Verification
2012-04-26 14:01:41 Launchpad Janitor linux (Ubuntu Precise): status Fix Committed Fix Released
2012-04-27 15:28:09 Launchpad Janitor linux (Ubuntu): status Fix Committed Fix Released
2012-05-08 01:11:36 Launchpad Janitor branch linked lp:ubuntu/precise-proposed/linux-ti-omap4
2012-05-14 22:24:39 Herton R. Krzesinski tags apport-bug i386 patch precise apport-bug i386 patch precise verification-done-precise
2012-06-08 18:38:21 Launchpad Janitor branch linked lp:ubuntu/precise-proposed/linux-armadaxp
2012-11-14 20:54:29 Adam Conrad removed subscriber Ubuntu Stable Release Updates Team
2012-11-14 21:30:44 Launchpad Janitor branch linked lp:ubuntu/precise-proposed/linux-lowlatency