diff options
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 29 | ||||
-rw-r--r-- | drivers/net/tulip/xircom_tulip_cb.c | 27 |
2 files changed, 17 insertions, 39 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index b4c0d101a7d7..7f414815cc62 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -224,24 +224,21 @@ static const struct pci_device_id w840_pci_tbl[] = { | |||
224 | }; | 224 | }; |
225 | MODULE_DEVICE_TABLE(pci, w840_pci_tbl); | 225 | MODULE_DEVICE_TABLE(pci, w840_pci_tbl); |
226 | 226 | ||
227 | enum { | ||
228 | netdev_res_size = 128, /* size of PCI BAR resource */ | ||
229 | }; | ||
230 | |||
227 | struct pci_id_info { | 231 | struct pci_id_info { |
228 | const char *name; | 232 | const char *name; |
229 | struct match_info { | 233 | int drv_flags; /* Driver use, intended as capability flags. */ |
230 | int pci, pci_mask, subsystem, subsystem_mask; | ||
231 | int revision, revision_mask; /* Only 8 bits. */ | ||
232 | } id; | ||
233 | int io_size; /* Needed for I/O region check or ioremap(). */ | ||
234 | int drv_flags; /* Driver use, intended as capability flags. */ | ||
235 | }; | 234 | }; |
236 | static struct pci_id_info pci_id_tbl[] = { | 235 | |
237 | {"Winbond W89c840", /* Sometime a Level-One switch card. */ | 236 | static const struct pci_id_info pci_id_tbl[] __devinitdata = { |
238 | { 0x08401050, 0xffffffff, 0x81530000, 0xffff0000 }, | 237 | { /* Sometime a Level-One switch card. */ |
239 | 128, CanHaveMII | HasBrokenTx | FDXOnNoMII}, | 238 | "Winbond W89c840", CanHaveMII | HasBrokenTx | FDXOnNoMII}, |
240 | {"Winbond W89c840", { 0x08401050, 0xffffffff, }, | 239 | { "Winbond W89c840", CanHaveMII | HasBrokenTx}, |
241 | 128, CanHaveMII | HasBrokenTx}, | 240 | { "Compex RL100-ATX", CanHaveMII | HasBrokenTx}, |
242 | {"Compex RL100-ATX", { 0x201111F6, 0xffffffff,}, | 241 | { } /* terminate list. */ |
243 | 128, CanHaveMII | HasBrokenTx}, | ||
244 | {NULL,}, /* 0 terminated list. */ | ||
245 | }; | 242 | }; |
246 | 243 | ||
247 | /* This driver was written to use PCI memory space, however some x86 systems | 244 | /* This driver was written to use PCI memory space, however some x86 systems |
@@ -399,7 +396,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev, | |||
399 | #ifdef USE_IO_OPS | 396 | #ifdef USE_IO_OPS |
400 | bar = 0; | 397 | bar = 0; |
401 | #endif | 398 | #endif |
402 | ioaddr = pci_iomap(pdev, bar, pci_id_tbl[chip_idx].io_size); | 399 | ioaddr = pci_iomap(pdev, bar, netdev_res_size); |
403 | if (!ioaddr) | 400 | if (!ioaddr) |
404 | goto err_out_free_res; | 401 | goto err_out_free_res; |
405 | 402 | ||
diff --git a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c index 091ebb7a62f6..17ca7dc42e6f 100644 --- a/drivers/net/tulip/xircom_tulip_cb.c +++ b/drivers/net/tulip/xircom_tulip_cb.c | |||
@@ -10,26 +10,11 @@ | |||
10 | 410 Severn Ave., Suite 210 | 10 | 410 Severn Ave., Suite 210 |
11 | Annapolis MD 21403 | 11 | Annapolis MD 21403 |
12 | 12 | ||
13 | ----------------------------------------------------------- | ||
14 | |||
15 | Linux kernel-specific changes: | ||
16 | |||
17 | LK1.0 (Ion Badulescu) | ||
18 | - Major cleanup | ||
19 | - Use 2.4 PCI API | ||
20 | - Support ethtool | ||
21 | - Rewrite perfect filter/hash code | ||
22 | - Use interrupts for media changes | ||
23 | |||
24 | LK1.1 (Ion Badulescu) | ||
25 | - Disallow negotiation of unsupported full-duplex modes | ||
26 | */ | 13 | */ |
27 | 14 | ||
28 | #define DRV_NAME "xircom_tulip_cb" | 15 | #define DRV_NAME "xircom_tulip_cb" |
29 | #define DRV_VERSION "0.91+LK1.1" | 16 | #define DRV_VERSION "0.92" |
30 | #define DRV_RELDATE "October 11, 2001" | 17 | #define DRV_RELDATE "June 27, 2006" |
31 | |||
32 | #define CARDBUS 1 | ||
33 | 18 | ||
34 | /* A few user-configurable values. */ | 19 | /* A few user-configurable values. */ |
35 | 20 | ||
@@ -306,10 +291,10 @@ struct xircom_private { | |||
306 | struct xircom_tx_desc tx_ring[TX_RING_SIZE]; | 291 | struct xircom_tx_desc tx_ring[TX_RING_SIZE]; |
307 | /* The saved address of a sent-in-place packet/buffer, for skfree(). */ | 292 | /* The saved address of a sent-in-place packet/buffer, for skfree(). */ |
308 | struct sk_buff* tx_skbuff[TX_RING_SIZE]; | 293 | struct sk_buff* tx_skbuff[TX_RING_SIZE]; |
309 | #ifdef CARDBUS | 294 | |
310 | /* The X3201-3 requires 4-byte aligned tx bufs */ | 295 | /* The X3201-3 requires 4-byte aligned tx bufs */ |
311 | struct sk_buff* tx_aligned_skbuff[TX_RING_SIZE]; | 296 | struct sk_buff* tx_aligned_skbuff[TX_RING_SIZE]; |
312 | #endif | 297 | |
313 | /* The addresses of receive-in-place skbuffs. */ | 298 | /* The addresses of receive-in-place skbuffs. */ |
314 | struct sk_buff* rx_skbuff[RX_RING_SIZE]; | 299 | struct sk_buff* rx_skbuff[RX_RING_SIZE]; |
315 | u16 setup_frame[PKT_SETUP_SZ / sizeof(u16)]; /* Pseudo-Tx frame to init address table. */ | 300 | u16 setup_frame[PKT_SETUP_SZ / sizeof(u16)]; /* Pseudo-Tx frame to init address table. */ |
@@ -908,10 +893,8 @@ static void xircom_init_ring(struct net_device *dev) | |||
908 | tp->tx_skbuff[i] = NULL; | 893 | tp->tx_skbuff[i] = NULL; |
909 | tp->tx_ring[i].status = 0; | 894 | tp->tx_ring[i].status = 0; |
910 | tp->tx_ring[i].buffer2 = virt_to_bus(&tp->tx_ring[i+1]); | 895 | tp->tx_ring[i].buffer2 = virt_to_bus(&tp->tx_ring[i+1]); |
911 | #ifdef CARDBUS | ||
912 | if (tp->chip_id == X3201_3) | 896 | if (tp->chip_id == X3201_3) |
913 | tp->tx_aligned_skbuff[i] = dev_alloc_skb(PKT_BUF_SZ); | 897 | tp->tx_aligned_skbuff[i] = dev_alloc_skb(PKT_BUF_SZ); |
914 | #endif /* CARDBUS */ | ||
915 | } | 898 | } |
916 | tp->tx_ring[i-1].buffer2 = virt_to_bus(&tp->tx_ring[0]); | 899 | tp->tx_ring[i-1].buffer2 = virt_to_bus(&tp->tx_ring[0]); |
917 | } | 900 | } |
@@ -931,12 +914,10 @@ xircom_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
931 | entry = tp->cur_tx % TX_RING_SIZE; | 914 | entry = tp->cur_tx % TX_RING_SIZE; |
932 | 915 | ||
933 | tp->tx_skbuff[entry] = skb; | 916 | tp->tx_skbuff[entry] = skb; |
934 | #ifdef CARDBUS | ||
935 | if (tp->chip_id == X3201_3) { | 917 | if (tp->chip_id == X3201_3) { |
936 | memcpy(tp->tx_aligned_skbuff[entry]->data,skb->data,skb->len); | 918 | memcpy(tp->tx_aligned_skbuff[entry]->data,skb->data,skb->len); |
937 | tp->tx_ring[entry].buffer1 = virt_to_bus(tp->tx_aligned_skbuff[entry]->data); | 919 | tp->tx_ring[entry].buffer1 = virt_to_bus(tp->tx_aligned_skbuff[entry]->data); |
938 | } else | 920 | } else |
939 | #endif | ||
940 | tp->tx_ring[entry].buffer1 = virt_to_bus(skb->data); | 921 | tp->tx_ring[entry].buffer1 = virt_to_bus(skb->data); |
941 | 922 | ||
942 | if (tp->cur_tx - tp->dirty_tx < TX_RING_SIZE/2) {/* Typical path */ | 923 | if (tp->cur_tx - tp->dirty_tx < TX_RING_SIZE/2) {/* Typical path */ |