]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoALSA: usb-audio: add support for E-Mu Tracker Pre
Eran Tromer [Fri, 26 Sep 2008 05:07:03 +0000 (01:07 -0400)]
ALSA: usb-audio: add support for E-Mu Tracker Pre

Add support for the E-Mu "Tracker Pre" USB sound card, following
the example of the (very similar) E-Mu 0202 and E-Mu 0404 USB.

As with the 0202 and 0404 USB, functionality is very limited:
just a couple of sample rates, no volume/mute control, etc.

Signed-off-by: Eran Tromer <eran@tromer.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoALSA: Fix for reading RIRB buffer on NVIDIA aza controller with AMD Phenom cpu
Wei Ni [Fri, 26 Sep 2008 05:55:56 +0000 (13:55 +0800)]
ALSA: Fix for reading RIRB buffer on NVIDIA aza controller with AMD Phenom cpu

When read RIRB buffer immediately after RIRB interrupt received,
sometimes the data will be "0x0". If we wait for some time, the data
in buffer will be correct. This issue only occurred with AMD Phenom cpu.
So we set this "needs_damn_long_delay" flag.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoALSA: Support NVIDIA MCP78/7A HDMI audio
Wei Ni [Fri, 26 Sep 2008 05:45:46 +0000 (13:45 +0800)]
ALSA: Support NVIDIA MCP78/7A HDMI audio

Add NVIDIA HDMI HD-audio codec support in snd-hda-intel driver,
include NVIDIA MCP78/7A HDMI.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoALSA: hda - Fix / clean-up slave digital out codes
Takashi Iwai [Thu, 25 Sep 2008 14:32:41 +0000 (16:32 +0200)]
ALSA: hda - Fix / clean-up slave digital out codes

The recent slave_dig_out addition has some rooms to clean up.
Also it doesn't call snd_hda_cleanup_stream() properly for slaves
at closing.  The patch fixes both issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoALSA: hda: slave_dig_outs code block in wrong location
Matthew Ranostay [Thu, 25 Sep 2008 13:17:11 +0000 (09:17 -0400)]
ALSA: hda: slave_dig_outs code block in wrong location

Removed invalid references to slave_dig_outs inside the S/PDIF IN capture switch
control. Beforehand this was basically a mute switch for the S/PDIF outs as well.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoALSA: intel8x0 - Add quirk for Fujitsu Lifebook P7010
Takashi Iwai [Wed, 24 Sep 2008 07:59:44 +0000 (09:59 +0200)]
ALSA: intel8x0 - Add quirk for Fujitsu Lifebook P7010

Fujitsu Lifebook P7010 requires ac97_quirk=hp_only.
    http://bugzilla.kernel.org/show_bug.cgi?id=9100

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoALSA: Remove bitwise from snd_pcm_hw_param_t
Takashi Iwai [Wed, 24 Sep 2008 07:44:18 +0000 (09:44 +0200)]
ALSA: Remove bitwise from snd_pcm_hw_param_t

We have some arithmetic operations against snd_pcm_hw_param_t, thus
bitwise isn't correct for it.  Better to remove the flag to shut up
sparse warnings.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoALSA: hda: use last DAC defined for hp_pin
Matthew Ranostay [Wed, 24 Sep 2008 01:46:30 +0000 (21:46 -0400)]
ALSA: hda: use last DAC defined for hp_pin

Patch allows the last DAC in the dac_nids for the hp_nid if there is an
available one this isn't in use by a line_out entry or if hp_nid isn't already
defined. This solves the issues with the 'Headphone Playback' mixer
controls on the 92hd73xxx branch and possibly others.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agodoc/cdrom: Trvial documentation error, file not present
Randy Dunlap [Fri, 10 Oct 2008 06:22:44 +0000 (08:22 +0200)]
doc/cdrom: Trvial documentation error, file not present

The sbpcd tester program is not included in the kernel source tree,
so remove the reference to it.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reported-by: Nick Warne <nick@ukfsn.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoenic: Attempt to fix build in 32-bit such as i386.
David S. Miller [Fri, 10 Oct 2008 05:13:53 +0000 (22:13 -0700)]
enic: Attempt to fix build in 32-bit such as i386.

Such platforms lack readq/writeq but this driver want to call them.

Noticed by Andrew Morton.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcpv6: fix error with CONFIG_TCP_MD5SIG disabled
Guo-Fu Tseng [Fri, 10 Oct 2008 04:11:56 +0000 (21:11 -0700)]
tcpv6: fix error with CONFIG_TCP_MD5SIG disabled

This patch fix error with CONFIG_TCP_MD5SIG disabled.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonf_conntrack_ecache.h: Fix missing braces
Guo-Fu Tseng [Fri, 10 Oct 2008 04:10:36 +0000 (21:10 -0700)]
nf_conntrack_ecache.h: Fix missing braces

This patch add missing braces of today's net-next-2.6:
include/net/netfilter/nf_conntrack_ecache.h

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branches 'cma', 'cxgb3', 'ehca', 'ipath', 'ipoib', 'mad', 'misc', 'mlx4', ...
Roland Dreier [Fri, 10 Oct 2008 00:41:15 +0000 (17:41 -0700)]
Merge branches 'cma', 'cxgb3', 'ehca', 'ipath', 'ipoib', 'mad', 'misc', 'mlx4', 'mthca' and 'nes' into for-next

15 years agoRDMA/nes: Fix slab corruption
Chien Tung [Fri, 10 Oct 2008 00:41:05 +0000 (17:41 -0700)]
RDMA/nes: Fix slab corruption

Referencing cm_node after it is freed via rem_ref_cm_node() causes a
slab corruption.  There is no need to set cm_node->cm_id to NULL in
mini_cm_close().

Signed-off-by: Chien Tung <ctung@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoMerge branch 'next' into for-linus
James Morris [Fri, 10 Oct 2008 00:09:47 +0000 (11:09 +1100)]
Merge branch 'next' into for-linus

15 years agoppp: Use skb_queue_walk() in ppp_mp_insert().
David S. Miller [Thu, 9 Oct 2008 23:40:29 +0000 (16:40 -0700)]
ppp: Use skb_queue_walk() in ppp_mp_insert().

