V4L/DVB (13495): pvrusb2: Support 16KB FX2 firmware

New FX2 firmware from Hauppauge is no longer 8KB in size - it's 16KB.
This is true for HVR-1950 and HVR-1900 devices.  Without this change,
new pvrusb2 users with that hardware are unable to use the driver
(because the CD shipped with the hardware only has the 16KB firmware).

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 4c1a2a5..9be0477 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1474,8 +1474,19 @@
 
 	pipe = usb_sndctrlpipe(hdw->usb_dev, 0);
 
-	if (fw_entry->size != 0x2000){
-		pvr2_trace(PVR2_TRACE_ERROR_LEGS,"wrong fx2 firmware size");
+	if ((fw_entry->size != 0x2000) &&
+	    (!(hdw->hdw_desc->flag_fx2_16kb && (fw_entry->size == 0x4000)))) {
+		if (hdw->hdw_desc->flag_fx2_16kb) {
+			pvr2_trace(PVR2_TRACE_ERROR_LEGS,
+				   "Wrong fx2 firmware size"
+				   " (expected 8192 or 16384, got %u)",
+				   fw_entry->size);
+		} else {
+			pvr2_trace(PVR2_TRACE_ERROR_LEGS,
+				   "Wrong fx2 firmware size"
+				   " (expected 8192, got %u)",
+				   fw_entry->size);
+		}
 		release_firmware(fw_entry);
 		return -ENOMEM;
 	}