Skip to contentSkip to conversation

libata: implement and use HORKAGE_NOSETXFER

PATCH Moritz Rigler 4 participants 7 messages Jan 7, 2009 – Jan 15, 2009 libata

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

There are two more reports linked from the thread.

http://ubuntuforums.org/showthread.php?t=986871
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/299865

There are also
https://bugs.launchpad.net/ubuntu/+bug/305724
http://ubuntuforums.org/showthread.php?t=1031170
http://forum.ubuntu-it.org/index.php?topic=230995.msg1741414
The problem appears at least on two models (Sony Vaio FW and Sony Vaio VGN-NS11S). So I really don't agree with your "one report, from one user, with one configuration, on one controller, using one firmware set" statement, Alan.

I think that the particular laptop model I have (Sony Vaio VGN-NS11S) has sold in large numbers only recently. So if you decide to do nothing there will likely be more reports soon. If you wait for that to happen a good share of the users encountering the problem will (unjustly) blame it on Linux and just turn back to using preinstalled Vista (where the drive works). I've already thought myself that it was perhaps unwise to run Linux on a newly bought computer (where issues like this have not been fixed yet).

Quoted 2 lines

That said, Moritz, can you please post the output of "hdparm -I" with and without the quirk applied?

unpatched:
http://article.gmane.org/gmane.linux.ide/36819
patched:
http://article.gmane.org/gmane.linux.ide/36840

Quoted 2 lines

And can you please use a preoper mail
address?

Hope you like this one better.

Regards,
Moritz

Signature · 2 lines
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a
#1 lore raw
Quoted 1 line

The problem appears at least on two models (Sony Vaio FW and Sony Vaio VGN-NS11S). So I really don't agree with you "one report, from one user, with one configuration, on one controller, using one firmware set" statement, Alan.

Thanks - yours was the only one I had seen references too. I don't spend my days reading the Ubuntu forums.

Quoted 1 line

(where issues like this have not been fixed yet).

Its probably a better idea to buy a computer that appears to work in the way it is expected yes. However there is more to making a good quality OS than running around flapping at every warped piece of hardware we meet. It would be good if this works but it would also be good to know therefore why it happens to work in Vista - are the delays longer, are they clearing some other undefined command bits that the spec says don't matter etc.

Simply saying 'oh it didn't work lets just pretend we don't care' isn't always a good idea, particuarly when the worst case failure for it on other devices where it indicates a real failing might be corruption of user data.

Yes - I'd like it to just work, but I'd like it to just work without breaking anything else, without adding device specific special cases and ideally in a way that makes other stuff that is similarly odd just work too.

Alan

#2 lore raw
Quoted 20 lines · Alan Cox
Quoted 1 line

The problem appears at least on two models (Sony Vaio FW and Sony Vaio VGN-NS11S). So I really don't agree with you "one report, from one user, with one configuration, on one controller, using one firmware set" statement, Alan.

Thanks - yours was the only one I had seen references too. I don't spend my days reading the Ubuntu forums.

Quoted 1 line

(where issues like this have not been fixed yet).

Its probably a better idea to buy a computer that appears to work in the way it is expected yes. However there is more to making a good quality OS than running around flapping at every warped piece of hardware we meet. It would be good if this works but it would also be good to know therefore why it happens to work in Vista - are the delays longer, are they clearing some other undefined command bits that the spec says don't matter etc.

Simply saying 'oh it didn't work lets just pretend we don't care' isn't always a good idea, particuarly when the worst case failure for it on other devices where it indicates a real failing might be corruption of user data.

Quoted 4 lines

Yes - I'd like it to just work, but I'd like it to just work without breaking anything else, without adding device specific special cases and ideally in a way that makes other stuff that is similarly odd just work too.

I wonder if whatever storage driver Sony has it set up to run with in Vista is just skipping the set transfer mode command on SATA devices?

If you guys still have the Vista install, can you tell us what driver it's using in Windows (the Intel one, standard Microsoft AHCI, etc?)

#3 lore raw
In reply to Alan Cox

Hello, Alan, Moritz.

Quoted 22 lines · Alan Cox
Quoted 4 lines

The problem appears at least on two models (Sony Vaio FW and Sony Vaio VGN-NS11S). So I really don't agree with you "one report, from one user, with one configuration, on one controller, using one firmware set" statement, Alan.

