* Tulip driver in 2.0.24
@ 1996-11-03 16:19 Linux support
0 siblings, 0 replies; 8+ messages in thread
From: Linux support @ 1996-11-03 16:19 UTC (permalink / raw)
Hello!
I was not able to get my smc8432 (DEC 21041 Tulip) card working with
2.0.24.
After restoring tulip.c to the 2.0.23 version, it works fine again.
I got the message "eth0: enabling BNC port" repeating after some seconds,
but the interface does never come up.
Hardware is a Cabriolet with a SMC card:
Bus 0, device 5, function 0:
Ethernet controller: DEC DC21041 (rev 17).
I think the patch for tulip.c was not very perfect ;-)
Fritz Ganter, LinuxAlpha Supporter
Member of the Quant-X Group: Alpha based Systems running Linux
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tulip driver in 2.0.24
[not found] <Pine.LNX.3.91.961103171333.329A-100000@rebekka.tu-graz.ac.at>
@ 1996-11-03 17:06 ` Ion Badulescu
0 siblings, 0 replies; 8+ messages in thread
From: Ion Badulescu @ 1996-11-03 17:06 UTC (permalink / raw)
Hi,
On Sun, 3 Nov 1996, Linux support wrote:
> I was not able to get my smc8432 (DEC 21041 Tulip) card working with
> 2.0.24.
>
> After restoring tulip.c to the 2.0.23 version, it works fine again.
>
> I got the message "eth0: enabling BNC port" repeating after some seconds,
> but the interface does never come up.
I've got the same problem with a 21041-based card: stock 2.0.24 does not
work at all and instead cycles the port type; 2.0.23 works just fine as
does 2.0.24 with tulip.c from 2.0.23; finally, 2.1.7 (which includes
_almost_ the same changes to tulip.c as 2.0.24) again works fine.
Now, there is a catch here: the difference between tulip.c in 2.1.7 and
2.0.24 is a constant. 2.1.7 has the correct value (as Linus pointed out in
a previous message). This is the patch for 2.0.24 (apply it with -p1):
--- linux/drivers/net/tulip.c.orig Sun Nov 3 12:02:47 1996
+++ linux/drivers/net/tulip.c Fri Nov 1 06:58:44 1996
@@ -1145,7 +1145,7 @@
tp->tx_skbuff[entry] = 0;
/* Put the setup frame on the Tx list. */
tp->tx_ring[entry].length = 192 |
- (entry == TX_RING_SIZE-1 ? 0x0a000000 : 0x08000);
+ (entry == TX_RING_SIZE-1 ? 0x0a000000 : 0x08000000);
tp->tx_ring[entry].buffer1 = virt_to_bus((char *)tp->setup_frame);
tp->tx_ring[entry].buffer2 = 0;
tp->tx_ring[entry].status = TRING_OWN;
Ionut
--
Ionut Badulescu - Columbia College '98 E-mail:ib42@columbia.edu
Phone: (212)853-7875 Snail mail: 4A4 Wallach Hall
Fax: (212)695-5560 1116 Amsterdam Ave
PGP key available on request New York, NY 10027
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tulip driver in 2.0.24
[not found] <torvalds@cs.helsinki.fi>
@ 1996-11-03 19:48 ` Franz Sirl
1996-11-03 22:48 ` Franz Sirl
1 sibling, 0 replies; 8+ messages in thread
From: Franz Sirl @ 1996-11-03 19:48 UTC (permalink / raw)
Hi,
and when will the following patch go into tulip.c:
----->
--- tulip.c.orig Sun Jun 9 20:15:22 1996
+++ tulip.c Mon Jun 10 00:26:27 1996
@@ -394,6 +394,8 @@
0x0000c000, PCI_DEVICE_ID_DEC_TULIP, "old smc8432", 0},
{auto21140_select, generic21140_fail,
0x0000f400, PCI_DEVICE_ID_DEC_TULIP_FAST, "LA100PCI", 0},
+ {generic21040_select, generic21040_fail,
+ 0x00009200, PCI_DEVICE_ID_DEC_TULIP, "Cogent EM96x", 1},
{cogent21140_select, generic21140_fail,
0x00009200, PCI_DEVICE_ID_DEC_TULIP_FAST, "cogent_em110", 0},
{generic21140_select, generic21140_fail,
@@ -1177,6 +1179,7 @@
{
/* See note below on the Znyx 315 etherarray. */
static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u',
'x'};
+ static int last_irq = 0;
char detect_mesg[80], *mesgp=detect_mesg;
struct tulip_private *tp = (struct tulip_private *)dev->priv;
int i;
@@ -1246,6 +1251,7 @@
for (i = 0; i < ETH_ALEN - 1; i++)
dev->dev_addr[i] = last_phys_addr[i];
dev->dev_addr[i] = last_phys_addr[i] + 1;
+ irq = last_irq;
}
for (i = 0; i < ETH_ALEN - 1; i++)
mesgp += sprintf(mesgp, "%2.2x:", dev->dev_addr[i]);
@@ -1255,8 +1261,10 @@
/* copy ethernet address */
if (card_type(tp, device_id,
htonl((*(int*)dev->dev_addr) & 0xFFFFFF)))
- for (i = 0; i < ETH_ALEN - 1; i++)
+ for (i = 0; i < ETH_ALEN - 1; i++) {
last_phys_addr[i] = dev->dev_addr[i];
+ last_irq = irq;
+ }
/* We do a request_region() only to register /proc/ioports info. */
request_region(ioaddr, TULIP_TOTAL_SIZE, tp->signature);
------<
This makes tulip.c handle multiport cards (like the Cogent 964) work
correctly with most BIOSes. I think I've seen a more sophisticated patch
for this problem already on linux-kernel, but that one also didn't made it
into the kernel, so I give it another try.
I think I've also found an important bug in tulip_probe(). It will only
work correctly if there's only one kind of chips in your system (21040 or
21041 or 21140 or ...). This is due a wrong arrangement of the pci_index++
and cno++ loops. They should be exchanged.
Can anyone confirm this behaviour?
Linus, should I prepare a patch for you?
Ciao,
Franz Sirl.
At 18:06 Uhr +0100 03.11.1996, Ion Badulescu wrote:
>Hi,
>
>On Sun, 3 Nov 1996, Linux support wrote:
>
>> I was not able to get my smc8432 (DEC 21041 Tulip) card working with
>> 2.0.24.
>>
>> After restoring tulip.c to the 2.0.23 version, it works fine again.
>>
>> I got the message "eth0: enabling BNC port" repeating after some seconds,
>> but the interface does never come up.
>
>I've got the same problem with a 21041-based card: stock 2.0.24 does not
>work at all and instead cycles the port type; 2.0.23 works just fine as
>does 2.0.24 with tulip.c from 2.0.23; finally, 2.1.7 (which includes
>_almost_ the same changes to tulip.c as 2.0.24) again works fine.
>
>Now, there is a catch here: the difference between tulip.c in 2.1.7 and
>2.0.24 is a constant. 2.1.7 has the correct value (as Linus pointed out in
>a previous message). This is the patch for 2.0.24 (apply it with -p1):
>
>--- linux/drivers/net/tulip.c.orig Sun Nov 3 12:02:47 1996
>+++ linux/drivers/net/tulip.c Fri Nov 1 06:58:44 1996
>@@ -1145,7 +1145,7 @@
> tp->tx_skbuff[entry] = 0;
> /* Put the setup frame on the Tx list. */
> tp->tx_ring[entry].length = 192 |
>- (entry == TX_RING_SIZE-1 ? 0x0a000000 : 0x08000);
>+ (entry == TX_RING_SIZE-1 ? 0x0a000000 :
>0x08000000);
> tp->tx_ring[entry].buffer1 = virt_to_bus((char
>*)tp->setup_frame);
> tp->tx_ring[entry].buffer2 = 0;
> tp->tx_ring[entry].status = TRING_OWN;
>
>
>Ionut
>
>--
>Ionut Badulescu - Columbia College '98 E-mail:ib42@columbia.edu
>Phone: (212)853-7875 Snail mail: 4A4 Wallach Hall
>Fax: (212)695-5560 1116 Amsterdam Ave
>PGP key available on request New York, NY 10027
> It is better to keep your mouth shut and be thought a fool,
> than to open it and remove all doubt.
--
--------------------------------------------------------------------------
phone ++49 8104 8943-0 mail Lauterbach Datentechnik GmbH
fax ++49 8104 8943-49 c/o Franz Sirl
email franz.sirl@lauterbach.com Fichtenstr. 27
web http://www.lauterbach.com D-85649 Hofolding
ftp://ftp.lauterbach.com Germany
--------------------------------------------------------------------------
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tulip driver in 2.0.24
@ 1996-11-03 21:39 Brian Topping
0 siblings, 0 replies; 8+ messages in thread
From: Brian Topping @ 1996-11-03 21:39 UTC (permalink / raw)
Folks,
This was my bad. I don't know how the error was introduced, but as it
is plain to see there are a few digits missing. The correct value is a
singe bit difference between the two values. It was probably a bad copy
and paste, since my original source had the problem too. Unfortuantely
it didn't show up in testing here on a 21040.
Sorry about the problems. At least multicast finally works again...
-B
Ion Badulescu wrote:
>
> Hi,
>
> On Sun, 3 Nov 1996, Linux support wrote:
>
> > I was not able to get my smc8432 (DEC 21041 Tulip) card working with
> > 2.0.24.
> >
> > After restoring tulip.c to the 2.0.23 version, it works fine again.
> >
> > I got the message "eth0: enabling BNC port" repeating after some seconds,
> > but the interface does never come up.
>
> I've got the same problem with a 21041-based card: stock 2.0.24 does not
> work at all and instead cycles the port type; 2.0.23 works just fine as
> does 2.0.24 with tulip.c from 2.0.23; finally, 2.1.7 (which includes
> _almost_ the same changes to tulip.c as 2.0.24) again works fine.
>
> Now, there is a catch here: the difference between tulip.c in 2.1.7 and
> 2.0.24 is a constant. 2.1.7 has the correct value (as Linus pointed out in
> a previous message). This is the patch for 2.0.24 (apply it with -p1):
>
> --- linux/drivers/net/tulip.c.orig Sun Nov 3 12:02:47 1996
> +++ linux/drivers/net/tulip.c Fri Nov 1 06:58:44 1996
> @@ -1145,7 +1145,7 @@
> tp->tx_skbuff[entry] = 0;
> /* Put the setup frame on the Tx list. */
> tp->tx_ring[entry].length = 192 |
> - (entry == TX_RING_SIZE-1 ? 0x0a000000 : 0x08000);
> + (entry == TX_RING_SIZE-1 ? 0x0a000000 : 0x08000000);
> tp->tx_ring[entry].buffer1 = virt_to_bus((char *)tp->setup_frame);
> tp->tx_ring[entry].buffer2 = 0;
> tp->tx_ring[entry].status = TRING_OWN;
>
> Ionut
>
> --
> Ionut Badulescu - Columbia College '98 E-mail:ib42@columbia.edu
> Phone: (212)853-7875 Snail mail: 4A4 Wallach Hall
> Fax: (212)695-5560 1116 Amsterdam Ave
> PGP key available on request New York, NY 10027
> It is better to keep your mouth shut and be thought a fool,
> than to open it and remove all doubt.
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tulip driver in 2.0.24
@ 1996-11-03 21:55 Brian Topping
0 siblings, 0 replies; 8+ messages in thread
From: Brian Topping @ 1996-11-03 21:55 UTC (permalink / raw)
I posted the original patch, but Linus rejected it because he felt there
were not enough people using it. The patch I created covers the cases
on broken BIOS's that return the NIC with the serial rom as the last NIC
instead of the first NIC.
I can generate the diff from the results of this patch, but I would
rather use my complete patch since it will be about the n'th time that I
have regenerated it due to driver changes over the months.
Realistically though, I think whichever patch is used is something that
is better put in the 2.1 source tree. 2.0.x needs to freeze so we can
move on, and those of us that need the multiport patch will be able to
help each other out on supporting the 2.0.x kernels on multiport 21x40
systems.
My two cents...
-B
Franz Sirl wrote:
<snip>
> This makes tulip.c handle multiport cards (like the Cogent 964) work
> correctly with most BIOSes. I think I've seen a more sophisticated patch
> for this problem already on linux-kernel, but that one also didn't made it
> into the kernel, so I give it another try.
>
> I think I've also found an important bug in tulip_probe(). It will only
> work correctly if there's only one kind of chips in your system (21040 or
> 21041 or 21140 or ...). This is due a wrong arrangement of the pci_index++
> and cno++ loops. They should be exchanged.
> Can anyone confirm this behaviour?
> Linus, should I prepare a patch for you?
>
> Ciao,
> Franz Sirl.
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tulip driver in 2.0.24
[not found] <torvalds@cs.helsinki.fi>
1996-11-03 19:48 ` Franz Sirl
@ 1996-11-03 22:48 ` Franz Sirl
1 sibling, 0 replies; 8+ messages in thread
From: Franz Sirl @ 1996-11-03 22:48 UTC (permalink / raw)
At 22:55 Uhr +0100 03.11.1996, Brian Topping wrote:
>I posted the original patch, but Linus rejected it because he felt there
>were not enough people using it. The patch I created covers the cases
>on broken BIOS's that return the NIC with the serial rom as the last NIC
>instead of the first NIC.
>
>I can generate the diff from the results of this patch, but I would
>rather use my complete patch since it will be about the n'th time that I
>have regenerated it due to driver changes over the months.
Does your patch also fix the mentioned detection bug for systems with mixed
chips?
>Realistically though, I think whichever patch is used is something that
>is better put in the 2.1 source tree. 2.0.x needs to freeze so we can
>move on, and those of us that need the multiport patch will be able to
>help each other out on supporting the 2.0.x kernels on multiport 21x40
No, no, no! ;-) The main reason I upgraded from 1.2.13 to 2.0.x was the
support for shared IRQ's and thus multiport cards! And now I have to wait
again? Ok, _I_ can use it, but in the last few months I've pointed a quite
a lot of people in the right direction (my patch and/or Donald's site for
new betas) and I don't read those newsgroups regularly.
The patches (at least mine, don't remember yours) are fairly simple and
probably don't break anything, but will help a lot of people with their
problems.
At least we should have a FTP-site (Donald's?), where all the patches and
new versions live, that is mentioned in
linux/Documentation/networking/tulip.txt.
Now already two people did patches for the same problem, how many more out
there?
Ciao,
Franz Sirl.
--
--------------------------------------------------------------------------
phone ++49 8104 8943-0 mail Lauterbach Datentechnik GmbH
fax ++49 8104 8943-49 c/o Franz Sirl
email franz.sirl@lauterbach.com Fichtenstr. 27
web http://www.lauterbach.com D-85649 Hofolding
ftp://ftp.lauterbach.com Germany
--------------------------------------------------------------------------
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tulip driver in 2.0.24
@ 1996-11-03 22:56 Matthew Jacob
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Jacob @ 1996-11-03 22:56 UTC (permalink / raw)
Here's a patch that fixes the 2.1.5 tulip.c for the znyx 314 multiport-
I had to do that for someone a couple of weeks ago. I then tested
against an SMC, the onboard multia i/f, the znyx 342 && the 314.
I've sent mail to manabe && mr. becker && linus about this, but
it may not be good enuff for folsks.
fyi.
----- Begin Included Message -----
From mjacob Fri Nov 1 10:08:26 1996
To: torvalds@cs.helsinki.fi
Subject: tulip chip driver...
Cc: +linux/ethernet
Content-Length: 9619
I've tried to get Mr. Becker and/or Manabe to respond- but they must
be busy.
below are patches to the tulip driver that clean up a bit of the PCI
stuff and run the larger etherarrays.
I've tested them. If you want to wait for the nominal owners to
look at them, that's fine- but I have to give the cards back today
so I wanted to come to closure on this...
*** linux/drivers/net/tulip.c-2.1.6 Fri Nov 1 10:03:06 1996
--- linux/drivers/net/tulip.c Fri Nov 1 10:03:06 1996
***************
*** 15,23 ****
*/
static char *version =
! "tulip.c:v0.10 8/11/95 becker@cesdis.gsfc.nasa.gov\n"
! " +0.72 4/17/96 "
! "http://www.dsl.tutics.tut.ac.jp/~linux/tulip\n";
/* A few user-configurable values. */
--- 15,24 ----
*/
static char *version =
! "tulip.c:v0.10 8/11/95 becker@cesdis.gsfc.nasa.gov\n"
! " +0.72 4/17/96 "
! "http://www.dsl.tutics.tut.ac.jp/~linux/tulip\n"
! " +0.01 10/24/96 mjacob@feral.com\n";
/* A few user-configurable values. */
***************
*** 334,339 ****
--- 335,341 ----
int setup_frame[48]; /* Pseudo-Tx frame to init address table. */
void (*port_select)(struct device *dev);
int (*port_fail)(struct device *dev);
+ struct device *next_module;
char *signature;
unsigned int cur_rx, cur_tx; /* The next free ring entry */
unsigned int dirty_rx, dirty_tx; /* The ring entries to be free()ed. */
***************
*** 367,373 ****
static void tulip_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static int tulip_close(struct device *dev);
static struct enet_statistics *tulip_get_stats(struct device *dev);
- static struct device *tulip_alloc(struct device *dev);
static void set_multicast_list(struct device *dev);
#define generic21140_fail NULL
--- 369,374 ----
***************
*** 379,384 ****
--- 380,390 ----
static int generic21040_fail(struct device *dev);
static int generic21041_fail(struct device *dev);
+ #ifdef MODULE
+ /* A list of all installed Tulip devices, for removing the driver module. */
+ static struct device *root_tulip_dev = NULL;
+ #endif
+
static struct {
void (*port_select)(struct device *dev);
int (*port_fail)(struct device *dev);
***************
*** 436,442 ****
#ifdef MODULE
static int if_port=TULIP_AUTO_PORT;
- static size_t alloc_size;
#ifdef TULIP_FULL_DUPLEX
static int full_duplex=1;
#else
--- 442,447 ----
***************
*** 1136,1180 ****
}
}
- static struct device *tulip_alloc(struct device *dev)
- {
- struct tulip_private *tp;
- char *buff;
- #ifndef MODULE
- size_t alloc_size;
- #endif
- if (!dev || dev->priv) {
- struct device *olddev = dev;
-
- alloc_size = sizeof(struct device)
- + sizeof(struct tulip_private)
- + ETHNAMSIZ;
- alloc_size = ROUND_UP(alloc_size, 8);
-
- buff = (char *)kmalloc(alloc_size, GFP_KERNEL);
- dev = (struct device *)buff;
- if (dev == NULL) {
- printk("tulip_alloc: kmalloc failed.\n");
- return(NULL);
- }
- tp = (struct tulip_private *)(buff + sizeof(struct device));
- memset(buff, 0, alloc_size);
- dev->priv = (void *)tp;
- dev->name = (char *)(buff + sizeof(struct device)
- + sizeof(struct tulip_private));
- if (olddev) {
- dev->next = olddev->next;
- olddev->next = dev;
- }
- } else {
- alloc_size = ROUND_UP(sizeof(struct tulip_private), 8);
- tp = (struct tulip_private *)kmalloc(alloc_size, GFP_KERNEL);
- memset((void *)tp, 0, alloc_size);
- dev->priv = (void *)tp;
- }
- return(dev);
- }
-
int
tulip_hwinit(struct device *dev, int ioaddr,
int irq, int device_id)
--- 1141,1146 ----
***************
*** 1181,1186 ****
--- 1147,1153 ----
{
/* See note below on the Znyx 315 etherarray. */
static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'};
+ static int last_irq;
char detect_mesg[80], *mesgp=detect_mesg;
struct tulip_private *tp = (struct tulip_private *)dev->priv;
int i;
***************
*** 1250,1260 ****
--- 1217,1229 ----
for (i = 0; i < ETH_ALEN - 1; i++)
dev->dev_addr[i] = last_phys_addr[i];
dev->dev_addr[i] = last_phys_addr[i] + 1;
+ irq = last_irq;
}
for (i = 0; i < ETH_ALEN - 1; i++)
mesgp += sprintf(mesgp, "%2.2x:", dev->dev_addr[i]);
mesgp += sprintf(mesgp, "%2.2x, IRQ %d\n",
last_phys_addr[i] = dev->dev_addr[i], irq);
+ last_irq = irq;
/* copy ethernet address */
if (card_type(tp, device_id,
***************
*** 1276,1282 ****
dev->set_multicast_list = &set_multicast_list;
#ifdef MODULE
- ether_setup(dev);
if (if_port == TULIP_AUTO_PORT)
if_port = TULIP_PORT;
else
--- 1245,1250 ----
***************
*** 1283,1296 ****
tp->port_fix = 1;
dev->if_port = if_port;
tp->full_duplex = full_duplex;
#else
#ifdef TULIP_FULL_DUPLEX
tp->full_duplex = 1;
#endif
- init_etherdev(dev, 0);
dev->if_port = TULIP_PORT;
#endif
-
#ifdef TULIP_FIX_PORT
tp->port_fix = 1;
#endif
--- 1251,1264 ----
tp->port_fix = 1;
dev->if_port = if_port;
tp->full_duplex = full_duplex;
+ tp->next_module = root_tulip_dev;
+ root_tulip_dev = dev;
#else
#ifdef TULIP_FULL_DUPLEX
tp->full_duplex = 1;
#endif
dev->if_port = TULIP_PORT;
#endif
#ifdef TULIP_FIX_PORT
tp->port_fix = 1;
#endif
***************
*** 1321,1334 ****
if (!pcibios_present()) return(-ENODEV);
! for (pci_index = 0; pci_index < 8; pci_index++) {
/* Search for the PCI_DEVICE_ID_DEV_TULIP* chips */
! for (cno = 0; pci_chips[cno] != PCI_DEVICE_ID_NONE; cno ++)
if (pcibios_find_device(PCI_VENDOR_ID_DEC,
pci_chips[cno],
pci_index, &pci_bus,
&pci_device_fn) == 0) {
- struct device *dp;
/* get IO address */
pcibios_read_config_dword(pci_bus, pci_device_fn,
--- 1289,1301 ----
if (!pcibios_present()) return(-ENODEV);
! for (pci_index = 0; pci_index < 0xff; pci_index++) {
/* Search for the PCI_DEVICE_ID_DEV_TULIP* chips */
! for (cno = 0; pci_chips[cno] != PCI_DEVICE_ID_NONE; cno++) {
if (pcibios_find_device(PCI_VENDOR_ID_DEC,
pci_chips[cno],
pci_index, &pci_bus,
&pci_device_fn) == 0) {
/* get IO address */
pcibios_read_config_dword(pci_bus, pci_device_fn,
***************
*** 1336,1354 ****
&pci_ioaddr);
/* Remove I/O space marker in bit 0. */
pci_ioaddr &= ~3;
- for (dp = tulip_head; dp != NULL; dp = dp->next)
- if (dp->base_addr == pci_ioaddr) break;
- if (dp) continue;
/* get IRQ */
! pcibios_read_config_byte(pci_bus, pci_device_fn,
! PCI_INTERRUPT_LINE, &pci_irq);
! #ifdef MODULE
! /* compare requested IRQ/IO address */
! if (dev && dev->base_addr &&
! dev->base_addr != pci_ioaddr) continue;
! #else
! if ((dev = tulip_alloc(dev)) == NULL) break;
! #endif
if (!tulip_head) {
printk(version);
tulip_head = dev;
--- 1303,1316 ----
&pci_ioaddr);
/* Remove I/O space marker in bit 0. */
pci_ioaddr &= ~3;
/* get IRQ */
! pcibios_read_config_byte(pci_bus, pci_device_fn, PCI_INTERRUPT_LINE, &pci_irq);
! dev = init_etherdev(NULL,
! ROUND_UP(sizeof(struct device) +
! sizeof (struct tulip_private) +
! ETHNAMSIZ, 8));
!
! if (dev == NULL) break;
if (!tulip_head) {
printk(version);
tulip_head = dev;
***************
*** 1375,1388 ****
PCI_LATENCY_TIMER, 100);
}
if (tulip_hwinit(dev, pci_ioaddr, pci_irq,
! pci_chips[cno]) < 0) continue;
! num ++;
! #ifdef MODULE
! return(0);
! #endif
#ifdef TULIP_MAX_CARDS
if (num >= TULIP_MAX_CARDS) return(0);
#endif
}
}
return(num > 0 ? 0: -ENODEV);
--- 1337,1350 ----
PCI_LATENCY_TIMER, 100);
}
if (tulip_hwinit(dev, pci_ioaddr, pci_irq,
! pci_chips[cno]) < 0) {
! continue;
! }
! num++;
#ifdef TULIP_MAX_CARDS
if (num >= TULIP_MAX_CARDS) return(0);
#endif
+ }
}
}
return(num > 0 ? 0: -ENODEV);
***************
*** 1389,1430 ****
}
#ifdef MODULE
- #ifdef __alpha__
- #if 1
- static int io = 0xb000;
- #else
- static int io = 0x10400;
- #endif
- #else
- static int io = 0xfc80;
- #endif
! static struct device *mod_dev;
! int init_module(void)
{
! if ((mod_dev = tulip_alloc(0)) == NULL) return(-EIO);
!
! mod_dev->base_addr = io;
! mod_dev->irq = 0;
! mod_dev->init = &tulip_probe;
!
! if (register_netdev(mod_dev)) {
! printk("tulip: register_netdev() returned non-zero.\n");
! kfree_s(mod_dev, alloc_size);
! return -EIO;
! }
! return(0);
}
void
cleanup_module(void)
{
! release_region(mod_dev->base_addr, TULIP_TOTAL_SIZE);
! unregister_netdev(mod_dev);
! kfree_s(mod_dev, alloc_size);
! }
#endif /* MODULE */
\f
--- 1351,1384 ----
}
#ifdef MODULE
! /* The parameters that may be passed in... */
! /* This driver does nothing with options yet. It will later be used to
! pass the full-duplex flag, etc. */
! int debug = -1;
! int
! init_module(void)
{
! root_tulip_dev = NULL;
! return tulip_probe(NULL);
}
void
cleanup_module(void)
{
! struct device *next_dev;
+ /* No need to check MOD_IN_USE, as sys_delete_module() checks. */
+ while (root_tulip_dev) {
+ next_dev =
+ ((struct tulip_private *) root_tulip_dev->priv)->next_module;
+ unregister_netdev(root_tulip_dev);
+ release_region(root_tulip_dev->base_addr, TULIP_TOTAL_SIZE);
+ kfree(root_tulip_dev);
+ root_tulip_dev = next_dev;
+ }
+ }
#endif /* MODULE */
\f
----- End Included Message -----
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Tulip driver in 2.0.24
@ 1996-11-04 3:56 Brian Topping
0 siblings, 0 replies; 8+ messages in thread
From: Brian Topping @ 1996-11-04 3:56 UTC (permalink / raw)
Aiya aiya....
Seems like everyone has a fix for this! ;-)
I see this as a feature. The multicast patch that we just got done
dealing with in 2.0.24 was a bug fix. If it doesn't make it into
2.0.2x, it doesn't mean that it won't work, it just means that you'll
have to use your own version. 2.1.x will have the "preferred" code, and
it will get tested Real Good. Once 2.2 hits, everyone will be happy as
a clam.
I agree that it would be nice to put this all in now, but but but...
I dunno, I'll be interested in seeing what you guys decide, I am
ambivalent at this point. Let's figure out who's patch we are going to
use, pass it around to test it, and get it done already...
take care,
-B
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1996-11-04 3:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-11-04 3:56 Tulip driver in 2.0.24 Brian Topping
-- strict thread matches above, loose matches on Subject: below --
1996-11-03 22:56 Matthew Jacob
1996-11-03 21:55 Brian Topping
1996-11-03 21:39 Brian Topping
[not found] <torvalds@cs.helsinki.fi>
1996-11-03 19:48 ` Franz Sirl
1996-11-03 22:48 ` Franz Sirl
[not found] <Pine.LNX.3.91.961103171333.329A-100000@rebekka.tu-graz.ac.at>
1996-11-03 17:06 ` Ion Badulescu
1996-11-03 16:19 Linux support
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox