Return-path: Received: from hapkido.dreamhost.com ([66.33.216.122]:43535 "EHLO hapkido.dreamhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbeAEAFP (ORCPT ); Thu, 4 Jan 2018 19:05:15 -0500 Received: from homiemail-a116.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) by hapkido.dreamhost.com (Postfix) with ESMTP id 92B9B8ED96 for ; Thu, 4 Jan 2018 16:05:15 -0800 (PST) From: Brad Love To: linux-media@vger.kernel.org Cc: Brad Love Subject: [PATCH 3/9] em28xx: USB bulk packet size fix Date: Thu, 4 Jan 2018 18:04:13 -0600 Message-Id: <1515110659-20145-4-git-send-email-brad@nextdimension.cc> In-Reply-To: <1515110659-20145-1-git-send-email-brad@nextdimension.cc> References: <1515110659-20145-1-git-send-email-brad@nextdimension.cc> Sender: linux-media-owner@vger.kernel.org List-ID: Hauppauge em28xx bulk devices exhibit continuity errors and corrupted packets, when run in VMWare virtual machines. Unknown if other manufacturers bulk models exhibit the same issue. KVM/Qemu is unaffected. According to documentation the maximum packet multiplier for em28xx in bulk transfer mode is 256 * 188 bytes. This changes the size of bulk transfers to maximum supported value and have a bonus beneficial alignment. Before: # 512 * 384 = 196608 ## 196608 % 188 != 0 After: # 512 * 47 * 2 = 48128 (188 * 128 * 2) ## 48128 % 188 = 0 This sets up USB to expect just as many bytes as the em28xx is set to emit. Successful usage under load afterwards natively and in both VMWare and KVM/Qemu virtual machines. Signed-off-by: Brad Love --- drivers/media/usb/em28xx/em28xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index c85292c..7be8ac9 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h @@ -191,7 +191,7 @@ USB 2.0 spec says bulk packet size is always 512 bytes */ #define EM28XX_BULK_PACKET_MULTIPLIER 384 -#define EM28XX_DVB_BULK_PACKET_MULTIPLIER 384 +#define EM28XX_DVB_BULK_PACKET_MULTIPLIER 94 #define EM28XX_INTERLACED_DEFAULT 1 -- 2.7.4