Re: [PATCH] sata_sis: fix flags handling for the secondary port

From: Patrick McHardy
Date: Mon Oct 23 2006 - 06:34:19 EST


Tejun Heo wrote:
> 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 by Patrick McHardy.
>
> Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
> Cc: Patric McHardy <kaber@xxxxxxxxx>
> ---
> Patrick, can you test this patch and post result?


The patch fixes the problem, both ports are properly detected and work
fine. Thanks Tejun.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/