Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37ebb549 authored by Petr Mladek's avatar Petr Mladek Committed by Greg Kroah-Hartman
Browse files

usb: hub: rename khubd to hub_wq in documentation and comments



USB hub has started to use a workqueue instead of kthread. Let's update
the documentation and comments here and there.

This patch mostly just replaces "khubd" with "hub_wq". There are only few
exceptions where the whole sentence was updated. These more complicated
changes can be found in the following files:

	   Documentation/usb/hotplug.txt
	   drivers/net/usb/usbnet.c
	   drivers/usb/core/hcd.c
	   drivers/usb/host/ohci-hcd.c
	   drivers/usb/host/xhci.c

Signed-off-by: default avatarPetr Mladek <pmladek@suse.cz>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 59d48b3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -593,7 +593,7 @@ for (;;) {
	    Each device has one control endpoint (endpoint zero)
	    Each device has one control endpoint (endpoint zero)
	    which supports a limited RPC style RPC access.
	    which supports a limited RPC style RPC access.
	    Devices are configured
	    Devices are configured
	    by khubd (in the kernel) setting a device-wide
	    by hub_wq (in the kernel) setting a device-wide
	    <emphasis>configuration</emphasis> that affects things
	    <emphasis>configuration</emphasis> that affects things
	    like power consumption and basic functionality.
	    like power consumption and basic functionality.
	    The endpoints are part of USB <emphasis>interfaces</emphasis>,
	    The endpoints are part of USB <emphasis>interfaces</emphasis>,
+3 −3
Original line number Original line Diff line number Diff line
@@ -308,7 +308,7 @@ HC picks the /DN_Connect/ out (nep module sends to notif.c for delivery
into /devconnect/). This process starts the authentication process for
into /devconnect/). This process starts the authentication process for
the device. First we allocate a /fake port/ and assign an
the device. First we allocate a /fake port/ and assign an
unauthenticated address (128 to 255--what we really do is
unauthenticated address (128 to 255--what we really do is
0x80 | fake_port_idx). We fiddle with the fake port status and /khubd/
0x80 | fake_port_idx). We fiddle with the fake port status and /hub_wq/
sees a new connection, so he moves on to enable the fake port with a reset.
sees a new connection, so he moves on to enable the fake port with a reset.


So now we are in the reset path -- we know we have a non-yet enumerated
So now we are in the reset path -- we know we have a non-yet enumerated
@@ -317,7 +317,7 @@ device with an unauthorized address; we ask user space to authenticate
exchange (FIXME: not yet done) and issue a /set address 0/ to bring the
exchange (FIXME: not yet done) and issue a /set address 0/ to bring the
device to the default state. Device is authenticated.
device to the default state. Device is authenticated.


From here, the USB stack takes control through the usb_hcd ops. khubd
From here, the USB stack takes control through the usb_hcd ops. hub_wq
has seen the port status changes, as we have been toggling them. It will
has seen the port status changes, as we have been toggling them. It will
start enumerating and doing transfers through usb_hcd->urb_enqueue() to
start enumerating and doing transfers through usb_hcd->urb_enqueue() to
read descriptors and move our data.
read descriptors and move our data.
@@ -331,7 +331,7 @@ Keep Alive IE; it responds with a /DN_Alive/ pong during the DNTS (this
arrives to us as a notification through
arrives to us as a notification through
devconnect.c:wusb_handle_dn_alive(). If a device times out, we
devconnect.c:wusb_handle_dn_alive(). If a device times out, we
disconnect it from the system (cleaning up internal information and
disconnect it from the system (cleaning up internal information and
toggling the bits in the fake hub port, which kicks khubd into removing
toggling the bits in the fake hub port, which kicks hub_wq into removing
the rest of the stuff).
the rest of the stuff).


This is done through devconnect:__wusb_check_devs(), which will scan the
This is done through devconnect:__wusb_check_devs(), which will scan the
+1 −1
Original line number Original line Diff line number Diff line
@@ -58,7 +58,7 @@ USB POLICY AGENT


The USB subsystem currently invokes /sbin/hotplug when USB devices
The USB subsystem currently invokes /sbin/hotplug when USB devices
are added or removed from system.  The invocation is done by the kernel
are added or removed from system.  The invocation is done by the kernel
hub daemon thread [khubd], or else as part of root hub initialization
hub workqueue [hub_wq], or else as part of root hub initialization
(done by init, modprobe, kapmd, etc).  Its single command line parameter
(done by init, modprobe, kapmd, etc).  Its single command line parameter
is the string "usb", and it passes these environment variables:
is the string "usb", and it passes these environment variables:


+8 −6
Original line number Original line Diff line number Diff line
@@ -69,8 +69,9 @@
// reawaken network queue this soon after stopping; else watchdog barks
// reawaken network queue this soon after stopping; else watchdog barks
#define TX_TIMEOUT_JIFFIES	(5*HZ)
#define TX_TIMEOUT_JIFFIES	(5*HZ)


// throttle rx/tx briefly after some faults, so khubd might disconnect()
/* throttle rx/tx briefly after some faults, so hub_wq might disconnect()
// us (it polls at HZ/4 usually) before we report too many false errors.
 * us (it polls at HZ/4 usually) before we report too many false errors.
 */
#define THROTTLE_JIFFIES	(HZ/8)
#define THROTTLE_JIFFIES	(HZ/8)


// between wakeups
// between wakeups
@@ -595,9 +596,9 @@ static void rx_complete (struct urb *urb)
			  "rx shutdown, code %d\n", urb_status);
			  "rx shutdown, code %d\n", urb_status);
		goto block;
		goto block;


	/* we get controller i/o faults during khubd disconnect() delays.
	/* we get controller i/o faults during hub_wq disconnect() delays.
	 * throttle down resubmits, to avoid log floods; just temporarily,
	 * throttle down resubmits, to avoid log floods; just temporarily,
	 * so we still recover when the fault isn't a khubd delay.
	 * so we still recover when the fault isn't a hub_wq delay.
	 */
	 */
	case -EPROTO:
	case -EPROTO:
	case -ETIME:
	case -ETIME:
@@ -1185,8 +1186,9 @@ static void tx_complete (struct urb *urb)
		case -ESHUTDOWN:		// hardware gone
		case -ESHUTDOWN:		// hardware gone
			break;
			break;


		// like rx, tx gets controller i/o faults during khubd delays
		/* like rx, tx gets controller i/o faults during hub_wq
		// and so it uses the same throttling mechanism.
		 * delays and so it uses the same throttling mechanism.
		 */
		case -EPROTO:
		case -EPROTO:
		case -ETIME:
		case -ETIME:
		case -EILSEQ:
		case -EILSEQ:
+1 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@ Here is a list of what each subdirectory here is, and what is contained in
them.
them.


core/		- This is for the core USB host code, including the
core/		- This is for the core USB host code, including the
		  usbfs files and the hub class driver ("khubd").
		  usbfs files and the hub class driver ("hub_wq").


host/		- This is for USB host controller drivers.  This
host/		- This is for USB host controller drivers.  This
		  includes UHCI, OHCI, EHCI, and others that might
		  includes UHCI, OHCI, EHCI, and others that might
Loading