Ticket #298 (closed defect: fixed)

Opened 12 years ago

Last modified 2 years ago

u-boot i2c read error causes dfu-util requiring 2 calls to run

Reported by: mickey@… Owned by: buglog@…
Priority: high Milestone:
Component: u-boot Version: unspecified
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

It looks like the dfu-util needs to have an increased timeout for checking for
the device after changing modes / resetting bus. Please see the following
(reproducable) output:

mickey@allanon:/tmp/moko$ dfu-util -d 0x1457:0x5119 -a 5 -R -D
openmoko-devel-image-fic-gta01-20070321132058.rootfs.jffs2
dfu-util - (C) 2007 by OpenMoko? Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Opening USB Device 0x1457:0x5119...
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
Resetting USB...
not at least 2 device changes found ?!?
Lost device after RESET?

mickey@allanon:/tmp/moko$ dfu-util -d 0x1457:0x5119 -a 5 -R -D
openmoko-devel-image-fic-gta01-20070321132058.rootfs.jffs2
dfu-util - (C) 2007 by OpenMoko? Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Opening USB Device 0x1457:0x5119...
Found Runtime: [0x1457:0x5119] devnum=10, cfg=0, intf=0, alt=5, name="rootfs"
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x1000
bytes_per_hash=518062
Starting download: [##########

Change History

comment:1 Changed 12 years ago by philippedeswert@…

I can confirm the issue:

fille@monster:~/mydev/openmoko/build/tmp/deploy/images$ sudo ./dfu-util -a 5 -R
-D openmoko-devel-image-fic-gta01.jffs2
dfu-util - (C) 2007 by OpenMoko? Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Opening USB Device 0x0000:0x0000...
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
Resetting USB...
not at least 2 device changes found ?!?
Lost device after RESET?
fille@monster:~/mydev/openmoko/build/tmp/deploy/images$ sudo ./dfu-util -a 5 -R
-D openmoko-devel-image-fic-gta01.jffs2
dfu-util - (C) 2007 by OpenMoko? Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Opening USB Device 0x0000:0x0000...
Found Runtime: [0x1457:0x5119] devnum=107, cfg=0, intf=0, alt=5, name="rootfs"
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x1000
bytes_per_hash=526254
Starting download: ################################################## finished!
state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to swithc back to runtime mode

Also correct the spelling mistake while you are at it :-)

U-boot version is
u-boot-gta01v3-r2_44ba464b99001f8bd1c456a1e9d59726252f707a_1503.bin if that
helps pinpointing the problem

comment:2 Changed 12 years ago by philippedeswert@…

spelling issue also pointed out in #335 (with patch)

comment:3 Changed 12 years ago by stefan@…

Interesting is the u-boot output during the fail:

DFU: Switching to DFU Mode
DEVICE_CONFIGURED: 1
Enabling automatic fast charge
I2c read: failed 4

I don't had the problem with u-boot-moko5. Must be introduced in 6 or 7. Still
using the dfu-util pre compiled binary from devirginator.

comment:4 Changed 12 years ago by stefan@…

trunk/src/host/dfu-util/src/main.c:516

if (usb_find_devices() < 2)

If this function is in place num_devs is 0 (519)

if (num_devs == 0) {

fprintf(stderr, "Lost device after RESET?\n");
exit(1);

}

If you comment out the line above it passes until 546.

n = find_dfu_if(dif->dev, &alt_by_name, alt_name);

if (!n) {

fprintf(stderr, "No such Alternate Setting: \"%s\"\n", alt_name);
exit(1);

}

Not sure yet why usb_find_devices() is involved here.

comment:5 Changed 12 years ago by laforge@…

  • Component changed from Host Software to u-boot
  • Summary changed from dfu-util always needs 2 calls to run to u-boot i2c read error causes dfu-util requiring 2 calls to run

hm, this is actually a u-boot issue. On my Bv4 (don't have other revisions with
me while travelling) using svn patchset 1737, I cannot reproduce the problem at
all, since the i2c read error is gone.

I think this is timing related. when there is some i2c bus problem, the neo1973
doesn't re-enumerate fast enough on the bus for dfu-util to handle it.

Will try to get hold of a Bv3 and retry.

comment:6 Changed 12 years ago by laforge@…

  • Status changed from new to closed
  • Resolution set to fixed

fixed in svn rev. 1897

comment:7 Changed 2 years ago by JustDox

