]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] sata_sis: fix flags handling for the secondary port
authorTejun Heo <htejun@gmail.com>
Sat, 28 Oct 2006 02:08:47 +0000 (19:08 -0700)
committerJeff Garzik <jeff@garzik.org>
Wed, 1 Nov 2006 01:26:10 +0000 (20:26 -0500)
commitcf0e812f0e90ee496af072b136e8bd02770387e6
tree2396b3407663ba2e3567c8b20fe1bdf077e51648
parentd5b9b787b5e1618dfe82a2c2a6972374e85b02db
[PATCH] sata_sis: fix flags handling for the secondary port

sis_init_one() modifies probe_ent->port_flags after allocating and
initializing it using ata_pci_init_native_mode().  This makes port_flags
for the secondary port (probe_ent->pinfo2->flags) go out of sync resulting
in misdetection of device due to incorrectly initialized SCR access flag.

This patch make probe_ent alloc/init happen after the final port flags
value is determined.  This is fragile but probe_ent and all the related
mess are scheduled to go away soon for exactly this reason.  We just need
to hold everything together till then.

This has been spotted and diagnosed and tested by Patrick McHardy.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Patric McHardy <kaber@trash.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_sis.c