diff mbox

[03/16] ngene: Firmware 18 support

Message ID 1294652184-12843-4-git-send-email-o.endriss@gmx.de (mailing list archive)
State Accepted
Headers show

Commit Message

Oliver Endriss Jan. 10, 2011, 9:36 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c
index 3a7ef71..e2546f1 100644
--- a/drivers/media/dvb/ngene/ngene-core.c
+++ b/drivers/media/dvb/ngene/ngene-core.c
@@ -1257,6 +1257,10 @@  static int ngene_load_firm(struct ngene *dev)
 		fw_name = "ngene_17.fw";
 		dev->cmd_timeout_workaround = true;
 		break;
+	case 18:
+		size = 0;
+		fw_name = "ngene_18.fw";
+		break;
 	}
 
 	if (request_firmware(&fw, fw_name, &dev->pci_dev->dev) < 0) {
@@ -1266,6 +1270,8 @@  static int ngene_load_firm(struct ngene *dev)
 			": Copy %s to your hotplug directory!\n", fw_name);
 		return -1;
 	}
+	if (size == 0)
+		size = fw->size;
 	if (size != fw->size) {
 		printk(KERN_ERR DEVICE_NAME
 			": Firmware %s has invalid size!", fw_name);
@@ -1364,7 +1370,7 @@  static int ngene_start(struct ngene *dev)
 	if (stat < 0)
 		goto fail;
 
-	if (dev->card_info->fw_version == 17) {
+	if (dev->card_info->fw_version >= 17) {
 		u8 tsin4_config[6] = {
 			3072 / 64, 3072 / 64, 0, 3072 / 64, 3072 / 64, 0};
 		u8 default_config[6] = {
@@ -1373,7 +1379,7 @@  static int ngene_start(struct ngene *dev)
 
 		if (dev->card_info->io_type[3] == NGENE_IO_TSIN)
 			bconf = tsin4_config;
-		dprintk(KERN_DEBUG DEVICE_NAME ": FW 17 buffer config\n");
+		dprintk(KERN_DEBUG DEVICE_NAME ": FW 17+ buffer config\n");
 		stat = ngene_command_config_free_buf(dev, bconf);
 	} else {
 		int bconf = BUFFER_CONFIG_4422;