From: Prarit Bhargava <prarit@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Prarit Bhargava <prarit@redhat.com>, linux-usb@vger.kernel.org
Subject: [PATCH 27/34] drivers/usb changes for SMBIOS and System Firmware
Date: Mon, 18 Jul 2011 09:08:41 -0400 [thread overview]
Message-ID: <1310994528-26276-28-git-send-email-prarit@redhat.com> (raw)
In-Reply-To: <1310994528-26276-1-git-send-email-prarit@redhat.com>
As part of the new SMBIOS and System Firmware code:
- Replace old dmi* structures and functions with new sysfw* and smbios*
structures and functions in individual drivers
- cleanup sysfw_id lookup tables
- add exactmatch functionality
Cc: linux-usb@vger.kernel.org
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
drivers/usb/host/pci-quirks.c | 19 ++++++++++++++-----
drivers/usb/host/uhci-hcd.c | 2 +-
drivers/usb/host/uhci-pci.c | 15 +++++++++++----
3 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index fd93061..ae2a681 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -14,7 +14,7 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/acpi.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
#include "pci-quirks.h"
#include "xhci-ext-caps.h"
@@ -507,6 +507,18 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
iounmap(base);
}
+static const struct sysfw_id __devinitdata ehci_bios_handoff_table[] = {
+ {
+ .ident = "Pegatron Lucid (ExoPC) Tablet",
+ .matches = {
+ SYSFW_MATCH(SYSFW_BOARD_NAME, "EXOPG06411"),
+ SYSFW_MATCH(SYSFW_BIOS_VERSION, "Lucid-CE-133"),
+ },
+ .exactmatch = 1,
+ },
+ {}
+};
+
static void __devinit ehci_bios_handoff(struct pci_dev *pdev,
void __iomem *op_reg_base,
u32 cap, u8 offset)
@@ -517,10 +529,7 @@ static void __devinit ehci_bios_handoff(struct pci_dev *pdev,
* seconds trying the handoff on its unused controller. Skip
* it. */
if (pdev->vendor == 0x8086 && pdev->device == 0x283a) {
- const char *dmi_bn = dmi_get_system_info(DMI_BOARD_NAME);
- const char *dmi_bv = dmi_get_system_info(DMI_BIOS_VERSION);
- if (dmi_bn && !strcmp(dmi_bn, "EXOPG06411") &&
- dmi_bv && !strcmp(dmi_bv, "Lucid-CE-133"))
+ if (sysfw_callback(ehci_bios_handoff_table))
try_handoff = 0;
}
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index fba99b1..1b03b7a 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -40,7 +40,7 @@
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include <linux/bitops.h>
-#include <linux/dmi.h>
+#include <linux/sysfw.h>
#include <asm/uaccess.h>
#include <asm/io.h>
diff --git a/drivers/usb/host/uhci-pci.c b/drivers/usb/host/uhci-pci.c
index c300bd2..ef3de10 100644
--- a/drivers/usb/host/uhci-pci.c
+++ b/drivers/usb/host/uhci-pci.c
@@ -88,18 +88,25 @@ static int uhci_pci_resume_detect_interrupts_are_broken(struct uhci_hcd *uhci)
return 0;
}
+static const struct sysfw_id bad_Asus_board_id[] = {
+ {
+ .ident = "A7V8X",
+ .matches = {
+ SYSFW_MATCH(SYSFW_BOARD_NAME, "A7V8X"),
+ },
+ },
+ {}
+};
+
static int uhci_pci_global_suspend_mode_is_broken(struct uhci_hcd *uhci)
{
int port;
- const char *sys_info;
- static const char bad_Asus_board[] = "A7V8X";
/* One of Asus's motherboards has a bug which causes it to
* wake up immediately from suspend-to-RAM if any of the ports
* are connected. In such cases we will not set EGSM.
*/
- sys_info = dmi_get_system_info(DMI_BOARD_NAME);
- if (sys_info && !strcmp(sys_info, bad_Asus_board)) {
+ if (sysfw_callback(bad_Asus_board_id)) {
for (port = 0; port < uhci->rh_numports; ++port) {
if (inw(uhci->io_addr + USBPORTSC1 + port * 2) &
USBPORTSC_CCS)
--
1.6.5.2
next prev parent reply other threads:[~2011-07-18 13:13 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 13:08 [PATCH 00/34] System Firmware and SMBIOS Support [v3] Prarit Bhargava
2011-07-18 13:08 ` [PATCH 01/34] System Firmware Interface Prarit Bhargava
2011-07-19 0:43 ` Andi Kleen
2011-07-19 9:05 ` Alan Cox
2011-07-19 12:23 ` Prarit Bhargava
2011-07-19 13:25 ` Andi Kleen
2011-07-19 13:52 ` Prarit Bhargava
2011-07-19 13:21 ` Andi Kleen
2011-07-19 13:39 ` Prarit Bhargava
2011-07-19 13:46 ` Andi Kleen
2011-07-19 13:58 ` Prarit Bhargava
2011-07-25 19:03 ` [lm-sensors] " Jean Delvare
2011-08-10 13:26 ` Prarit Bhargava
2011-07-18 13:08 ` [PATCH 02/34] New SMBIOS driver for x86 and ia64 Prarit Bhargava
2011-07-18 13:08 ` [PATCH 03/34] arch specific changes for SMBIOS and System Firmware Prarit Bhargava
2011-07-18 13:08 ` [PATCH 04/34] drivers/acpi changes for SMBIOS and System Firmware interface Prarit Bhargava
2011-07-18 13:08 ` [PATCH 05/34] drivers/ata changes for SMBIOS and System Firmware Prarit Bhargava
2011-07-18 13:08 ` [PATCH 06/34] drivers/floppy " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 07/34] drivers/char " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 08/34] drivers/crypto " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 09/34] drivers/gpio " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 10/34] drivers/gpu " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 11/34] drivers/hwmon " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 12/34] drivers/i2c " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 13/34] drivers/ide " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 14/34] drivers/input " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 15/34] drivers/leds " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 16/34] drivers/media " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 17/34] drivers/misc " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 18/34] drivers/mtd " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 19/34] drivers/net " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 20/34] drivers/pci " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 21/34] drivers/platform " Prarit Bhargava
2011-08-11 4:30 ` Jonathan Woithe
2011-07-18 13:08 ` [PATCH 22/34] drivers/pnp " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 23/34] drivers/power " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 24/34] drivers/rtc " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 25/34] drivers/staging " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 26/34] drivers/tty " Prarit Bhargava
2011-07-18 13:08 ` Prarit Bhargava [this message]
2011-07-19 19:47 ` [PATCH 27/34] drivers/usb " Alan Stern
2011-07-18 13:08 ` [PATCH 28/34] drivers/video " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 29/34] drivers/w1 " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 30/34] drivers/watchdog " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 31/34] include/linux/acpi.h " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 32/34] Kernel panic " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 33/34] sound/pci/hda " Prarit Bhargava
2011-07-18 13:08 ` [PATCH 34/34] Remove old DMI & SMBIOS code and make SMBIOS default on Prarit Bhargava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310994528-26276-28-git-send-email-prarit@redhat.com \
--to=prarit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome