04 Feb, 2014

17 commits

  • Incorrectly setting of free-run for Composite.
    Copy/paste regression fix.

    Signed-off-by: Martin Bugge
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Martin Bugge
     
  • Round off image width to nearest 8 (GTF_CELL_GRAN)

    A source sending a GTF (Generalized Timing Formula) format have no means of
    signalling image width. The assumed aspect ratio may result in an odd image
    width but according to the standard image width should be in multiple of 8.

    Cc: Mats Randgaard
    Signed-off-by: Martin Bugge
    Reviewed-by: Hans Verkuil
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Martin Bugge
     
  • cppcheck reported memory leak in device_authorizatio()
    within hdpvr-core.c.
    When the debug option is specified and the code jump to
    "unlock:" label, print_buf was not freed.
    Confirm the module succesfully compiled without error.

    Signed-off-by: Masanari Iida
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Masanari Iida
     
  • Add USB ID [2040:f900] for Hauppauge WinTV-MiniStick 2.
    Device is build upon IT9135 chipset.

    Tested-by: Stefan Becker
    Signed-off-by: Antti Palosaari
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Antti Palosaari
     
  • Fix the following build error:

    drivers/media/usb/dvb-usb-v2/
    mxl111sf-tuner.h:72:9: error: expected ‘;’, ‘,’ or ‘)’ before ‘struct’
    struct mxl111sf_tuner_config *cfg)

    Signed-off-by: Dave Jones
    Signed-off-by: Michael Krufky
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Dave Jones
     
  • mxl111sf_read_reg takes an address of a variable to write to as an argument.
    drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c:mxl111sf_config_pin_mux_modes
    passes several uninitialized stack variables to this routine, expecting
    them to be filled in. In the event that something unexpected happens when
    reading from the chip, we end up doing a pr_debug of the value passed in,
    revealing whatever garbage happened to be on the stack.

    Change the pr_debug to match what happens in the 'success' case, where we
    assign buf[1] to *data.

    Spotted with Coverity (Bugs 731910 through 731917)

    Signed-off-by: Dave Jones
    Signed-off-by: Michael Krufky
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Dave Jones
     
  • Don't use '&state->priv->i2c->dev' reference to device because
    state is still 'NULL'. Use '&i2c->dev' instead.

    This bug has been reported by scan.coverity.com

    Signed-off-by: Andi Shyti
    Signed-off-by: Michael Krufky
    Cc: vger@stable.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Andi Shyti
     
  • At this point of the execution in the function cx24117_attach()
    demod cannot be '0'. In that case the function returns earlier
    with an error value ('NULL'). Remove the if statement.

    This error has been reported by scan.coverity.com

    Signed-off-by: Andi Shyti
    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Andi Shyti
     
  • I am no longer available at the kernellabs.com or m1k.net email
    addresses. Update each instance of my email to my linuxtv.org
    account.

    Signed-off-by: Michael Krufky
    Signed-off-by: Mauro Carvalho Chehab

    Michael Krufky
     
  • This patch adds a test preventing streamon() if there is no buffer
    ready.

    Without this patch, a user could call streamon() before
    preparing any buffer. This leads to a situation where if he calls
    close() before calling streamoff() the device is kept streaming.

    Signed-off-by: Ricardo Ribalda Delgado
    Reviewed-by: Marek Szyprowski
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Ricardo Ribalda
     
  • This reverts commit a242f426108c284049a69710f871cc9f11b13e61.

    That commit actually caused deadlocks, rather then fixing them.

    If ext_lock is set to NULL (otherwise videobuf_queue_lock doesn't do
    anything), then you get this deadlock:

    The driver's mmap function calls videobuf_mmap_mapper which calls
    videobuf_queue_lock on q. videobuf_mmap_mapper calls __videobuf_mmap_mapper,
    __videobuf_mmap_mapper calls videobuf_vm_open and videobuf_vm_open
    calls videobuf_queue_lock on q (introduced by above patch): deadlocked.

    This affects drivers using dma-contig and dma-vmalloc. Only dma-sg is
    not affected since it doesn't call videobuf_vm_open from __videobuf_mmap_mapper.

    Most drivers these days have a non-NULL ext_lock. Those that still use
    NULL there are all fairly obscure drivers, which is why this hasn't been
    seen earlier.

    Since everything worked perfectly fine for many years I prefer to just
    revert this patch rather than trying to fix it. videobuf is quite fragile
    and I rather not touch it too much. Work is (slowly) progressing to move
    everything over to vb2 or at the very least use non-NULL ext_lock in
    videobuf.

    Signed-off-by: Hans Verkuil
    Cc: # for v3.11 and up
    Cc: Al Viro
    Reported-by: Pete Eberlein
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • This is required so that we give up the last reference to the device.
    Remove the kfree() because the put_device() call will actually call
    release_sub_device which in turn kfrees the device.

    Signed-off-by: Levente Kurusa
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Levente Kurusa
     
  • Enclose the runtime PM helpers in #ifdef CONFIG_PM_RUNTIME/#endif
    to avoid following compile warning when CONFIG_PM_RUNTIME is disabled:

    CC drivers/media/platform/exynos4-is/fimc-lite.o
    drivers/media/platform/exynos4-is/fimc-lite.c:1591:12: warning: ‘fimc_lite_runtime_resume’ defined but not used [-Wunused-function]
    drivers/media/platform/exynos4-is/fimc-lite.c:1599:12: warning: ‘fimc_lite_runtime_suspend’ defined but not used [-Wunused-function]

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • Enclose the runtime PM helpers in #ifdef CONFIG_PM_RUNTIME/#endif
    to avoid following compile warning when CONFIG_PM_RUNTIME is disabled:

    CC drivers/media/platform/exynos4-is/fimc-core.o
    drivers/media/platform/exynos4-is/fimc-core.c:1040:12: warning: ‘fimc_runtime_resume’ defined but not used
    drivers/media/platform/exynos4-is/fimc-core.c:1057:12: warning: ‘fimc_runtime_suspend’ defined but not used

    Signed-off-by: Sylwester Nawrocki
    Reviewed-by: Jingoo Han
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • Ensure clk_disable() is called on error paths only when clk_enable()
    was previously called.

    This fixes following build warning:

    .../media-git/drivers/media/platform/exynos4-is/fimc-lite.c: In function 'fimc_lite_probe':
    .../media-git/drivers/media/platform/exynos4-is/fimc-lite.c:1583:1: warning: label 'err_sd' defined but not used [-Wunused-label]

    Reported-by: Hans Verkuil
    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Sylwester Nawrocki
     
  • NV12 format entries in the sjpeg_formats array had wrong
    colplanes, depth and v_align values.

    Signed-off-by: Jacek Anaszewski
    Signed-off-by: Kyungmin Park
    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Jacek Anaszewski
     
  • Using variable length array in s5k5baf_write_arr_seq caused
    an implicit assumption that i2c sequences should be short.
    The patch rewrites the function so it can handle sequences
    of any length and does not use variable length array.

    Reported-by: Dan Carpenter
    Signed-off-by: Andrzej Hajda
    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Andrzej Hajda
     