Reation To Amoxil <a href=http://cial5mg.xyz/cheap-cialis-and-viagra.php>Cheap Cialis And Viagra</a> Fast Delivery Viagrabest Online Price Cialis Shop Online <a href=http://kama1.xyz/kamagra-jelly.php>Kamagra Jelly</a> Amoxicillin Pill Id Genericos Finasteride Comprar Propecia <a href=http://prednisone.ccrpdc.com/fast-delivery-deltasone.php>Fast Delivery Deltasone</a> Cialis Generico Prezzi Buy Lasix 40mg <a href=http://zol1.xyz/purchase-cheap-zoloft.php>Purchase Cheap Zoloft</a> Discount Acticin Store Prix Du Propecia En Belgique <a href=http://cial5mg.xyz/cheap-cialis-40mg.php>Cheap Cialis 40mg</a> Get Pyridium Without Perscription Tablet With Free Shipping Cialis Et Viagra <a href=http://cial1.xyz/order-cialis-tablets.php>Order Cialis Tablets</a> Buy Levothyroxine 50 Mcg Uk Acheter Cialis Angleterre <a href=http://strattera.ccrpdc.com/generic-for-strattera.php>Generic For Strattera</a> Levitra Rezeptfrei Kaufen Ger Prescriptions Online For Proscar <a href=http://strattera.ccrpdc.com>Buy Strattera</a> Need Generic Dutasteride Drugs With Overnight Delivery New Hampshire Trusted Mens Meds <a href=http://cial1.xyz/buy-cheap-generic-cialis.php>Buy Cheap Generic Cialis</a> Vigra On Line Cialis Avec Dapoxetine <a href=http://viag1.xyz/online-viagra.php>Online Viagra</a> Baclofene Et Sep Metronidazole For Cheap <a href=http://kama1.xyz/kamagra-tablet.php>Kamagra Tablet</a> Super Generac Viagra Levitra Orosolubile Prezzo Farmacia <a href=http://cial5mg.xyz/cialis-to-buy.php>Cialis To Buy</a> Scabies Ciproflox Buy Kamagra Jelly In London <a href=http://kama1.xyz/buy-cheap-kamagra.php>Buy Cheap Kamagra</a> Levitra Farmacia Italiana Amoxil Dosage <a href=http://viag1.xyz/order-cheap-viagra.php>Order Cheap Viagra</a> Priligy Dapoxetine Blog Macrobid Niftran Bacterial Infections <a href=http://antabuse.ccrpdc.com/buy-generic-antabuse.php>Buy Generic Antabuse</a> Propecia Vademecum Zithromax For Strep Throat <a href=http://viag1.xyz/cheap-viagra-25mg.php>Cheap Viagra 25mg</a> Cialis Prezzo Farmacia Keflex <a href=http://viag1.xyz/cheapest-viagra-online.php>Cheapest Viagra Online</a> Propecia 3 Months 1 Mg Buy Valtrex Uk <a href=http://cial1.xyz/cialis-cheap.php>Cialis Cheap</a> Viamed Order Kamagra Jelly Online <a href=http://xenical.ccrpdc.com/cheap-xenical-20mg.php>Cheap Xenical 20mg</a> Zithromax For Acne Nolvadex Steroids <a href=http://cial5mg.xyz/best-cialis-online.php>Best Cialis Online</a> Kamagra Suppliers Cats On Amoxicillin <a href=http://zol1.xyz/zoloft-price.php>Zoloft Price</a> Canadian Name Brand Viagra Levitra Club <a href=http://cial1.xyz/purchase-cheap-cialis.php>Purchase Cheap Cialis</a> Soft Cialis Finasteride 1mg Buy Generic Propecia <a href=http://cial1.xyz/buy-cheap-cialis-on-line.php>Buy Cheap Cialis On Line</a> Buy Diflucan Online Uk Propecia Muskeln <a href=http://viag1.xyz/cheap-viagra-25mg.php>Cheap Viagra 25mg</a> Discount Propecia London Average Cost Of Propecia <a href=http://kama1.xyz/buy-online-kamagra.php>Buy Online Kamagra</a> Cialis Et Sante Amoxicillin With Or Without Food <a href=http://kama1.xyz/where-to-order-kamagra.php>Where To Order Kamagra</a> Buy Salbutimol Keflex Uti <a href=http://kama1.xyz/kamagra-pill.php>Kamagra Pill</a> 1063 Staxyn Acheter Baclofen <a href=http://cial1.xyz/canadian-cheap-cialis.php>Canadian Cheap Cialis</a> Veterinary Amoxicillin 250mg 5ml Tadalafil Canada <a href=http://accutane.ccrpdc.com/map.php>Amnesteem</a> Propecia Effects On Women Become Pregnant Propecia Effects On Women Androgenetic Alopecia <a href=http://cial1.xyz/online-cialis.php>Online Cialis</a> Zithromax Online Uk Free Shipping Direct Levaquin Worldwide <a href=http://lasix.ccrpdc.com/lasix-online-cheap.php>Lasix Online Cheap</a> Cialis Segunda Mano Achat Kamagra Voir Le Profil <a href=http://prednisone.ccrpdc.com/buy-generic-prednisone.php>Buy Generic Prednisone</a> Can Amoxicillin Expire Lasix Mexico <a href=http://cial5mg.xyz/cialis-online-cs.php>Cialis Online Cs</a> Isotretinoin With Next Day Delivery Cod Only Propecia Bastelanleitung <a href=http://cial1.xyz/cialis-online.php>Cialis Online</a> Nolvadex Pct For Sale

Note: See TracTickets for help on using tickets.