All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sky2 breakage
@ 2007-07-20 15:07 Al Viro
  2007-07-20 15:11 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2007-07-20 15:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: shemminger, jgarzik, linux-kernel

	Doing |= 1 << 19 to 16bit unsigned is not particulary useful;
that register is 32bit, unlike the ones dealt with in the rest of
function, so we need u32 variable here.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index a2f3215..13f08a3 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -692,6 +692,7 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
 {
 	struct sky2_port *sky2 = netdev_priv(hw->dev[port]);
 	u16 reg;
+	u32 rx_reg;
 	int i;
 	const u8 *addr = hw->dev[port]->dev_addr;
 
@@ -768,11 +769,11 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port)
 
 	/* Configure Rx MAC FIFO */
 	sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_CLR);
-	reg = GMF_OPER_ON | GMF_RX_F_FL_ON;
+	rx_reg = GMF_OPER_ON | GMF_RX_F_FL_ON;
 	if (hw->chip_id == CHIP_ID_YUKON_EX)
-		reg |= GMF_RX_OVER_ON;
+		rx_reg |= GMF_RX_OVER_ON;
 
-	sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), reg);
+	sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg);
 
 	/* Flush Rx MAC FIFO on any flow control or error */
 	sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sky2 breakage
  2007-07-20 15:07 [PATCH] sky2 breakage Al Viro
@ 2007-07-20 15:11 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2007-07-20 15:11 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, jgarzik, netdev

On Fri, 20 Jul 2007 16:07:33 +0100
Al Viro <viro@ftp.linux.org.uk> wrote:

> 	Doing |= 1 << 19 to 16bit unsigned is not particulary useful;
> that register is 32bit, unlike the ones dealt with in the rest of
> function, so we need u32 variable here.
> 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Yes, thanks.  This only applies to the YUKON_EX hardware support
that is new (post 2.6.22), and no one but me has the boards yet,
so not a big impact.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-20 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-20 15:07 [PATCH] sky2 breakage Al Viro
2007-07-20 15:11 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.