[ofa-general] [PATCH 3/5] nes: fix link reset for certain phy types

Sean Hefty sean.hefty at intel.com
Fri Nov 30 10:38:14 PST 2007


>@@ -2102,7 +2102,7 @@ int nes_cm_disconn_true(struct nes_qp *nesqp)
> 	struct iw_cm_id *cm_id;
> 	struct iw_cm_event cm_event;
> 	struct nes_vnic *nesvnic;
>-	struct nes_cm_node *cm_node = NULL;
>+	/* struct nes_cm_node *cm_node = NULL; */

Just delete this.

>+static void nes_reset_link(struct nes_device *nesdev, u32 mac_index)
>+{
>+	struct nes_adapter *nesadapter = nesdev->nesadapter;
>+	u32 reset_value;
>+	u32 i=0;
>+
>+	if (nesadapter->hw_rev == NE020_REV) {
>+		return;
>+	}
>+
>+

Extra blank line and {} are not needed.

>+	reset_value = nes_read32(nesdev->regs+NES_SOFTWARE_RESET);
>+	if ((mac_index == 0)||((mac_index == 1) && (nesadapter->OneG_Mode))) {
>+		reset_value |= 0x0000001d;
>+	} else {
>+		reset_value |= 0x0000002d;
>+	}

{}'s are not needed.

>+	nes_write32(nesdev->regs+NES_SOFTWARE_RESET, reset_value);

Need spacing around '+' - similar spacing issues in other places

>+
>+	while (((nes_read32(nesdev->regs+NES_SOFTWARE_RESET)
>+			& 0x00000040) != 0x00000040) && (i++ < 5000)) {
>+	}

Is there a better way to wait for the read?

>+
>+
>+
>+}

Lots of extra blank lines

- Sean



More information about the general mailing list