mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
Merge mulgrave-w:git/linux-2.6
Conflicts: include/linux/blkdev.h Trivial merge to incorporate tag prototypes.
This commit is contained in:
7
CREDITS
7
CREDITS
@@ -2384,6 +2384,13 @@ N: Thomas Molina
|
||||
E: tmolina@cablespeed.com
|
||||
D: bug fixes, documentation, minor hackery
|
||||
|
||||
N: Paul Moore
|
||||
E: paul.moore@hp.com
|
||||
D: NetLabel author
|
||||
S: Hewlett-Packard
|
||||
S: 110 Spit Brook Road
|
||||
S: Nashua, NH 03062
|
||||
|
||||
N: James Morris
|
||||
E: jmorris@namei.org
|
||||
W: http://namei.org/
|
||||
|
||||
@@ -184,6 +184,8 @@ mtrr.txt
|
||||
- how to use PPro Memory Type Range Registers to increase performance.
|
||||
nbd.txt
|
||||
- info on a TCP implementation of a network block device.
|
||||
netlabel/
|
||||
- directory with information on the NetLabel subsystem.
|
||||
networking/
|
||||
- directory with info on various aspects of networking with Linux.
|
||||
nfsroot.txt
|
||||
|
||||
10
Documentation/netlabel/00-INDEX
Normal file
10
Documentation/netlabel/00-INDEX
Normal file
@@ -0,0 +1,10 @@
|
||||
00-INDEX
|
||||
- this file.
|
||||
cipso_ipv4.txt
|
||||
- documentation on the IPv4 CIPSO protocol engine.
|
||||
draft-ietf-cipso-ipsecurity-01.txt
|
||||
- IETF draft of the CIPSO protocol, dated 16 July 1992.
|
||||
introduction.txt
|
||||
- NetLabel introduction, READ THIS FIRST.
|
||||
lsm_interface.txt
|
||||
- documentation on the NetLabel kernel security module API.
|
||||
48
Documentation/netlabel/cipso_ipv4.txt
Normal file
48
Documentation/netlabel/cipso_ipv4.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
NetLabel CIPSO/IPv4 Protocol Engine
|
||||
==============================================================================
|
||||
Paul Moore, paul.moore@hp.com
|
||||
|
||||
May 17, 2006
|
||||
|
||||
* Overview
|
||||
|
||||
The NetLabel CIPSO/IPv4 protocol engine is based on the IETF Commercial IP
|
||||
Security Option (CIPSO) draft from July 16, 1992. A copy of this draft can be
|
||||
found in this directory, consult '00-INDEX' for the filename. While the IETF
|
||||
draft never made it to an RFC standard it has become a de-facto standard for
|
||||
labeled networking and is used in many trusted operating systems.
|
||||
|
||||
* Outbound Packet Processing
|
||||
|
||||
The CIPSO/IPv4 protocol engine applies the CIPSO IP option to packets by
|
||||
adding the CIPSO label to the socket. This causes all packets leaving the
|
||||
system through the socket to have the CIPSO IP option applied. The socket's
|
||||
CIPSO label can be changed at any point in time, however, it is recommended
|
||||
that it is set upon the socket's creation. The LSM can set the socket's CIPSO
|
||||
label by using the NetLabel security module API; if the NetLabel "domain" is
|
||||
configured to use CIPSO for packet labeling then a CIPSO IP option will be
|
||||
generated and attached to the socket.
|
||||
|
||||
* Inbound Packet Processing
|
||||
|
||||
The CIPSO/IPv4 protocol engine validates every CIPSO IP option it finds at the
|
||||
IP layer without any special handling required by the LSM. However, in order
|
||||
to decode and translate the CIPSO label on the packet the LSM must use the
|
||||
NetLabel security module API to extract the security attributes of the packet.
|
||||
This is typically done at the socket layer using the 'socket_sock_rcv_skb()'
|
||||
LSM hook.
|
||||
|
||||
* Label Translation
|
||||
|
||||
The CIPSO/IPv4 protocol engine contains a mechanism to translate CIPSO security
|
||||
attributes such as sensitivity level and category to values which are
|
||||
appropriate for the host. These mappings are defined as part of a CIPSO
|
||||
Domain Of Interpretation (DOI) definition and are configured through the
|
||||
NetLabel user space communication layer. Each DOI definition can have a
|
||||
different security attribute mapping table.
|
||||
|
||||
* Label Translation Cache
|
||||
|
||||
The NetLabel system provides a framework for caching security attribute
|
||||
mappings from the network labels to the corresponding LSM identifiers. The
|
||||
CIPSO/IPv4 protocol engine supports this caching mechanism.
|
||||
791
Documentation/netlabel/draft-ietf-cipso-ipsecurity-01.txt
Normal file
791
Documentation/netlabel/draft-ietf-cipso-ipsecurity-01.txt
Normal file
File diff suppressed because it is too large
Load Diff
46
Documentation/netlabel/introduction.txt
Normal file
46
Documentation/netlabel/introduction.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
NetLabel Introduction
|
||||
==============================================================================
|
||||
Paul Moore, paul.moore@hp.com
|
||||
|
||||
August 2, 2006
|
||||
|
||||
* Overview
|
||||
|
||||
NetLabel is a mechanism which can be used by kernel security modules to attach
|
||||
security attributes to outgoing network packets generated from user space
|
||||
applications and read security attributes from incoming network packets. It
|
||||
is composed of three main components, the protocol engines, the communication
|
||||
layer, and the kernel security module API.
|
||||
|
||||
* Protocol Engines
|
||||
|
||||
The protocol engines are responsible for both applying and retrieving the
|
||||
network packet's security attributes. If any translation between the network
|
||||
security attributes and those on the host are required then the protocol
|
||||
engine will handle those tasks as well. Other kernel subsystems should
|
||||
refrain from calling the protocol engines directly, instead they should use
|
||||
the NetLabel kernel security module API described below.
|
||||
|
||||
Detailed information about each NetLabel protocol engine can be found in this
|
||||
directory, consult '00-INDEX' for filenames.
|
||||
|
||||
* Communication Layer
|
||||
|
||||
The communication layer exists to allow NetLabel configuration and monitoring
|
||||
from user space. The NetLabel communication layer uses a message based
|
||||
protocol built on top of the Generic NETLINK transport mechanism. The exact
|
||||
formatting of these NetLabel messages as well as the Generic NETLINK family
|
||||
names can be found in the the 'net/netlabel/' directory as comments in the
|
||||
header files as well as in 'include/net/netlabel.h'.
|
||||
|
||||
* Security Module API
|
||||
|
||||
The purpose of the NetLabel security module API is to provide a protocol
|
||||
independent interface to the underlying NetLabel protocol engines. In addition
|
||||
to protocol independence, the security module API is designed to be completely
|
||||
LSM independent which should allow multiple LSMs to leverage the same code
|
||||
base.
|
||||
|
||||
Detailed information about the NetLabel security module API can be found in the
|
||||
'include/net/netlabel.h' header file as well as the 'lsm_interface.txt' file
|
||||
found in this directory.
|
||||
47
Documentation/netlabel/lsm_interface.txt
Normal file
47
Documentation/netlabel/lsm_interface.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
NetLabel Linux Security Module Interface
|
||||
==============================================================================
|
||||
Paul Moore, paul.moore@hp.com
|
||||
|
||||
May 17, 2006
|
||||
|
||||
* Overview
|
||||
|
||||
NetLabel is a mechanism which can set and retrieve security attributes from
|
||||
network packets. It is intended to be used by LSM developers who want to make
|
||||
use of a common code base for several different packet labeling protocols.
|
||||
The NetLabel security module API is defined in 'include/net/netlabel.h' but a
|
||||
brief overview is given below.
|
||||
|
||||
* NetLabel Security Attributes
|
||||
|
||||
Since NetLabel supports multiple different packet labeling protocols and LSMs
|
||||
it uses the concept of security attributes to refer to the packet's security
|
||||
labels. The NetLabel security attributes are defined by the
|
||||
'netlbl_lsm_secattr' structure in the NetLabel header file. Internally the
|
||||
NetLabel subsystem converts the security attributes to and from the correct
|
||||
low-level packet label depending on the NetLabel build time and run time
|
||||
configuration. It is up to the LSM developer to translate the NetLabel
|
||||
security attributes into whatever security identifiers are in use for their
|
||||
particular LSM.
|
||||
|
||||
* NetLabel LSM Protocol Operations
|
||||
|
||||
These are the functions which allow the LSM developer to manipulate the labels
|
||||
on outgoing packets as well as read the labels on incoming packets. Functions
|
||||
exist to operate both on sockets as well as the sk_buffs directly. These high
|
||||
level functions are translated into low level protocol operations based on how
|
||||
the administrator has configured the NetLabel subsystem.
|
||||
|
||||
* NetLabel Label Mapping Cache Operations
|
||||
|
||||
Depending on the exact configuration, translation between the network packet
|
||||
label and the internal LSM security identifier can be time consuming. The
|
||||
NetLabel label mapping cache is a caching mechanism which can be used to
|
||||
sidestep much of this overhead once a mapping has been established. Once the
|
||||
LSM has received a packet, used NetLabel to decode it's security attributes,
|
||||
and translated the security attributes into a LSM internal identifier the LSM
|
||||
can use the NetLabel caching functions to associate the LSM internal
|
||||
identifier with the network packet's label. This means that in the future
|
||||
when a incoming packet matches a cached value not only are the internal
|
||||
NetLabel translation mechanisms bypassed but the LSM translation mechanisms are
|
||||
bypassed as well which should result in a significant reduction in overhead.
|
||||
@@ -375,6 +375,41 @@ tcp_slow_start_after_idle - BOOLEAN
|
||||
be timed out after an idle period.
|
||||
Default: 1
|
||||
|
||||
CIPSOv4 Variables:
|
||||
|
||||
cipso_cache_enable - BOOLEAN
|
||||
If set, enable additions to and lookups from the CIPSO label mapping
|
||||
cache. If unset, additions are ignored and lookups always result in a
|
||||
miss. However, regardless of the setting the cache is still
|
||||
invalidated when required when means you can safely toggle this on and
|
||||
off and the cache will always be "safe".
|
||||
Default: 1
|
||||
|
||||
cipso_cache_bucket_size - INTEGER
|
||||
The CIPSO label cache consists of a fixed size hash table with each
|
||||
hash bucket containing a number of cache entries. This variable limits
|
||||
the number of entries in each hash bucket; the larger the value the
|
||||
more CIPSO label mappings that can be cached. When the number of
|
||||
entries in a given hash bucket reaches this limit adding new entries
|
||||
causes the oldest entry in the bucket to be removed to make room.
|
||||
Default: 10
|
||||
|
||||
cipso_rbm_optfmt - BOOLEAN
|
||||
Enable the "Optimized Tag 1 Format" as defined in section 3.4.2.6 of
|
||||
the CIPSO draft specification (see Documentation/netlabel for details).
|
||||
This means that when set the CIPSO tag will be padded with empty
|
||||
categories in order to make the packet data 32-bit aligned.
|
||||
Default: 0
|
||||
|
||||
cipso_rbm_structvalid - BOOLEAN
|
||||
If set, do a very strict check of the CIPSO option when
|
||||
ip_options_compile() is called. If unset, relax the checks done during
|
||||
ip_options_compile(). Either way is "safe" as errors are caught else
|
||||
where in the CIPSO processing code but setting this to 0 (False) should
|
||||
result in less work (i.e. it should be faster) but could cause problems
|
||||
with other implementations that require strict checking.
|
||||
Default: 0
|
||||
|
||||
IP Variables:
|
||||
|
||||
ip_local_port_range - 2 INTEGERS
|
||||
@@ -730,6 +765,9 @@ conf/all/forwarding - BOOLEAN
|
||||
|
||||
This referred to as global forwarding.
|
||||
|
||||
proxy_ndp - BOOLEAN
|
||||
Do proxy ndp.
|
||||
|
||||
conf/interface/*:
|
||||
Change special settings per interface.
|
||||
|
||||
|
||||
14
Documentation/networking/secid.txt
Normal file
14
Documentation/networking/secid.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
flowi structure:
|
||||
|
||||
The secid member in the flow structure is used in LSMs (e.g. SELinux) to indicate
|
||||
the label of the flow. This label of the flow is currently used in selecting
|
||||
matching labeled xfrm(s).
|
||||
|
||||
If this is an outbound flow, the label is derived from the socket, if any, or
|
||||
the incoming packet this flow is being generated as a response to (e.g. tcp
|
||||
resets, timewait ack, etc.). It is also conceivable that the label could be
|
||||
derived from other sources such as process context, device, etc., in special
|
||||
cases, as may be appropriate.
|
||||
|
||||
If this is an inbound flow, the label is derived from the IPSec security
|
||||
associations, if any, used by the packet.
|
||||
@@ -758,6 +758,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
|
||||
single_cmd - Use single immediate commands to communicate with
|
||||
codecs (for debugging only)
|
||||
disable_msi - Disable Message Signaled Interrupt (MSI)
|
||||
|
||||
This module supports one card and autoprobe.
|
||||
|
||||
@@ -778,11 +779,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
6stack-digout 6-jack with a SPDIF out
|
||||
w810 3-jack
|
||||
z71v 3-jack (HP shared SPDIF)
|
||||
asus 3-jack
|
||||
asus 3-jack (ASUS Mobo)
|
||||
asus-w1v ASUS W1V
|
||||
asus-dig ASUS with SPDIF out
|
||||
asus-dig2 ASUS with SPDIF out (using GPIO2)
|
||||
uniwill 3-jack
|
||||
F1734 2-jack
|
||||
lg LG laptop (m1 express dual)
|
||||
lg-lw LG LW20 laptop
|
||||
lg-lw LG LW20/LW25 laptop
|
||||
tcl TCL S700
|
||||
clevo Clevo laptops (m520G, m665n)
|
||||
test for testing/debugging purpose, almost all controls can be
|
||||
adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
@@ -790,6 +796,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
ALC260
|
||||
hp HP machines
|
||||
hp-3013 HP machines (3013-variant)
|
||||
fujitsu Fujitsu S7020
|
||||
acer Acer TravelMate
|
||||
basic fixed pin assignment (old default model)
|
||||
@@ -797,24 +804,32 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
ALC262
|
||||
fujitsu Fujitsu Laptop
|
||||
hp-bpc HP xw4400/6400/8400/9400 laptops
|
||||
benq Benq ED8
|
||||
basic fixed pin assignment w/o SPDIF
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC882/885
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stck-dig 6-jack digital with SPDIF I/O
|
||||
arima Arima W820Di1
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC883/888
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
6stack-dig-demo 6-stack digital for Intel demo board
|
||||
3stack-6ch 3-jack 6-channel
|
||||
3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
|
||||
6stack-dig-demo 6-jack digital for Intel demo board
|
||||
acer Acer laptops (Travelmate 3012WTMi, Aspire 5600, etc)
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC861/660
|
||||
3stack 3-jack
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack with SPDIF I/O
|
||||
3stack-660 3-jack (for ALC660)
|
||||
uniwill-m31 Uniwill M31 laptop
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
CMI9880
|
||||
@@ -843,10 +858,21 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
3stack-dig ditto with SPDIF
|
||||
laptop 3-jack with hp-jack automute
|
||||
laptop-dig ditto with SPDIF
|
||||
auto auto-confgi reading BIOS (default)
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
STAC7661(?)
|
||||
STAC9200/9205/9220/9221/9254
|
||||
ref Reference board
|
||||
3stack D945 3stack
|
||||
5stack D945 5stack + SPDIF
|
||||
|
||||
STAC9227/9228/9229/927x
|
||||
ref Reference board
|
||||
3stack D965 3stack
|
||||
5stack D965 5stack + SPDIF
|
||||
|
||||
STAC9872
|
||||
vaio Setup for VAIO FE550G/SZ110
|
||||
vaio-ar Setup for VAIO AR
|
||||
|
||||
If the default configuration doesn't work and one of the above
|
||||
matches with your device, report it together with the PCI
|
||||
@@ -1213,6 +1239,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
|
||||
Module supports only 1 card. This module has no enable option.
|
||||
|
||||
Module snd-mts64
|
||||
----------------
|
||||
|
||||
Module for Ego Systems (ESI) Miditerminal 4140
|
||||
|
||||
This module supports multiple devices.
|
||||
Requires parport (CONFIG_PARPORT).
|
||||
|
||||
Module snd-nm256
|
||||
----------------
|
||||
|
||||
|
||||
@@ -1054,9 +1054,8 @@
|
||||
|
||||
<para>
|
||||
For a device which allows hotplugging, you can use
|
||||
<function>snd_card_free_in_thread</function>. This one will
|
||||
postpone the destruction and wait in a kernel-thread until all
|
||||
devices are closed.
|
||||
<function>snd_card_free_when_closed</function>. This one will
|
||||
postpone the destruction until all devices are closed.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -1058,8 +1058,8 @@ core99_reset_cpu(struct device_node *node, long param, long value)
|
||||
if (np == NULL)
|
||||
return -ENODEV;
|
||||
for (np = np->child; np != NULL; np = np->sibling) {
|
||||
u32 *num = get_property(np, "reg", NULL);
|
||||
u32 *rst = get_property(np, "soft-reset", NULL);
|
||||
const u32 *num = get_property(np, "reg", NULL);
|
||||
const u32 *rst = get_property(np, "soft-reset", NULL);
|
||||
if (num == NULL || rst == NULL)
|
||||
continue;
|
||||
if (param == *num) {
|
||||
|
||||
@@ -702,7 +702,7 @@ static void __init smp_core99_setup(int ncpus)
|
||||
/* GPIO based HW sync on ppc32 Core99 */
|
||||
if (pmac_tb_freeze == NULL && !machine_is_compatible("MacRISC4")) {
|
||||
struct device_node *cpu;
|
||||
u32 *tbprop = NULL;
|
||||
const u32 *tbprop = NULL;
|
||||
|
||||
core99_tb_gpio = KL_GPIO_TB_ENABLE; /* default value */
|
||||
cpu = of_find_node_by_type(NULL, "cpu");
|
||||
|
||||
@@ -2801,6 +2801,18 @@ long blk_congestion_wait(int rw, long timeout)
|
||||
|
||||
EXPORT_SYMBOL(blk_congestion_wait);
|
||||
|
||||
/**
|
||||
* blk_congestion_end - wake up sleepers on a congestion queue
|
||||
* @rw: READ or WRITE
|
||||
*/
|
||||
void blk_congestion_end(int rw)
|
||||
{
|
||||
wait_queue_head_t *wqh = &congestion_wqh[rw];
|
||||
|
||||
if (waitqueue_active(wqh))
|
||||
wake_up(wqh);
|
||||
}
|
||||
|
||||
/*
|
||||
* Has to be called with the request spinlock acquired
|
||||
*/
|
||||
|
||||
@@ -92,13 +92,17 @@ static int hmac_init(struct hash_desc *pdesc)
|
||||
struct hmac_ctx *ctx = align_ptr(ipad + bs * 2 + ds, sizeof(void *));
|
||||
struct hash_desc desc;
|
||||
struct scatterlist tmp;
|
||||
int err;
|
||||
|
||||
desc.tfm = ctx->child;
|
||||
desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
|
||||
sg_set_buf(&tmp, ipad, bs);
|
||||
|
||||
return unlikely(crypto_hash_init(&desc)) ?:
|
||||
crypto_hash_update(&desc, &tmp, 1);
|
||||
err = crypto_hash_init(&desc);
|
||||
if (unlikely(err))
|
||||
return err;
|
||||
|
||||
return crypto_hash_update(&desc, &tmp, bs);
|
||||
}
|
||||
|
||||
static int hmac_update(struct hash_desc *pdesc,
|
||||
@@ -123,13 +127,17 @@ static int hmac_final(struct hash_desc *pdesc, u8 *out)
|
||||
struct hmac_ctx *ctx = align_ptr(digest + ds, sizeof(void *));
|
||||
struct hash_desc desc;
|
||||
struct scatterlist tmp;
|
||||
int err;
|
||||
|
||||
desc.tfm = ctx->child;
|
||||
desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
|
||||
sg_set_buf(&tmp, opad, bs + ds);
|
||||
|
||||
return unlikely(crypto_hash_final(&desc, digest)) ?:
|
||||
crypto_hash_digest(&desc, &tmp, bs + ds, out);
|
||||
err = crypto_hash_final(&desc, digest);
|
||||
if (unlikely(err))
|
||||
return err;
|
||||
|
||||
return crypto_hash_digest(&desc, &tmp, bs + ds, out);
|
||||
}
|
||||
|
||||
static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
|
||||
@@ -145,6 +153,7 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
|
||||
struct hash_desc desc;
|
||||
struct scatterlist sg1[2];
|
||||
struct scatterlist sg2[1];
|
||||
int err;
|
||||
|
||||
desc.tfm = ctx->child;
|
||||
desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
|
||||
@@ -154,8 +163,11 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
|
||||
sg1[1].length = 0;
|
||||
sg_set_buf(sg2, opad, bs + ds);
|
||||
|
||||
return unlikely(crypto_hash_digest(&desc, sg1, nbytes + bs, digest)) ?:
|
||||
crypto_hash_digest(&desc, sg2, bs + ds, out);
|
||||
err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest);
|
||||
if (unlikely(err))
|
||||
return err;
|
||||
|
||||
return crypto_hash_digest(&desc, sg2, bs + ds, out);
|
||||
}
|
||||
|
||||
static int hmac_init_tfm(struct crypto_tfm *tfm)
|
||||
|
||||
@@ -1912,7 +1912,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
|
||||
skb->tail = skb->data + skb->len;
|
||||
#ifdef USE_CHECKSUM_HW
|
||||
if (vcc->vpi == 0 && vcc->vci >= ATM_NOT_RSV_VCI) {
|
||||
skb->ip_summed = CHECKSUM_HW;
|
||||
skb->ip_summed = CHECKSUM_COMPLETE;
|
||||
skb->csum = TCP_CKSUM(skb->data,
|
||||
he_vcc->pdu_len);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ static int briq_panel_release(struct inode *ino, struct file *filep)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t briq_panel_read(struct file *file, char *buf, size_t count,
|
||||
static ssize_t briq_panel_read(struct file *file, char __user *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
unsigned short c;
|
||||
@@ -135,7 +135,7 @@ static void scroll_vfd( void )
|
||||
vfd_cursor = 20;
|
||||
}
|
||||
|
||||
static ssize_t briq_panel_write(struct file *file, const char *buf, size_t len,
|
||||
static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_t len,
|
||||
loff_t *ppos)
|
||||
{
|
||||
size_t indx = len;
|
||||
@@ -150,19 +150,22 @@ static ssize_t briq_panel_write(struct file *file, const char *buf, size_t len,
|
||||
return -EBUSY;
|
||||
|
||||
for (;;) {
|
||||
char c;
|
||||
if (!indx)
|
||||
break;
|
||||
if (get_user(c, buf))
|
||||
return -EFAULT;
|
||||
if (esc) {
|
||||
set_led(*buf);
|
||||
set_led(c);
|
||||
esc = 0;
|
||||
} else if (*buf == 27) {
|
||||
} else if (c == 27) {
|
||||
esc = 1;
|
||||
} else if (*buf == 12) {
|
||||
} else if (c == 12) {
|
||||
/* do a form feed */
|
||||
for (i=0; i<40; i++)
|
||||
vfd[i] = ' ';
|
||||
vfd_cursor = 0;
|
||||
} else if (*buf == 10) {
|
||||
} else if (c == 10) {
|
||||
if (vfd_cursor < 20)
|
||||
vfd_cursor = 20;
|
||||
else if (vfd_cursor < 40)
|
||||
@@ -175,7 +178,7 @@ static ssize_t briq_panel_write(struct file *file, const char *buf, size_t len,
|
||||
/* just a character */
|
||||
if (vfd_cursor > 39)
|
||||
scroll_vfd();
|
||||
vfd[vfd_cursor++] = *buf;
|
||||
vfd[vfd_cursor++] = c;
|
||||
}
|
||||
indx--;
|
||||
buf++;
|
||||
@@ -202,7 +205,7 @@ static struct miscdevice briq_panel_miscdev = {
|
||||
static int __init briq_panel_init(void)
|
||||
{
|
||||
struct device_node *root = find_path_device("/");
|
||||
char *machine;
|
||||
const char *machine;
|
||||
int i;
|
||||
|
||||
machine = get_property(root, "model", NULL);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#define __IB_MAD_PRIV_H__
|
||||
|
||||
#include <linux/completion.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <rdma/ib_mad.h>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/inet.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
#include <linux/route.h>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user