public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<sarah.a.sharp@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Holger Hans Peter Freyther <holger@moiji-mobile.com>
Subject: [PATCH 02/10] xhci: 'noxhci_port_switch' kernel parameter
Date: Thu,  8 May 2014 19:25:55 +0300	[thread overview]
Message-ID: <1399566363-25837-3-git-send-email-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <1399566363-25837-1-git-send-email-mathias.nyman@linux.intel.com>

From: Dan Williams <dan.j.williams@intel.com>

Add a command line switch for disabling ehci port switchover.  Useful
for working around / debugging xhci incompatibilities where ehci
operation is available.

Reference: http://marc.info/?l=linux-usb&m=138920063001509&w=2

Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
 Documentation/kernel-parameters.txt |  3 +++
 drivers/usb/host/pci-quirks.c       | 15 +++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4384217..fc3403114 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2251,6 +2251,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
 	nox2apic	[X86-64,APIC] Do not enable x2APIC mode.
 
+	noxhci_port_switch
+			[USB] Use EHCI instead of XHCI where available
+
 	cpu0_hotplug	[X86] Turn on CPU0 hotplug feature when
 			CONFIG_BOOTPARAM_HOTPLUG_CPU0 is off.
 			Some features depend on CPU0. Known dependencies are:
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 00661d3..38bfe3d 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -823,6 +823,15 @@ static int handshake(void __iomem *ptr, u32 mask, u32 done,
 	return -ETIMEDOUT;
 }
 
+static int noxhci_port_switch;
+
+static int __init noxhci_port_switch_setup(char *str)
+{
+	noxhci_port_switch = 1;
+	return 0;
+}
+early_param("noxhci_port_switch", noxhci_port_switch_setup);
+
 /*
  * Intel's Panther Point chipset has two host controllers (EHCI and xHCI) that
  * share some number of ports.  These ports can be switched between either
@@ -860,8 +869,7 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev)
 		return;
 
 	/* Don't switchover the ports if the user hasn't compiled the xHCI
-	 * driver.  Otherwise they will see "dead" USB ports that don't power
-	 * the devices.
+	 * driver or has explicitly disabled switchover
 	 */
 	if (!IS_ENABLED(CONFIG_USB_XHCI_HCD)) {
 		dev_warn(&xhci_pdev->dev,
@@ -871,6 +879,9 @@ void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev)
 				"USB 3.0 devices will work at USB 2.0 speeds.\n");
 		usb_disable_xhci_ports(xhci_pdev);
 		return;
+	} else if (noxhci_port_switch) {
+		usb_disable_xhci_ports(xhci_pdev);
+		return;
 	}
 
 	/* Read USB3PRM, the USB 3.0 Port Routing Mask Register
-- 
1.8.3.2


  parent reply	other threads:[~2014-05-08 16:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 16:25 [PATCH 00/10] xhci: features for usb-next Mathias Nyman
2014-05-08 16:25 ` [PATCH 01/10] xhci: fix wrong port number reported when setting USB2.0 hardware LPM Mathias Nyman
2014-05-08 16:25 ` Mathias Nyman [this message]
2014-05-20  1:01   ` [PATCH 02/10] xhci: 'noxhci_port_switch' kernel parameter Greg KH
2014-05-20  9:47     ` Mathias Nyman
2014-05-20  9:51       ` Takashi Iwai
2014-05-20 18:25         ` Dan Williams
2014-05-20 19:04           ` Takashi Iwai
2014-05-20 20:34           ` Greg KH
2014-05-20 22:40             ` Dan Williams
2014-05-21  0:27               ` Greg KH
2014-05-21  6:21                 ` Dan Williams
2014-05-21  6:31                   ` Greg KH
2014-05-21 17:29                     ` Dan Williams
2014-05-21 17:52                       ` Alan Stern
2014-05-21 21:59                       ` Greg KH
2014-05-24  6:39               ` Holger Hans Peter Freyther
2014-05-24 14:13                 ` Dan Williams
2014-07-11 10:08                   ` Holger Hans Peter Freyther
2014-05-08 16:25 ` [PATCH 03/10] usb: catch attempts to submit urbs with a vmalloc'd transfer buffer Mathias Nyman
2014-05-08 16:21   ` Dan Williams
2014-05-12 15:01     ` Mathias Nyman
2014-05-20  0:58       ` Greg KH
2014-05-08 16:22   ` David Laight
2014-05-08 16:32     ` Dan Williams
2014-05-08 16:47   ` Joe Perches
2014-05-08 17:05     ` Dan Williams
2014-05-08 16:25 ` [PATCH 04/10] usb: xhci: Use IS_ENABLED() macro Mathias Nyman
2014-05-08 16:25 ` [PATCH 05/10] xhci: Use pci_enable_msix_exact() instead of pci_enable_msix() Mathias Nyman
2014-05-08 16:25 ` [PATCH 06/10] xhci: Report max device limit when Enable Slot command fails Mathias Nyman
2014-05-08 16:26 ` [PATCH 07/10] xhci: Use command structures when queuing commands on the command ring Mathias Nyman
2014-06-05 22:16   ` Dan Williams
2014-06-06  8:14     ` Mathias Nyman
2014-05-08 16:26 ` [PATCH 08/10] xhci: Add a global command queue Mathias Nyman
2014-05-08 16:26 ` [PATCH 09/10] xhci: Use completion and status in " Mathias Nyman
2014-05-08 16:26 ` [PATCH 10/10] xhci: rework command timeout and cancellation, Mathias Nyman
2014-05-15 15:44 ` [PATCH 00/10] xhci: features for usb-next Mathias Nyman
2014-05-20  1:04 ` Greg KH

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=1399566363-25837-3-git-send-email-mathias.nyman@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=holger@moiji-mobile.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sarah.a.sharp@linux.intel.com \
    /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