Skip to content

Commit

Permalink
ALSA: 6fire: fix control and bulk message timeouts
Browse files Browse the repository at this point in the history
commit 9b371c6 upstream.

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

Fixes: c6d43ba ("ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB")
Cc: stable@vger.kernel.org      # 2.6.39
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20211025121142.6531-2-johan@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jhovold authored and gregkh committed Nov 17, 2021
1 parent 9bdf312 commit c725f34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sound/usb/6fire/comm.c
Expand Up @@ -95,7 +95,7 @@ static int usb6fire_comm_send_buffer(u8 *buffer, struct usb_device *dev)
int actual_len;

ret = usb_interrupt_msg(dev, usb_sndintpipe(dev, COMM_EP),
buffer, buffer[1] + 2, &actual_len, HZ);
buffer, buffer[1] + 2, &actual_len, 1000);
if (ret < 0)
return ret;
else if (actual_len != buffer[1] + 2)
Expand Down
6 changes: 3 additions & 3 deletions sound/usb/6fire/firmware.c
Expand Up @@ -160,15 +160,15 @@ static int usb6fire_fw_ezusb_write(struct usb_device *device,
{
return usb_control_msg_send(device, 0, type,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
value, 0, data, len, HZ, GFP_KERNEL);
value, 0, data, len, 1000, GFP_KERNEL);
}

static int usb6fire_fw_ezusb_read(struct usb_device *device,
int type, int value, char *data, int len)
{
return usb_control_msg_recv(device, 0, type,
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
value, 0, data, len, HZ, GFP_KERNEL);
value, 0, data, len, 1000, GFP_KERNEL);
}

static int usb6fire_fw_fpga_write(struct usb_device *device,
Expand All @@ -178,7 +178,7 @@ static int usb6fire_fw_fpga_write(struct usb_device *device,
int ret;

ret = usb_bulk_msg(device, usb_sndbulkpipe(device, FPGA_EP), data, len,
&actual_len, HZ);
&actual_len, 1000);
if (ret < 0)
return ret;
else if (actual_len != len)
Expand Down

0 comments on commit c725f34

Please sign in to comment.