[Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-20 Thread Steve Bennett
Instead, just produce a warning

Signed-off-by: Steve Bennett 
---
 src/jtag/drivers/ft2232.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index 38ead56..2e0495d 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -2260,8 +2260,7 @@ static int ft2232_init_ftd2xx(uint16_t vid, uint16_t pid, 
int more, int* try_mor
 
if ((status = FT_GetLatencyTimer(ftdih, &latency_timer)) != FT_OK)
{
-   LOG_ERROR("unable to get latency timer: %lu", status);
-   return ERROR_JTAG_INIT_FAILED;
+   LOG_WARNING("unable to get latency timer: %lu", status);
}
else
{
-- 
1.7.5.1

___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-20 Thread Øyvind Harboe
On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett  wrote:
> Instead, just produce a warning

Why?

It merits a comment at least?


-- 
Øyvind Harboe

Can Zylin Consulting help on your project?

US toll free 1-866-980-3434 / International +47 51 87 40 27

http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-20 Thread Steve Bennett
On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:

> On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett  
> wrote:
>> Instead, just produce a warning
> 
> Why?
> 
> It merits a comment at least?

Seems self-evident to me.
Why should it be fatal just because a value couldn't be read?
Doesn't stop anything from working.

Cheers,
Steve

> 
> 
> -- 
> Øyvind Harboe
> 
> Can Zylin Consulting help on your project?
> 
> US toll free 1-866-980-3434 / International +47 51 87 40 27
> 
> http://www.zylin.com/zy1000.html
> ARM7 ARM9 ARM11 XScale Cortex
> JTAG debugger and flash programmer
> 

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-20 Thread Øyvind Harboe
On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett  wrote:
> On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
>
>> On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett  
>> wrote:
>>> Instead, just produce a warning
>>
>> Why?
>>
>> It merits a comment at least?
>
> Seems self-evident to me.
> Why should it be fatal just because a value couldn't be read?
> Doesn't stop anything from working.

Why should we support broken hardware or drivers?

Better the user is told to toss his busted dongle / hardware than to tangle
with subtle followon errors?


-- 
Øyvind Harboe

Can Zylin Consulting help on your project?

US toll free 1-866-980-3434 / International +47 51 87 40 27

http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-20 Thread Steve Bennett
On 20/06/2011, at 9:51 PM, Øyvind Harboe  wrote:

> On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett  wrote:
>> On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
>> 
>>> On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett  
>>> wrote:
 Instead, just produce a warning
>>> 
>>> Why?
>>> 
>>> It merits a comment at least?
>> 
>> Seems self-evident to me.
>> Why should it be fatal just because a value couldn't be read?
>> Doesn't stop anything from working.
> 
> Why should we support broken hardware or drivers?
> 
> Better the user is told to toss his busted dongle / hardware than to tangle
> with subtle followon errors?

Nothing to do with hardware. It's a problem with the driver.
See 
http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html

> 
> 
> -- 
> Øyvind Harboe
> 
> Can Zylin Consulting help on your project?
> 
> US toll free 1-866-980-3434 / International +47 51 87 40 27
> 
> http://www.zylin.com/zy1000.html
> ARM7 ARM9 ARM11 XScale Cortex
> JTAG debugger and flash programmer
> 
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-20 Thread Øyvind Harboe
> Nothing to do with hardware. It's a problem with the driver.
> See 
> http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html

So perhaps it does merit a comment? :-)


-- 
Øyvind Harboe

Can Zylin Consulting help on your project?

US toll free 1-866-980-3434 / International +47 51 87 40 27

http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-21 Thread Laurent Gauch

Steve Bennett wrote:

On 21/06/2011, at 5:01 PM, Xiaofan Chen wrote:

  

On Tue, Jun 21, 2011 at 2:55 PM, Xiaofan Chen  wrote:


But are you sure to have the correct libusb version. On linux and mac, the
libusb is the kernel driver for the d2xx.


This has been discussed before and I think in this case an exception should
be granted and the patch should be accepted.

Thread:
http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html

I was suggesting the user to use the open source libftdi and libftdi-1.0
under Linux instead but D2XX might still have some benefits so that
users may still want to use it.

  

It is a long thread but I was able to reproduce the error.
http://lists.berlios.de/pipermail/openocd-development/2011-March/018434.html
"I think the latest d2xx library needs some fix from the OpenOCD
side or from the d2xx side."

It is more difficult to ask FTDI for a fix so it may better to fix this from
OpenOCD side. Therefore I think the patch should be accepted.

When FTDI fixes D2xx, then probably the patch can be reverted.



I have reported the problem to FTDI, but in my experience we can not
expect a response soon, if ever.
I think there are two options, either apply the patch as a workaround
(note that the returned value is *never* used), or remove support for D2XX.
  

Thank you Steve,

If you do not get any reply on next Monday, please let me know I will 
ask them. Amontec has good contacts to FTDI team.


Please apply the patch as a workaround.

But if the returned value is never used, there are no reason to give a 
warning !


Laurent
 http://www.amontec.com


Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





  


___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-21 Thread Steve Bennett

On 21/06/2011, at 5:18 PM, Laurent Gauch wrote:

> Steve Bennett wrote:
>> On 21/06/2011, at 5:01 PM, Xiaofan Chen wrote:
>> 
>>  
>>> On Tue, Jun 21, 2011 at 2:55 PM, Xiaofan Chen  wrote:
>>>
> But are you sure to have the correct libusb version. On linux and mac, the
> libusb is the kernel driver for the d2xx.
>
 This has been discussed before and I think in this case an exception should
 be granted and the patch should be accepted.
 
 Thread:
 http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html
 
 I was suggesting the user to use the open source libftdi and libftdi-1.0
 under Linux instead but D2XX might still have some benefits so that
 users may still want to use it.
 
  
>>> It is a long thread but I was able to reproduce the error.
>>> http://lists.berlios.de/pipermail/openocd-development/2011-March/018434.html
>>> "I think the latest d2xx library needs some fix from the OpenOCD
>>> side or from the d2xx side."
>>> 
>>> It is more difficult to ask FTDI for a fix so it may better to fix this from
>>> OpenOCD side. Therefore I think the patch should be accepted.
>>> 
>>> When FTDI fixes D2xx, then probably the patch can be reverted.
>>>
>> 
>> I have reported the problem to FTDI, but in my experience we can not
>> expect a response soon, if ever.
>> I think there are two options, either apply the patch as a workaround
>> (note that the returned value is *never* used), or remove support for D2XX.
>>  
> Thank you Steve,
> 
> If you do not get any reply on next Monday, please let me know I will ask 
> them. Amontec has good contacts to FTDI team.

Will do.

> Please apply the patch as a workaround.

It is on the list. Perhaps some kind maintainer will do so.

> 
> But if the returned value is never used, there are no reason to give a 
> warning !

Agreed. But it seemed less of a step from fatal error to warning than ignoring 
it
completely.

Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-22 Thread Steve Bennett
On 21/06/2011, at 5:22 PM, Steve Bennett wrote:

> 
> On 21/06/2011, at 5:18 PM, Laurent Gauch wrote:
> 
>> Steve Bennett wrote:
>>> On 21/06/2011, at 5:01 PM, Xiaofan Chen wrote:
>>> 
>>> 
 On Tue, Jun 21, 2011 at 2:55 PM, Xiaofan Chen  wrote:
 
>> But are you sure to have the correct libusb version. On linux and mac, 
>> the
>> libusb is the kernel driver for the d2xx.
>> 
> This has been discussed before and I think in this case an exception 
> should
> be granted and the patch should be accepted.
> 
> Thread:
> http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html
> 
> I was suggesting the user to use the open source libftdi and libftdi-1.0
> under Linux instead but D2XX might still have some benefits so that
> users may still want to use it.
> 
> 
 It is a long thread but I was able to reproduce the error.
 http://lists.berlios.de/pipermail/openocd-development/2011-March/018434.html
 "I think the latest d2xx library needs some fix from the OpenOCD
 side or from the d2xx side."
 
 It is more difficult to ask FTDI for a fix so it may better to fix this 
 from
 OpenOCD side. Therefore I think the patch should be accepted.
 
 When FTDI fixes D2xx, then probably the patch can be reverted.
 
>>> 
>>> I have reported the problem to FTDI, but in my experience we can not
>>> expect a response soon, if ever.
>>> I think there are two options, either apply the patch as a workaround
>>> (note that the returned value is *never* used), or remove support for D2XX.
>>> 
>> Thank you Steve,
>> 
>> If you do not get any reply on next Monday, please let me know I will ask 
>> them. Amontec has good contacts to FTDI team.
> 
> Will do.
> 
>> Please apply the patch as a workaround.
> 
> It is on the list. Perhaps some kind maintainer will do so.
> 
>> 
>> But if the returned value is never used, there are no reason to give a 
>> warning !
> 
> Agreed. But it seemed less of a step from fatal error to warning than 
> ignoring it
> completely.

I take it all back!
I got a very prompt reply from FTDI with a new version
of the D2XX driver to test (1.0.5) which resolves this problem.
Hopefully this version will become generally available soon.

Cheers,
Steve
--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal

2011-06-23 Thread Laurent Gauch

Steve Bennett wrote:

On 21/06/2011, at 5:22 PM, Steve Bennett wrote:

  

On 21/06/2011, at 5:18 PM, Laurent Gauch wrote:



Steve Bennett wrote:
  

On 21/06/2011, at 5:01 PM, Xiaofan Chen wrote:




On Tue, Jun 21, 2011 at 2:55 PM, Xiaofan Chen  wrote:

  

But are you sure to have the correct libusb version. On linux and mac, the
libusb is the kernel driver for the d2xx.

  

This has been discussed before and I think in this case an exception should
be granted and the patch should be accepted.

Thread:
http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html

I was suggesting the user to use the open source libftdi and libftdi-1.0
under Linux instead but D2XX might still have some benefits so that
users may still want to use it.




It is a long thread but I was able to reproduce the error.
http://lists.berlios.de/pipermail/openocd-development/2011-March/018434.html
"I think the latest d2xx library needs some fix from the OpenOCD
side or from the d2xx side."

It is more difficult to ask FTDI for a fix so it may better to fix this from
OpenOCD side. Therefore I think the patch should be accepted.

When FTDI fixes D2xx, then probably the patch can be reverted.

  

I have reported the problem to FTDI, but in my experience we can not
expect a response soon, if ever.
I think there are two options, either apply the patch as a workaround
(note that the returned value is *never* used), or remove support for D2XX.



Thank you Steve,

If you do not get any reply on next Monday, please let me know I will ask them. 
Amontec has good contacts to FTDI team.
  

Will do.



Please apply the patch as a workaround.
  

It is on the list. Perhaps some kind maintainer will do so.



But if the returned value is never used, there are no reason to give a warning !
  

Agreed. But it seemed less of a step from fatal error to warning than ignoring 
it
completely.



I take it all back!
I got a very prompt reply from FTDI with a new version
of the D2XX driver to test (1.0.5) which resolves this problem.
Hopefully this version will become generally available soon.

Cheers,
Steve
--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





  

Great to know this.
Great to know it is coming from d2xx itself, but resolved in a newer 
version.
So, your first idea to add warning instead the fatal error, is the way 
to go.

This will become transparent with newer d2xx driver.

To maintainer : please merge the Steve patches.

Regards,
Laurent
http://www.amontec.com
Amontec JTAGkey-2 USB JTAG CABLE for ARM processors
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-20 Thread Laurent Gauch


>/ On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote:
/>>/ On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
/>>/ 
/>>>/ On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote:

// Instead, just produce a warning
/>>>/ 
/>>>/ Why?
/>>>/ 
/>>>/ It merits a comment at least?
/>>/ 
/>>/ Seems self-evident to me.

/>>/ Why should it be fatal just because a value couldn't be read?
/>>/ Doesn't stop anything from working.
/>/ 
/>/ Why should we support broken hardware or drivers?
/>/ 
/>/ Better the user is told to toss his busted dongle / hardware than to tangle

/>/ with subtle followon errors?
/
Nothing to do with hardware. It's a problem with the driver.
See 
http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html

>/ 
/

Objection !

If we cannot read this value back, this means we reach trouble with 
driver or device somewhere.

Also, this trouble could affect following access ...
This is why we stop with fatal error.

Regards,
Laurent
http://www.amontec.com/jtagkey.shtml
Amontec JTAGkey-2 USB JTAG INTERFACE


___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-20 Thread Steve Bennett
On 21/06/2011, at 1:07 AM, Laurent Gauch wrote:

>> 
>> >/ On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett > >> wrote:
>> />>/ On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
>> />>/ />>>/ On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett > workware.net.au 
>> > wrote:
>> // Instead, just produce a warning
>> />>>/ />>>/ Why?
>> />>>/ />>>/ It merits a comment at least?
>> />>/ />>/ Seems self-evident to me.
>> />>/ Why should it be fatal just because a value couldn't be read?
>> />>/ Doesn't stop anything from working.
>> />/ />/ Why should we support broken hardware or drivers?
>> />/ />/ Better the user is told to toss his busted dongle / hardware than to 
>> tangle
>> />/ with subtle followon errors?
>> /
>> Nothing to do with hardware. It's a problem with the driver.
>> See 
>> http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html
>> 
>> >/ /
> Objection !
> 
> If we cannot read this value back, this means we reach trouble with driver or 
> device somewhere.
> Also, this trouble could affect following access ...
> This is why we stop with fatal error.

OK. So what alternative solution would you suggest to make this driver work?

Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-20 Thread Laurent Gauch

On 21/06/2011, at 1:07 AM, Laurent Gauch wrote:

>>/ 
/>>/ >/ On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote:

/>>/ />>/ On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
/>>/ />>/ />>>/ On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote:
/>>/ // Instead, just produce a warning
/>>/ />>>/ />>>/ Why?
/>>/ />>>/ />>>/ It merits a comment at least?
/>>/ />>/ />>/ Seems self-evident to me.
/>>/ />>/ Why should it be fatal just because a value couldn't be read?
/>>/ />>/ Doesn't stop anything from working.
/>>/ />/ />/ Why should we support broken hardware or drivers?
/>>/ />/ />/ Better the user is told to toss his busted dongle / hardware than 
to tangle
/>>/ />/ with subtle followon errors?
/>>/ /
/>>/ Nothing to do with hardware. It's a problem with the driver.
/>>/ See 
http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html
/>>/ 
/>>/ >/ /

/>/ Objection !
/>/ 
/>/ If we cannot read this value back, this means we reach trouble with driver or device somewhere.

/>/ Also, this trouble could affect following access ...
/>/ This is why we stop with fatal error.
/
OK. So what alternative solution would you suggest to make this driver work?


What version of the driver do you use. If it really come from the driver and if 
this is the last official driver, then ask the writer of the driver to correct.
If no correction are done quickly by the writer of the driver, then yes, you 
may just produce a warning.

Regards,
Laurent 
http://www.amontec.com/jtagkey.shtml 





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-20 Thread Steve Bennett
On 21/06/2011, at 3:59 PM, Laurent Gauch wrote:

>> On 21/06/2011, at 1:07 AM, Laurent Gauch wrote:
>> 
>> >>/ />>/ >/ On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett > >>workware.net.au 
>> >>> wrote:
>> />>/ />>/ On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
>> />>/ />>/ />>>/ On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett > workware.net.au 
>> > wrote:
>> />>/ // Instead, just produce a warning
>> />>/ />>>/ />>>/ Why?
>> />>/ />>>/ />>>/ It merits a comment at least?
>> />>/ />>/ />>/ Seems self-evident to me.
>> />>/ />>/ Why should it be fatal just because a value couldn't be read?
>> />>/ />>/ Doesn't stop anything from working.
>> />>/ />/ />/ Why should we support broken hardware or drivers?
>> />>/ />/ />/ Better the user is told to toss his busted dongle / hardware 
>> than to tangle
>> />>/ />/ with subtle followon errors?
>> />>/ /
>> />>/ Nothing to do with hardware. It's a problem with the driver.
>> />>/ See 
>> http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html
>> />>/ />>/ >/ /
>> />/ Objection !
>> />/ />/ If we cannot read this value back, this means we reach trouble with 
>> driver or device somewhere.
>> />/ Also, this trouble could affect following access ...
>> />/ This is why we stop with fatal error.
>> /
>> OK. So what alternative solution would you suggest to make this driver work?
>> 
> What version of the driver do you use. If it really come from the driver and 
> if this is the last official driver, then ask the writer of the driver to 
> correct.
> If no correction are done quickly by the writer of the driver, then yes, you 
> may just produce a warning.

http://www.ftdichip.com/Drivers/D2XX.htm

Latest version, 1.0.4. Same behaviour on both MacOSX and Linux.

Sure. I'll ask if they would like to fix this problem.
I will let you know what useful response I get.

Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-20 Thread Laurent Gauch

Steve Bennett wrote:

On 21/06/2011, at 3:59 PM, Laurent Gauch wrote:

  

On 21/06/2011, at 1:07 AM, Laurent Gauch wrote:

  

/ />>/ >/ On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote:
  

/>>/ />>/ On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
/>>/ />>/ />>>/ On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote:
/>>/ // Instead, just produce a warning
/>>/ />>>/ />>>/ Why?
/>>/ />>>/ />>>/ It merits a comment at least?
/>>/ />>/ />>/ Seems self-evident to me.
/>>/ />>/ Why should it be fatal just because a value couldn't be read?
/>>/ />>/ Doesn't stop anything from working.
/>>/ />/ />/ Why should we support broken hardware or drivers?
/>>/ />/ />/ Better the user is told to toss his busted dongle / hardware than 
to tangle
/>>/ />/ with subtle followon errors?
/>>/ /
/>>/ Nothing to do with hardware. It's a problem with the driver.
/>>/ See 
http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html
/>>/ />>/ >/ /
/>/ Objection !
/>/ />/ If we cannot read this value back, this means we reach trouble with 
driver or device somewhere.
/>/ Also, this trouble could affect following access ...
/>/ This is why we stop with fatal error.
/
OK. So what alternative solution would you suggest to make this driver work?

  

What version of the driver do you use. If it really come from the driver and if 
this is the last official driver, then ask the writer of the driver to correct.
If no correction are done quickly by the writer of the driver, then yes, you 
may just produce a warning.



http://www.ftdichip.com/Drivers/D2XX.htm

Latest version, 1.0.4. Same behaviour on both MacOSX and Linux.

Sure. I'll ask if they would like to fix this problem.
I will let you know what useful response I get.
  

Great.

But are you sure to have the correct libusb version. On linux and mac, 
the libusb is the kernel driver for the d2xx.


Regards,
Laurent Gauch
http://www.amontec.com

Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





  


___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-20 Thread Steve Bennett
On 21/06/2011, at 4:45 PM, Laurent Gauch wrote:

> Steve Bennett wrote:
>> On 21/06/2011, at 3:59 PM, Laurent Gauch wrote:
>> 
>>  
 On 21/06/2011, at 1:07 AM, Laurent Gauch wrote:
 
  
>> / />>/ >/ On Mon, Jun 20, 2011 at 1:00 PM, Steve Bennett > workware.net.au 
>> > wrote:
>>  
 />>/ />>/ On 20/06/2011, at 8:54 PM, Øyvind Harboe wrote:
 />>/ />>/ />>>/ On Mon, Jun 20, 2011 at 12:50 PM, Steve Bennett >>> workware.net.au 
 > wrote:
 />>/ // Instead, just produce a warning
 />>/ />>>/ />>>/ Why?
 />>/ />>>/ />>>/ It merits a comment at least?
 />>/ />>/ />>/ Seems self-evident to me.
 />>/ />>/ Why should it be fatal just because a value couldn't be read?
 />>/ />>/ Doesn't stop anything from working.
 />>/ />/ />/ Why should we support broken hardware or drivers?
 />>/ />/ />/ Better the user is told to toss his busted dongle / hardware 
 than to tangle
 />>/ />/ with subtle followon errors?
 />>/ /
 />>/ Nothing to do with hardware. It's a problem with the driver.
 />>/ See 
 http://www.mail-archive.com/openocd-development@lists.berlios.de/msg15945.html
 />>/ />>/ >/ /
 />/ Objection !
 />/ />/ If we cannot read this value back, this means we reach trouble 
 with driver or device somewhere.
 />/ Also, this trouble could affect following access ...
 />/ This is why we stop with fatal error.
 /
 OK. So what alternative solution would you suggest to make this driver 
 work?
 
  
>>> What version of the driver do you use. If it really come from the driver 
>>> and if this is the last official driver, then ask the writer of the driver 
>>> to correct.
>>> If no correction are done quickly by the writer of the driver, then yes, 
>>> you may just produce a warning.
>>>
>> 
>> http://www.ftdichip.com/Drivers/D2XX.htm
>> 
>> Latest version, 1.0.4. Same behaviour on both MacOSX and Linux.
>> 
>> Sure. I'll ask if they would like to fix this problem.
>> I will let you know what useful response I get.
>>  
> Great.
> 
> But are you sure to have the correct libusb version. On linux and mac, the 
> libusb is the kernel driver for the d2xx.

Yes. I am using the static library of libftd2xx which includes libusb.
(openocd does not build with the shared library)

Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-20 Thread Xiaofan Chen
On Tue, Jun 21, 2011 at 2:45 PM, Laurent Gauch
 wrote:
>> Latest version, 1.0.4. Same behaviour on both MacOSX and Linux.
>>
>> Sure. I'll ask if they would like to fix this problem.
>> I will let you know what useful response I get.
>>
>
> Great.
>
> But are you sure to have the correct libusb version. On linux and mac, the
> libusb is the kernel driver for the d2xx.

This has been discussed before and I think in this case an exception should
be granted and the patch should be accepted.

Thread:
http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html

I was suggesting the user to use the open source libftdi and libftdi-1.0
under Linux instead but D2XX might still have some benefits so that
users may still want to use it.


-- 
Xiaofan
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-21 Thread Xiaofan Chen
On Tue, Jun 21, 2011 at 2:55 PM, Xiaofan Chen  wrote:
>> But are you sure to have the correct libusb version. On linux and mac, the
>> libusb is the kernel driver for the d2xx.
>
> This has been discussed before and I think in this case an exception should
> be granted and the patch should be accepted.
>
> Thread:
> http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html
>
> I was suggesting the user to use the open source libftdi and libftdi-1.0
> under Linux instead but D2XX might still have some benefits so that
> users may still want to use it.
>

It is a long thread but I was able to reproduce the error.
http://lists.berlios.de/pipermail/openocd-development/2011-March/018434.html
"I think the latest d2xx library needs some fix from the OpenOCD
side or from the d2xx side."

It is more difficult to ask FTDI for a fix so it may better to fix this from
OpenOCD side. Therefore I think the patch should be accepted.

When FTDI fixes D2xx, then probably the patch can be reverted.



-- 
Xiaofan
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-21 Thread Steve Bennett
On 21/06/2011, at 5:01 PM, Xiaofan Chen wrote:

> On Tue, Jun 21, 2011 at 2:55 PM, Xiaofan Chen  wrote:
>>> But are you sure to have the correct libusb version. On linux and mac, the
>>> libusb is the kernel driver for the d2xx.
>> 
>> This has been discussed before and I think in this case an exception should
>> be granted and the patch should be accepted.
>> 
>> Thread:
>> http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html
>> 
>> I was suggesting the user to use the open source libftdi and libftdi-1.0
>> under Linux instead but D2XX might still have some benefits so that
>> users may still want to use it.
>> 
> 
> It is a long thread but I was able to reproduce the error.
> http://lists.berlios.de/pipermail/openocd-development/2011-March/018434.html
> "I think the latest d2xx library needs some fix from the OpenOCD
> side or from the d2xx side."
> 
> It is more difficult to ask FTDI for a fix so it may better to fix this from
> OpenOCD side. Therefore I think the patch should be accepted.
> 
> When FTDI fixes D2xx, then probably the patch can be reverted.

I have reported the problem to FTDI, but in my experience we can not
expect a response soon, if ever.
I think there are two options, either apply the patch as a workaround
(note that the returned value is *never* used), or remove support for D2XX.

Cheers,
Steve

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: +61 434 921 300
E: ste...@workware.net.au   F: +61 7 3391 6002





___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] [PATCH 2/3] ft2232: Failure to get latency should not be fatal / OBJECTION

2011-06-21 Thread Laurent Gauch

Xiaofan Chen wrote:

On Tue, Jun 21, 2011 at 2:55 PM, Xiaofan Chen  wrote:
  

But are you sure to have the correct libusb version. On linux and mac, the
libusb is the kernel driver for the d2xx.
  

This has been discussed before and I think in this case an exception should
be granted and the patch should be accepted.

Thread:
http://lists.berlios.de/pipermail/openocd-development/2011-March/018422.html

I was suggesting the user to use the open source libftdi and libftdi-1.0
under Linux instead but D2XX might still have some benefits so that
users may still want to use it.




It is a long thread but I was able to reproduce the error.
http://lists.berlios.de/pipermail/openocd-development/2011-March/018434.html
"I think the latest d2xx library needs some fix from the OpenOCD
side or from the d2xx side."

It is more difficult to ask FTDI for a fix so it may better to fix this from
OpenOCD side. Therefore I think the patch should be accepted.

When FTDI fixes D2xx, then probably the patch can be reverted.



  

Yes, right.

I revert my objection.

We can merge this patch and we will revert it lately.

Regards,
Laurent
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development