aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/xirc2ps_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/xirc2ps_cs.c')
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 034920b459d1..8fb0eb1dc341 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -677,9 +677,9 @@ xirc2ps_config_modem(struct pcmcia_device *p_dev,
677 677
678 if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) { 678 if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) {
679 for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { 679 for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) {
680 p_dev->io.BasePort2 = cf->io.win[0].base; 680 p_dev->resource[1]->start = cf->io.win[0].base;
681 p_dev->io.BasePort1 = ioaddr; 681 p_dev->resource[0]->start = ioaddr;
682 if (!pcmcia_request_io(p_dev, &p_dev->io)) 682 if (!pcmcia_request_io(p_dev))
683 return 0; 683 return 0;
684 } 684 }
685 } 685 }
@@ -696,11 +696,11 @@ xirc2ps_config_check(struct pcmcia_device *p_dev,
696 int *pass = priv_data; 696 int *pass = priv_data;
697 697
698 if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) { 698 if (cf->io.nwin > 0 && (cf->io.win[0].base & 0xf) == 8) {
699 p_dev->io.BasePort2 = cf->io.win[0].base; 699 p_dev->resource[1]->start = cf->io.win[0].base;
700 p_dev->io.BasePort1 = p_dev->io.BasePort2 700 p_dev->resource[0]->start = p_dev->resource[1]->start
701 + (*pass ? (cf->index & 0x20 ? -24:8) 701 + (*pass ? (cf->index & 0x20 ? -24:8)
702 : (cf->index & 0x20 ? 8:-24)); 702 : (cf->index & 0x20 ? 8:-24));
703 if (!pcmcia_request_io(p_dev, &p_dev->io)) 703 if (!pcmcia_request_io(p_dev))
704 return 0; 704 return 0;
705 } 705 }
706 return -ENODEV; 706 return -ENODEV;
@@ -807,8 +807,7 @@ xirc2ps_config(struct pcmcia_device * link)
807 goto failure; 807 goto failure;
808 } 808 }
809 809
810 link->io.IOAddrLines =10; 810 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;
811 link->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
812 if (local->modem) { 811 if (local->modem) {
813 int pass; 812 int pass;
814 813
@@ -816,16 +815,16 @@ xirc2ps_config(struct pcmcia_device * link)
816 link->conf.Attributes |= CONF_ENABLE_SPKR; 815 link->conf.Attributes |= CONF_ENABLE_SPKR;
817 link->conf.Status |= CCSR_AUDIO_ENA; 816 link->conf.Status |= CCSR_AUDIO_ENA;
818 } 817 }
819 link->io.NumPorts2 = 8; 818 link->resource[1]->end = 8;
820 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 819 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
821 if (local->dingo) { 820 if (local->dingo) {
822 /* Take the Modem IO port from the CIS and scan for a free 821 /* Take the Modem IO port from the CIS and scan for a free
823 * Ethernet port */ 822 * Ethernet port */
824 link->io.NumPorts1 = 16; /* no Mako stuff anymore */ 823 link->resource[0]->end = 16; /* no Mako stuff anymore */
825 if (!pcmcia_loop_config(link, xirc2ps_config_modem, NULL)) 824 if (!pcmcia_loop_config(link, xirc2ps_config_modem, NULL))
826 goto port_found; 825 goto port_found;
827 } else { 826 } else {
828 link->io.NumPorts1 = 18; 827 link->resource[0]->end = 18;
829 /* We do 2 passes here: The first one uses the regular mapping and 828 /* We do 2 passes here: The first one uses the regular mapping and
830 * the second tries again, thereby considering that the 32 ports are 829 * the second tries again, thereby considering that the 32 ports are
831 * mirrored every 32 bytes. Actually we use a mirrored port for 830 * mirrored every 32 bytes. Actually we use a mirrored port for
@@ -840,14 +839,15 @@ xirc2ps_config(struct pcmcia_device * link)
840 } 839 }
841 printk(KNOT_XIRC "no ports available\n"); 840 printk(KNOT_XIRC "no ports available\n");
842 } else { 841 } else {
843 link->io.NumPorts1 = 16; 842 link->io_lines = 10;
843 link->resource[0]->end = 16;
844 for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) { 844 for (ioaddr = 0x300; ioaddr < 0x400; ioaddr += 0x10) {
845 link->io.BasePort1 = ioaddr; 845 link->resource[0]->start = ioaddr;
846 if (!(err=pcmcia_request_io(link, &link->io))) 846 if (!(err = pcmcia_request_io(link)))
847 goto port_found; 847 goto port_found;
848 } 848 }
849 link->io.BasePort1 = 0; /* let CS decide */ 849 link->resource[0]->start = 0; /* let CS decide */
850 if ((err=pcmcia_request_io(link, &link->io))) 850 if ((err = pcmcia_request_io(link)))
851 goto config_error; 851 goto config_error;
852 } 852 }
853 port_found: 853 port_found: