]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pata_hpt{37x|3x2n}: fix timing register masks (take 2)
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 27 Nov 2009 18:29:02 +0000 (22:29 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 21:30:46 +0000 (13:30 -0800)
commit4a4e3688bd53ac0bb5d40d33a666e9e343da562b
tree1d9ee7049b0b8d620a75b4f81a55e3f32572a8cd
parentbdbff270b10274766fa5365fea7f461dca693144
pata_hpt{37x|3x2n}: fix timing register masks (take 2)

commit 5600c70e576199a7552e1c0fff43f3fe16f5566e upstream.

These drivers inherited from the older 'hpt366' IDE driver the buggy timing
register masks in their set_piomode() metods. As a result, too low command
cycle active time is programmed for slow PIO modes.  Quite fortunately, it's
later "fixed up" by the set_dmamode() methods which also "helpfully" reprogram
the command timings, usually to PIO mode 4; unfortunately, setting an UltraDMA
mode #N also reprograms already set PIO data timings, usually to MWDMA mode #
max(N, 2) timings...

However, the drivers added some breakage of their own too:  the bit that they
set/clear to control the FIFO is sometimes wrong -- it's actually the MSB of
the command cycle setup time; also, setting it in DMA mode is wrong as this
bit is only for PIO actually and clearing it for PIO modes is not needed as
no mode in any timing table has it set...

Fix all this, inverting the masks while at it, like in the 'hpt366' and
'pata_hpt366' drivers; bump the drivers' versions, accounting for recent
patches that forgot to do it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/pata_hpt37x.c
drivers/ata/pata_hpt3x2n.c