aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/nmclan_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/nmclan_cs.c')
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index c0eacfae1512..c0d85af3e942 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -757,29 +757,20 @@ static void nmclan_reset(struct net_device *dev)
757 757
758#if RESET_XILINX 758#if RESET_XILINX
759 struct pcmcia_device *link = &lp->link; 759 struct pcmcia_device *link = &lp->link;
760 conf_reg_t reg; 760 u8 OrigCorValue;
761 u_long OrigCorValue;
762 761
763 /* Save original COR value */ 762 /* Save original COR value */
764 reg.Function = 0; 763 pcmcia_read_config_byte(link, CISREG_COR, &OrigCorValue);
765 reg.Action = CS_READ;
766 reg.Offset = CISREG_COR;
767 reg.Value = 0;
768 pcmcia_access_configuration_register(link, &reg);
769 OrigCorValue = reg.Value;
770 764
771 /* Reset Xilinx */ 765 /* Reset Xilinx */
772 reg.Action = CS_WRITE; 766 dev_dbg(&link->dev, "nmclan_reset: OrigCorValue=0x%x, resetting...\n",
773 reg.Offset = CISREG_COR;
774 dev_dbg(&link->dev, "nmclan_reset: OrigCorValue=0x%lX, resetting...\n",
775 OrigCorValue); 767 OrigCorValue);
776 reg.Value = COR_SOFT_RESET; 768 pcmcia_write_config_byte(link, CISREG_COR, COR_SOFT_RESET);
777 pcmcia_access_configuration_register(link, &reg);
778 /* Need to wait for 20 ms for PCMCIA to finish reset. */ 769 /* Need to wait for 20 ms for PCMCIA to finish reset. */
779 770
780 /* Restore original COR configuration index */ 771 /* Restore original COR configuration index */
781 reg.Value = COR_LEVEL_REQ | (OrigCorValue & COR_CONFIG_MASK); 772 pcmcia_write_config_byte(link, CISREG_COR,
782 pcmcia_access_configuration_register(link, &reg); 773 (COR_LEVEL_REQ | (OrigCorValue & COR_CONFIG_MASK)));
783 /* Xilinx is now completely reset along with the MACE chip. */ 774 /* Xilinx is now completely reset along with the MACE chip. */
784 lp->tx_free_frames=AM2150_MAX_TX_FRAMES; 775 lp->tx_free_frames=AM2150_MAX_TX_FRAMES;
785 776