Skip to content

Commit

Permalink
typhoon: set_settings broken on big-endian
Browse files Browse the repository at this point in the history
One cpu_to_le16() too many when passing argument for TYPHOON_CMD_XCVR_SELECT;
we end up passing host-endian while the hardware expects little-endian.  The
other place doing that (typhoon_start_runtime()) does the right thing, so the
card will recover at the next ifconfig up/tx timeout/resume, which limits the
amount of mess, but still, WTF?

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Al Viro authored and Jeff Garzik committed Dec 23, 2007
1 parent fdcfd77 commit b46281f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/typhoon.c
Original file line number Diff line number Diff line change
@@ -1157,7 +1157,7 @@ typhoon_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
}

INIT_COMMAND_NO_RESPONSE(&xp_cmd, TYPHOON_CMD_XCVR_SELECT);
xp_cmd.parm1 = cpu_to_le16(xcvr);
xp_cmd.parm1 = xcvr;
err = typhoon_issue_command(tp, 1, &xp_cmd, 0, NULL);
if(err < 0)
goto out;

0 comments on commit b46281f

Please sign in to comment.