This patch fixes a race condition that caused the HWA_HC interface probe
function to occasionally fail. The HWA_HC would attempt to register
itself with the HWA_RC by searching for a uwb_rc class device with the
same parent device ptr. If the probe function for the HWA_RC interface
had yet to run, the uwb_rc class device would not have been created
causing the look up to fail and the HWA_HC probe function to return an
error causing the device to be unusable.
The fix is for the HWA to delay registering with the HWA_RC until
receiving the command from userspace to start the wireless channel. It
is the responsibility of userspace to ensure that the uwb_rc class
device has been created before starting the HWA channel.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch adds a sysfs attribute for the wireless host controller
transaction retry count. It also changes the default value from 15
retries to infinite retries because the driver currently does not handle
retry errors gracefully.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch adds a sysfs attribute for the wireless USB host controller
device notification transmit slot(DNTS) count and interval. It also
changes the defaults from 16 slots in every MMC to a more reasonable 4
slots every 2ms.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch reduces the keepalive threshold of WUSB host controllers from
timeout/2 to timeout/3. The keepalive timer fires every timeout/2 ms, but
due to rounding errors and jitter, the host may decide not to send a
keepalive at timeout/2. By the time the next timer fires, a full timeout
period may have expired causing the device to be disconnected without ever
having been sent a keepalive. Changing the keepalive threshold to
timeout/3 ensures that at least one keepalive will be sent before a device
is disconnected. The patch also updates the code to use msecs_to_jiffies
consistently.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In wusb_cluster_id_get(), if no zero bits exist in wusb_cluster_id_table,
find_first_zero_bit() returns CLUSTER_IDS.
But it is impossible to detect that the bitmap is full because there
is an off-by-one error in the return value check. It will cause
unexpected memory access by setting bit out of wusb_cluster_id_table
bitmap, and caller will get wrong cluster id.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add the wusb_phy_rate sysfs file to Wireless USB host controllers. This
sets the maximum PHY rate that will be used for all connected devices.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Make the wusb_chid sysfs file match the ABI documentation.
Print all zeros if the WUSB host is stopped (instead of an empty file)
and end the file with a newline.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix an oops in wusbhc_giveback_urb() if the wusb device had disconnected
while an urb was in progress. Also release the ref count obtained here.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a facility for PALs to have symlinks to their radio controller
(and vice-versa) and make WUSB host controllers use this.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Add support for Ceritified Wireless USB 1.0 to the USB stack.
This has been split into several patches for easier review.
core (this patch):
- host controller infrastructure
- cluster reservation
- UWB PAL registration
- fake root hub
protocol:
- MMC management (start/stop, managing IEs)
- device connection
security:
- device authentication and authorization
build-system:
- Kconfig and Kbuild files
Signed-off-by: David Vrabel <david.vrabel@csr.com>