Instead of open-coded version.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoLinux 2.6.27 v2.6.27
Linus Torvalds [Thu, 9 Oct 2008 22:13:53 +0000 (15:13 -0700)]
Linux 2.6.27

15 years agoudp: complete port availability checking
Eric Dumazet [Thu, 9 Oct 2008 21:51:27 +0000 (14:51 -0700)]
udp: complete port availability checking

While looking at UDP port randomization, I noticed it
was litle bit pessimistic, not looking at type of sockets
(IPV6/IPV4) and not looking at bound addresses if any.

We should perform same tests than when binding to a
specific port.

This permits a cleanup of udp_lib_get_port()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcpv6: combine tcp_v6_send_(reset|ack)
Ilpo Järvinen [Thu, 9 Oct 2008 21:42:40 +0000 (14:42 -0700)]
tcpv6: combine tcp_v6_send_(reset|ack)

$ codiff tcp_ipv6.o.old tcp_ipv6.o.new
net/ipv6/tcp_ipv6.c:
  tcp_v6_md5_hash_hdr | -144
  tcp_v6_send_ack     | -585
  tcp_v6_send_reset   | -540
 3 functions changed, 1269 bytes removed, diff: -1269

net/ipv6/tcp_ipv6.c:
  tcp_v6_send_response | +791
 1 function changed, 791 bytes added, diff: +791

tcp_ipv6.o.new:
 4 functions changed, 791 bytes added, 1269 bytes removed, diff: -478

I choose to leave the reset related netns comment in place (not
the one that is killed) as I cannot understand its English so
it's a bit hard for me to evaluate its usefulness :-).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcpv6: convert opt[] -> topt in tcp_v6_send_reset
Ilpo Järvinen [Thu, 9 Oct 2008 21:42:01 +0000 (14:42 -0700)]
tcpv6: convert opt[] -> topt in tcp_v6_send_reset

after this I get:

$ diff-funcs tcp_v6_send_reset tcp_ipv6.c tcp_ipv6.c tcp_v6_send_ack
 --- tcp_ipv6.c:tcp_v6_send_reset()
 +++ tcp_ipv6.c:tcp_v6_send_ack()
@@ -1,4 +1,5 @@
-static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
+static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
u32 ts,
+                           struct tcp_md5sig_key *key)
 {
        struct tcphdr *th = tcp_hdr(skb), *t1;
        struct sk_buff *buff;
@@ -7,31 +8,14 @@
        struct sock *ctl_sk = net->ipv6.tcp_sk;
        unsigned int tot_len = sizeof(struct tcphdr);
        __be32 *topt;
-#ifdef CONFIG_TCP_MD5SIG
-       struct tcp_md5sig_key *key;
-#endif
-
-       if (th->rst)
-               return;
-
-       if (!ipv6_unicast_destination(skb))
-               return;

+       if (ts)
+               tot_len += TCPOLEN_TSTAMP_ALIGNED;
 #ifdef CONFIG_TCP_MD5SIG
-       if (sk)
-               key = tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr);
-       else
-               key = NULL;
-
        if (key)
                tot_len += TCPOLEN_MD5SIG_ALIGNED;
 #endif

-       /*
-        * We need to grab some memory, and put together an RST,
-        * and then put it into the queue to be sent.
-        */
-
        buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,
                         GFP_ATOMIC);
        if (buff == NULL)
@@ -46,18 +30,20 @@
        t1->dest = th->source;
        t1->source = th->dest;
        t1->doff = tot_len / 4;
-       t1->rst = 1;
-
-       if(th->ack) {
-               t1->seq = th->ack_seq;
-       } else {
-               t1->ack = 1;
-               t1->ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin
-                                   + skb->len - (th->doff<<2));
-       }
+       t1->seq = htonl(seq);
+       t1->ack_seq = htonl(ack);
+       t1->ack = 1;
+       t1->window = htons(win);

        topt = (__be32 *)(t1 + 1);

+       if (ts) {
+               *topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
+                               (TCPOPT_TIMESTAMP << 8) |
TCPOLEN_TIMESTAMP);
+               *topt++ = htonl(tcp_time_stamp);
+               *topt++ = htonl(ts);
+       }
+
 #ifdef CONFIG_TCP_MD5SIG
        if (key) {
                *topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
@@ -84,15 +70,10 @@
        fl.fl_ip_sport = t1->source;
        security_skb_classify_flow(skb, &fl);

-       /* Pass a socket to ip6_dst_lookup either it is for RST
-        * Underlying function will use this to retrieve the network
-        * namespace
-        */
        if (!ip6_dst_lookup(ctl_sk, &buff->dst, &fl)) {
                if (xfrm_lookup(&buff->dst, &fl, NULL, 0) >= 0) {
                        ip6_xmit(ctl_sk, buff, &fl, NULL, 0);
                        TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS);
-                       TCP_INC_STATS_BH(net, TCP_MIB_OUTRSTS);
                        return;
                }
        }

...which starts to be trivial to combine.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcpv6: trivial formatting changes to send_(ack|reset)
Ilpo Järvinen [Thu, 9 Oct 2008 21:41:38 +0000 (14:41 -0700)]
tcpv6: trivial formatting changes to send_(ack|reset)

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcpv[46]: fix md5 pseudoheader address field ordering
Ilpo Järvinen [Thu, 9 Oct 2008 21:37:47 +0000 (14:37 -0700)]
tcpv[46]: fix md5 pseudoheader address field ordering

Maybe it's just me but I guess those md5 people made a mess
out of it by having *_md5_hash_* to use daddr, saddr order
instead of the one that is natural (and equal to what csum
functions use). For the segment were sending, the original
addresses are reversed so buff's saddr == skb's daddr and
vice-versa.

Maybe I can finally proceed with unification of some code
after fixing it first... :-)

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor8169: fix early spinlock use
Francois Romieu [Thu, 9 Oct 2008 21:35:58 +0000 (14:35 -0700)]
r8169: fix early spinlock use

rtl8169_init_one
-> rtl_init_mac_address
   -> rtl_rar_set
      -> spin_lock_irq(&tp->lock);
[...]
-> spin_lock_init(&tp->lock);

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc95xx: fix usb usage on big endian platforms
Steve Glendinning [Thu, 9 Oct 2008 21:34:47 +0000 (14:34 -0700)]
smsc95xx: fix usb usage on big endian platforms

Fix warnings caught by David Miller on sparc64

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: update SNMP statiscts when T5 timer expired.
Vlad Yasevich [Thu, 9 Oct 2008 21:33:26 +0000 (14:33 -0700)]
sctp: update SNMP statiscts when T5 timer expired.

The T5 timer is the timer for the over-all shutdown procedure.  If
this timer expires, then shutdown procedure has not completed and we
ABORT the association.  We should update SCTP_MIB_ABORTED and
SCTP_MIB_CURRESTAB  when aborting.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Fix SNMP number of SCTP_MIB_ABORTED during violation handling.
Vlad Yasevich [Thu, 9 Oct 2008 21:33:01 +0000 (14:33 -0700)]
sctp: Fix SNMP number of SCTP_MIB_ABORTED during violation handling.

If ABORT chunks require authentication and a protocol violation
is triggered, we do not tear down the association.  Subsequently,
we should not increment SCTP_MIB_ABORTED.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Fix the SNMP number of SCTP_MIB_CURRESTAB
Wei Yongjun [Thu, 9 Oct 2008 21:32:24 +0000 (14:32 -0700)]
sctp: Fix the SNMP number of SCTP_MIB_CURRESTAB

RFC3873 defined SCTP_MIB_CURRESTAB:
  sctpCurrEstab OBJECT-TYPE
    SYNTAX         Gauge32
    MAX-ACCESS     read-only
    STATUS         current
    DESCRIPTION
         "The number of associations for which the current state is
         either ESTABLISHED, SHUTDOWN-RECEIVED or SHUTDOWN-PENDING."
    REFERENCE
         "Section 4 in RFC2960 covers the SCTP   Association state
         diagram."

If the T4 RTO timer expires many times(timeout), the association will enter
CLOSED state, so we should dec the number of SCTP_MIB_CURRESTAB, not inc the
number of SCTP_MIB_CURRESTAB.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomyri10ge: remove over-paranoid queue number modulus
Brice Goglin [Thu, 9 Oct 2008 21:31:42 +0000 (14:31 -0700)]
myri10ge: remove over-paranoid queue number modulus

No need to modulus the queue number in ->hard_start_xmit() since the
core is going to do that for you modulus ->real_num_tx_queues.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000: don't generate bad checksums for tcp packets with 0 csum
Dave Graham [Thu, 9 Oct 2008 21:29:26 +0000 (14:29 -0700)]
e1000: don't generate bad checksums for tcp packets with 0 csum

When offloading transmit checksums only, the driver was not
correctly configuring the hardware to handle the case of a zero
checksum.  For UDP the correct behavior is to leave it alone, but
for tcp the checksum must be changed from 0x0000 to 0xFFFF.  The
hardware takes care of this case but only if it is told the
packet is tcp.

same patch as e1000e

Signed-off-by: Dave Graham <david.graham@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: don't generate bad checksums for tcp packets with 0 csum
Dave Graham [Thu, 9 Oct 2008 21:28:58 +0000 (14:28 -0700)]
e1000e: don't generate bad checksums for tcp packets with 0 csum

When offloading transmit checksums only, the driver was not
correctly configuring the hardware to handle the case of a zero
checksum.  For UDP the correct behavior is to leave it alone, but
for tcp the checksum must be changed from 0x0000 to 0xFFFF.  The
hardware takes care of this case but only if it is told the
packet is tcp.

Signed-off-by: Dave Graham <david.graham@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoDon't allow splice() to files opened with O_APPEND
Linus Torvalds [Thu, 9 Oct 2008 21:04:54 +0000 (14:04 -0700)]
Don't allow splice() to files opened with O_APPEND

This is debatable, but while we're debating it, let's disallow the
combination of splice and an O_APPEND destination.

It's not entirely clear what the semantics of O_APPEND should be, and
POSIX apparently expects pwrite() to ignore O_APPEND, for example.  So
we could make up any semantics we want, including the old ones.

