]> git.baikalelectronics.ru Git - kernel.git/commit
amd-xgbe: Fix maximum GPIO value check
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Tue, 15 Nov 2016 22:11:15 +0000 (16:11 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 18:57:44 +0000 (13:57 -0500)
commit14c9a74fd8392759ca21af7455cdc5dd0becd181
tree05373315f75629a5eb73e1601f1a8b4020aa6aa6
parent00d3ea45d56637ce23cdc630b803a92fa9bf78e0
amd-xgbe: Fix maximum GPIO value check

The GPIO support in the hardware allows for up to 16 GPIO pins, enumerated
from 0 to 15.  The driver uses the wrong value (16) to validate the GPIO
pin range in the routines to set and clear the GPIO output pins.  Update
the code to use the correct value (15).

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-dev.c