Skip to contentSkip to conversation

sata_mv fixes: coding style preference?

DISCUSSION Mark Lord 2 participants 2 messages Nov 28, 2007 2 messages not in the archive libata

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mark Lord

author
#2 lore raw

(adding linux-ide to CC:)

Quoted 9 lines · Jeff Garzik
Quoted 5 lines · Mark Lord

Below, I used inline functions to calculate the correct reg offsets so that the rest of the code doesn't need any special if-stmts. But another way to do it would be to just store the correct offsets as new fields within the mv_host_priv struct. I suspect that method would be better.

Yes, store the offsets, you shouldn't need to call a function to calculate the same value over and over again. Simple, no branches added to the code, ...

..

Good, so we all agree on that!

And as it turns out, this patch (or the better version coming later) fixes both of the Marvell 7042 problems reported here a couple of weeks ago:

1: Tom Morrison "hang with large file operations".
2. Hein-Pieter van Braam "PCI ERROR; PCI IRQ reason=0x00000000 highpoint rocketraid 2300 pci-e"

Tom has confirmed the fix, and I'm waiting to hear back from Hein-Pieter even though I now have identical hardware here as what he has.

Jeff: This fix (one I reissue it) should go upstream for 2.6.24, if possible.

Right now the driver is guaranteed to fail on 7042, since it is hitting reserved PCI addresses instead of valid registers.

Not a regression though, so your call.
But it does fix reported bugs, and really cannot hurt anything.

Cheers

#3 lore raw
Quoted 1 line · Mark Lord

Jeff: This fix (one I reissue it) should go upstream for 2.6.24, if possible.

Fine by me...

Jeff