static int mv6_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio) 
static int mv6_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio, unsigned int n_hc) 
static int mv6_reset_hc(struct mv_host_priv *hpriv, void __iomem *mmio){	void __iomem *reg = mmio + PCI_MAIN_CMD_STS_OFS;	int i, rc = 0;	u32 t;	/* Following procedure defined in PCI "main command and status	 * register" table.	 */	t = readl(reg);	writel(t | STOP_PCI_MASTER, reg);	for (i = 0; i < 1000; i++) {		udelay(1);		t = readl(reg);		if (PCI_MASTER_EMPTY & t) {			break;		}	}	if (!(PCI_MASTER_EMPTY & t)) {		printk(KERN_ERR DRV_NAME ": PCI master won't flush\n");		rc = 1;		goto done;	}	/* set reset */	i = 5;	do {		writel(t | GLOB_SFT_RST, reg);		t = readl(reg);		udelay(1);	} while (!(GLOB_SFT_RST & t) && (i-- > 0));	if (!(GLOB_SFT_RST & t)) {		printk(KERN_ERR DRV_NAME ": can't set global reset\n");		rc = 1;		goto done;	}	/* clear reset and *reenable the PCI master* (not mentioned in spec) */	i = 5;	do {		writel(t & ~(GLOB_SFT_RST | STOP_PCI_MASTER), reg);		t = readl(reg);		udelay(1);	} while ((GLOB_SFT_RST & t) && (i-- > 0));	if (GLOB_SFT_RST & t) {		printk(KERN_ERR DRV_NAME ": can't clear global reset\n");		rc = 1;	}done:	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c9d39130123238ac18478a42e25cb7996eacfcc0/sata_mv.c/buggy/drivers/scsi/sata_mv.c