01 Feb, 2014

1 commit

  • Pull media updates from Mauro Carvalho Chehab:
    - a new jpeg codec driver for Samsung Exynos (jpeg-hw-exynos4)
    - a new dvb frontend for ds2103 chipset (m88ds2103)
    - a new sensor driver for Samsung S5K5BAF UXGA (s5k5baf)
    - new drivers for R-Car VSP1
    - a new radio driver: radio-raremono
    - a new tuner driver for ts2022 chipset (m88ts2022)
    - the analog part of em28xx is now a separate module that only
    load/runs if the device is not a pure digital TV device
    - added a staging driver for bcm2048 radio devices
    - the omap 2 video driver (omap24xx) was moved to staging. This driver
    is for an old hardware and uses a deprecated Kernel internal API. If
    nobody cares enough to fix it, it would be removed on a couple Kernel
    releases
    - the sn9c102 driver was moved to staging. This driver was replaced by
    gspca, and disabled on some distros, as almost all devices are known
    to work properly with gspca. It should be removed from kernel on a
    couple Kernel releases
    - lots of driver fixes, improvements and cleanups

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (421 commits)
    [media] media: v4l2-dev: fix video device index assignment
    [media] rc-core: reuse device numbers
    [media] em28xx-cards: properly initialize the device bitmap
    [media] Staging: media: Fix line length exceeding 80 characters in as102_drv.c
    [media] Staging: media: Fix line length exceeding 80 characters in as102_fe.c
    [media] Staging: media: Fix quoted string split across line in as102_fe.c
    [media] media: st-rc: Add reset support
    [media] m2m-deinterlace: fix allocated struct type
    [media] radio-usb-si4713: fix sparse non static symbol warnings
    [media] em28xx-audio: remove needless check before usb_free_coherent()
    [media] au0828: Fix sparse non static symbol warning
    Revert "[media] go7007-usb: only use go->dev after allocated"
    [media] em28xx-audio: provide an error code when URB submit fails
    [media] em28xx: fix check for audio only usb interfaces when changing the usb alternate setting
    [media] em28xx: fix usb alternate setting for analog and digital video endpoints > 0
    [media] em28xx: make 'em28xx_ctrl_ops' static
    em28xx-alsa: Fix error patch for init/fini
    [media] em28xx-audio: flush work at .fini
    [media] drxk: remove the option to load firmware asynchronously
    [media] em28xx: adjust period size at runtime
    ...

    Linus Torvalds
     

