History log of /linux-master/drivers/usb/host/fhci-sched.c
Revision Date Author Comments
# b13fecb1 13-Jul-2020 Kees Cook <keescook@chromium.org>

treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()

This converts all the existing DECLARE_TASKLET() (and ...DISABLED)
macros with DECLARE_TASKLET_OLD() in preparation for refactoring the
tasklet callback type. All existing DECLARE_TASKLET() users had a "0"
data argument, it has been removed here as well.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>


# a6a6d06f 06-Jul-2020 Lee Jones <lee.jones@linaro.org>

usb: host: fhci-sched: Remove unused variable 'td'

'td' has been completely unused since the driver's inception in 2009.

Fixes the following W=1 kernel build warning(s):

drivers/usb/host/fhci-sched.c: In function ‘fhci_queue_urb’:
drivers/usb/host/fhci-sched.c:704:13: warning: variable ‘td’ set but not used [-Wunused-but-set-variable]
704 | struct td *td;
| ^~

Cc: Shlomi Gridish <gridish@freescale.com>
Cc: Jerry Huang <Chang-Ming.Huang@freescale.com>
Cc: Peter Barada <peterb@logicpd.com>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200706133341.476881-32-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9bcb762c 18-Apr-2019 Yan Zhu <zhuyan34@huawei.com>

usb: host: use usb_endpoint_maxp instead of usb_maxpacket

fhci_queue_urb() shouldn't use urb->pipe to compute the maxpacket
size anyway.It should use usb_endpoint_maxp(&urb->ep->desc).

Signed-off-by: Yan Zhu <zhuyan34@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fc4e404d 06-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: host: fhci: Remove redundant license text

Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5fd54ace 03-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: add SPDX identifiers to all remaining files in drivers/usb/

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2b4ba254 08-May-2016 Heinrich Schuchardt <xypron.glpk@gmx.de>

USB: FHCI: avoid redundant condition

The right part of the following or expression is only evaluated if
td is nonzero.
!td || (td && td.status == USB_TD_INPROGRESS)
So no need to check td again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7aa1aa6e 29-Nov-2015 Zhao Qiang <qiang.zhao@freescale.com>

QE: Move QE from arch/powerpc to drivers/soc

ls1 has qe and ls1 has arm cpu.
move qe from arch/powerpc to drivers/soc/fsl
to adapt to powerpc and arm

Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>


# f467ff4c 29-May-2013 Alan Stern <stern@rowland.harvard.edu>

USB: FHCI: upgrade the isochronous API

This patch attempts to fix the isochronous API in the fhci-hcd
driver. There are two problems with the current code:

ed->last_iso is used but not set anywhere. The patch changes
its name to ed->next_iso and uses it to store the frame number
of the next available slot in the isochronous stream.

urb->start_frame isn't set when the URB_ISO_ASAP flag is off.
The patch sets it to the next available slot if the stream is
in use, or the current frame otherwise.

This won't give the right behavior when an underrun occurs, but I
don't know enough about the driver to handle that case.

Unfortunately, I don't have any way to test these changes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Anton Vorontsov <avorontsov@ru.mvista.com>
CC: Li Yang <leoli@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 027c5215 05-Sep-2012 Wei Yongjun <yongjun_wei@trendmicro.com.cn>

USB: FHCI: use list_move_tail instead of list_del/list_add_tail

Using list_move_tail() instead of list_del() + list_add_tail().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cf61fdb9 23-Jun-2012 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

USB: FHCI: Reusing QUICC Engine USB Controller registers from immap_qe.h

The struct fhci_regs (in drivers/usb/host/fhci.h) is basically a redefinition
of the struct qe_usb_ctlr (in arch/powerpc/include/asm/immap_qe.h).

The qe_usb_ctlr struct is preferrable once it uses accurately the registers'
names found in the Freescale's QUICC Engine Block Reference Manuals (QEIWRM.pdf
Rev.4.4 Chapter 19 for MPC836xE series and MPC8323ERM.pdf Rev.2 Chapter 36 for
MPC832xE series), making easier to map the FHCI device driver to the hardware
manual. Also, as the FHCI driver uses the USB Controller registers, the name
qe_usb_ctlr is a more precise representation of the hardware than fhci_regs.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 273d2357 17-Oct-2011 Jerry Huang <r66093@freescale.com>

