lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20110531155341.3615.68693.sendpatchset@prarit.bos.redhat.com>
Date:	Tue, 31 May 2011 11:53:42 -0400
From:	Prarit Bhargava <prarit@...hat.com>
To:	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Cc:	Prarit Bhargava <prarit@...hat.com>
Subject: [RFC PATCH 28/35] drivers/usb changes for SMBIOS and System Firmware

drivers/usb changes for SMBIOS and System Firmware

---
 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 c300bd2f7..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.7.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