patch-2.2.17 linux/drivers/net/c101.c
Next file: linux/drivers/net/com20020.c
Previous file: linux/drivers/net/bsd_comp.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Mon Sep 4 18:39:19 2000
- Orig file:
v2.2.16/drivers/net/c101.c
- Orig date:
Mon Sep 4 18:37:28 2000
diff -u --recursive --new-file v2.2.16/drivers/net/c101.c linux/drivers/net/c101.c
@@ -73,21 +73,21 @@
typedef card_t port_t;
-#define sca_in(reg, card) readb(card->win0base+C101_SCA+reg)
-#define sca_out(value, reg, card) writeb(value, card->win0base+C101_SCA+reg)
-#define sca_inw(reg, card) readw(card->win0base+C101_SCA+reg)
-#define sca_outw(value, reg, card) writew(value, card->win0base+C101_SCA+reg)
+#define sca_in(reg, card) readb((card)->win0base+C101_SCA+(reg))
+#define sca_out(value, reg, card) writeb(value, (card)->win0base+C101_SCA+(reg))
+#define sca_inw(reg, card) readw((card)->win0base+C101_SCA+(reg))
+#define sca_outw(value, reg, card) writew(value, (card)->win0base+C101_SCA+(reg))
#define port_to_card(port) (port)
#define log_node(port) (0)
#define phy_node(port) (0)
#define winsize(card) (C101_WINDOW_SIZE)
-#define win0base(card) (card->win0base)
-#define winbase(card) (card->win0base+0x2000)
-#define get_port(card, port) (port == 0 ? card : NULL)
+#define win0base(card) ((card)->win0base)
+#define winbase(card) ((card)->win0base+0x2000)
+#define get_port(card, port) ((port) == 0 ? (card) : NULL)
-static __inline__ u8 get_page(card_t *card)
+static __inline__ u8 sca_get_page(card_t *card)
{
return card->page;
}
@@ -117,12 +117,14 @@
static __inline__ void open_port(port_t *port)
{
writeb(1, port->win0base+C101_DTR);
+ sca_out(0, MSCI1_OFFSET + CTL, port); /* RTS uses ch#2 output */
}
static __inline__ void close_port(port_t *port)
{
writeb(0, port->win0base+C101_DTR);
+ sca_out(CTL_NORTS, MSCI1_OFFSET + CTL, port);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)