QE/FHCI: fixed the CONTROL bug

For USB CONTROL transaction, when the data length is zero,
the IN package is needed to finish this transaction in status stage.

Signed-off-by: Jerry Huang <r66093@freescale.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 698f9315 02-Jul-2010 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

fix comment/printk typos concerning "already"

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 27729aad 24-Apr-2010 Eric Lescouet <Eric.Lescouet@virtuallogix.com>

USB: make hcd.h public (drivers dependency)

The usbcore headers: hcd.h and hub.h are shared between usbcore,
HCDs and a couple of other drivers (e.g. USBIP modules).
So, it makes sense to move them into a more public location and
to cleanup dependency of those modules on kernel internal headers.
This patch moves hcd.h from drivers/usb/core into include/linux/usb/

Signed-of-by: Eric Lescouet <eric@lescouet.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 45465487 21-Dec-2009 Stefani Seibold <stefani@seibold.net>

kfifo: move struct kfifo in place

This is a new generic kernel FIFO implementation.

The current kernel fifo API is not very widely used, because it has to
many constrains. Only 17 files in the current 2.6.31-rc5 used it.
FIFO's are like list's a very basic thing and a kfifo API which handles
the most use case would save a lot of development time and memory
resources.

I think this are the reasons why kfifo is not in use:

- The API is to simple, important functions are missing
- A fifo can be only allocated dynamically
- There is a requirement of a spinlock whether you need it or not
- There is no support for data records inside a fifo

So I decided to extend the kfifo in a more generic way without blowing up
the API to much. The new API has the following benefits:

- Generic usage: For kernel internal use and/or device driver.
- Provide an API for the most use case.
- Slim API: The whole API provides 25 functions.
- Linux style habit.
- DECLARE_KFIFO, DEFINE_KFIFO and INIT_KFIFO Macros
- Direct copy_to_user from the fifo and copy_from_user into the fifo.
- The kfifo itself is an in place member of the using data structure, this save an
indirection access and does not waste the kernel allocator.
- Lockless access: if only one reader and one writer is active on the fifo,
which is the common use case, no additional locking is necessary.
- Remove spinlock - give the user the freedom of choice what kind of locking to use if
one is required.
- Ability to handle records. Three type of records are supported:
- Variable length records between 0-255 bytes, with a record size
field of 1 bytes.
- Variable length records between 0-65535 bytes, with a record size
field of 2 bytes.
- Fixed size records, which no record size field.
- Preserve memory resource.
- Performance!
- Easy to use!

This patch:

Since most users want to have the kfifo as part of another object,
reorganize the code to allow including struct kfifo in another data
structure. This requires changing the kfifo_alloc and kfifo_init
prototypes so that we pass an existing kfifo pointer into them. This
patch changes the implementation and all existing users.

[akpm@linux-foundation.org: fix warning]
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# af901ca1 14-Nov-2009 André Goddard Rosa <andre.goddard@gmail.com>

tree-wide: fix assorted typos all over the place

That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 9525dcb3 10-Jun-2009 Roel Kluin <roel.kluin@gmail.com>

USB: fhci: mutually exclusive port_status

FHCI_PORT_DISABLED, -LOW and -FULL are mutually exclusive as status.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 236dd4d1 09-Jan-2009 Anton Vorontsov <avorontsov@ru.mvista.com>

USB: Driver for Freescale QUICC Engine USB Host Controller

This patch adds support for the FHCI USB controller, as found
in the Freescale MPC836x and MPC832x processors. It can support
Full or Low speed modes.

Quite a lot the hardware is doing by itself (SOF generation, CRC
generation and checking), though scheduling and retransmission is on
software's shoulders.

This controller does not integrate the root hub, so this driver also
fakes one-port hub. External hub is required to support more than
one device.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>