Re: [PATCH 01/24] use IS_ENABLED() macro

2013-01-21 Thread Jonathan Nieder
Hans de Goede wrote: > Thanks for the patches I'll pick up 5 - 21 and add them to > my tree for Mauro. Ack on patch 1, BTW. Thanks, Jonathan -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at htt

Re: video: USB webcam fails since kernel 3.2

2012-10-09 Thread Jonathan Nieder
Jean-Francois Moine wrote: > I tried to prepare a patch set for the vc032x, That's good to hear. Does that you mean you have a rough patchset available, even if it doesn't work perfectly yet? I'd be happy to see some patches e.g. with [PATCH/WIP] in the subject line so there is something for pe

Re: video: USB webcam fails since kernel 3.2

2012-10-09 Thread Jonathan Nieder
Hi, In June, Martin-Éric Racine wrote: > Since recent kernels, this ASUS W5F's built-in webcam fails to be > detected. Gstreamer-based applications (Cheese, > gstreamer-properties) immediately crash whenever trying to access > the video device. [...] > video_source:sr[3246]: segfault at 0 ip (n

Re: video: USB webcam fails since kernel 3.2

2012-07-11 Thread Jonathan Nieder
Martin-Éric Racine wrote: > PS: Jonathan, do you feel like investigating why > arch/x86/Makefile_32.cpu wasn't included in the > linux-headers-3.5.0-rc6+_3.5.0-rc6+-1_i386.deb package that was > generated by the 'make deb-pkg' target? MAINTAINERS tells me that linux-kbu...@vger.kernel.org is the

Re: video: USB webcam fails since kernel 3.2

2012-07-09 Thread Jonathan Nieder
Hi Martin-Éric, Hans de Goede wrote: > Erm, that is quite a bit of work from my side for something which you > can easily do yourself, edit gspca.c, search for which_bandwidth > and then under the following lines: > u32 bandwidth; > int i; > > Add a line like this: > return

Re: [bisected] Webcam Genius 1300[AF] V2 not working since kernel 2.6.39

2012-07-04 Thread Jonathan Nieder
(cc-ing Rafael for runtime PM advice, Peter who reported the same bug, Laurent and Alexey for uvcvideo advice) Hi, Shubhadeep Chaudhuri wrote: > The webcams Genius 1300 V2 and Genius 1300AF V2 (and probably some built-in > MacBook iSight webcams) face an issue [...] > Every application displays

Re: video: USB webcam fails since kernel 3.2

2012-06-17 Thread Jonathan Nieder
Jonathan Nieder wrote: > (cc-ing Hans de Goede, the new gspca maintainer. Sorry I missed > that before.) Actually cc-ing this time. Sorry for the noise. >> Martin-Éric Racine wrote: >>> usb 1-7: new high-speed USB device number 3 using ehci_hcd [...] >>> usb 1

Re: video: USB webcam fails since kernel 3.2

2012-06-17 Thread Jonathan Nieder
(cc-ing Hans de Goede, the new gspca maintainer. Sorry I missed that before.) >> Martin-Éric Racine wrote: >>> usb 1-7: new high-speed USB device number 3 using ehci_hcd [...] >>> usb 1-7: Product: USB2.0 Web Camera >>> usb 1-7: Manufacturer: Vimicro Corp. [...] >>> gspca_main: v2.14.0 registered

Re: [PATCH] [media] cx88: Remove duplicate const

2012-05-04 Thread Jonathan Nieder
es and strings const, 2010-08-25). The address of an array is already immutable by definition, so for what it's worth, with or without a clarified commit message, Acked-by: Jonathan Nieder -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of

Re: [PATCH 3.0.y 0/4] Re: lirc_serial spuriously claims assigned port and irq to be in use

2012-03-07 Thread Jonathan Nieder
Greg Kroah-Hartman wrote: > On Fri, Mar 02, 2012 at 02:39:13PM -0600, Jonathan Nieder wrote: >> Ben Hutchings wrote: >>> On Thu, 2012-03-01 at 21:45 -0600, Jonathan Nieder wrote: >>>> Would some of these patches (e.g., at least patches 1, 2, and 5) be >>>&

Re: [bug?] ov519 fails to handle Hercules Deluxe webcam

