Skip to content

Commit 72c6068

Browse files
mikemccormackdavem330
authored andcommitted
sky2: Use 32bit read to read Y2_VAUX_AVAIL
B0_CTST is a 24bit register according to the vendor driver (sk98lin). A 16bit read on B0_CTST will always return 0 for Y2_VAUX_AVAIL (1<<16), so use a 32bit read when testing Y2_VAUX_AVAIL Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 90bbebb commit 72c6068

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/sky2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static void sky2_power_aux(struct sky2_hw *hw)
273273
Y2_COR_CLK_LNK2_DIS | Y2_CLK_GAT_LNK2_DIS);
274274

275275
/* switch power to VAUX */
276-
if (sky2_read16(hw, B0_CTST) & Y2_VAUX_AVAIL)
276+
if (sky2_read32(hw, B0_CTST) & Y2_VAUX_AVAIL)
277277
sky2_write8(hw, B0_POWER_CTRL,
278278
(PC_VAUX_ENA | PC_VCC_ENA |
279279
PC_VAUX_ON | PC_VCC_OFF));

drivers/net/sky2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ enum csr_regs {
260260
Y2_CFG_AER = 0x1d00, /* PCI Advanced Error Report region */
261261
};
262262

263-
/* B0_CTST 16 bit Control/Status register */
263+
/* B0_CTST 24 bit Control/Status register */
264264
enum {
265265
Y2_VMAIN_AVAIL = 1<<17,/* VMAIN available (YUKON-2 only) */
266266
Y2_VAUX_AVAIL = 1<<16,/* VAUX available (YUKON-2 only) */

0 commit comments

Comments
 (0)