But Miklos convinced me that we should at least give it some thought,
and that accepting writes at arbitrary offsets is wrong at least for
IS_APPEND() files (which always have O_APPEND set, even if the reverse
isn't true: you can obviously have O_APPEND set on a regular file).

So disallow O_APPEND entirely for now.  I doubt anybody cares, and this
way we have one less gray area to worry about.

Reported-and-argued-for-by: Miklos Szeredi <miklos@szeredi.hu>
Acked-by: Jens Axboe <ens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-rmk' of git://git.marvell.com/orion
Russell King [Thu, 9 Oct 2008 20:33:07 +0000 (21:33 +0100)]
Merge branch 'for-rmk' of git://git.marvell.com/orion

Merge branch 'orion-devel' into devel

15 years agoMerge branch 'for-rmk' of git://source.mvista.com/git/linux-davinci-2.6.git
Russell King [Thu, 9 Oct 2008 20:33:05 +0000 (21:33 +0100)]
Merge branch 'for-rmk' of git://source.mvista.com/git/linux-davinci-2.6.git

Merge branch 'davinci' into devel

15 years agoMerge branch 'for-rmk' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6.git
Russell King [Thu, 9 Oct 2008 20:33:03 +0000 (21:33 +0100)]
Merge branch 'for-rmk' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6.git

Merge branch 'imx-devel' into devel

15 years agoMerge branch 'pxa-all' into devel
Russell King [Thu, 9 Oct 2008 20:33:02 +0000 (21:33 +0100)]
Merge branch 'pxa-all' into devel

Conflicts:

arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/include/mach/hardware.h
arch/arm/mach-pxa/spitz.c

15 years agoMerge branch 'at91' into devel
Russell King [Thu, 9 Oct 2008 20:31:58 +0000 (21:31 +0100)]
Merge branch 'at91' into devel

15 years agoMerge branch 'ptebits' into devel
Russell King [Thu, 9 Oct 2008 20:31:56 +0000 (21:31 +0100)]
Merge branch 'ptebits' into devel

Conflicts:

arch/arm/Kconfig

15 years agoMerge branches 'machtypes', 'core', 'ep93xx', 'ks8695', 'netdev' and 'sa1100' into...
Russell King [Thu, 9 Oct 2008 20:31:54 +0000 (21:31 +0100)]
Merge branches 'machtypes', 'core', 'ep93xx', 'ks8695', 'netdev' and 'sa1100' into devel

15 years ago[ARM] 5295/1: make ZONE_DMA optional
Nicolas Pitre [Tue, 7 Oct 2008 19:14:55 +0000 (20:14 +0100)]
[ARM] 5295/1: make ZONE_DMA optional

Most ARM machines don't need a special "DMA" memory zone, and
when configured out, the kernel becomes a bit smaller:

|   text    data     bss     dec     hex filename
|3826182  102384  111700 4040266  3da64a vmlinux
|3823593  101616  111700 4036909  3d992d vmlinux.nodmazone

This is because the system now has only one zone total which effect is
to optimize away many conditionals in page allocation paths.

So let's configure this zone only on machines that need split zones.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agobnx2: Update version to 1.8.1.
Michael Chan [Thu, 9 Oct 2008 19:27:06 +0000 (12:27 -0700)]
bnx2: Update version to 1.8.1.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Handle DMA mapping errors.
Benjamin Li [Thu, 9 Oct 2008 19:26:41 +0000 (12:26 -0700)]
bnx2: Handle DMA mapping errors.

Before, the driver would not care about the return codes from pci_map_*
functions.  This could be potentially dangerous if a mapping failed.
Now, we will check all pci_map_* calls.  On the transmit side, we switch
to use the new function skb_dma_map().  On the receive side, we add
pci_dma_mapping_error().

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Eliminate TSO header modifications.
Michael Chan [Thu, 9 Oct 2008 19:24:39 +0000 (12:24 -0700)]
bnx2: Eliminate TSO header modifications.

This is now possible with updated firmware.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Thu, 9 Oct 2008 19:23:54 +0000 (12:23 -0700)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  hwmon: (abituguru3) Enable DMI probing feature on Abit AT8 32X
  hwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X
  hwmon: (adt7473) Fix some bogosity in documentation file
  hwmon: Define sysfs interface for energy consumption register
  hwmon: (it87) Prevent power-off on Shuttle SN68PT
  eeepc-laptop: Fix hwmon interface

15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Thu, 9 Oct 2008 19:23:35 +0000 (12:23 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] correct broken links and email addresses

15 years agobnx2: Update 5706/5708 firmware.
Michael Chan [Thu, 9 Oct 2008 19:22:38 +0000 (12:22 -0700)]
bnx2: Update 5706/5708 firmware.

With this new firmware, the driver no longer has to modify the
TCP/IP header fields when transmitting TSO packets.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Check netif_running() in all ethtool operations.
Michael Chan [Thu, 9 Oct 2008 19:21:46 +0000 (12:21 -0700)]
bnx2: Check netif_running() in all ethtool operations.

We need to check netif_running() state in most ethtool operations
and properly handle the !netif_running() state where the chip is
in an uninitailzed state or low power state that may not accept
any MMIO.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2: Add bnx2_shutdown_chip().
Michael Chan [Thu, 9 Oct 2008 19:21:08 +0000 (12:21 -0700)]
bnx2: Add bnx2_shutdown_chip().

This logic is used in bnx2_close() and bnx2_suspend() and
so should be separated out into a separate function.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoSLOB: fix bogus ksize calculation fix
Matt Mackall [Wed, 8 Oct 2008 19:51:57 +0000 (14:51 -0500)]
SLOB: fix bogus ksize calculation fix

This fixes the previous fix, which was completely wrong on closer
inspection. This version has been manually tested with a user-space
test harness and generates sane values. A nearly identical patch has
been boot-tested.

The problem arose from changing how kmalloc/kfree handled alignment
padding without updating ksize to match. This brings it in sync.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoinet: Make tunnel RX/TX byte counters more consistent
Herbert Xu [Thu, 9 Oct 2008 19:03:17 +0000 (12:03 -0700)]
inet: Make tunnel RX/TX byte counters more consistent

This patch makes the RX/TX byte counters for IPIP, GRE and SIT more
consistent.  Previously we included the external IP headers on the
way out but not when the packet is inbound.

The new scheme is to count payload only in both directions.  For
IPIP and SIT this simply means the exclusion of the external IP
header.  For GRE this means that we exclude the GRE header as
well.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogre: Add Transparent Ethernet Bridging
Herbert Xu [Thu, 9 Oct 2008 19:00:17 +0000 (12:00 -0700)]
gre: Add Transparent Ethernet Bridging

This patch adds support for Ethernet over GRE encapsulation.
This is exposed to user-space with a new link type of "gretap"
instead of "gre".  It will create an ARPHRD_ETHER device in
lieu of the usual ARPHRD_IPGRE.

Note that to preserver backwards compatibility all Transparent
Ethernet Bridging packets are passed to an ARPHRD_IPGRE tunnel
if its key matches and there is no ARPHRD_ETHER device whose
key matches more closely.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogre: Add netlink interface
Herbert Xu [Thu, 9 Oct 2008 18:59:55 +0000 (11:59 -0700)]
gre: Add netlink interface

This patch adds a netlink interface that will eventually displace
the existing ioctl interface.  It utilises the elegant rtnl_link_ops
mechanism.

This also means that user-space no longer needs to rely on the
tunnel interface being of type GRE to identify GRE tunnels.  The
identification can now occur using rtnl_link_ops.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogre: Move MTU setting out of ipgre_tunnel_bind_dev
Herbert Xu [Thu, 9 Oct 2008 18:59:32 +0000 (11:59 -0700)]
gre: Move MTU setting out of ipgre_tunnel_bind_dev

This patch moves the dev->mtu setting out of ipgre_tunnel_bind_dev.
This is in prepartion of using rtnl_link where we'll need to make
the MTU setting conditional on whether the user has supplied an
MTU.  This also requires the move of the ipgre_tunnel_bind_dev
call out of the dev->init function so that we can access the user
parameters later.

This patch also adds a check to prevent setting the MTU below
the minimum of 68.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agogre: Use needed_headroom
Herbert Xu [Thu, 9 Oct 2008 18:58:54 +0000 (11:58 -0700)]
gre: Use needed_headroom

Now that we have dev->needed_headroom, we can use it instead of
having a bogus dev->hard_header_len.  This also allows us to
include dev->hard_header_len in the MTU computation so that when
we do have a meaningful hard_harder_len in future it is included
automatically in figuring out the MTU.

Incidentally, this fixes a bug where we ignored the needed_headroom
field of the underlying device in calculating our own hard_header_len.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[CPUFREQ] Fix BUG: using smp_processor_id() in preemptible code
Andrea Righi [Thu, 18 Sep 2008 10:43:40 +0000 (10:43 +0000)]
[CPUFREQ] Fix BUG: using smp_processor_id() in preemptible code

Use get_cpu()/put_cpu() in cpufreq_ondemand init routine, instead of
smp_processor_id() to avoid the following BUG:

[   35.313118] BUG: using smp_processor_id() in preemptible [00000000] code=: modprobe/4952
[   35.313132] caller is cpufreq_gov_dbs_init+0xa/0x8f [cpufreq_ondemand]
[   35.313140] Pid: 4952, comm: modprobe Not tainted 2.6.27-rc5-mm1 #23
[   35.313145] Call Trace:
[   35.313158]  [<ffffffff80361ff7>] debug_smp_processor_id+0xd7/0xe0
[   35.313167]  [<ffffffffa010800a>] cpufreq_gov_dbs_init+0xa/0x8f [cpufreq_ondemand]
[   35.313176]  [<ffffffff8020903b>] _stext+0x3b/0x160
[   35.313185]  [<ffffffff804768c5>] __mutex_unlock_slowpath+0xe5/0x190
[   35.313195]  [<ffffffff8026236a>] trace_hardirqs_on_caller+0xca/0x140
[   35.313205]  [<ffffffff8026ef4c>] sys_init_module+0xdc/0x210
[   35.313212]  [<ffffffff8020b7cb>] system_call_fastpath+0x16/0x1b

Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] Don't export governors for default governor
Sven Wegener [Sat, 20 Sep 2008 14:50:08 +0000 (16:50 +0200)]
[CPUFREQ] Don't export governors for default governor