2012-03-05 Thread Jonathan Nieder
Jean-Francois Moine wrote: > Jonathan Nieder wrote: >>> To be sure, try the gspca test version from my web site. >> >> Skippy, assuming that works (and I expect it would), could you try the >> attached patch against 2.6.32.y? It works like this: [...] >> 1.

Re: [bug?] ov519 fails to handle Hercules Deluxe webcam

2012-03-05 Thread Jonathan Nieder
edia] gspca - ov519: Fix sensor detection problems commit b877a9a7fb00d96bae4ab49c69f1be65b3e87e61 upstream. The sensor of some webcams could not be detected due to timing problems in sensor register reading. This patch adds bridge register readings before sensor register reading. Signed-off-by:

[bug?] ov519 fails to handle Hercules Deluxe webcam

2012-03-04 Thread Jonathan Nieder
Hi, Skippy le Grand Gourou wrote[1]: > Hercules Deluxe USB webcam won't work, see the end of the kernel > log. [...] > [521041.808976] gspca: probing 05a9:4519 > [521042.469094] ov519: I2C synced in 3 attempt(s) > [521042.469097] ov519: starting OV7xx0 configuration > [521042.469793] ov519: Unkno

Re: [PATCH 3.0.y 0/4] Re: lirc_serial spuriously claims assigned port and irq to be in use

2012-03-02 Thread Jonathan Nieder
Greg Kroah-Hartman wrote: > I'll look at these, but please, in the future, send all stable patches > to sta...@vger.kernel.org as there are other stable trees that people > maintain and they watch that list... Thanks, Greg. Will do. -- To unsubscribe from this list: send the line "unsubscribe li

[PATCH 4/4] [media] staging: lirc_serial: Do not assume error codes returned by request_irq()

2012-03-02 Thread Jonathan Nieder
d-off-by: Jonathan Nieder --- drivers/staging/lirc/lirc_serial.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lirc/lirc_serial.c b/drivers/staging/lirc/lirc_serial.c index 4b8fefb954d3..21cbc9ae79c9 100644 --- a/drivers/staging

[PATCH 3/4] [media] staging: lirc_serial: Fix deadlock on resume failure

2012-03-02 Thread Jonathan Nieder
From: Ben Hutchings Date: Wed, 16 Nov 2011 01:53:25 -0300 commit 1ff1d88e862948ae5bfe490248c023ff8ac2855d upstream. A resume function cannot remove the device it is resuming! Signed-off-by: Ben Hutchings Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder --- drivers

[PATCH 2/4] [media] staging: lirc_serial: Free resources on failure paths of lirc_serial_probe()

2012-03-02 Thread Jonathan Nieder
: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder --- drivers/staging/lirc/lirc_serial.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lirc/lirc_serial.c b/drivers/staging/lirc/lirc_serial.c index c8a4b7bc5879..fa023da6bdaa 100644

[PATCH 1/4] [media] staging: lirc_serial: Fix init/exit order

2012-03-02 Thread Jonathan Nieder
ff-by: Ben Hutchings Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder --- drivers/staging/lirc/lirc_serial.c | 56 ++-- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/drivers/staging/lirc/lirc_serial.c b/drivers/staging/lirc/lir

[PATCH 3.0.y 0/4] Re: lirc_serial spuriously claims assigned port and irq to be in use

2012-03-02 Thread Jonathan Nieder
Ben Hutchings wrote: > On Thu, 2012-03-01 at 21:45 -0600, Jonathan Nieder wrote: >> Would some of these patches (e.g., at least patches 1, 2, and 5) be >> appropriate for inclusion in the 3.0.y and 3.2.y stable kernels from >> kernel.org? > > Assuming they haven't

Re: [PATCH 1/5] staging: lirc_serial: Fix init/exit order

2012-03-01 Thread Jonathan Nieder
Hi Ben, Ben Hutchings wrote[1]: > Currently the module init function registers a platform_device and > only then allocates its IRQ and I/O region. This allows allocation to > race with the device's suspend() function. Instead, allocate > resources in the platform driver's probe() function and f

[PATCH 2/2] [media] af9005, af9015: use symbolic names for USB id table indices

2012-01-07 Thread Jonathan Nieder
that do not change meaning when items in the USB id table are reordered. Encouraged-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder --- drivers/media/dvb/dvb-usb/af9005.c | 23 ++- drivers/media/dvb/dvb-usb/af9015.c | 316 +++- 2 files changed, 25

