Hello, Shane. Huang, Shane wrote: > static void ahci_enable_fbs(struct ata_port *ap) > { > struct ahci_port_priv *pp = ap->private_data; > void __iomem *port_mmio = ahci_port_base(ap); > u32 fbs; > int rc; > > if (!pp->fbs_supported) > return; > > fbs = readl(port_mmio + PORT_FBS); > if (fbs & PORT_FBS_EN) > return; This can leave pp->fbs_enabled out of sync, right? Just don't check and set the bit anyway. > rc = ahci_stop_engine(ap); > if (rc) > return; > > writel(fbs | PORT_FBS_EN, port_mmio + PORT_FBS); > fbs = readl(port_mmio + PORT_FBS); > if (fbs & PORT_FBS_EN) { > dev_printk(KERN_INFO, ap->host->dev, "FBS is > enabled.\n"); > pp->fbs_enabled = true; > pp->fbs_last_dev = -1; /* initialization */ > } else > dev_printk(KERN_ERR, ap->host->dev, "Failed to enable > FBS\n"); > > ahci_start_engine(ap); > } > > > static void ahci_disable_fbs(struct ata_port *ap) > { > struct ahci_port_priv *pp = ap->private_data; > void __iomem *port_mmio = ahci_port_base(ap); > u32 fbs; > int rc; > > if (!pp->fbs_supported) > return; > > fbs = readl(port_mmio + PORT_FBS); > if ((fbs & PORT_FBS_EN) == 0) > return; Ditto. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html