af9015 Slow down download firmware
PATCH 1/7 af9015 Slow down download firmware
It is noticed that sometimes the device fails to download parts of the firmware.
Since there is no ack from firmware write a 250u second delay has been added.
--- drivers/media/dvb/dvb-usb/af9015.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/media/dvb/dvb-usb/af9015.c +1 -0
@@ -698,6 +698,7 @@ static int af9015_download_firmware(struct usb_device *udev,err ("firmware download failed:%d" , ret); goto error; } +udelay (250 ); }/* firmware loaded, request boot */
Signature · 1 line
1.7.5.4
Quoted 14 lines · Malcolm Priestley
It is noticed that sometimes the device fails to download parts of the firmware.
Since there is no ack from firmware write a 250u second delay has been added.
Signed-off-by Malcolm Priestley<[email protected]>--- drivers/media/dvb/dvb-usb/af9015.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/media/dvb/dvb-usb/af9015.c +0
-0
drivers/media/dvb/dvb-usb/af9015.c static int af9015_download_firmware(struct usb_device *udev, · line 704
Quoted 7 lines
drivers/media/dvb/dvb-usb/af9015.c +1
-0@@ -698,6 +698,7 @@ static int af9015_download_firmware(struct usb_device *udev,err ("firmware download failed:%d" , ret); goto error; } +udelay (250 ); }/* firmware loaded, request boot */
That sleep is not critical as all, so defining it as udelay() is wrong in my understanding. Refer Kernel documentation about delays.
regards
Antti
Signature · 1 line
http://palosaari.fi/
Quoted 21 lines · Antti Palosaari
Quoted 20 lines · Malcolm Priestley
It is noticed that sometimes the device fails to download parts of the firmware.
Since there is no ack from firmware write a 250u second delay has been added.
Signed-off-by Malcolm Priestley<[email protected]>--- drivers/media/dvb/dvb-usb/af9015.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/media/dvb/dvb-usb/af9015.c +1
-0@@ -698,6 +698,7 @@ static int af9015_download_firmware(struct usb_device *udev,err ("firmware download failed:%d" , ret); goto error; } +udelay (250 ); }
Quoted 4 lines
drivers/media/dvb/dvb-usb/af9015.c static int af9015_download_firmware(struct usb_device *udev, · line 704
Quoted 1 line
drivers/media/dvb/dvb-usb/af9015.c +0
-0/* firmware loaded, request boot */ That sleep is not critical as all, so defining it as
udelay()is wrong in my understanding. Refer Kernel documentation about delays.
So we just go faster and faster, without acknowledgements and due respect for the hardware?
Typical download time is about 100ms, download on some systems was less than 50ms and failing.
A 250uS wait brought the time back up to arround 100ms.
Regards
Malcolm
Quoted 27 lines · Malcolm Priestley
Quoted 21 lines · Antti Palosaari
Quoted 20 lines · Malcolm Priestley
It is noticed that sometimes the device fails to download parts of the firmware.
Since there is no ack from firmware write a 250u second delay has been added.
Signed-off-by Malcolm Priestley<[email protected]>--- drivers/media/dvb/dvb-usb/af9015.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/media/dvb/dvb-usb/af9015.c +1
-0@@ -698,6 +698,7 @@ static int af9015_download_firmware(struct usb_device *udev,err ("firmware download failed:%d" , ret); goto error; } +udelay (250 ); }Quoted 4 lines
drivers/media/dvb/dvb-usb/af9015.c static int af9015_download_firmware(struct usb_device *udev, · line 704
Quoted 1 line
drivers/media/dvb/dvb-usb/af9015.c +0
-0/* firmware loaded, request boot */ That sleep is not critical as all, so defining it as
udelay()is wrong in my understanding. Refer Kernel documentation about delays.
Quoted 7 lines
So we just go faster and faster, without acknowledgements and due respect for the hardware?
Typical download time is about 100ms, download on some systems was less than 50ms and failing.
A 250uS wait brought the time back up to arround 100ms.
I said you should not use udelay() since that sleep is not critical. udelay() have bad effect in system level. You didn't looked documentation as I asked, here it is: Documentation/timers/timers-howto.txt . I think usleep_range() is correct function.
Antti
Signature · 1 line
http://palosaari.fi/