On Thu, 25 May 2006 03:51:03 -0700 (PDT)
"Linsys Contractor Amit S. Kale" <[EMAIL PROTECTED]> wrote:

> diff -Naru linux-2.6.16.18.orig/drivers/net/netxen/netxen_nic.h 
> linux-2.6.16.18/drivers/net/netxen/netxen_nic.h
> --- linux-2.6.16.18.orig/drivers/net/netxen/netxen_nic.h      1969-12-31 
> 16:00:00.000000000 -0800
> +++ linux-2.6.16.18/drivers/net/netxen/netxen_nic.h   2006-05-25 
> 02:43:22.000000000 -0700
> @@ -0,0 +1,950 @@
>
> +#define IP_ALIGNMENT_BYTES           2 /* make ip aligned on 16 bytes addr */

Please use NET_IP_ALIGN, it does the right architecture dependent
offset.

...
> +#define NETXEN_PCI_ID(X) { PCI_DEVICE(PCI_VENDOR_ID_NX, (X)) }

Nested macro's on macro's, just use PCI_DEVICE()

> +
> +#define PFX "netxen: "
> +
> +/* Note: Make sure to not call this before adapter->port is valid */
> +#if !defined(NETXEN_DEBUG)
> +#define DPRINTK(klevel, fmt, args...)        do { \
> +     } while (0)
> +#else
> +#define DPRINTK(klevel, fmt, args...)        do { \
> +     printk(KERN_##klevel PFX "%s: %s: " fmt, __FUNCTION__,\
> +             (adapter != NULL && adapter->port != NULL && \
> +             adapter->port[0] != NULL && \
> +             adapter->port[0]->netdev != NULL) ? \
> +             adapter->port[0]->netdev->name : NULL, \
> +             ## args); } while(0)
> +#endif
> +

Ugh. Macro with magic variable.  if you need to keep this, pass adapter.


> +struct netdev_list {
> +     struct netdev_list *next;
> +     struct net_device *netdev;
> +};

Why not use regular list.h or simple linked list.  Even better
figure out how to not need need "list of devices at all"

> +struct netxen_port_hw {
> +     unsigned char mac_addr[MAX_ADDR_LEN];
> +     int mtu;
> +     struct pci_dev *pdev;
> +     struct netxen_port *port;
> +};

Isn't mtu redundant with dev->mtu and mac_addr redundant
with dev->dev_addr


> +/* Following structure is for specific port information    */
> +
> +#define      NETXEN_PORT_UP                  0
> +#define      NETXEN_PORT_DOWN                1
> +#define      NETXEN_PORT_INITIALIAZED        2
> +#define      NETXEN_PORT_SUSPEND             3

Don't mirror port state with netdevice state because you risk
getting the two out of sync. Isn't this redundant with
netif_running()

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to