Re: [PATCH] s390 (6/7): network drivers.

From: Martin Schwidefsky
Date: Fri Sep 12 2003 - 03:47:43 EST



Hi Jeff,

> > - spin_lock_init(&card->wait_q_lock);
> > + /* setup net_device stuff */
> > + card->dev->priv = card;
> > +
> > + strncpy(card->dev->name, card->dev_name, IFNAMSIZ);
>
> what's this about? Why avoid the net stack's dev->name assignment?
This is indeed strange, because in qeth_init_netdev the name is copied
from the net_device to the card structure. Seems like the card->dev_name
is superflous. I'll ask our networking guys.


> > + QETH_DBF_TEXT3(0, trace, "alloccrd");
> > + card = (struct qeth_card *) vmalloc(sizeof (struct qeth_card));
> > + if (!card)
> > + return NULL;
>
> Is the card's private info really so large that you need vmalloc() ?
For 31 bit struct qeth_card has 55808 bytes for 64 bit 64256. We could
allocate it with kmalloc but overall the qeth driver allocates a LOT of
memory with vmalloc. The inbound/outbound queues are quite big and the
qeth_card structure is almost neglectable...

blue skies,
Martin


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/