Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1739560

[PATCH 2/6] ath9k: add a quirk to set use_msi automatically

From AceLan Kao <acelan.kao@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 2/6] ath9k: add a quirk to set use_msi automatically
Date 2017-09-26 08:50 +0200
Message-ID <utRQS-150-31@gated-at.bofh.it> (permalink)
References <utRQR-150-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Some platform(BIOS) blocks legacy interrupts (INTx), and only allows MSI
for WLAN device. So adding a quirk to list those machines and set
use_msi automatically.
Adding Dell Inspiron 24-3460 to the quirk.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 drivers/net/wireless/ath/ath9k/init.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index b6b7a35..1667949 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -23,6 +23,7 @@
 #include <linux/of.h>
 #include <linux/of_net.h>
 #include <linux/relay.h>
+#include <linux/dmi.h>
 #include <net/ieee80211_radiotap.h>
 
 #include "ath9k.h"
@@ -96,6 +97,24 @@ static const struct ieee80211_tpt_blink ath9k_tpt_blink[] = {
 };
 #endif
 
+static int __init set_use_msi(const struct dmi_system_id *dmi)
+{
+	ath9k_use_msi = 1;
+	return 1;
+}
+
+static const struct dmi_system_id ath9k_quirks[] __initconst = {
+	{
+		.callback = set_use_msi,
+		.ident = "Dell Inspiron 24-3460",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 24-3460"),
+		},
+	},
+	{}
+};
+
 static void ath9k_deinit_softc(struct ath_softc *sc);
 
 static void ath9k_op_ps_wakeup(struct ath_common *common)
@@ -1104,6 +1123,8 @@ static int __init ath9k_init(void)
 		goto err_pci_exit;
 	}
 
+	dmi_check_system(ath9k_quirks);
+
 	return 0;
 
  err_pci_exit:
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/6] ath9k: add MSI support and use_msi parameter AceLan Kao <acelan.kao@canonical.com> - 2017-09-26 08:50 +0200
  [PATCH 6/6] ath9k: set use_msi=1 on Dell Inspiron 14-3473 AceLan Kao <acelan.kao@canonical.com> - 2017-09-26 08:50 +0200
  [PATCH 4/6] ath9k: set use_msi=1 on Dell Inspiron 3472 AceLan Kao <acelan.kao@canonical.com> - 2017-09-26 08:50 +0200
  [PATCH 2/6] ath9k: add a quirk to set use_msi automatically AceLan Kao <acelan.kao@canonical.com> - 2017-09-26 08:50 +0200
    Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically Christoph Hellwig <hch@infradead.org> - 2017-09-26 08:50 +0200
      Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically AceLan Kao <acelan.kao@canonical.com> - 2017-09-26 09:30 +0200
        Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically Christoph Hellwig <hch@infradead.org> - 2017-09-26 16:10 +0200
          Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically Kalle Valo <kvalo@codeaurora.org> - 2017-09-26 16:20 +0200
            Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically AceLan Kao <acelan.kao@canonical.com> - 2017-09-28 10:30 +0200
              Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically Daniel Drake <drake@endlessm.com> - 2017-10-02 06:30 +0200
  [PATCH 3/6] ath9k: set use_msi=1 on Dell Vostro 3262 AceLan Kao <acelan.kao@canonical.com> - 2017-09-26 08:50 +0200
  [PATCH 5/6] ath9k: set use_msi=1 on Dell Vostro 15-3572 AceLan Kao <acelan.kao@canonical.com> - 2017-09-26 08:50 +0200

csiph-web