add: cidp->msi_enabled = bge_enable_msi;
context: bge_chip_id_init(bge_t *bgep){	char buf[MAXPATHLEN];		/* any risk of stack overflow?	*/	boolean_t sys_ok;	boolean_t dev_ok;	chip_id_t *cidp;	uint32_t subid;	char *devname;	char *sysname;	int *ids;	int err;	uint_t i;	ASSERT(bgep->bge_chip_state == BGE_CHIP_INITIAL);	sys_ok = dev_ok = B_FALSE;	cidp = &bgep->chipid;	/*	 * Check the PCI device ID to determine the generic chip type and	 * select parameters that depend on this.	 *	 * Note: because the SPARC platforms in general don't fit the	 * SEEPROM 'behind' the chip, the PCI revision ID register reads	 * as zero - which is why we use <asic_rev> rather than <revision>	 * below ...	 *	 * Note: in general we can't distinguish between the Copper/SerDes	 * versions by ID alone, as some Copper devices (e.g. some but not	 * all 5703Cs) have the same ID as the SerDes equivalents.  So we	 * treat them the same here, and the MII code works out the media	 * type later on ...	 */	cidp->mbuf_base = bge_mbuf_pool_base;	cidp->mbuf_length = bge_mbuf_pool_len;	cidp->recv_slots = BGE_RECV_SLOTS_USED;	cidp->bge_dma_rwctrl = bge_dma_rwctrl;	cidp->pci_type = BGE_PCI_X;	if (cidp->rx_rings == 0 || cidp->rx_rings > BGE_RECV_RINGS_MAX)		cidp->rx_rings = BGE_RECV_RINGS_DEFAULT;	if (cidp->tx_rings == 0 || cidp->tx_rings > BGE_SEND_RINGS_MAX)		cidp->tx_rings = BGE_SEND_RINGS_DEFAULT;	cidp->bge_msi_enabled = B_FALSE;	switch (cidp->device) {	case DEVICE_ID_5700:	case DEVICE_ID_5700x:		cidp->chip_label = 5700;		cidp->flags |= CHIP_FLAG_NO_CSUM;		break;	case DEVICE_ID_5701:		cidp->chip_label = 5701;		dev_ok = B_TRUE;		cidp->flags |= CHIP_FLAG_NO_CSUM;		break;	case DEVICE_ID_5702:	case DEVICE_ID_5702fe:		cidp->chip_label = 5702;		dev_ok = B_TRUE;		cidp->flags |= CHIP_FLAG_NO_CSUM;	/* for now	*/		break;	case DEVICE_ID_5703C:	case DEVICE_ID_5703S:	case DEVICE_ID_5703:		/*		 * Revision A0 of the 5703/5793 had various errata		 * that we can't or don't work around, so it's not		 * supported, but all later versions are		 */		cidp->chip_label = cidp->subven == VENDOR_ID_SUN ? 5793 : 5703;		if (bgep->chipid.asic_rev != MHCR_CHIP_REV_5703_A0)			dev_ok = B_TRUE;		break;	case DEVICE_ID_5704C:	case DEVICE_ID_5704S:	case DEVICE_ID_5704:		/*		 * Revision A0 of the 5704/5794 had various errata		 * but we have workarounds, so it *is* supported.		 */		cidp->chip_label = cidp->subven == VENDOR_ID_SUN ? 5794 : 5704;		cidp->mbuf_base = bge_mbuf_pool_base_5704;		cidp->mbuf_length = bge_mbuf_pool_len_5704;		dev_ok = B_TRUE;		break;	case DEVICE_ID_5705C:	case DEVICE_ID_5705M:	case DEVICE_ID_5705MA3:		cidp->chip_label = 5705;		cidp->mbuf_base = bge_mbuf_pool_base_5705;		cidp->mbuf_length = bge_mbuf_pool_len_5705;		cidp->recv_slots = BGE_RECV_SLOTS_5705;		if (cidp->rx_rings > BGE_RECV_RINGS_MAX_5705)			cidp->rx_rings = BGE_RECV_RINGS_DEFAULT;		if (cidp->tx_rings > BGE_SEND_RINGS_MAX_5705)			cidp->tx_rings = BGE_SEND_RINGS_DEFAULT;		cidp->flags |= CHIP_FLAG_NO_JUMBO;		dev_ok = B_TRUE;		break;	case DEVICE_ID_5706:		cidp->chip_label = 5706;		cidp->flags |= CHIP_FLAG_NO_JUMBO;		cidp->flags |= CHIP_FLAG_NO_CSUM;	/* for now	*/		break;	case DEVICE_ID_5782:		/*		 * Apart from the label, we treat this as a 5705(?)		 */		cidp->chip_label = 5782;		cidp->mbuf_base = bge_mbuf_pool_base_5705;		cidp->mbuf_length = bge_mbuf_pool_len_5705;		cidp->recv_slots = BGE_RECV_SLOTS_5705;		if (cidp->rx_rings > BGE_RECV_RINGS_MAX_5705)			cidp->rx_rings = BGE_RECV_RINGS_DEFAULT;		if (cidp->tx_rings > BGE_SEND_RINGS_MAX_5705)			cidp->tx_rings = BGE_SEND_RINGS_DEFAULT;		cidp->flags |= CHIP_FLAG_NO_JUMBO;		dev_ok = B_TRUE;		break;	case DEVICE_ID_5788:		/*		 * Apart from the label, we treat this as a 5705(?)		 */		cidp->chip_label = 5788;		cidp->mbuf_base = bge_mbuf_pool_base_5705;		cidp->mbuf_length = bge_mbuf_pool_len_5705;		cidp->recv_slots = BGE_RECV_SLOTS_5705;		dev_ok = B_TRUE;		break;	case DEVICE_ID_5714C:	case DEVICE_ID_5714S:		cidp->chip_label = 5714;		cidp->mbuf_base = bge_mbuf_pool_base_5721;		cidp->mbuf_length = bge_mbuf_pool_len_5721;		cidp->recv_slots = BGE_RECV_SLOTS_5721;		cidp->bge_dma_rwctrl = bge_dma_rwctrl_5714;		cidp->bge_mlcr_default = bge_mlcr_default_5714;		cidp->pci_type = BGE_PCI_E;		dev_ok = B_TRUE;		break;	case DEVICE_ID_5715C:		cidp->chip_label = 5715;		cidp->mbuf_base = bge_mbuf_pool_base_5721;		cidp->mbuf_length = bge_mbuf_pool_len_5721;		cidp->recv_slots = BGE_RECV_SLOTS_5721;		cidp->bge_dma_rwctrl = bge_dma_rwctrl_5714;		cidp->bge_mlcr_default = bge_mlcr_default_5714;		cidp->pci_type = BGE_PCI_E;		dev_ok = B_TRUE;		break;	case DEVICE_ID_5721:		cidp->chip_label = 5721;		cidp->mbuf_base = bge_mbuf_pool_base_5721;		cidp->mbuf_length = bge_mbuf_pool_len_5721;		cidp->recv_slots = BGE_RECV_SLOTS_5721;		cidp->pci_type = BGE_PCI_E;		cidp->bge_dma_rwctrl = bge_dma_rwctrl_5721;		dev_ok = B_TRUE;		break;	case DEVICE_ID_5751:	case DEVICE_ID_5751M:		cidp->chip_label = 5751;		cidp->mbuf_base = bge_mbuf_pool_base_5721;		cidp->mbuf_length = bge_mbuf_pool_len_5721;		cidp->recv_slots = BGE_RECV_SLOTS_5721;		cidp->bge_dma_rwctrl = bge_dma_rwctrl_5721;		cidp->pci_type = BGE_PCI_E;		dev_ok = B_TRUE;		break;	}	/*	 * Setup the default jumbo parameter.	 */	cidp->mbuf_lo_water_rdma = bge_mbuf_lo_water_rdma;	cidp->mbuf_lo_water_rmac = bge_mbuf_lo_water_rmac;	cidp->mbuf_hi_water = bge_mbuf_hi_water;	cidp->ethmax_size = ETHERMAX;	cidp->snd_buff_size = BGE_SEND_BUFF_SIZE_DEFAULT;	/*	 * If jumbo is enabled and this kind of chipset supports jumbo feature,	 * setup below jumbo specific parameters.	 */	if (bge_jumbo_enable &&	    !(cidp->flags & CHIP_FLAG_NO_JUMBO)) {		cidp->mbuf_lo_water_rdma = RDMA_MBUF_LOWAT_JUMBO;		cidp->mbuf_lo_water_rmac = MAC_RX_MBUF_LOWAT_JUMBO;		cidp->mbuf_hi_water = MBUF_HIWAT_JUMBO;		cidp->recv_jumbo_size = BGE_JUMBO_BUFF_SIZE;		cidp->snd_buff_size = BGE_SEND_BUFF_SIZE_JUMBO;		cidp->jumbo_slots = BGE_JUMBO_SLOTS_USED;		cidp->ethmax_size = bge_jumbo_size - ETHERFCSL;		cidp->ethmax_size -= VLAN_TAGSZ;	}	/*	 * Identify the NV memory type: SEEPROM or Flash?	 */	cidp->nvtype = bge_nvmem_id(bgep);	/*	 * Now, we want to check whether this device is part of a	 * supported subsystem (e.g., on the motherboard of a Sun	 * branded platform).	 *	 * Rule 1: If the Subsystem Vendor ID is "Sun", then it's OK ;-)	 */	if (cidp->subven == VENDOR_ID_SUN)		sys_ok = B_TRUE;	/*	 * Rule 2: If it's on the list on known subsystems, then it's OK.	 * Note: 0x14e41647 should *not* appear in the list, but the code	 * doesn't enforce that.	 */	err = ddi_prop_lookup_int_array(DDI_DEV_T_ANY, bgep->devinfo,		DDI_PROP_DONTPASS, knownids_propname, &ids, &i);	if (err == DDI_PROP_SUCCESS) {		/*		 * Got the list; scan for a matching subsystem vendor/device		 */		subid = (cidp->subven << 16) | cidp->subdev;		while (i--)			if (ids[i] == subid)				sys_ok = B_TRUE;		ddi_prop_free(ids);	}	/*	 * Rule 3: If it's a Taco/ENWS motherboard device, then it's OK	 *	 * Unfortunately, early SunBlade 1500s and 2500s didn't reprogram	 * the Subsystem Vendor ID, so it defaults to Broadcom.  Therefore,	 * we have to check specially for the exact device paths to the	 * motherboard devices on those platforms ;-(	 *	 * Note: we can't just use the "supported-subsystems" mechanism	 * above, because the entry would have to be 0x14e41647 -- which	 * would then accept *any* plugin card that *didn't* contain a	 * (valid) SEEPROM ;-(	 */	sysname = ddi_node_name(ddi_root_node());	devname = ddi_pathname(bgep->devinfo, buf);	ASSERT(strlen(devname) > 0);	if (strcmp(sysname, "SUNW,Sun-Blade-1500") == 0)	/* Taco */		if (strcmp(devname, "/pci@1f,700000/network@2") == 0)			sys_ok = B_TRUE;	if (strcmp(sysname, "SUNW,Sun-Blade-2500") == 0)	/* ENWS */		if (strcmp(devname, "/pci@1c,600000/network@3") == 0)			sys_ok = B_TRUE;	/*	 * Now check what we've discovered: is this truly a supported	 * chip on (the motherboard of) a supported platform?	 *	 * Possible problems here:	 * 1)	it's a completely unheard-of chip (e.g. 5761)	 * 2)	it's a recognised but unsupported chip (e.g. 5701, 5703C-A0)	 * 3)	it's a chip we would support if it were on the motherboard	 *	of a Sun platform, but this one isn't ;-(	 */	if (cidp->chip_label == 0)		bge_problem(bgep,			"Device 'pci%04x,%04x' not recognized (%d?)",			cidp->vendor, cidp->device, cidp->device);	else if (!dev_ok)		bge_problem(bgep,			"Device 'pci%04x,%04x' (%d) revision %d not supported",			cidp->vendor, cidp->device, cidp->chip_label,			cidp->revision);	else if (!sys_ok)		bge_problem(bgep,			"%d-based subsystem 'pci%04x,%04x' not validated",			cidp->chip_label, cidp->subven, cidp->subdev);	else		cidp->flags |= CHIP_FLAG_SUPPORTED;}