aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-09-19 11:51:46 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 14:12:42 -0400
commit5bc636072d708287c106af15a4cd11c434c8329a (patch)
treef8bfaea18cd4186ae73bcfea2dff57c92f844f2b /drivers
parent0540c4961fcc6d69b8a3314c330c376890715eee (diff)
V4L/DVB (4650): Misc fixes for dib0700 download
Several fixes for dib0700-module. (Firmware error checking, dependency) Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-usb/Kconfig1
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_core.c8
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-firmware.c1
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-init.c2
4 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig
index 135f287510c7..67cefdd2334a 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -70,6 +70,7 @@ config DVB_USB_DIB0700
70 tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)" 70 tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)"
71 depends on DVB_USB 71 depends on DVB_USB
72 select DVB_DIB7000M 72 select DVB_DIB7000M
73 select DVB_DIB3000MC
73 select DVB_TUNER_MT2060 74 select DVB_TUNER_MT2060
74 help 75 help
75 Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The 76 Support for USB2.0/1.1 DVB receivers based on the DiB0700 USB bridge. The
diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c
index 75e8570f4ad8..a1a8165ab272 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_core.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_core.c
@@ -138,8 +138,6 @@ int dib0700_identify_state(struct usb_device *udev, struct dvb_usb_device_proper
138 buf[0], USB_TYPE_VENDOR | USB_DIR_OUT, 0, 0, buf, 3, USB_CTRL_GET_TIMEOUT) != 3; 138 buf[0], USB_TYPE_VENDOR | USB_DIR_OUT, 0, 0, buf, 3, USB_CTRL_GET_TIMEOUT) != 3;
139 139
140 deb_info("cold: %d\n", *cold); 140 deb_info("cold: %d\n", *cold);
141
142 *cold = 0;
143 return 0; 141 return 0;
144} 142}
145 143
@@ -171,11 +169,11 @@ int dib0700_download_firmware(struct usb_device *udev, const struct firmware *fw
171 u8 buf[260]; 169 u8 buf[260];
172 170
173 while ((ret = dvb_usb_get_hexline(fw, &hx, &pos)) > 0) { 171 while ((ret = dvb_usb_get_hexline(fw, &hx, &pos)) > 0) {
174 deb_fwdata("writing to address 0x%04x (buffer: 0x%02x %02x)\n",hx.addr, hx.len, hx.chk); 172 deb_fwdata("writing to address 0x%08x (buffer: 0x%02x %02x)\n",hx.addr, hx.len, hx.chk);
175 173
176 buf[0] = hx.len; 174 buf[0] = hx.len;
177 buf[1] = hx.addr >> 8; 175 buf[1] = (hx.addr >> 8) & 0xff;
178 buf[2] = hx.addr & 0xff; 176 buf[2] = hx.addr & 0xff;
179 buf[3] = hx.type; 177 buf[3] = hx.type;
180 memcpy(&buf[4],hx.data,hx.len); 178 memcpy(&buf[4],hx.data,hx.len);
181 buf[4+hx.len] = hx.chk; 179 buf[4+hx.len] = hx.chk;
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
index 4e986f12b674..e1112e39fb63 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
@@ -80,7 +80,6 @@ int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_device_pro
80 int ret; 80 int ret;
81 const struct firmware *fw = NULL; 81 const struct firmware *fw = NULL;
82 82
83
84 if ((ret = request_firmware(&fw, props->firmware, &udev->dev)) != 0) { 83 if ((ret = request_firmware(&fw, props->firmware, &udev->dev)) != 0) {
85 err("did not find the firmware file. (%s) " 84 err("did not find the firmware file. (%s) "
86 "Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)", 85 "Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)",
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index 6babdcd4c1ab..0dd90d1fe67c 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -228,7 +228,7 @@ int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_device_proper
228 if (cold) { 228 if (cold) {
229 info("found a '%s' in cold state, will try to load a firmware",desc->name); 229 info("found a '%s' in cold state, will try to load a firmware",desc->name);
230 ret = dvb_usb_download_firmware(udev,props); 230 ret = dvb_usb_download_firmware(udev,props);
231 if (!props->no_reconnect) 231 if (!props->no_reconnect || ret != 0)
232 return ret; 232 return ret;
233 } 233 }
234 234