Browse Source

[via-velocity] Avoid unused variable warning in gcc 4.6

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
68a48b2220
1 changed files with 1 additions and 16 deletions
  1. 1
    16
      src/drivers/net/via-velocity.c

+ 1
- 16
src/drivers/net/via-velocity.c View File

1225
 #define COMMAND_WAIT        0x80
1225
 #define COMMAND_WAIT        0x80
1226
 static int velocity_open(struct nic *nic, struct pci_device *pci __unused)
1226
 static int velocity_open(struct nic *nic, struct pci_device *pci __unused)
1227
 {
1227
 {
1228
-	int ret;
1229
-
1230
 	u8 diff;
1228
 	u8 diff;
1231
 	u32 TxPhyAddr, RxPhyAddr;
1229
 	u32 TxPhyAddr, RxPhyAddr;
1232
 	u32 TxBufPhyAddr, RxBufPhyAddr;
1230
 	u32 TxBufPhyAddr, RxBufPhyAddr;
1278
     // turn this on to detect MII coding error
1276
     // turn this on to detect MII coding error
1279
     PCI_BYTE_REG_BITS_ON(MODE3_MIION, PCI_REG_MODE3, pci);
1277
     PCI_BYTE_REG_BITS_ON(MODE3_MIION, PCI_REG_MODE3, pci);
1280
  */
1278
  */
1281
-	ret = velocity_init_rings(vptr);
1279
+	velocity_init_rings(vptr);
1282
 
1280
 
1283
 	/* Ensure chip is running */
1281
 	/* Ensure chip is running */
1284
 //FIXME:        pci_set_power_state(vptr->pdev, PCI_D0);
1282
 //FIXME:        pci_set_power_state(vptr->pdev, PCI_D0);
1608
 static int velocity_set_media_mode(struct velocity_info *vptr,
1606
 static int velocity_set_media_mode(struct velocity_info *vptr,
1609
 				   u32 mii_status)
1607
 				   u32 mii_status)
1610
 {
1608
 {
1611
-	u32 curr_status;
1612
 	struct mac_regs *regs = vptr->mac_regs;
1609
 	struct mac_regs *regs = vptr->mac_regs;
1613
 
1610
 
1614
 	vptr->mii_status = mii_check_media_mode(vptr->mac_regs);
1611
 	vptr->mii_status = mii_check_media_mode(vptr->mac_regs);
1615
-	curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);
1616
 
1612
 
1617
 	/* Set mii link status */
1613
 	/* Set mii link status */
1618
 	set_mii_flow_control(vptr);
1614
 	set_mii_flow_control(vptr);
1619
 
1615
 
1620
-	/*
1621
-	   Check if new status is consisent with current status
1622
-	   if (((mii_status & curr_status) & VELOCITY_AUTONEG_ENABLE)
1623
-	   || (mii_status==curr_status)) {
1624
-	   vptr->mii_status=mii_check_media_mode(vptr->mac_regs);
1625
-	   vptr->mii_status=check_connection_type(vptr->mac_regs);
1626
-	   printf(MSG_LEVEL_INFO, "Velocity link no change\n");
1627
-	   return 0;
1628
-	   }
1629
-	 */
1630
-
1631
 	if (PHYID_GET_PHY_ID(vptr->phy_id) == PHYID_CICADA_CS8201) {
1616
 	if (PHYID_GET_PHY_ID(vptr->phy_id) == PHYID_CICADA_CS8201) {
1632
 		MII_REG_BITS_ON(AUXCR_MDPPS, MII_REG_AUXCR,
1617
 		MII_REG_BITS_ON(AUXCR_MDPPS, MII_REG_AUXCR,
1633
 				vptr->mac_regs);
1618
 				vptr->mac_regs);

Loading…
Cancel
Save