We don't need to export the governors for use as the default governor,
because the default governor will be built-in anyway and we can access
the symbol directly.

This also fixes the following sparse warnings:

drivers/cpufreq/cpufreq_conservative.c:578:25: warning: symbol 'cpufreq_gov_conservative' was not declared. Should it be static?
drivers/cpufreq/cpufreq_ondemand.c:582:25: warning: symbol 'cpufreq_gov_ondemand' was not declared. Should it be static?
drivers/cpufreq/cpufreq_performance.c:39:25: warning: symbol 'cpufreq_gov_performance' was not declared. Should it be static?
drivers/cpufreq/cpufreq_powersave.c:38:25: warning: symbol 'cpufreq_gov_powersave' was not declared. Should it be static?
drivers/cpufreq/cpufreq_userspace.c:190:25: warning: symbol 'cpufreq_gov_userspace' was not declared. Should it be static?

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ][6/6] cpufreq: Add idle microaccounting in ondemand governor
venkatesh.pallipadi@intel.com [Mon, 4 Aug 2008 18:59:12 +0000 (11:59 -0700)]
[CPUFREQ][6/6] cpufreq: Add idle microaccounting in ondemand governor

Use get_cpu_idle_time_us() to get micro-accounted idle information.
This enables ondemand to get more accurate idle and busy timings
than the jiffy based calculation. As a result, we can decrease
the ondemand safety gaurd band from 80-10 to 95-3.

Results in more aggressive power savings.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ][5/6] cpufreq: Changes to get_cpu_idle_time_us(), used by ondemand governor
venkatesh.pallipadi@intel.com [Mon, 4 Aug 2008 18:59:11 +0000 (11:59 -0700)]
[CPUFREQ][5/6] cpufreq: Changes to get_cpu_idle_time_us(), used by ondemand governor

export get_cpu_idle_time_us() for it to be used in ondemand governor.
Last update time can be current time when the CPU is currently non-idle,
accounting for the busy time since last idle.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ][4/6] cpufreq_ondemand: Parameterize down differential
venkatesh.pallipadi@intel.com [Mon, 4 Aug 2008 18:59:10 +0000 (11:59 -0700)]
[CPUFREQ][4/6] cpufreq_ondemand: Parameterize down differential

Use a parameter for down differential, instead of hardcoded 10%. Follow-on
patch changes the down-differential dynamically, based on whether
we are using idle micro-accounting or not.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ][3/6] cpufreq: get_cpu_idle_time() changes in ondemand for idle-microaccounting
venkatesh.pallipadi@intel.com [Mon, 4 Aug 2008 18:59:09 +0000 (11:59 -0700)]
[CPUFREQ][3/6] cpufreq: get_cpu_idle_time() changes in ondemand for idle-microaccounting

Preparatory changes for doing idle micro-accounting in ondemand governor.
get_cpu_idle_time() gets extra parameter and returns idle time and also the
wall time that corresponds to the idle time measurement.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ][2/6] cpufreq: Change load calculation in ondemand for software coordination
venkatesh.pallipadi@intel.com [Mon, 4 Aug 2008 18:59:08 +0000 (11:59 -0700)]
[CPUFREQ][2/6] cpufreq: Change load calculation in ondemand for software coordination

Change the load calculation algorithm in ondemand to work well with software
coordination of frequency across the dependent cpus.

Multiply individual CPU utilization with the average freq of that logical CPU
during the measurement interval (using getavg call). And find the max CPU
utilization number in terms of CPU freq. That number is then used to
get to the target freq for next sampling interval.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ][1/6] cpufreq: Add cpu number parameter to __cpufreq_driver_getavg()
venkatesh.pallipadi@intel.com [Mon, 4 Aug 2008 18:59:07 +0000 (11:59 -0700)]
[CPUFREQ][1/6] cpufreq: Add cpu number parameter to __cpufreq_driver_getavg()

Add a cpu parameter to __cpufreq_driver_getavg(). This is needed for software
cpufreq coordination where policy->cpu may not be same as the CPU on which we
want to getavg frequency.