Thanks - yours was the only one I had seen references too. I don't spend my days reading the Ubuntu forums.

Quoted 1 line

(where issues like this have not been fixed yet).

Its probably a better idea to buy a computer that appears to work in the way it is expected yes. However there is more to making a good quality OS than running around flapping at every warped piece of hardware we meet. It would be good if this works but it would also be good to know therefore why it happens to work in Vista - are the delays longer, are they clearing some other undefined command bits that the spec says don't matter etc.

Simply saying 'oh it didn't work lets just pretend we don't care' isn't always a good idea, particuarly when the worst case failure for it on other devices where it indicates a real failing might be corruption of user data.

Quoted 4 lines

Yes - I'd like it to just work, but I'd like it to just work without breaking anything else, without adding device specific special cases and ideally in a way that makes other stuff that is similarly odd just work too.

Then, how do you suggest proceeding on it? Without a bus tracer, we can't easily tell what Windows is doing and on native SATA skipping SETXFER isn't likely to cause any serious problem. It's basically noop.

If you're worried about the match being triggered on unaffected configurations, how about doing a DMI & device ID match, so we flip the stupid quirk only on the stupid machine? It's not like we're adding a lot of complexities and it's not likely that someone would invest the time and resource to root-cause problem this specific unless it begins to appear on other places. So, let's get the thing working and if similar problems creep up on other machines, deal with them then.

Thanks.

Signature · 1 line
tejun
#4 lore raw
Quoted 9 lines
Quoted 4 lines

Yes - I'd like it to just work, but I'd like it to just work without breaking anything else, without adding device specific special cases and ideally in a way that makes other stuff that is similarly odd just work too.

Then, how do you suggest proceeding on it? Without a bus tracer, we can't easily tell what Windows is doing and on native SATA skipping SETXFER isn't likely to cause any serious problem. It's basically noop.

I would suggest we issue the SETXFER always. If it times out then we will revalidate the identify data so we can use that to see what mode we are actually in.

Alan

#5 lore raw
Quoted 4 lines · Alan Cox
Quoted 4 lines
Quoted 4 lines

Yes - I'd like it to just work, but I'd like it to just work without breaking anything else, without adding device specific special cases and ideally in a way that makes other stuff that is similarly odd just work too.

Quoted 8 lines
Quoted 4 lines

Then, how do you suggest proceeding on it? Without a bus tracer, we can't easily tell what Windows is doing and on native SATA skipping SETXFER isn't likely to cause any serious problem. It's basically noop.

I would suggest we issue the SETXFER always. If it times out then we will revalidate the identify data so we can use that to see what mode we are actually in.

Hmmm... our current timeout for SETXFER is 5s, so it wouldn't be nice but not too bad either. Alright, I'll brew up something.

Signature · 1 line
tejun
#6 lore raw
Quoted 9 lines · Tejun Heo
Quoted 8 lines · Alan Cox
Quoted 8 lines
Quoted 4 lines

Yes - I'd like it to just work, but I'd like it to just work without breaking anything else, without adding device specific special cases and ideally in a way that makes other stuff that is similarly odd just work too.

Then, how do you suggest proceeding on it? Without a bus tracer, we can't easily tell what Windows is doing and on native SATA skipping SETXFER isn't likely to cause any serious problem. It's basically noop.

Quoted 6 lines
Quoted 3 lines

I would suggest we issue the SETXFER always. If it times out then we will revalidate the identify data so we can use that to see what mode we are actually in.

Hmmm... our current timeout for SETXFER is 5s, so it wouldn't be nice but not too bad either. Alright, I'll brew up something.

Hmm... There's a problem. After a timeout, libata EH always resets and reset can reset transfer mode settings and stuff, so the whole dancing becomes a bit pointless. The device in question in this case seems to retain (either that or udma/33 is the default which is unlikely) the configuration over resets but I'm skeptical how useful such logic would be generally.

We can change EH logic such that it does its best to issue IDENTIFY after a SETXFER timeout without reset but that's likely to bring more problem than it solves. Some LLDs might be okay with it but there simply is no guarantee. Given the rarity, I don't think the problem warrants such major behavior change.

Any more thoughts?

Thanks.

Signature · 1 line
tejun