diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 84e18bbed9d2..86942c09d8da 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -874,11 +874,8 @@ static int smc91c92_suspend(struct pcmcia_device *p_dev) | |||
874 | dev_link_t *link = dev_to_instance(p_dev); | 874 | dev_link_t *link = dev_to_instance(p_dev); |
875 | struct net_device *dev = link->priv; | 875 | struct net_device *dev = link->priv; |
876 | 876 | ||
877 | if (link->state & DEV_CONFIG) { | 877 | if ((link->state & DEV_CONFIG) && (link->open)) |
878 | if (link->open) | 878 | netif_device_detach(dev); |
879 | netif_device_detach(dev); | ||
880 | pcmcia_release_configuration(link->handle); | ||
881 | } | ||
882 | 879 | ||
883 | return 0; | 880 | return 0; |
884 | } | 881 | } |
@@ -894,7 +891,6 @@ static int smc91c92_resume(struct pcmcia_device *p_dev) | |||
894 | if ((smc->manfid == MANFID_MEGAHERTZ) && | 891 | if ((smc->manfid == MANFID_MEGAHERTZ) && |
895 | (smc->cardid == PRODID_MEGAHERTZ_EM3288)) | 892 | (smc->cardid == PRODID_MEGAHERTZ_EM3288)) |
896 | mhz_3288_power(link); | 893 | mhz_3288_power(link); |
897 | pcmcia_request_configuration(link->handle, &link->conf); | ||
898 | if (smc->manfid == MANFID_MOTOROLA) | 894 | if (smc->manfid == MANFID_MOTOROLA) |
899 | mot_config(link); | 895 | mot_config(link); |
900 | if ((smc->manfid == MANFID_OSITECH) && | 896 | if ((smc->manfid == MANFID_OSITECH) && |
@@ -963,18 +959,15 @@ static int check_sig(dev_link_t *link) | |||
963 | } | 959 | } |
964 | 960 | ||
965 | if (width) { | 961 | if (width) { |
966 | printk(KERN_INFO "smc91c92_cs: using 8-bit IO window.\n"); | 962 | modconf_t mod = { |
967 | /* call pcmcia_release_configuration() in _suspend */ | 963 | .Attributes = CONF_IO_CHANGE_WIDTH, |
968 | smc91c92_suspend(link->handle); | 964 | }; |
969 | 965 | printk(KERN_INFO "smc91c92_cs: using 8-bit IO window.\n"); | |
970 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 966 | |
971 | link->handle->socket->io[0].res->flags &= ~IO_DATA_PATH_WIDTH; | 967 | smc91c92_suspend(link->handle); |
972 | link->handle->socket->io[0].res->flags |= IO_DATA_PATH_WIDTH_8; | 968 | pcmcia_modify_configuration(link->handle, &mod); |
973 | 969 | smc91c92_resume(link->handle); | |
974 | /* call pcmcia_request_configuration() in _resume, it handles the | 970 | return check_sig(link); |
975 | * flag update */ | ||
976 | smc91c92_resume(link->handle); | ||
977 | return check_sig(link); | ||
978 | } | 971 | } |
979 | return -ENODEV; | 972 | return -ENODEV; |
980 | } | 973 | } |