A follow-on patch will use this parameter to getavg freq from all cpus
in policy->cpus.

Change since last patch. Fix the offline/online and suspend/resume
oops reported by Youquan Song <youquan.song@intel.com>

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] use deferrable delayed work init in conservative governor
Ben Slusky [Mon, 7 Jul 2008 17:16:20 +0000 (13:16 -0400)]
[CPUFREQ] use deferrable delayed work init in conservative governor

Venki Pallipadi made a similar change to the ondemand governor a while
back (in commit 28287033e12463c8ff89f1ea8038783d0360391c). It seems to
work just as well in the conservative governor, leading to fewer wakeups
as reported by powertop.

Signed-off-by: Ben Slusky <sluskyb@paranoiacs.org>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] drivers/cpufreq/cpufreq.c: Adjust error handling code involving cpufreq_cpu_put
Julia Lawall [Fri, 25 Jul 2008 20:44:53 +0000 (22:44 +0200)]
[CPUFREQ] drivers/cpufreq/cpufreq.c: Adjust error handling code involving cpufreq_cpu_put

After calling cpufreq_cpu_get, error handling code should call
cpufreq_cpu_put.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r@
expression x,E;
statement S;
position p1,p2,p3;
@@

(
if ((x = cpufreq_cpu_get@p1(...)) == NULL || ...) S
|
x = cpufreq_cpu_get@p1(...)
... when != x
if (x == NULL || ...) S
)
<...
if@p3 (...) { ... when != cpufreq_cpu_put(x)
                  when != if (x) { ... cpufreq_cpu_put(x); ...}
    return@p2 ...;
}
...>
(
return x;
|
return 0;
|
x = E
|
E = x
|
cpufreq_cpu_put(x)
)

@exists@
position r.p1,r.p2,r.p3;
expression x;
int ret != 0;
statement S;
@@

* x = cpufreq_cpu_get@p1(...)
  <...
* if@p3 (...)
  S
  ...>
* return@p2 \(NULL\|ret\);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] add error handling for cpufreq_register_governor() error
Akinobu Mita [Mon, 14 Jul 2008 03:00:45 +0000 (12:00 +0900)]
[CPUFREQ] add error handling for cpufreq_register_governor() error

Add error handling for cpufreq_register_governor() error

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: cpufreq@lists.linux.org.uk
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] acpi-cpufreq: add error handling for cpufreq_register_driver() error
Akinobu Mita [Mon, 14 Jul 2008 02:59:44 +0000 (11:59 +0900)]
[CPUFREQ] acpi-cpufreq: add error handling for cpufreq_register_driver() error

add error handling for cpufreq_register_driver() error

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: cpufreq@lists.linux.org.uk
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c
Paolo Ciarrocchi [Mon, 28 Jul 2008 19:08:16 +0000 (21:08 +0200)]
[CPUFREQ] Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c

Before:
total: 11 errors, 15 warnings, 255 lines checked

After:
total: 0 errors, 6 warnings, 254 lines checked

paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/powernow-k6.o.*
476932f5e1ffe365db9d1dfb3f860369  /tmp/powernow-k6.o.after
476932f5e1ffe365db9d1dfb3f860369  /tmp/powernow-k6.o.before

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] Coding style fixes to arch/x86/kernel/cpu/cpufreq/elanfreq.c
Paolo Ciarrocchi [Mon, 28 Jul 2008 11:00:49 +0000 (13:00 +0200)]
[CPUFREQ] Coding style fixes to arch/x86/kernel/cpu/cpufreq/elanfreq.c

Before:
total: 15 errors, 10 warnings, 308 lines checked

After:
total: 0 errors, 4 warnings, 308 lines checked

paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/elafreq.o.*
add1d36c2f077c5aab7682e8642a9f34  /tmp/elafreq.o.after
add1d36c2f077c5aab7682e8642a9f34  /tmp/elafreq.o.before

paolo@paolo-desktop:~/linux.trees.git$ size /tmp/elafreq.o.*
   text    data     bss     dec     hex filename
    934     270       4    1208     4b8 /tmp/elafreq.o.after
    934     270       4    1208     4b8 /tmp/elafreq.o.before

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] correct broken links and email addresses
Németh Márton [Thu, 9 Oct 2008 12:59:17 +0000 (14:59 +0200)]
[CPUFREQ] correct broken links and email addresses

Replace the no longer working links and email address in the
documentation and in source code.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years agophylib: two dynamic mii_bus allocation fallout fixes
Lennert Buytenhek [Thu, 9 Oct 2008 16:45:04 +0000 (09:45 -0700)]
phylib: two dynamic mii_bus allocation fallout fixes

1. arch/powerpc/platforms/pasemi/gpio_mdio.c also needs to be
   converted over to mdiobus_{alloc,free}().

2. drivers/net/phy/fixed.c used to embed a struct mii_bus into its
   struct fixed_mdio_bus and then use container_of() to go from the
   former to the latter.  Since mii bus structures are no longer
   embedded, we need to do something like use the mii bus private
   pointer to go from mii_bus to fixed_mdio_bus instead.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosched debug: add name to sched_domain sysctl entries
Ingo Molnar [Thu, 9 Oct 2008 09:35:51 +0000 (11:35 +0200)]
sched debug: add name to sched_domain sysctl entries

add /proc/sys/kernel/sched_domain/cpu0/domain0/name, to make
it easier to see which specific scheduler domain remained at
that entry.

Since we process the scheduler domain tree and
simplify it, it's not always immediately clear during debugging
which domain came from where.

depends on CONFIG_SCHED_DEBUG=y.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[ARM] 5239/1: Palm Zire 72 power management support
Sergey Lapin [Fri, 29 Aug 2008 14:53:24 +0000 (15:53 +0100)]
[ARM] 5239/1: Palm Zire 72 power management support

This patch contains Palm Zire 72 power
management support.

Depends on #5238/1

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5298/1: Drop desc_handle_irq()
Dmitry Baryshkov [Thu, 9 Oct 2008 12:36:24 +0000 (13:36 +0100)]
[ARM] 5298/1: Drop desc_handle_irq()

