Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6604 closed bug (fixed)

SuperTOP usb-disk case returns with residue 0 always

Reported by: Matthias Owned by: stippi
Priority: normal Milestone: R1
Component: Drivers/USB Version: R1/alpha2
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

The usb-pata adapter calling itself SuperTOP IDE Bridge (Vendor ID 0x14cd, Product ID 0x6600) always returns with residue 0. This makes it non-working in Haiku. Other systems have the same problem and the workaround is, to update the residue in that case to data length minus actual transferred length (or something like that). Even using data length minus actual transferred length instead of residue seems to work for other systems (NetBSD).

/var/log/syslog doesn't give any further information except the usual bootup message. When I try to access the device with diskprobe everything is set to zero (which is not the case).

I would be happy to test solutions to this problem, but as I have no clue about the usb-code of Haiku and have no time to look at it in detail, I can't provide a working fix myself.

I tested this with R1A2 and nightly-builds from 2010-09-12. Other USB mass storage devices work like a charm on the same computer with Haiku.

Attachments (2)

supertop-haiku-patch (833 bytes) - added by Matthias 9 years ago.
supertop-haiku-patch
haiku-supertop.patch (826 bytes) - added by Matthias 9 years ago.
hopefully fixed all style issues (same functionality)

Download all attachments as: .zip

Change History (11)

comment:1 Changed 9 years ago by Matthias

I have a solution at hand to get the device working. It seems that it may also return residue values which are unequal to 0 and wrong. The proposed fix is to calculate the residue by hand. Now I can access the SuperTop device and have successfully installed a nightly build from an USB stick. So basically other devices seem to work well with the attached patch. I look forward to get some feedback from someone who has more clue about the USB disk code.

Changed 9 years ago by Matthias

Attachment: supertop-haiku-patch added

supertop-haiku-patch

comment:2 Changed 9 years ago by Matthias

Has a Patch: set

comment:3 Changed 9 years ago by stippi

Patch looks fine to me, but hopefully mmlr can comment/apply.

comment:4 Changed 9 years ago by korli

At least one style issue with the patch though.

Changed 9 years ago by Matthias

Attachment: haiku-supertop.patch added

hopefully fixed all style issues (same functionality)

comment:5 Changed 9 years ago by korli

The patch is fine to me. Though a comment to explain that we can't trust the status.residue field is to be added.

At least one other OS seems to also ignore this field link

comment:6 Changed 9 years ago by stippi

Owner: changed from mmlr to stippi
Status: newin-progress

Well, that further confirms that the approach in the patch is sensible. Since there is no feedback from mmlr, I will just go ahead and commit the patch.

comment:7 Changed 9 years ago by stippi

Applied in hrev38836. Thanks a bunch!

comment:8 Changed 9 years ago by stippi

Resolution: fixed
Status: in-progressclosed

comment:9 Changed 9 years ago by korli

Thanks Stephan!

Note: See TracTickets for help on using tickets.