29 Jan, 2014

1 commit


28 Jan, 2014

1 commit

  • The side effect of commit 1056e4388b045 ("v4l2-dev: Fix race condition on
    __video_register_device") is the increased number of index value assigned
    on video_device registration. Before that commit video_devices were
    numbered from 0, after it, the indexes starts from 1, because get_index()
    always count the device, which is being registered. Some device drivers
    rely on video_device index number for internal purposes, i.e. s5p-mfc
    driver stopped working after that patch. This patch restores the old method
    of numbering the video_device indexes.

    Cc: stable@vger.kernel.org # for v3.12
    Signed-off-by: Marek Szyprowski
    Acked-by: Sakari Ailus
    Acked-by: Ricardo Ribalda
    Signed-off-by: Mauro Carvalho Chehab

    Marek Szyprowski
     

26 Jan, 2014

1 commit

  • Pull networking updates from David Miller:

    1) BPF debugger and asm tool by Daniel Borkmann.

    2) Speed up create/bind in AF_PACKET, also from Daniel Borkmann.

    3) Correct reciprocal_divide and update users, from Hannes Frederic
    Sowa and Daniel Borkmann.

    4) Currently we only have a "set" operation for the hw timestamp socket
    ioctl, add a "get" operation to match. From Ben Hutchings.

    5) Add better trace events for debugging driver datapath problems, also
    from Ben Hutchings.

    6) Implement auto corking in TCP, from Eric Dumazet. Basically, if we
    have a small send and a previous packet is already in the qdisc or
    device queue, defer until TX completion or we get more data.

    7) Allow userspace to manage ipv6 temporary addresses, from Jiri Pirko.

    8) Add a qdisc bypass option for AF_PACKET sockets, from Daniel
    Borkmann.

    9) Share IP header compression code between Bluetooth and IEEE802154
    layers, from Jukka Rissanen.

    10) Fix ipv6 router reachability probing, from Jiri Benc.

    11) Allow packets to be captured on macvtap devices, from Vlad Yasevich.

    12) Support tunneling in GRO layer, from Jerry Chu.

    13) Allow bonding to be configured fully using netlink, from Scott
    Feldman.

    14) Allow AF_PACKET users to obtain the VLAN TPID, just like they can
    already get the TCI. From Atzm Watanabe.

    15) New "Heavy Hitter" qdisc, from Terry Lam.

    16) Significantly improve the IPSEC support in pktgen, from Fan Du.

    17) Allow ipv4 tunnels to cache routes, just like sockets. From Tom
    Herbert.

    18) Add Proportional Integral Enhanced packet scheduler, from Vijay
    Subramanian.

    19) Allow openvswitch to mmap'd netlink, from Thomas Graf.

    20) Key TCP metrics blobs also by source address, not just destination
    address. From Christoph Paasch.

    21) Support 10G in generic phylib. From Andy Fleming.

    22) Try to short-circuit GRO flow compares using device provided RX
    hash, if provided. From Tom Herbert.

    The wireless and netfilter folks have been busy little bees too.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2064 commits)
    net/cxgb4: Fix referencing freed adapter
    ipv6: reallocate addrconf router for ipv6 address when lo device up
    fib_frontend: fix possible NULL pointer dereference
    rtnetlink: remove IFLA_BOND_SLAVE definition
    rtnetlink: remove check for fill_slave_info in rtnl_have_link_slave_info
    qlcnic: update version to 5.3.55
    qlcnic: Enhance logic to calculate msix vectors.
    qlcnic: Refactor interrupt coalescing code for all adapters.
    qlcnic: Update poll controller code path
    qlcnic: Interrupt code cleanup
    qlcnic: Enhance Tx timeout debugging.
    qlcnic: Use bool for rx_mac_learn.
    bonding: fix u64 division
    rtnetlink: add missing IFLA_BOND_AD_INFO_UNSPEC
    sfc: Use the correct maximum TX DMA ring size for SFC9100
    Add Shradha Shah as the sfc driver maintainer.
    net/vxlan: Share RX skb de-marking and checksum checks with ovs
    tulip: cleanup by using ARRAY_SIZE()
    ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
    net/cxgb4: Don't retrieve stats during recovery
    ...

    Linus Torvalds
     

