lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 022/320] media: pvrusb2: fix control-message timeouts
    Date
    From: Johan Hovold <johan@kernel.org>

    commit b82bf9b9dc305d7d3d93eab106d70dbf2171b43e upstream.

    USB control-message timeouts are specified in milliseconds and should
    specifically not vary with CONFIG_HZ.

    Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")
    Cc: stable@vger.kernel.org # 2.6.18
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
    +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
    @@ -1468,7 +1468,7 @@ static int pvr2_upload_firmware1(struct
    for (address = 0; address < fwsize; address += 0x800) {
    memcpy(fw_ptr, fw_entry->data + address, 0x800);
    ret += usb_control_msg(hdw->usb_dev, pipe, 0xa0, 0x40, address,
    - 0, fw_ptr, 0x800, HZ);
    + 0, fw_ptr, 0x800, 1000);
    }

    trace_firmware("Upload done, releasing device's CPU");
    @@ -1606,7 +1606,7 @@ int pvr2_upload_firmware2(struct pvr2_hd
    ((u32 *)fw_ptr)[icnt] = swab32(((u32 *)fw_ptr)[icnt]);

    ret |= usb_bulk_msg(hdw->usb_dev, pipe, fw_ptr,bcnt,
    - &actual_length, HZ);
    + &actual_length, 1000);
    ret |= (actual_length != bcnt);
    if (ret) break;
    fw_done += bcnt;
    @@ -3439,7 +3439,7 @@ void pvr2_hdw_cpufw_set_enabled(struct p
    0xa0,0xc0,
    address,0,
    hdw->fw_buffer+address,
    - 0x800,HZ);
    + 0x800,1000);
    if (ret < 0) break;
    }

    @@ -3978,7 +3978,7 @@ void pvr2_hdw_cpureset_assert(struct pvr
    /* Write the CPUCS register on the 8051. The lsb of the register
    is the reset bit; a 1 asserts reset while a 0 clears it. */
    pipe = usb_sndctrlpipe(hdw->usb_dev, 0);
    - ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0x40,0xe600,0,da,1,HZ);
    + ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0x40,0xe600,0,da,1,1000);
    if (ret < 0) {
    pvr2_trace(PVR2_TRACE_ERROR_LEGS,
    "cpureset_assert(%d) error=%d",val,ret);

    \
     
     \ /
      Last update: 2022-01-24 21:13    [W:2.994 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site