struct php_ctlr_state_s *php_ctlr = (struct php_ctlr_state_s *) slot->ctrl->hpc_ctlr_handle; 
struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; 
static int hpc_get_max_bus_speed (struct slot *slot, enum pci_bus_speed *value){	struct php_ctlr_state_s *php_ctlr = (struct php_ctlr_state_s *) slot->ctrl->hpc_ctlr_handle;	enum pci_bus_speed bus_speed = PCI_SPEED_UNKNOWN;	int retval = 0;	u8 pi;	u32 slot_avail1, slot_avail2;	int slot_num;	DBG_ENTER_ROUTINE 	if (!slot->ctrl->hpc_ctlr_handle) {		err("%s: Invalid HPC controller handle!\n", __FUNCTION__);		return -1;	}	if (slot->hp_slot >= php_ctlr->num_slots) {		err("%s: Invalid HPC slot number!\n", __FUNCTION__);		return -1;	}	pi = readb(php_ctlr->creg + PROG_INTERFACE);	slot_avail1 = readl(php_ctlr->creg + SLOT_AVAIL1);	slot_avail2 = readl(php_ctlr->creg + SLOT_AVAIL2);	if (pi == 2) {		if ((slot_num = ((slot_avail2 & SLOT_133MHZ_PCIX_533) >> 27)  ) != 0 )			bus_speed = PCIX_133MHZ_533;		else if ((slot_num = ((slot_avail2 & SLOT_100MHZ_PCIX_533) >> 23)  ) != 0 )			bus_speed = PCIX_100MHZ_533;		else if ((slot_num = ((slot_avail2 & SLOT_66MHZ_PCIX_533) >> 19)  ) != 0 )			bus_speed = PCIX_66MHZ_533;		else if ((slot_num = ((slot_avail2 & SLOT_133MHZ_PCIX_266) >> 15)  ) != 0 )			bus_speed = PCIX_133MHZ_266;		else if ((slot_num = ((slot_avail2 & SLOT_100MHZ_PCIX_266) >> 11)  ) != 0 )			bus_speed = PCIX_100MHZ_266;		else if ((slot_num = ((slot_avail2 & SLOT_66MHZ_PCIX_266) >> 7)  ) != 0 )			bus_speed = PCIX_66MHZ_266;		else if ((slot_num = ((slot_avail1 & SLOT_133MHZ_PCIX) >> 23)  ) != 0 )			bus_speed = PCIX_133MHZ;		else if ((slot_num = ((slot_avail1 & SLOT_100MHZ_PCIX) >> 15)  ) != 0 )			bus_speed = PCIX_100MHZ;		else if ((slot_num = ((slot_avail1 & SLOT_66MHZ_PCIX) >> 7)  ) != 0 )			bus_speed = PCIX_66MHZ;		else if ((slot_num = (slot_avail2 & SLOT_66MHZ)) != 0 )			bus_speed = PCI_66MHZ;		else if ((slot_num = (slot_avail1 & SLOT_33MHZ)) != 0 )			bus_speed = PCI_33MHZ;		else bus_speed = PCI_SPEED_UNKNOWN;	} else {		if ((slot_num = ((slot_avail1 & SLOT_133MHZ_PCIX) >> 23)  ) != 0 )			bus_speed = PCIX_133MHZ;		else if ((slot_num = ((slot_avail1 & SLOT_100MHZ_PCIX) >> 15)  ) != 0 )			bus_speed = PCIX_100MHZ;		else if ((slot_num = ((slot_avail1 & SLOT_66MHZ_PCIX) >> 7)  ) != 0 )			bus_speed = PCIX_66MHZ;		else if ((slot_num = (slot_avail2 & SLOT_66MHZ)) != 0 )			bus_speed = PCI_66MHZ;		else if ((slot_num = (slot_avail1 & SLOT_33MHZ)) != 0 )			bus_speed = PCI_33MHZ;		else bus_speed = PCI_SPEED_UNKNOWN;	}	*value = bus_speed;	dbg("Max bus speed = %d\n", bus_speed);	DBG_LEAVE_ROUTINE 	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ee138334d5eb5ca662b2d69228420c1ccc051e0e/shpchp_hpc.c/buggy/drivers/pci/hotplug/shpchp_hpc.c