|
@@ -1005,12 +1005,15 @@ static bool ncsi_check_hwa(struct ncsi_dev_priv *ndp)
|
|
|
struct ncsi_package *np;
|
|
|
struct ncsi_channel *nc;
|
|
|
unsigned int cap;
|
|
|
+ bool has_channel = false;
|
|
|
|
|
|
/* The hardware arbitration is disabled if any one channel
|
|
|
* doesn't support explicitly.
|
|
|
*/
|
|
|
NCSI_FOR_EACH_PACKAGE(ndp, np) {
|
|
|
NCSI_FOR_EACH_CHANNEL(np, nc) {
|
|
|
+ has_channel = true;
|
|
|
+
|
|
|
cap = nc->caps[NCSI_CAP_GENERIC].cap;
|
|
|
if (!(cap & NCSI_CAP_GENERIC_HWA) ||
|
|
|
(cap & NCSI_CAP_GENERIC_HWA_MASK) !=
|
|
@@ -1021,8 +1024,13 @@ static bool ncsi_check_hwa(struct ncsi_dev_priv *ndp)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- ndp->flags |= NCSI_DEV_HWA;
|
|
|
- return true;
|
|
|
+ if (has_channel) {
|
|
|
+ ndp->flags |= NCSI_DEV_HWA;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ ndp->flags &= ~NCSI_DEV_HWA;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
static int ncsi_enable_hwa(struct ncsi_dev_priv *ndp)
|