Bläddra i källkod

[sky2] Use 32-bit 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.

[This patch is copied directly from the Linux kernel tree.]

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Mike McCormack 7 år sedan
förälder
incheckning
a317e9a310
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1
    1
      src/drivers/net/sky2.c
  2. 1
    1
      src/drivers/net/sky2.h

+ 1
- 1
src/drivers/net/sky2.c Visa fil

@@ -246,7 +246,7 @@ static void sky2_power_aux(struct sky2_hw *hw)
246 246
 			    Y2_COR_CLK_LNK2_DIS | Y2_CLK_GAT_LNK2_DIS);
247 247
 
248 248
 	/* switch power to VAUX */
249
-	if (sky2_read16(hw, B0_CTST) & Y2_VAUX_AVAIL)
249
+	if (sky2_read32(hw, B0_CTST) & Y2_VAUX_AVAIL)
250 250
 		sky2_write8(hw, B0_POWER_CTRL,
251 251
 			    (PC_VAUX_ENA | PC_VCC_ENA |
252 252
 			     PC_VAUX_ON | PC_VCC_OFF));

+ 1
- 1
src/drivers/net/sky2.h Visa fil

@@ -294,7 +294,7 @@ enum csr_regs {
294 294
 	Y2_CFG_AER      = 0x1d00,	/* PCI Advanced Error Report region */
295 295
 };
296 296
 
297
-/*	B0_CTST			16 bit	Control/Status register */
297
+/*	B0_CTST			24 bit	Control/Status register */
298 298
 enum {
299 299
 	Y2_VMAIN_AVAIL	= 1<<17,/* VMAIN available (YUKON-2 only) */
300 300
 	Y2_VAUX_AVAIL	= 1<<16,/* VAUX available (YUKON-2 only) */

Laddar…
Avbryt
Spara