[PATCH 1/2] [media] a800: use symbolic names for a800_table indices

2012-01-07 Thread Jonathan Nieder
he id table without fear. Encouraged-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder --- drivers/media/dvb/dvb-usb/a800.c | 21 ++--- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a

[PATCH 0/2] Re: [RFC/PATCH] [media] dw2102: use symbolic names for dw2102_table indices

2012-01-07 Thread Jonathan Nieder
d that this is a common constructor used inside the > dvb-usb drivers. IMHO, an approach like that should be extended to the > other drivers as well. Here's a few. Many more to go. Jonathan Nieder (2): [media] a800: use symbolic names for a800_table indices [media] af9005, af9015: use symbo

[PATCH] [media] dm1105: release dvbnet on frontend attachment failure

2012-01-06 Thread Jonathan Nieder
The patch "dm1105: handle errors from dvb_net_init" moved the initialization of dvbnet to before frontend attachment but forgot to adjust the error handling when frontend attachment fails. Signed-off-by: Jonathan Nieder --- Mauro Carvalho Chehab wrote: > Subject: [media] dm1105:

[PATCH 2/2] [media] dvb-bt8xx: convert printks to pr_err()

2012-01-06 Thread Jonathan Nieder
of messages and bump the loglevel of "Unknown bttv card type" from KERN_WARNING to KERN_ERR while at it. Inspired-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder --- drivers/media/dvb/bt8xx/dvb-bt8xx.c | 35 +-- 1 files changed, 17 inserti

[PATCH 1/2] [media] dvb-bt8xx: use dprintk for debug statements

2012-01-06 Thread Jonathan Nieder
This way, the messages will be tagged with KERN_DEBUG and not clutter the log from dmesg unless the "debug" module parameter is set. Signed-off-by: Jonathan Nieder --- drivers/media/dvb/bt8xx/dvb-bt8xx.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dri

[PATCH 0/2] Re: [git:v4l-dvb/for_v3.3] [media] dvb-bt8xx: handle errors from dvb_net_init

2012-01-06 Thread Jonathan Nieder
‘dvb_bt8xx_load_card’: drivers/media/dvb/bt8xx/dvb-bt8xx.c:788:10: warning: too many arguments for format [-Wformat-extra-args] Perhaps it would be better to add the KERN_ levels throughout the file with a separate patch. Like this: Jonathan Nieder (2): [media] dvb-bt8xx: use dpri

[PATCH] [media] flexcop: CodingStyle fix: don't use "if ((ret = foo()) < 0)"

