pci_read_config_word(ha->pdev, PCI_ROM_ADDRESS, &w); w &= ~PCI_ROM_ADDRESS_ENABLE; pci_write_config_word(ha->pdev, PCI_ROM_ADDRESS, w); 
pci_read_config_dword(ha->pdev, PCI_ROM_ADDRESS, &d); d &= ~PCI_ROM_ADDRESS_ENABLE; pci_write_config_dword(ha->pdev, PCI_ROM_ADDRESS, d); 
qla2300_pci_config(scsi_qla_host_t *ha){	uint16_t	w, mwi;	unsigned long   flags = 0;	uint32_t	cnt;	struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;	pci_set_master(ha->pdev);	mwi = 0;	if (pci_set_mwi(ha->pdev))		mwi = PCI_COMMAND_INVALIDATE;	pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision);	pci_read_config_word(ha->pdev, PCI_COMMAND, &w);	w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);	if (IS_QLA2322(ha) || IS_QLA6322(ha))		w &= ~PCI_COMMAND_INTX_DISABLE;	/*	 * If this is a 2300 card and not 2312, reset the	 * COMMAND_INVALIDATE due to a bug in the 2300. Unfortunately,	 * the 2310 also reports itself as a 2300 so we need to get the	 * fb revision level -- a 6 indicates it really is a 2300 and	 * not a 2310.	 */	if (IS_QLA2300(ha)) {		spin_lock_irqsave(&ha->hardware_lock, flags);		/* Pause RISC. */		WRT_REG_WORD(&reg->hccr, HCCR_PAUSE_RISC);		for (cnt = 0; cnt < 30000; cnt++) {			if ((RD_REG_WORD(&reg->hccr) & HCCR_RISC_PAUSE) != 0)				break;			udelay(10);		}		/* Select FPM registers. */		WRT_REG_WORD(&reg->ctrl_status, 0x20);		RD_REG_WORD(&reg->ctrl_status);		/* Get the fb rev level */		ha->fb_rev = RD_FB_CMD_REG(ha, reg);		if (ha->fb_rev == FPM_2300)			w &= ~PCI_COMMAND_INVALIDATE;		/* Deselect FPM registers. */		WRT_REG_WORD(&reg->ctrl_status, 0x0);		RD_REG_WORD(&reg->ctrl_status);		/* Release RISC module. */		WRT_REG_WORD(&reg->hccr, HCCR_RELEASE_RISC);		for (cnt = 0; cnt < 30000; cnt++) {			if ((RD_REG_WORD(&reg->hccr) & HCCR_RISC_PAUSE) == 0)				break;			udelay(10);		}		spin_unlock_irqrestore(&ha->hardware_lock, flags);	}	pci_write_config_word(ha->pdev, PCI_COMMAND, w);	pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80);	/* Reset expansion ROM address decode enable */	pci_read_config_word(ha->pdev, PCI_ROM_ADDRESS, &w);	w &= ~PCI_ROM_ADDRESS_ENABLE;	pci_write_config_word(ha->pdev, PCI_ROM_ADDRESS, w);	/* Get PCI bus information. */	spin_lock_irqsave(&ha->hardware_lock, flags);	ha->pci_attr = RD_REG_WORD(&reg->ctrl_status);	spin_unlock_irqrestore(&ha->hardware_lock, flags);	return QLA_SUCCESS;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/27b2f6792f3b482e4636818c7efaf4c43fef32a3/qla_init.c/buggy/drivers/scsi/qla2xxx/qla_init.c