Attached is a patch to the current chdkptp trunk that attempts to get the maximum endpoint size from the libusb data and use that to determine if the dummy packet needs to be sent.
Can you try this with your camera and see what happens.
The recognition of the max packet size works well for the two "full speed" cameras I tried.
After testing them with reyalp's msgtest, the results are:
A410 (DIGIC II, full speed)
Fails at length=0x34 (camera does not become unstable), works with any other length (tried up to 520). Note that as I reported earlier, length=0x34 was not problematic on this camera. (Hmmm, looks like a need for special casing some models...)
A420 (DIGIC II, full speed)
Max packet size recognition correct, msgtest runs correctly with any length.
A470 (DIGIC III, full speed)
Works with any length, but I get random "unexpected msg type" showstoppers while running msgtest. These start to be an issue over length>200. Camera does not become unstable, the test can be restarted. Previously, all lengths of (n*0x40)-0xc were problematic.
Ixus65 (DIGIC II, high speed)
Max packet size recognition correct, msgtest runs correctly with any length.
edit: host controller USB2.0, OS Linux 32bit
A separate note: the test with msgtest runs much slower on DIGIC II cameras, no matter full or high speed.
I have no idea if this is the right way to do this sort if thing - I'm still trying to understand the whole USB PTP interface stuff.
Looks good enough to me.