NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/50672: urtwn: fix a typo in urtwn_chip_stop()
>Number: 50672
>Category: kern
>Synopsis: urtwn: fix a typo in urtwn_chip_stop()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 17 21:35:00 +0000 2016
>Originator: Andriy Voskoboinyk
>Release:
>Organization:
>Environment:
>Description:
There is a (probably, copy-paste) typo:
static void
urtwn_chip_stop(struct urtwn_softc *sc)
{
...
urtwn_write_4(sc, R92C_GPIO_PIN_CTRL, reg);
/* Disable GPIO[10:8] */
urtwn_write_1(sc, R92C_GPIO_MUXCFG + 3, 0x00);
reg = urtwn_read_2(sc, R92C_GPIO_MUXCFG + 2) & ~0x00f0;
reg |= (((reg & 0x000f) << 4) | 0x0780);
urtwn_write_2(sc, R92C_GPIO_PIN_CTRL+2, reg); << wrong register is used here (0x044+2 instead of 0x040+2)
...
}
Vendor's driver implementation:
static VOID
_DisableGPIO(
...
//2. Disable GPIO[10:8]
rtw_write8(Adapter, REG_GPIO_MUXCFG+3, 0x00);
value16 = rtw_read16(Adapter, REG_GPIO_MUXCFG+2) & 0xFF0F;
value8 = (u8) (value16&0x000F);
value16 |= ((value8<<4) | 0x0780);
rtw_write16(Adapter, REG_GPIO_MUXCFG+2, value16);
...
}
>How-To-Repeat:
>Fix:
Replace R92C_GPIO_PIN_CTRL+2 in the last copied line with R92C_GPIO_MUXCFG + 2 (or with R92C_GPIO_IO_SEL)
Home |
Main Index |
Thread Index |
Old Index