2012-01-06 Thread Jonathan Nieder
Lift assignments from "if" conditionals for readability. No change in functionality intended. Suggested-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Nieder --- Mauro Carvalho Chehab wrote: > Subject: [media] flexcop: handle errors from dvb_net_init [...] > [mc

[PATCH 9/9] [media] firedtv: handle errors from dvb_net_init

2011-12-31 Thread Jonathan Nieder
It is not common for dvb_net_init to fail, but after the patch "dvb_net_init: return -errno on error" it can fail due to running out of memory. Handle this. >From an audit of dvb_net_init callers. Signed-off-by: Jonathan Nieder --- That's the end of the series, though it wo

[PATCH 8/9] [media] dvb-usb: handle errors from dvb_net_init

2011-12-31 Thread Jonathan Nieder
>From an audit of dvb_net_init callers, now that that function returns -errno on error. Signed-off-by: Jonathan Nieder --- drivers/media/dvb/dvb-usb/dvb-usb-dvb.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/driv

[PATCH 7/9] [media] dm1105: handle errors from dvb_net_init

2011-12-31 Thread Jonathan Nieder
Clean up and error out if dvb_net_init fails (for example due to ENOMEM). This involves moving the dvb_net_init call to before frontend_init to make cleaning up a little easier. >From an audit of dvb_net_init callers, now that dvb_net_init lets callers know about errors. Signed-off-by: Jonat

[PATCH 6/9] [media] dvb-bt8xx: handle errors from dvb_net_init

2011-12-31 Thread Jonathan Nieder
Clean up and error out if dvb_net_init fails (for example when running out of memory). >From an audit of dvb_net_init callers, now that dvb_net_init has learned to return a nonzero value from time to time. Signed-off-by: Jonathan Nieder --- drivers/media/dvb/bt8xx/dvb-bt8xx.c |

[PATCH 5/9] [media] flexcop: handle errors from dvb_net_init

2011-12-31 Thread Jonathan Nieder
Bail out if dvb_net_init encounters an error (for example an out-of-memory condition), now that it reports them. Signed-off-by: Jonathan Nieder --- drivers/media/dvb/b2c2/flexcop.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/media/dvb/b2c2/flexcop.c b

[PATCH 4/9] [media] ttusb-budget: use goto for exception handling

2011-12-31 Thread Jonathan Nieder
Avoid some repetition by adopting the usual "goto err" idiom for error handling. Signed-off-by: Jonathan Nieder --- drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 40 +++- 1 files changed, 22 insertions(+), 18 deletions(-) diff --git a/drivers/media/dvb/ttusb-

[PATCH 3/9] [media] dvb-bt8xx: use goto based exception handling

2011-12-31 Thread Jonathan Nieder
x27;re touching this code, also lift some assignments from "if" conditionals for simplicity. No functional change intended. Signed-off-by: Jonathan Nieder --- drivers/media/dvb/bt8xx/dvb-bt8xx.c | 57 -- 1 files changed, 27 insertions(+), 30 deletions

[PATCH 2/9] [media] videobuf-dvb: avoid spurious ENOMEM when CONFIG_DVB_NET=n

2011-12-31 Thread Jonathan Nieder
B_NET=n, and the kernel will pass on a more useful error code describing what happened when CONFIG_DVB_NET=y but dvb_net_init fails due to resource exhaustion. Reported-by: David Fries Signed-off-by: Jonathan Nieder --- drivers/media/video/videobuf-dvb.c |7 --- 1 files changed, 4 insertions

[PATCH 1/9] [media] DVB: dvb_net_init: return -errno on error

2011-12-31 Thread Jonathan Nieder
turn a meaningful error code, as preparation for adapting callers to look at that instead. The only immediate impact of this patch should be to make the few callers that already check for an error code from dvb_net_init behave a little more sensibly when it fails. Signed-off-by: Jonathan Nieder --- d

Re: [git:v4l-dvb/for_v3.3] [media] cx88-dvb avoid dangling core->gate_ctrl pointer

2011-12-31 Thread Jonathan Nieder
without clearing the > value of core->gate_ctrl which will cause an oops in macros > called from video_open in cx88-video.c > > Signed-off-by: David Fries > Cc: Mauro Carvalho Chehab > Cc: Istvan Varga > Cc: Jonathan Nieder > Signed-off-by: Mauro Carvalho Chehab For wha

[ddbridge] suspend-to-disk takes about a minute ("I2C timeout") if vdr in use on ASUS P8H67-M EVO

2011-12-23 Thread Jonathan Nieder
Eric Lavarde wrote: > On 12/12/11 03:29, Jonathan Nieder wrote: >> Does suspend-to-disk ("echo >> disk>/sys/power/state") work fine in general? > > No idea in general, but I made some tests. Thanks for this, and sorry for the slow response. > First, it

[RFC/PATCH] [media] dw2102: use symbolic names for dw2102_table indices

2011-12-23 Thread Jonathan Nieder
names for each index to avoid this. This way, other device tables wanting to reuse the USB ids can use expressions like "&dw2102_table[TEVII_S630]" that do not change as the entries in the table are reordered. Signed-off-by: Jonathan Nieder --- Patrick Boettcher wrote: > Due to the

Re: Add support for new Terratec DVB USB IDs

2011-12-22 Thread Jonathan Nieder
Hi, Eduard Bloch wrote[1]: > current revision of the Cinergy S2 USB box from Terratec seems to use > another USB-IDs. The manufacturer provides patches at > http://linux.terratec.de/tv_en.html and it seems like the only > difference is really just the new ID and a couple of init flag changes. > >

Re: [PATCH] cx88-dvb avoid dangling core->gate_ctrl pointer

2011-12-18 Thread Jonathan Nieder
Hi David, David Fries wrote: > DVB: registering new adapter (cx88[0]) > DVB: registering adapter 0 frontend 0 (Oren OR51132 VSB/QAM Frontend)... > cx88[0]: videobuf_dvb_register_frontend failed (errno = -12) > cx88[0]/2: dvb_register failed (err = -12) > cx88[0]/2: cx8802 probe failed, err = -12

Re: [PATCH] uvcvideo: Fix crash when linking entities

2011-09-12 Thread Jonathan Nieder
Laurent Pinchart wrote: > I've just sent a pull request to Mauro. Thanks! Looks good to me, for what little that's worth. My only nits are that in the future it might be nice to "Cc: stable" and credit testers so they can grep through commit logs to find out if the kernel is fixed. -- To unsubs

Re: [PATCH] uvcvideo: Fix crash when linking entities

2011-09-11 Thread Jonathan Nieder
Hi Laurent and Mauro, Laurent Pinchart wrote: > On Wednesday 07 September 2011 17:32:41 Josh Boyer wrote: >> On Wed, Sep 07, 2011 at 12:29:08AM +0200, Laurent Pinchart wrote: >>> drivers/media/video/uvc/uvc_entity.c |2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> This pat

Re: DiBxxxx: fixes for 3.1/3.0

2011-08-28 Thread Jonathan Nieder
Hi, Patrick Boettcher wrote: > On Wed, 3 Aug 2011, Patrick Boettcher wrote: >> [media] dib0700: protect the dib0700 buffer access >> [media] DiBcom: protect the I2C bufer access > > I added a patch from Olivier which fixes wrongly used dprintks and replaces > them by err()-calls. > > [media] dib0

[regression] uvcvideo: BUG at drivers/media/media-entity.c:346 for compaq presario cq56 (laptop) built-in webcam

2011-08-14 Thread Jonathan Nieder
Hi, Daniel Dickinson wrote[1]: > New in 3.0.0: > > webcam oopses and then spams syslog. Didn't happen in .39 so is a > regression. > > uvcvideo: Found UVC 1.00 device HP Webcam-101 (0bda:58e0) > > From syslog: > > [ 428.117889] Linux video capture interface: v2.00 > [ 428.161164] uvcvideo: Fou

Re: cx88 sound does not always work

2011-05-04 Thread Jonathan Nieder
(culling cc list) hubstar wrote: > Update: > > I noticed I was using the desktop kernel this time, and reinstalled the > default kernel. The audio now works fine (once this patch is installed). > Works every time. > > This rings a bell, like I've had to do this to a system in the past. > > I don't

Re: [git:v4l-dvb/for_v2.6.40] [media] cx88: protect per-device driver list with device lock

2011-05-03 Thread Jonathan Nieder
Mauro Carvalho Chehab wrote: > This is an automatic generated email to let you know that the > following patch were queued at the > http://git.linuxtv.org/media_tree.git tree: > > Subject: [media] cx88: protect per-device driver list with device lock [and so on] Thanks, Mauro! Let's hope testers

cx88 sound does not always work (Re: [PATCH v2.6.38 resend 0/7] cx88 deadlock and data races)

2011-05-02 Thread Jonathan Nieder
Hi, linuxtv wrote: > FYI I too experienced the problem of hanging and used the patch dated > 6th April to get it working. > However I do have the problem that sound does not always work/come on. > Once it is started it stays, getting it started is not reliable. Could you give details? What card

[PATCH 7/7] [media] cx88: don't use atomic_t for core->users

2011-05-01 Thread Jonathan Nieder
users is always read or written with core->lock held. A plain int is simpler and faster. Tested-by: Andi Huber Tested-by: Marlon de Boer Signed-off-by: Jonathan Nieder --- That's the end of the series. Thanks for reading. drivers/media/video/cx88/cx88-video.c |5 +++-- drive

[PATCH 6/7] [media] cx88: don't use atomic_t for core->mpeg_users

2011-05-01 Thread Jonathan Nieder
mpeg_users is always read or written with core->lock held except in mpeg_release (where it looks like a bug). A plain int is simpler and faster. Tested-by: Andi Huber Tested-by: Marlon de Boer Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c |

[PATCH 5/7] [media] cx88: gracefully reject attempts to use unregistered cx88-blackbird driver

2011-05-01 Thread Jonathan Nieder
Tested-by: Andi Huber Tested-by: Marlon de Boer Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/c

[PATCH 4/7] [media] cx88: protect cx8802_devlist with a mutex

2011-05-01 Thread Jonathan Nieder
Add and use a mutex to protect the cx88-mpeg device list. Previously the BKL prevented races. Based on work by Ben Hutchings . Tested-by: Andi Huber Tested-by: Marlon de Boer Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-mpeg.c | 20 +--- 1 files changed

[PATCH 3/7] [media] cx88: hold device lock during sub-driver initialization

2011-05-01 Thread Jonathan Nieder
el.org Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c |2 -- drivers/media/video/cx88/cx88-mpeg.c |5 ++--- drivers/media/video/cx88/cx88.h |7 ++- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/media/video/cx8

[PATCH 2/7] [media] cx88: fix locking of sub-driver operations

2011-05-01 Thread Jonathan Nieder
arlon de Boer Cc: sta...@kernel.org Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c |4 ++-- drivers/media/video/cx88/cx88-dvb.c |3 +-- drivers/media/video/cx88/cx88-mpeg.c |4 drivers/media/video/cx88/cx88.h |3 ++- 4

[PATCH 1/7] [media] cx88: protect per-device driver list with device lock

2011-05-01 Thread Jonathan Nieder
chings . Tested-by: Andi Huber Tested-by: Marlon de Boer Cc: sta...@kernel.org Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c |3 ++- drivers/media/video/cx88/cx88-dvb.c |3 +++ drivers/media/video/cx88/cx88-mpeg.c | 11 +++ drivers/medi

[PATCH v2.6.38 resend 0/7] cx88 deadlock and data races

2011-05-01 Thread Jonathan Nieder
Thoughts? Jonathan Nieder (7): [media] cx88: protect per-device driver list with device lock [media] cx88: fix locking of sub-driver operations [media] cx88: hold device lock during sub-driver initialization [media] cx88: protect cx8802_devlist with a mutex [media] cx88: gracefu

Re: [RFC/PATCH v2 0/7] locking fixes for cx88

2011-04-05 Thread Jonathan Nieder
Jonathan Nieder wrote: > Jonathan Nieder (7): > [media] cx88: protect per-device driver list with device lock > [media] cx88: fix locking of sub-driver operations > [media] cx88: hold device lock during sub-driver initialization > [media] cx88: use a mutex to protect

Re: [PATCH 7/7] [mpeg] cx88: don't use atomic_t for core->users

2011-04-04 Thread Jonathan Nieder
Jonathan Nieder wrote: > [Subject: [PATCH 7/7] [mpeg] cx88: don't use atomic_t for core->users] The subject should say [media] rather than [mpeg]. I fixed it locally and then sent the wrong patch; sorry for the nonsense. -- To unsubscribe from this list: send the line "unsubsc

[PATCH 7/7] [mpeg] cx88: don't use atomic_t for core->users

2011-04-04 Thread Jonathan Nieder
users is always read or written with core->lock held. A plain int is simpler and faster. Signed-off-by: Jonathan Nieder --- Thanks for reading. drivers/media/video/cx88/cx88-video.c |5 +++-- drivers/media/video/cx88/cx88.h |2 +- 2 files changed, 4 insertions(+), 3 deleti

[PATCH 6/7] [media] cx88: don't use atomic_t for core->mpeg_users

2011-04-04 Thread Jonathan Nieder
mpeg_users is always read or written with core->lock held except in mpeg_release (where it looks like a bug). A plain int is simpler and faster. Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c | 11 ++- drivers/media/video/cx88/cx88.h |

[PATCH 5/7] [media] cx88: gracefully reject attempts to use unregistered cx88-blackbird driver

2011-04-04 Thread Jonathan Nieder
rning. Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index f637d34..fa8e347 100644 ---

[PATCH 4/7] [media] cx88: use a mutex to protect cx8802_devlist

2011-04-04 Thread Jonathan Nieder
Add and use a mutex to protect the cx88-mpeg device list. Previously the BKL prevented races. Based on a patch by Ben Hutchings . Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-mpeg.c | 20 +--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git

[PATCH 3/7] [media] cx88: hold device lock during sub-driver initialization

2011-04-04 Thread Jonathan Nieder
nce count becomes negative --- uh oh. Close the race by holding core->lock during probe and not releasing until the device is in drvlist and initialization finished. Previously the BKL prevented this race. Reported-by: Andreas Huber Signed-off-by: Jonathan Nieder --- drivers/media/video/cx8

[PATCH 2/7] [media] cx88: fix locking of sub-driver operations

2011-04-04 Thread Jonathan Nieder
g the semantics of request_acquire, request_release, advise_acquire, and advise_release: all will require the caller to hold the device lock. Based on a patch by Ben Hutchings . Reported-by: Andi Huber Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=31962 Signed-off-by: Jonathan Nieder Cc

[PATCH 1/7] [media] cx88: protect per-device driver list with device lock

2011-04-04 Thread Jonathan Nieder
Based on a patch by Ben Hutchings . Signed-off-by: Jonathan Nieder Cc: Andi Huber Cc: sta...@kernel.org --- drivers/media/video/cx88/cx88-blackbird.c |3 ++- drivers/media/video/cx88/cx88-dvb.c |3 +++ drivers/media/video/cx88/cx88-mpeg.c | 11 +++ drivers/medi

[RFC/PATCH v2 0/7] locking fixes for cx88

2011-04-04 Thread Jonathan Nieder
Hi again, Jonathan Nieder wrote: > Huber Andreas wrote[1]: >> Processes that try to open a cx88-blackbird driven MPEG device will hang up. > > Here's a possible fix based on a patch by Ben Hutchings and > corrections from Andi Huber. Warning: probably full of mistakes (my

Re: [PATCH 3/3] [media] cx88: use a mutex to protect cx8802_devlist

2011-04-04 Thread Jonathan Nieder
[media] cx88: lock device during driver initialization Reported-by: Andreas Huber Signed-off-by: Jonathan Nieder --- drivers/media/video/cx88/cx88-blackbird.c |2 -- drivers/media/video/cx88/cx88-mpeg.c |5 ++--- drivers/media/video/cx88/cx88.h |7 ++- 3 files cha

Re: [PATCH 3/3] [media] cx88: use a mutex to protect cx8802_devlist

2011-04-02 Thread Jonathan Nieder
Hi Andreas, (please turn off HTML mail.) Andreas Huber wrote: > There is a reference count bug in the driver code. The driver's > active_ref count may become negative which leads to unpredictable > behavior. (mpeg video device inaccessible, etc ...) Hmm, the patchset didn't touch active_ref hand

Re: [RFC/PATCH 0/3] locking fixes for cx88

2011-04-02 Thread Jonathan Nieder
Ben Hutchings wrote: > Since you have split up and otherwise modified the patch I sent, please > remove the 'From' and 'Signed-off-by' lines with my name and address. > Just state that the patches are based on my work. Okay, will do. Thanks again for writing it. -- To unsubscribe from this list:

[PATCH 3/3] [media] cx88: use a mutex to protect cx8802_devlist

2011-04-02 Thread Jonathan Nieder
: Jonathan Nieder --- That's the end of the series. Hopefully I haven't mangled the patches too much --- if we're lucky they might even still work, though I wouldn't bet on it. Bug reports and improvements welcome. Good night, Jonathan drivers/media/video/cx8

[PATCH 2/3] [media] cx88: fix locking of sub-driver operations

2011-04-02 Thread Jonathan Nieder
d the device lock now. [jn: split from a larger patch, with new commit message] Reported-by: Andi Huber Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=31962 Signed-off-by: Ben Hutchings Signed-off-by: Jonathan Nieder Cc: sta...@kernel.org --- drivers/media/video/cx88/cx88-blackbird.c |

[PATCH 1/3] [media] cx88: protect per-device driver list with device lock

2011-04-02 Thread Jonathan Nieder
es. There are still some relevant races (noted in comments) and the deadlock noticed by Andi remains; later patches will address that. Based-on-patch-by: Ben Hutchings Signed-off-by: Jonathan Nieder Cc: Andi Huber Cc: sta...@kernel.org --- drivers/media/video/cx88/cx88-blackbird.c |8 +++-

[RFC/PATCH 0/3] locking fixes for cx88

2011-04-02 Thread Jonathan Nieder
of this stuff. Untested. Review and testing would be welcome. Ben Hutchings (2): [media] cx88: fix locking of sub-driver operations [media] cx88: use a mutex to protect cx8802_devlist Jonathan Nieder (1): [media] cx88: protect per-device driver list with device lock drivers/media/video/cx88/cx8

Re: [linux-dvb] cx88-blackbird broken (since 2.6.37)

2011-03-27 Thread Jonathan Nieder
Hi Andi, Huber Andreas wrote[1]: > [Symptom] > Processes that try to open a cx88-blackbird driven MPEG device will hang up. Thanks for reporting. Just cc-ing some relevant people. Could you file a bug to track this at , product v4l-dvb, component cx88, and then sen