License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 17:07:57 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
#ifndef _LINUX_FIREWIRE_H
|
|
|
|
#define _LINUX_FIREWIRE_H
|
|
|
|
|
|
|
|
#include <linux/completion.h>
|
2012-04-02 00:38:45 +04:00
|
|
|
#include <linux/device.h>
|
2009-05-18 21:08:06 +04:00
|
|
|
#include <linux/dma-mapping.h>
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/kref.h>
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/mutex.h>
|
|
|
|
#include <linux/spinlock.h>
|
|
|
|
#include <linux/sysfs.h>
|
|
|
|
#include <linux/timer.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/workqueue.h>
|
|
|
|
|
2011-07-27 03:09:06 +04:00
|
|
|
#include <linux/atomic.h>
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
#include <asm/byteorder.h>
|
|
|
|
|
|
|
|
#define CSR_REGISTER_BASE 0xfffff0000000ULL
|
|
|
|
|
|
|
|
/* register offsets are relative to CSR_REGISTER_BASE */
|
|
|
|
#define CSR_STATE_CLEAR 0x0
|
|
|
|
#define CSR_STATE_SET 0x4
|
|
|
|
#define CSR_NODE_IDS 0x8
|
|
|
|
#define CSR_RESET_START 0xc
|
|
|
|
#define CSR_SPLIT_TIMEOUT_HI 0x18
|
|
|
|
#define CSR_SPLIT_TIMEOUT_LO 0x1c
|
|
|
|
#define CSR_CYCLE_TIME 0x200
|
|
|
|
#define CSR_BUS_TIME 0x204
|
|
|
|
#define CSR_BUSY_TIMEOUT 0x210
|
2010-06-10 10:35:06 +04:00
|
|
|
#define CSR_PRIORITY_BUDGET 0x218
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
#define CSR_BUS_MANAGER_ID 0x21c
|
|
|
|
#define CSR_BANDWIDTH_AVAILABLE 0x220
|
|
|
|
#define CSR_CHANNELS_AVAILABLE 0x224
|
|
|
|
#define CSR_CHANNELS_AVAILABLE_HI 0x224
|
|
|
|
#define CSR_CHANNELS_AVAILABLE_LO 0x228
|
2010-06-10 10:35:37 +04:00
|
|
|
#define CSR_MAINT_UTILITY 0x230
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
#define CSR_BROADCAST_CHANNEL 0x234
|
|
|
|
#define CSR_CONFIG_ROM 0x400
|
|
|
|
#define CSR_CONFIG_ROM_END 0x800
|
2011-03-15 09:53:21 +03:00
|
|
|
#define CSR_OMPR 0x900
|
|
|
|
#define CSR_OPCR(i) (0x904 + (i) * 4)
|
|
|
|
#define CSR_IMPR 0x980
|
|
|
|
#define CSR_IPCR(i) (0x984 + (i) * 4)
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
#define CSR_FCP_COMMAND 0xB00
|
|
|
|
#define CSR_FCP_RESPONSE 0xD00
|
|
|
|
#define CSR_FCP_END 0xF00
|
|
|
|
#define CSR_TOPOLOGY_MAP 0x1000
|
|
|
|
#define CSR_TOPOLOGY_MAP_END 0x1400
|
|
|
|
#define CSR_SPEED_MAP 0x2000
|
|
|
|
#define CSR_SPEED_MAP_END 0x3000
|
|
|
|
|
|
|
|
#define CSR_OFFSET 0x40
|
|
|
|
#define CSR_LEAF 0x80
|
|
|
|
#define CSR_DIRECTORY 0xc0
|
|
|
|
|
|
|
|
#define CSR_DESCRIPTOR 0x01
|
|
|
|
#define CSR_VENDOR 0x03
|
|
|
|
#define CSR_HARDWARE_VERSION 0x04
|
|
|
|
#define CSR_UNIT 0x11
|
|
|
|
#define CSR_SPECIFIER_ID 0x12
|
|
|
|
#define CSR_VERSION 0x13
|
|
|
|
#define CSR_DEPENDENT_INFO 0x14
|
|
|
|
#define CSR_MODEL 0x17
|
|
|
|
#define CSR_DIRECTORY_ID 0x20
|
|
|
|
|
|
|
|
struct fw_csr_iterator {
|
2009-12-26 03:44:10 +03:00
|
|
|
const u32 *p;
|
|
|
|
const u32 *end;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
};
|
|
|
|
|
2009-12-26 03:44:10 +03:00
|
|
|
void fw_csr_iterator_init(struct fw_csr_iterator *ci, const u32 *p);
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value);
|
2009-12-26 03:44:10 +03:00
|
|
|
int fw_csr_string(const u32 *directory, int key, char *buf, size_t size);
|
2009-12-24 13:59:57 +03:00
|
|
|
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
extern struct bus_type fw_bus_type;
|
|
|
|
|
|
|
|
struct fw_card_driver;
|
|
|
|
struct fw_node;
|
|
|
|
|
|
|
|
struct fw_card {
|
|
|
|
const struct fw_card_driver *driver;
|
|
|
|
struct device *device;
|
|
|
|
struct kref kref;
|
|
|
|
struct completion done;
|
|
|
|
|
|
|
|
int node_id;
|
|
|
|
int generation;
|
2009-06-14 15:23:58 +04:00
|
|
|
int current_tlabel;
|
|
|
|
u64 tlabel_mask;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
struct list_head transaction_list;
|
2011-01-22 17:05:03 +03:00
|
|
|
u64 reset_jiffies;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
|
2010-06-10 10:26:28 +04:00
|
|
|
u32 split_timeout_hi;
|
|
|
|
u32 split_timeout_lo;
|
|
|
|
unsigned int split_timeout_cycles;
|
|
|
|
unsigned int split_timeout_jiffies;
|
|
|
|
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
unsigned long long guid;
|
|
|
|
unsigned max_receive;
|
|
|
|
int link_speed;
|
|
|
|
int config_rom_generation;
|
|
|
|
|
|
|
|
spinlock_t lock; /* Take this lock when handling the lists in
|
|
|
|
* this struct. */
|
|
|
|
struct fw_node *local_node;
|
|
|
|
struct fw_node *root_node;
|
|
|
|
struct fw_node *irm_node;
|
|
|
|
u8 color; /* must be u8 to match the definition in struct fw_node */
|
|
|
|
int gap_count;
|
|
|
|
bool beta_repeaters_present;
|
|
|
|
|
|
|
|
int index;
|
|
|
|
struct list_head link;
|
|
|
|
|
2010-07-17 00:25:51 +04:00
|
|
|
struct list_head phy_receiver_list;
|
|
|
|
|
2010-07-08 18:09:06 +04:00
|
|
|
struct delayed_work br_work; /* bus reset job */
|
|
|
|
bool br_short;
|
|
|
|
|
|
|
|
struct delayed_work bm_work; /* bus manager job */
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
int bm_retries;
|
|
|
|
int bm_generation;
|
2010-06-22 01:24:35 +04:00
|
|
|
int bm_node_id;
|
2010-06-12 22:34:50 +04:00
|
|
|
bool bm_abdicate;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
|
2010-06-12 22:30:21 +04:00
|
|
|
bool priority_budget_implemented; /* controller feature */
|
|
|
|
bool broadcast_channel_auto_allocated; /* controller feature */
|
|
|
|
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
bool broadcast_channel_allocated;
|
|
|
|
u32 broadcast_channel;
|
2009-10-08 02:42:53 +04:00
|
|
|
__be32 topology_map[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4];
|
2010-06-10 10:35:37 +04:00
|
|
|
|
|
|
|
__be32 maint_utility_register;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
};
|
|
|
|
|
2012-02-02 02:36:02 +04:00
|
|
|
static inline struct fw_card *fw_card_get(struct fw_card *card)
|
|
|
|
{
|
|
|
|
kref_get(&card->kref);
|
|
|
|
|
|
|
|
return card;
|
|
|
|
}
|
|
|
|
|
|
|
|
void fw_card_release(struct kref *kref);
|
|
|
|
|
|
|
|
static inline void fw_card_put(struct fw_card *card)
|
|
|
|
{
|
|
|
|
kref_put(&card->kref, fw_card_release);
|
|
|
|
}
|
|
|
|
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
struct fw_attribute_group {
|
|
|
|
struct attribute_group *groups[2];
|
|
|
|
struct attribute_group group;
|
2012-06-17 18:40:36 +04:00
|
|
|
struct attribute *attrs[13];
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
enum fw_device_state {
|
|
|
|
FW_DEVICE_INITIALIZING,
|
|
|
|
FW_DEVICE_RUNNING,
|
|
|
|
FW_DEVICE_GONE,
|
|
|
|
FW_DEVICE_SHUTDOWN,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Note, fw_device.generation always has to be read before fw_device.node_id.
|
|
|
|
* Use SMP memory barriers to ensure this. Otherwise requests will be sent
|
|
|
|
* to an outdated node_id if the generation was updated in the meantime due
|
|
|
|
* to a bus reset.
|
|
|
|
*
|
|
|
|
* Likewise, fw-core will take care to update .node_id before .generation so
|
|
|
|
* that whenever fw_device.generation is current WRT the actual bus generation,
|
|
|
|
* fw_device.node_id is guaranteed to be current too.
|
|
|
|
*
|
|
|
|
* The same applies to fw_device.card->node_id vs. fw_device.generation.
|
|
|
|
*
|
|
|
|
* fw_device.config_rom and fw_device.config_rom_length may be accessed during
|
|
|
|
* the lifetime of any fw_unit belonging to the fw_device, before device_del()
|
|
|
|
* was called on the last fw_unit. Alternatively, they may be accessed while
|
|
|
|
* holding fw_device_rwsem.
|
|
|
|
*/
|
|
|
|
struct fw_device {
|
|
|
|
atomic_t state;
|
|
|
|
struct fw_node *node;
|
|
|
|
int node_id;
|
|
|
|
int generation;
|
|
|
|
unsigned max_speed;
|
|
|
|
struct fw_card *card;
|
|
|
|
struct device device;
|
|
|
|
|
|
|
|
struct mutex client_list_mutex;
|
|
|
|
struct list_head client_list;
|
|
|
|
|
2009-12-26 03:44:10 +03:00
|
|
|
const u32 *config_rom;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
size_t config_rom_length;
|
|
|
|
int config_rom_retries;
|
|
|
|
unsigned is_local:1;
|
2009-06-10 01:56:55 +04:00
|
|
|
unsigned max_rec:4;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
unsigned cmc:1;
|
2009-06-10 01:56:55 +04:00
|
|
|
unsigned irmc:1;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
unsigned bc_implemented:2;
|
|
|
|
|
2014-03-07 19:19:57 +04:00
|
|
|
work_func_t workfn;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
struct delayed_work work;
|
|
|
|
struct fw_attribute_group attribute_group;
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline struct fw_device *fw_device(struct device *dev)
|
|
|
|
{
|
|
|
|
return container_of(dev, struct fw_device, device);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int fw_device_is_shutdown(struct fw_device *device)
|
|
|
|
{
|
|
|
|
return atomic_read(&device->state) == FW_DEVICE_SHUTDOWN;
|
|
|
|
}
|
|
|
|
|
|
|
|
int fw_device_enable_phys_dma(struct fw_device *device);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* fw_unit.directory must not be accessed after device_del(&fw_unit.device).
|
|
|
|
*/
|
|
|
|
struct fw_unit {
|
|
|
|
struct device device;
|
2009-12-26 03:44:10 +03:00
|
|
|
const u32 *directory;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
struct fw_attribute_group attribute_group;
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline struct fw_unit *fw_unit(struct device *dev)
|
|
|
|
{
|
|
|
|
return container_of(dev, struct fw_unit, device);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct fw_unit *fw_unit_get(struct fw_unit *unit)
|
|
|
|
{
|
|
|
|
get_device(&unit->device);
|
|
|
|
|
|
|
|
return unit;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void fw_unit_put(struct fw_unit *unit)
|
|
|
|
{
|
|
|
|
put_device(&unit->device);
|
|
|
|
}
|
|
|
|
|
2009-06-06 20:35:27 +04:00
|
|
|
static inline struct fw_device *fw_parent_device(struct fw_unit *unit)
|
|
|
|
{
|
|
|
|
return fw_device(unit->device.parent);
|
|
|
|
}
|
|
|
|
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
struct ieee1394_device_id;
|
|
|
|
|
|
|
|
struct fw_driver {
|
|
|
|
struct device_driver driver;
|
2013-06-09 20:15:00 +04:00
|
|
|
int (*probe)(struct fw_unit *unit, const struct ieee1394_device_id *id);
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
/* Called when the parent device sits through a bus reset. */
|
|
|
|
void (*update)(struct fw_unit *unit);
|
2013-06-09 20:15:00 +04:00
|
|
|
void (*remove)(struct fw_unit *unit);
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
const struct ieee1394_device_id *id_table;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fw_packet;
|
|
|
|
struct fw_request;
|
|
|
|
|
|
|
|
typedef void (*fw_packet_callback_t)(struct fw_packet *packet,
|
|
|
|
struct fw_card *card, int status);
|
|
|
|
typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode,
|
|
|
|
void *data, size_t length,
|
|
|
|
void *callback_data);
|
|
|
|
/*
|
2012-09-27 23:46:09 +04:00
|
|
|
* This callback handles an inbound request subaction. It is called in
|
|
|
|
* RCU read-side context, therefore must not sleep.
|
|
|
|
*
|
|
|
|
* The callback should not initiate outbound request subactions directly.
|
|
|
|
* Otherwise there is a danger of recursion of inbound and outbound
|
|
|
|
* transactions from and to the local node.
|
|
|
|
*
|
|
|
|
* The callback is responsible that either fw_send_response() or kfree()
|
|
|
|
* is called on the @request, except for FCP registers for which the core
|
|
|
|
* takes care of that.
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
*/
|
|
|
|
typedef void (*fw_address_callback_t)(struct fw_card *card,
|
|
|
|
struct fw_request *request,
|
|
|
|
int tcode, int destination, int source,
|
2010-06-21 00:50:35 +04:00
|
|
|
int generation,
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
unsigned long long offset,
|
|
|
|
void *data, size_t length,
|
|
|
|
void *callback_data);
|
|
|
|
|
|
|
|
struct fw_packet {
|
|
|
|
int speed;
|
|
|
|
int generation;
|
|
|
|
u32 header[4];
|
|
|
|
size_t header_length;
|
|
|
|
void *payload;
|
|
|
|
size_t payload_length;
|
|
|
|
dma_addr_t payload_bus;
|
2009-10-14 22:40:10 +04:00
|
|
|
bool payload_mapped;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
u32 timestamp;
|
|
|
|
|
|
|
|
/*
|
2010-07-18 14:44:01 +04:00
|
|
|
* This callback is called when the packet transmission has completed.
|
|
|
|
* For successful transmission, the status code is the ack received
|
|
|
|
* from the destination. Otherwise it is one of the juju-specific
|
|
|
|
* rcodes: RCODE_SEND_ERROR, _CANCELLED, _BUSY, _GENERATION, _NO_ACK.
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
* The callback can be called from tasklet context and thus
|
|
|
|
* must never block.
|
|
|
|
*/
|
|
|
|
fw_packet_callback_t callback;
|
|
|
|
int ack;
|
|
|
|
struct list_head link;
|
|
|
|
void *driver_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fw_transaction {
|
|
|
|
int node_id; /* The generation is implied; it is always the current. */
|
|
|
|
int tlabel;
|
|
|
|
struct list_head link;
|
2010-04-27 11:07:00 +04:00
|
|
|
struct fw_card *card;
|
2010-12-13 16:56:02 +03:00
|
|
|
bool is_split_transaction;
|
2010-04-27 11:07:00 +04:00
|
|
|
struct timer_list split_timeout_timer;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
|
|
|
|
struct fw_packet packet;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The data passed to the callback is valid only during the
|
|
|
|
* callback.
|
|
|
|
*/
|
|
|
|
fw_transaction_callback_t callback;
|
|
|
|
void *callback_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fw_address_handler {
|
|
|
|
u64 offset;
|
2012-05-24 21:28:17 +04:00
|
|
|
u64 length;
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
fw_address_callback_t address_callback;
|
|
|
|
void *callback_data;
|
|
|
|
struct list_head link;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fw_address_region {
|
|
|
|
u64 start;
|
|
|
|
u64 end;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const struct fw_address_region fw_high_memory_region;
|
|
|
|
|
|
|
|
int fw_core_add_address_handler(struct fw_address_handler *handler,
|
|
|
|
const struct fw_address_region *region);
|
|
|
|
void fw_core_remove_address_handler(struct fw_address_handler *handler);
|
|
|
|
void fw_send_response(struct fw_card *card,
|
|
|
|
struct fw_request *request, int rcode);
|
2012-02-16 13:16:35 +04:00
|
|
|
int fw_get_request_speed(struct fw_request *request);
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
void fw_send_request(struct fw_card *card, struct fw_transaction *t,
|
|
|
|
int tcode, int destination_id, int generation, int speed,
|
|
|
|
unsigned long long offset, void *payload, size_t length,
|
|
|
|
fw_transaction_callback_t callback, void *callback_data);
|
|
|
|
int fw_cancel_transaction(struct fw_card *card,
|
|
|
|
struct fw_transaction *transaction);
|
|
|
|
int fw_run_transaction(struct fw_card *card, int tcode, int destination_id,
|
|
|
|
int generation, int speed, unsigned long long offset,
|
|
|
|
void *payload, size_t length);
|
2012-04-11 19:38:10 +04:00
|
|
|
const char *fw_rcode_string(int rcode);
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
|
2009-05-18 21:08:06 +04:00
|
|
|
static inline int fw_stream_packet_destination_id(int tag, int channel, int sy)
|
|
|
|
{
|
|
|
|
return tag << 14 | channel << 8 | sy;
|
|
|
|
}
|
|
|
|
|
2014-04-25 17:45:30 +04:00
|
|
|
void fw_schedule_bus_reset(struct fw_card *card, bool delayed,
|
|
|
|
bool short_reset);
|
|
|
|
|
2009-05-18 21:08:06 +04:00
|
|
|
struct fw_descriptor {
|
|
|
|
struct list_head link;
|
|
|
|
size_t length;
|
|
|
|
u32 immediate;
|
|
|
|
u32 key;
|
|
|
|
const u32 *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
int fw_core_add_descriptor(struct fw_descriptor *desc);
|
|
|
|
void fw_core_remove_descriptor(struct fw_descriptor *desc);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The iso packet format allows for an immediate header/payload part
|
|
|
|
* stored in 'header' immediately after the packet info plus an
|
|
|
|
* indirect payload part that is pointer to by the 'payload' field.
|
|
|
|
* Applications can use one or the other or both to implement simple
|
|
|
|
* low-bandwidth streaming (e.g. audio) or more advanced
|
|
|
|
* scatter-gather streaming (e.g. assembling video frame automatically).
|
|
|
|
*/
|
|
|
|
struct fw_iso_packet {
|
2010-07-29 20:19:22 +04:00
|
|
|
u16 payload_length; /* Length of indirect payload */
|
|
|
|
u32 interrupt:1; /* Generate interrupt on this packet */
|
|
|
|
u32 skip:1; /* tx: Set to not send packet at all */
|
|
|
|
/* rx: Sync bit, wait for matching sy */
|
|
|
|
u32 tag:2; /* tx: Tag in packet header */
|
|
|
|
u32 sy:4; /* tx: Sy in packet header */
|
|
|
|
u32 header_length:8; /* Length of immediate header */
|
|
|
|
u32 header[0]; /* tx: Top of 1394 isoch. data_block */
|
2009-05-18 21:08:06 +04:00
|
|
|
};
|
|
|
|
|
2010-07-29 20:19:22 +04:00
|
|
|
#define FW_ISO_CONTEXT_TRANSMIT 0
|
|
|
|
#define FW_ISO_CONTEXT_RECEIVE 1
|
|
|
|
#define FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL 2
|
2009-05-18 21:08:06 +04:00
|
|
|
|
|
|
|
#define FW_ISO_CONTEXT_MATCH_TAG0 1
|
|
|
|
#define FW_ISO_CONTEXT_MATCH_TAG1 2
|
|
|
|
#define FW_ISO_CONTEXT_MATCH_TAG2 4
|
|
|
|
#define FW_ISO_CONTEXT_MATCH_TAG3 8
|
|
|
|
#define FW_ISO_CONTEXT_MATCH_ALL_TAGS 15
|
|
|
|
|
|
|
|
/*
|
|
|
|
* An iso buffer is just a set of pages mapped for DMA in the
|
|
|
|
* specified direction. Since the pages are to be used for DMA, they
|
|
|
|
* are not mapped into the kernel virtual address space. We store the
|
|
|
|
* DMA address in the page private. The helper function
|
|
|
|
* fw_iso_buffer_map() will map the pages into a given vma.
|
|
|
|
*/
|
|
|
|
struct fw_iso_buffer {
|
|
|
|
enum dma_data_direction direction;
|
|
|
|
struct page **pages;
|
|
|
|
int page_count;
|
2012-04-09 22:51:18 +04:00
|
|
|
int page_count_mapped;
|
2009-05-18 21:08:06 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card,
|
|
|
|
int page_count, enum dma_data_direction direction);
|
|
|
|
void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, struct fw_card *card);
|
2010-07-29 20:19:22 +04:00
|
|
|
size_t fw_iso_buffer_lookup(struct fw_iso_buffer *buffer, dma_addr_t completed);
|
2009-05-18 21:08:06 +04:00
|
|
|
|
|
|
|
struct fw_iso_context;
|
|
|
|
typedef void (*fw_iso_callback_t)(struct fw_iso_context *context,
|
|
|
|
u32 cycle, size_t header_length,
|
|
|
|
void *header, void *data);
|
2010-07-29 20:19:22 +04:00
|
|
|
typedef void (*fw_iso_mc_callback_t)(struct fw_iso_context *context,
|
|
|
|
dma_addr_t completed, void *data);
|
2009-05-18 21:08:06 +04:00
|
|
|
struct fw_iso_context {
|
|
|
|
struct fw_card *card;
|
|
|
|
int type;
|
|
|
|
int channel;
|
|
|
|
int speed;
|
2013-07-22 23:32:09 +04:00
|
|
|
bool drop_overflow_headers;
|
2009-05-18 21:08:06 +04:00
|
|
|
size_t header_size;
|
2010-07-29 20:19:22 +04:00
|
|
|
union {
|
|
|
|
fw_iso_callback_t sc;
|
|
|
|
fw_iso_mc_callback_t mc;
|
|
|
|
} callback;
|
2009-05-18 21:08:06 +04:00
|
|
|
void *callback_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
|
|
|
|
int type, int channel, int speed, size_t header_size,
|
|
|
|
fw_iso_callback_t callback, void *callback_data);
|
2010-07-29 20:19:22 +04:00
|
|
|
int fw_iso_context_set_channels(struct fw_iso_context *ctx, u64 *channels);
|
2009-05-18 21:08:06 +04:00
|
|
|
int fw_iso_context_queue(struct fw_iso_context *ctx,
|
|
|
|
struct fw_iso_packet *packet,
|
|
|
|
struct fw_iso_buffer *buffer,
|
|
|
|
unsigned long payload);
|
2011-05-02 11:33:56 +04:00
|
|
|
void fw_iso_context_queue_flush(struct fw_iso_context *ctx);
|
2012-03-18 22:06:39 +04:00
|
|
|
int fw_iso_context_flush_completions(struct fw_iso_context *ctx);
|
2009-05-18 21:08:06 +04:00
|
|
|
int fw_iso_context_start(struct fw_iso_context *ctx,
|
|
|
|
int cycle, int sync, int tags);
|
|
|
|
int fw_iso_context_stop(struct fw_iso_context *ctx);
|
|
|
|
void fw_iso_context_destroy(struct fw_iso_context *ctx);
|
2011-03-15 09:53:21 +03:00
|
|
|
void fw_iso_resource_manage(struct fw_card *card, int generation,
|
|
|
|
u64 channels_mask, int *channel, int *bandwidth,
|
2011-04-22 17:13:54 +04:00
|
|
|
bool allocate);
|
2009-05-18 21:08:06 +04:00
|
|
|
|
firewire: sbp2: parallelize login, reconnect, logout
The struct sbp2_logical_unit.work items can all be executed in parallel
but are not reentrant. Furthermore, reconnect or re-login work must be
executed in a WQ_MEM_RECLAIM workqueue.
Hence replace the old single-threaded firewire-sbp2 workqueue by a
concurrency-managed but non-reentrant workqueue with rescuer.
firewire-core already maintains one, hence use this one.
In earlier versions of this change, I observed occasional failures of
parallel INQUIRY to an Initio INIC-2430 FireWire 800 to dual IDE bridge.
More testing indicates that parallel INQUIRY is not actually a problem,
but too quick successions of logout and login + INQUIRY, e.g. a quick
sequence of cable plugout and plugin, can result in failed INQUIRY.
This does not seem to be something that should or could be addressed by
serialization.
Another dual-LU device to which I currently have access to, an
OXUF924DSB FireWire 800 to dual SATA bridge with firmware from MacPower,
has been successfully tested with this too.
This change is beneficial to environments with two or more FireWire
storage devices, especially if they are located on the same bus.
Management tasks that should be performed as soon and as quickly as
possible, especially reconnect, are no longer held up by tasks on other
devices that may take a long time, especially login with INQUIRY and sd
or sr driver probe.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2011-05-01 22:50:31 +04:00
|
|
|
extern struct workqueue_struct *fw_workqueue;
|
|
|
|
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 18:26:18 +04:00
|
|
|
#endif /* _LINUX_FIREWIRE_H */
|