24 Jan, 2014

1 commit

  • Pull clk framework changes from Mike Turquette:
    "The first half of the clk framework pull request is made up almost
    entirely of new platform/driver support. There are some conversions
    of existing drivers to the common-clock Device Tree binding, and a few
    non-critical fixes to the framework.

    Due to an entirely unnecessary cyclical dependency with the arm-soc
    tree this pull request is broken into two pieces. The second piece
    will be sent out after arm-soc sends you the pull request that merged
    in core support for the HiSilicon 3620 platform. That same pull
    request from arm-soc depends on this pull request to merge in those
    HiSilicon bits without causing build failures"

    [ Just did the ARM SoC merges, so getting ready for the second clk tree
    pull request - Linus ]

    * tag 'clk-for-linus-3.14-part1' of git://git.linaro.org/people/mike.turquette/linux: (97 commits)
    devicetree: bindings: Document qcom,mmcc
    devicetree: bindings: Document qcom,gcc
    clk: qcom: Add support for MSM8660's global clock controller (GCC)
    clk: qcom: Add support for MSM8974's multimedia clock controller (MMCC)
    clk: qcom: Add support for MSM8974's global clock controller (GCC)
    clk: qcom: Add support for MSM8960's multimedia clock controller (MMCC)
    clk: qcom: Add support for MSM8960's global clock controller (GCC)
    clk: qcom: Add reset controller support
    clk: qcom: Add support for branches/gate clocks
    clk: qcom: Add support for root clock generators (RCGs)
    clk: qcom: Add support for phase locked loops (PLLs)
    clk: qcom: Add a regmap type clock struct
    clk: Add set_rate_and_parent() op
    reset: Silence warning in reset-controller.h
    clk: sirf: re-arch to make the codes support both prima2 and atlas6
    clk: composite: pass mux_hw into determine_rate
    clk: shmobile: Fix MSTP clock array initialization
    clk: shmobile: Fix MSTP clock index
    ARM: dts: Add clock provider specific properties to max77686 node
    clk: max77686: Register OF clock provider
    ...

    Linus Torvalds
     

15 Jan, 2014

