Linsys Contractor Amit S. Kale <[EMAIL PROTECTED]> :
> diff -Naru linux-2.6.16_orig/drivers/net/netxen/netxen_nic_hw.c
> linux-2.6.16/drivers/net/netxen/netxen_nic_hw.c
> --- linux-2.6.16_orig/drivers/net/netxen/netxen_nic_hw.c 1969-12-31
> 16:00:00.000000000 -0800
> +++ linux-2.6.16/drivers/net/netxen/netxen_nic_hw.c 2006-03-24
> 14:13:57.000000000 -0800
[...]
> +int
> +netxen_nic_hw_write_wx(netxen_adapter *adapter, u64 off, void *data, int len)
> +{//This is modified from _netxen_nic_hw_write()._netxen_nic_hw_write does
> not exist now.
> + void *addr;
Add some __iomem annotation ?
[...]
> +void netxen_nic_set_link_parameters(struct netxen_port *port)
> +{
> + struct netxen_adapter_s *adapter = port->adapter;
> + netxen_niu_phy_status_t status;
> + uint16_t autoneg;
> + netxen_niu_control_t mode;
> +
> + netxen_nic_read_w0(adapter, NetXen_NIU_MODE, (uint32_t *)&mode);
> + if(mode.enable_ge) { // Gb 10/100/1000 Mbps mode
> + if (netxen_nic_phy_read(port->adapter,port->portnum,
> + NetXen_NIU_GB_MII_MGMT_ADDR_PHY_STATUS,
> + (netxen_crbword_t *)&status) == 0) {
> + if(status.link) {
Please use goto and shift everything left...
[...]
> + } else {
> + port->state = -1;
> + port->link_speed = -1;
> + port->link_duplex = -1;
> + }
> + } else {
> + port->state = -1;
> + port->link_speed = -1;
> + port->link_duplex = -1;
> + }
... it should help factoring this stuff.
--
Ueimor
-
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