• Tejun Heo's avatar
    [PATCH] sata_sis: fix flags handling for the secondary port · cf0e812f
    Tejun Heo authored
    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: default avatarTejun Heo <htejun@gmail.com>
    Cc: Patric McHardy <kaber@trash.net>
    Cc: Jeff Garzik <jeff@garzik.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    cf0e812f
sata_sis.c 9.03 KB