desc_handle_irq() was declared as obsolete since long ago.
Replace it with generic_handle_irq()

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agohwmon: (abituguru3) Enable DMI probing feature on Abit AT8 32X
Alistair John Strachan [Thu, 9 Oct 2008 13:33:59 +0000 (15:33 +0200)]
hwmon: (abituguru3) Enable DMI probing feature on Abit AT8 32X

Enable driver checking of the DMI product name (when enabled) on
an Abit AT8 32X, instead of falling back to a manual probe. This
eliminates false negatives and eventually will help avoid
unnecessary bus probes on unsupported mainboards.

Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Tested-by: Daniel Exner <dex@dragonslave.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agohwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X
Alistair John Strachan [Thu, 9 Oct 2008 13:33:59 +0000 (15:33 +0200)]
hwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X

The table for the Abit AT8 32X was incorrectly missing an entry
for the sixth ("AUX3") fan. Add this entry, exporting the fan
reading to userspace.

Closes lm-sensors.org ticket #2339.

Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Tested-by: Daniel Exner <dex@dragonslave.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agohwmon: (adt7473) Fix some bogosity in documentation file
Darrick J. Wong [Thu, 9 Oct 2008 13:33:58 +0000 (15:33 +0200)]
hwmon: (adt7473) Fix some bogosity in documentation file

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agohwmon: Define sysfs interface for energy consumption register
Darrick J. Wong [Thu, 9 Oct 2008 13:33:58 +0000 (15:33 +0200)]
hwmon: Define sysfs interface for energy consumption register

Describe the sysfs files that were introduced in the ibmaem driver.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agohwmon: (it87) Prevent power-off on Shuttle SN68PT
Jean Delvare [Thu, 9 Oct 2008 13:33:58 +0000 (15:33 +0200)]
hwmon: (it87) Prevent power-off on Shuttle SN68PT

On the Shuttle SN68PT, FAN_CTL2 is apparently not connected to a fan,
but to something else. One user has reported instant system power-off
when changing the PWM2 duty cycle, so we disable it.

I use the board name string as the trigger in case the same board is
ever used in other systems.

This closes lm-sensors ticket #2349:
pwmconfig causes a hard poweroff
http://www.lm-sensors.org/ticket/2349

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoeeepc-laptop: Fix hwmon interface
Corentin Chary [Thu, 9 Oct 2008 13:33:57 +0000 (15:33 +0200)]
eeepc-laptop: Fix hwmon interface

Creates a name file in the sysfs directory, that
is needed for the libsensors library to work.
Also rename fan1_pwm to pwm1 and scale its value as needed.

This fixes bug #11520:
http://bugzilla.kernel.org/show_bug.cgi?id=11520

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years ago[ARM] 5297/1: [KS8695] Fix two compile-time warnings
Andrew Victor [Tue, 7 Oct 2008 19:44:07 +0000 (20:44 +0100)]
[ARM] 5297/1: [KS8695] Fix two compile-time warnings

Fix two warnings when compiling for the KS8695 processor.

arch/arm/include/asm/dma-mapping.h: In function 'dma_to_virt':
arch/arm/include/asm/dma-mapping.h:40: warning: return makes pointer
from integer without a cast

Section mismatch in reference from the function pcibios_fixup_bus() to
the (unknown reference) .devinit.text:(unknown)
The function pcibios_fixup_bus() references
the (unknown reference) __devinit (unknown).
This is often because pcibios_fixup_bus lacks a __devinit
annotation or the annotation of (unknown) is wrong.

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5296/1: [KS8695] Replace macro's with trailing underscores.
Andrew Victor [Tue, 7 Oct 2008 19:20:15 +0000 (20:20 +0100)]
[ARM] 5296/1: [KS8695] Replace macro's with trailing underscores.

Replace Macro names that have trailing underscores.
Also use the IOPD() macro instead of a hard-coded bit-shift (for
better readability).

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoblock_dev: fix kernel-doc in new functions
Randy Dunlap [Thu, 9 Oct 2008 08:42:38 +0000 (10:42 +0200)]
block_dev: fix kernel-doc in new functions

Fix kernel-doc in new functions:

Error(mmotm-2008-1002-1617//fs/block_dev.c:895): duplicate section name 'Description'
Error(mmotm-2008-1002-1617//fs/block_dev.c:924): duplicate section name 'Description'
Warning(mmotm-2008-1002-1617//fs/block_dev.c:1282): No description found for parameter 'pathname'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: add some comments around the bio read-write flags
Jens Axboe [Thu, 9 Oct 2008 07:01:10 +0000 (09:01 +0200)]
block: add some comments around the bio read-write flags

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: mark bio_split_pool static
Denis ChengRq [Thu, 9 Oct 2008 06:57:05 +0000 (08:57 +0200)]
block: mark bio_split_pool static

Since all bio_split calls refer the same single bio_split_pool, the bio_split
function can use bio_split_pool directly instead of the mempool_t parameter;

then the mempool_t parameter can be removed from bio_split param list, and
bio_split_pool is only referred in fs/bio.c file, can be marked static.

Signed-off-by: Denis ChengRq <crquan@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Find bio sector offset given idx and offset
Martin K. Petersen [Thu, 2 Oct 2008 02:42:53 +0000 (22:42 -0400)]
block: Find bio sector offset given idx and offset

Helper function to find the sector offset in a bio given bvec index
and page offset.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: gendisk integrity wrapper
Martin K. Petersen [Thu, 2 Oct 2008 16:47:49 +0000 (18:47 +0200)]
block: gendisk integrity wrapper

This is a wrapper for accessing a gendisk's integrity bits.  It allows
the integrity support in MD to be compiled with BLK_DEV_INTEGRITY off.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Switch blk_integrity_compare from bdev to gendisk
Martin K. Petersen [Wed, 1 Oct 2008 07:38:39 +0000 (03:38 -0400)]
block: Switch blk_integrity_compare from bdev to gendisk

The DM and MD integrity support now depends on being able to use
gendisks instead of block_devices when comparing integrity profiles.
Change function parameters accordingly.

Also update comparison logic so that two NULL profiles are a valid
configuration.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Fix double put in blk_integrity_unregister
Martin K. Petersen [Wed, 1 Oct 2008 07:38:38 +0000 (03:38 -0400)]
block: Fix double put in blk_integrity_unregister

- kobject_del already puts the parent.

 - Set integrity profile to NULL to prevent stale data.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Introduce integrity data ownership flag
Martin K. Petersen [Wed, 1 Oct 2008 07:38:37 +0000 (03:38 -0400)]
block: Introduce integrity data ownership flag

A filesystem might supply its own integrity metadata.  Introduce a
flag that indicates whether the filesystem or the block layer owns the
integrity buffer.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: revert part of d7533ad0e132f92e75c1b2eb7c26387b25a583c1
Jens Axboe [Thu, 2 Oct 2008 10:53:22 +0000 (12:53 +0200)]
block: revert part of d7533ad0e132f92e75c1b2eb7c26387b25a583c1

We need bdev_get_integrity() to support the pending md/dm patches.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agobio.h: Remove unused conditional code
Alberto Bertogli [Thu, 2 Oct 2008 10:46:53 +0000 (12:46 +0200)]
bio.h: Remove unused conditional code

The whole bio_integrity() definition is inside an #ifdef
CONFIG_BLK_DEV_INTEGRITY, there's no need for the conditional code.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: remove end_{queued|dequeued}_request()
Kiyoshi Ueda [Wed, 1 Oct 2008 14:14:46 +0000 (10:14 -0400)]
block: remove end_{queued|dequeued}_request()

This patch removes end_queued_request() and end_dequeued_request(),
which are no longer used.

As a results, users of __end_request() became only end_request().
So the actual code in __end_request() is moved to end_request()
and __end_request() is removed.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: change elevator to use __blk_end_request()
Kiyoshi Ueda [Wed, 1 Oct 2008 14:13:44 +0000 (10:13 -0400)]
block: change elevator to use __blk_end_request()

This patch converts elevator to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.
Related 'uptodate' arguments is converted to 'error'.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agogdrom: change to use __blk_end_request()
Kiyoshi Ueda [Wed, 1 Oct 2008 14:13:02 +0000 (10:13 -0400)]
gdrom: change to use __blk_end_request()

This patch converts gdrom to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.

gd.transfer is '1' in error cases and '0' in non-error cases,
so gdrom hasn't been propagating any error code to the block layer.
We can just convert error cases to '-EIO'.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agomemstick: change to use __blk_end_request()
Kiyoshi Ueda [Wed, 1 Oct 2008 14:12:15 +0000 (10:12 -0400)]
memstick: change to use __blk_end_request()

This patch converts memstick to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agovirtio_blk: change to use __blk_end_request()
Kiyoshi Ueda [Wed, 1 Oct 2008 14:11:20 +0000 (10:11 -0400)]
virtio_blk: change to use __blk_end_request()

This patch converts virtio_blk to use __blk_end_request() directly
so that end_{queued|dequeued}_request() can be removed.
Related 'uptodate' argument is converted to 'error'.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblktrace: use BLKTRACE_BDEV_SIZE as the name size for setup structure
Jens Axboe [Wed, 1 Oct 2008 14:16:25 +0000 (16:16 +0200)]
blktrace: use BLKTRACE_BDEV_SIZE as the name size for setup structure

Define as 32, which is is what BDEVNAME_SIZE is/was as well. This keeps
the user interface the same and gets rid of the difference between
kernel and user api here.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: add lld busy state exporting interface
Kiyoshi Ueda [Wed, 1 Oct 2008 14:12:15 +0000 (16:12 +0200)]
block: add lld busy state exporting interface

This patch adds an new interface, blk_lld_busy(), to check lld's
busy state from the block layer.
blk_lld_busy() calls down into low-level drivers for the checking
if the drivers set q->lld_busy_fn() using blk_queue_lld_busy().

This resolves a performance problem on request stacking devices below.

Some drivers like scsi mid layer stop dispatching request when
they detect busy state on its low-level device like host/target/device.
It allows other requests to stay in the I/O scheduler's queue
for a chance of merging.

Request stacking drivers like request-based dm should follow
the same logic.
However, there is no generic interface for the stacked device
to check if the underlying device(s) are busy.
If the request stacking driver dispatches and submits requests to
the busy underlying device, the requests will stay in
the underlying device's queue without a chance of merging.
This causes performance problem on burst I/O load.

With this patch, busy state of the underlying device is exported
via q->lld_busy_fn().  So the request stacking driver can check it
and stop dispatching requests if busy.

The underlying device driver must return the busy state appropriately:
    1: when the device driver can't process requests immediately.
    0: when the device driver can process requests immediately,
       including abnormal situations where the device driver needs
       to kill all requests.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: Fix blk_start_queueing() to not kick a stopped queue
Elias Oltmanns [Wed, 1 Oct 2008 14:02:33 +0000 (16:02 +0200)]
block: Fix blk_start_queueing() to not kick a stopped queue

blk_start_queueing() should act like the generic queue unplugging
and kicking and ignore a stopped queue. Such a queue may not be
run until after a call to blk_start_queue().

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoinclude blktrace_api.h in headers_install
Sven Schuetz [Fri, 26 Sep 2008 08:58:02 +0000 (10:58 +0200)]
include blktrace_api.h in headers_install

This header file is of interest for user space programming, i.e.
for tools that process blktrace data.

We would like to use it for a tool on-top of blktrace which processes
data provided by blktrace. For this purpose, it would be helpful
if the blktrace API would make it to /usr/include/linux.

The git tree for the blktrace tools comes with its own copy of this header
file. I didn't manage to replace that copy with the file generated
by the patch below yet. A few more cleanups would be needed.
For example, the blktrace ioctl numbers, which are currently defined in
usr/include/fs.h, might need to be moved. Should be feasible, though.

Signed-off-by: Sven Schuetz <sven@linux.vnet.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: reserve some tags just for sync IO
Jens Axboe [Thu, 25 Sep 2008 09:42:41 +0000 (11:42 +0200)]
block: reserve some tags just for sync IO

By only allowing async IO to consume 3/4 ths of the tag depth, we
always have slots free to serve sync IO. This is important to avoid
having writes fill the entire tag queue, thus starving reads.

Original patch and idea from Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>