18 commits

  • Before changeset d8b4b5822f51e, the remote controller device numbers
    were released when the device were unregistered. That helped to maintain
    some sanity, as, when USB devices are replugged, the remote controller
    would get the same number.

    Restore the same behaviour.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Instead of just creating a long int, use DECLARE_BITMAP().

    No functional changes.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Some of the SOCs hold the IRB IP in softreset state by default.
    For this IP to work driver needs to bring it out of softreset.
    This patch adds support to reset the IP via reset framework.

    Without this patch the driver can not work with SoCs which holds the IP
    in softreset.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Mauro Carvalho Chehab

    Srinivas Kandagatla
     
  • 'xt' points to a dma_interleaved_template and not a dma_async_tx_descriptor.

    Signed-off-by: Jassi Brar
    Signed-off-by: Mauro Carvalho Chehab

    Jassi Brar
     
  • Fixes the following sparse warnings:

    drivers/media/radio/si4713/radio-usb-si4713.c:226:31: warning:
    symbol 'start_seq' was not declared. Should it be static?
    drivers/media/radio/si4713/radio-usb-si4713.c:291:29: warning:
    symbol 'command_table' was not declared. Should it be static?

    Signed-off-by: Wei Yongjun
    Signed-off-by: Mauro Carvalho Chehab

    Wei Yongjun
     
  • usb_free_coherent() is safe with NULL addr and this check is
    not required.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Mauro Carvalho Chehab

    Wei Yongjun
     
  • Fixes the following sparse warning:

    drivers/media/usb/au0828/au0828-dvb.c:36:5: warning:
    symbol 'preallocate_big_buffers' was not declared. Should it be static?

    Signed-off-by: Wei Yongjun
    Signed-off-by: Mauro Carvalho Chehab

    Wei Yongjun
     
  • Instead of just saying:
    [ 1646.412419] em2882/3 #0: submit of audio urb failed
    Print the reason why it failed, to help debugging and fixing it.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Previously, we've been assuming that the video endpoints are always at usb
    interface 0. Hence, if vendor audio endpoints are provided at a separate
    interface, they were supposed to be at interface number > 0.
    Instead of checking for (interface number > 0) to determine if an interface
    is a pure audio interface, dev->is_audio_only should be checked.

    Signed-off-by: Frank Schäfer
    Signed-off-by: Mauro Carvalho Chehab

    Frank Schaefer
     
  • The current code assumes that the analog + digital video endpoints are always at
    interface number 0 when changing the alternate setting.
    This seems to work fine for most existing devices.
    However, at least the SpeedLink VAD Laplace webcam has the video endpoint on
    interface number 3 (which fortunately doesn't cause any trouble because ist uses
    bulk transfers only).
    We already consider the actual interface number for audio endpoints, so
    rename the the audio_ifnum variable and use it for all device types.
    Also get get rid of a pointless (ifnum < 0) in em28xx-audio.

    Signed-off-by: Frank Schäfer
    Signed-off-by: Mauro Carvalho Chehab

    Frank Schaefer
     
  • sparse warnings: (new ones prefixed by >>)

    >> drivers/media/usb/em28xx/em28xx-video.c:1151:28: sparse: symbol 'em28xx_ctrl_ops' was not declared. Should it be static?

    Signed-off-by: Fengguang Wu
    Signed-off-by: Mauro Carvalho Chehab

    Fengguang Wu
     
  • If something bad happens during init, we free the card data.
    However, we still keep it initialized, causing some dependent
    code to be called at .fini.

    Fix it.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • As a pending action might be still there at the work
    thread, flush it.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The option to load firmware asynchronously were added due to
    a requirement with a few versions of udev. It turns that this was
    a bad idea and caused regressions on drxk-based devices.

    So, we end by only letting the firmware to be loaded syncronously
    everywhere.

    So, let's remove the bad code.

    This patch partially reverts the changeset 8e30783b0b3.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • While the current hardcoded period is ok for the current values,
    we may latter change the driver to work with different bit rates
    or with different latencies than 64ms.

    So, adust the period size at runtime.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Avoid circular mutex lock by pushing the dev->lock to the .fini
    callback on each extension.

    As em28xx-dvb, em28xx-alsa and em28xx-rc have their own data
    structures, and don't touch at the common structure during .fini,
    only em28xx-v4l needs to be locked.

    [ 90.994317] ======================================================
    [ 90.994356] [ INFO: possible circular locking dependency detected ]
    [ 90.994395] 3.13.0-rc1+ #24 Not tainted
    [ 90.994427] -------------------------------------------------------
    [ 90.994458] khubd/54 is trying to acquire lock:
    [ 90.994490] (&card->controls_rwsem){++++.+}, at: [] snd_ctl_dev_free+0x28/0x60 [snd]
    [ 90.994656]
    [ 90.994656] but task is already holding lock:
    [ 90.994688] (&dev->lock){+.+.+.}, at: [] em28xx_close_extension+0x31/0x90 [em28xx]
    [ 90.994843]
    [ 90.994843] which lock already depends on the new lock.
    [ 90.994843]
    [ 90.994874]
    [ 90.994874] the existing dependency chain (in reverse order) is:
    [ 90.994905]
    -> #1 (&dev->lock){+.+.+.}:
    [ 90.995057] [] __lock_acquire+0xb43/0x1330
    [ 90.995121] [] lock_acquire+0xa2/0x120
    [ 90.995182] [] mutex_lock_nested+0x5c/0x3c0
    [ 90.995245] [] em28xx_vol_put_mute+0x1ba/0x1d0 [em28xx_alsa]
    [ 90.995309] [] snd_ctl_elem_write+0xfd/0x140 [snd]
    [ 90.995376] [] snd_ctl_ioctl+0xe2/0x810 [snd]
    [ 90.995442] [] do_vfs_ioctl+0x300/0x520
    [ 90.995504] [] SyS_ioctl+0x81/0xa0
    [ 90.995568] [] system_call_fastpath+0x16/0x1b
    [ 90.995630]
    -> #0 (&card->controls_rwsem){++++.+}:
    [ 90.995780] [] check_prevs_add+0x947/0x950
    [ 90.995841] [] __lock_acquire+0xb43/0x1330
    [ 90.995901] [] lock_acquire+0xa2/0x120
    [ 90.995962] [] down_write+0x3b/0xa0
    [ 90.996022] [] snd_ctl_dev_free+0x28/0x60 [snd]
    [ 90.996088] [] snd_device_free+0x65/0x140 [snd]
    [ 90.996154] [] snd_device_free_all+0x61/0xa0 [snd]
    [ 90.996219] [] snd_card_do_free+0x14/0x130 [snd]
    [ 90.996283] [] snd_card_free+0x84/0x90 [snd]
    [ 90.996349] [] em28xx_audio_fini+0x97/0xb0 [em28xx_alsa]
    [ 90.996411] [] em28xx_close_extension+0x56/0x90 [em28xx]
    [ 90.996475] [] em28xx_usb_disconnect+0x79/0x90 [em28xx]
    [ 90.996539] [] usb_unbind_interface+0x67/0x1d0
    [ 90.996620] [] __device_release_driver+0x7f/0xf0
    [ 90.996682] [] device_release_driver+0x25/0x40
    [ 90.996742] [] bus_remove_device+0x11c/0x1a0
    [ 90.996801] [] device_del+0x136/0x1d0
    [ 90.996863] [] usb_disable_device+0xb0/0x290
    [ 90.996923] [] usb_disconnect+0xb5/0x1d0
    [ 90.996984] [] hub_port_connect_change+0xd6/0xad0
    [ 90.997044] [] hub_events+0x313/0x9b0
    [ 90.997105] [] hub_thread+0x35/0x170
    [ 90.997165] [] kthread+0xff/0x120
    [ 90.997226] [] ret_from_fork+0x7c/0xb0
    [ 90.997287]
    [ 90.997287] other info that might help us debug this:
    [ 90.997287]
    [ 90.997318] Possible unsafe locking scenario:
    [ 90.997318]
    [ 90.997348] CPU0 CPU1
    [ 90.997378] ---- ----
    [ 90.997408] lock(&dev->lock);
    [ 90.997497] lock(&card->controls_rwsem);
    [ 90.997607] lock(&dev->lock);
    [ 90.997697] lock(&card->controls_rwsem);
    [ 90.997786]
    [ 90.997786] *** DEADLOCK ***
    [ 90.997786]
    [ 90.997817] 5 locks held by khubd/54:
    [ 90.997847] #0: (&__lockdep_no_validate__){......}, at: [] hub_events+0xb4/0x9b0
    [ 90.998025] #1: (&__lockdep_no_validate__){......}, at: [] usb_disconnect+0x66/0x1d0
    [ 90.998204] #2: (&__lockdep_no_validate__){......}, at: [] device_release_driver+0x1d/0x40
    [ 90.998383] #3: (em28xx_devlist_mutex){+.+.+.}, at: [] em28xx_close_extension+0x27/0x90 [em28xx]
    [ 90.998567] #4: (&dev->lock){+.+.+.}, at: [] em28xx_close_extension+0x31/0x90 [em28xx]

    Reviewed-by: Frank Schäfer
    Tested-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Now that everything is extension, the usb disconnect logic should
    be the same.

    While here, fix the device name.

    Reviewed-by: Frank Schäfer
    Tested-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • That helps to identify if something fails and explain why em28xx
    struct is not freed (if it ever happens).

    Reviewed-by: Frank Schäfer
    Tested-by: Antti Palosaari
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab