Commit graph

72918 commits

Author SHA1 Message Date
Chuck Lever 513f54b78f sg_init_table() should use unsigned loop index variable
Clean up: fix a mixed sign comparison in sg_init_table() accidentally
introduced by commit d6ec0842.  The sign of the loop index variable
should match the sign of the "nents" argument.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
2007-10-29 09:18:04 +01:00
Chuck Lever 74eb94f7b8 sg_last() should use unsigned loop index variable
Clean up: fix a mixed sign comparison in sg_last() accidentally
introduced by commit 70eb8040.  The sign of the loop index variable
should match the sign of the "nents" argument.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
2007-10-29 09:18:04 +01:00
Anton Blanchard 30fa0d0f0c Initialise scatter/gather list in sg driver
After turning on DEBUG_SG I hit a fail:

kernel BUG at include/linux/scatterlist.h:50!

	sg_build_indirect
	sg_build_reserve
	sg_open
	chrdev_open
	__dentry_open
	do_filp_open
	do_sys_open

We should initialise the sg list when we allocate it in sg_build_sgat.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-29 09:18:03 +01:00
Anton Blanchard acd054a5ef Initialise scatter/gather list in ata_sg_setup
After turning on DEBUG_SG I hit a fail:

kernel BUG at include/linux/scatterlist.h:50!

	ata_qc_issue
	ata_scsi_translate
	ipr_queuecommand
	scsi_dispatch_cmd
	scsi_request_fn
	elv_insert
	blk_execute_rq_nowait
	blk_execute_rq
	sg_io
	scsi_cmd_ioctl
	cdrom_ioctl
	sr_block_ioctl
	blkdev_driver_ioctl
	blkdev_ioctl
	block_ioctl
	do_ioctl
	vfs_ioctl
	sys_ioctl
	sg_ioctl_trans

It looks like ata_sg_setup is working on an uninitialised sg table. Call
sg_init_table to initialise it before use.

Signed-off-by: Anton Blanchard <anton@samba.org>

Note: this patch will fix it, but you could also get away with just
doing the sg_init_table() once at qc creation time.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-29 09:18:03 +01:00
FUJITA Tomonori 5336940dd8 x86: fix pci-gart failure handling
blk_rq_map_sg doesn't initialize sg->dma_address/length to zero
anymore. Some low level drivers reuse sg lists without initializing so
IOMMUs might get non-zero dma_address/length. If map_sg fails, we need
pass the number of the mapped entries to gart_unmap_sg.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-29 09:18:03 +01:00
Jens Axboe 9335432959 SG: s390-scsi: missing size parameter in zfcp_address_to_sg()
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-29 09:18:03 +01:00
Jens Axboe 73fd546aa7 SG: clear termination bit in sg_chain()
Since we are using the last entry in the list, clear any possible
termination bit that may have already been set. Pointed out by Rusty.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-29 09:18:03 +01:00
Javier Herrero ab472a0484 Blackfin arch: Added support for HV Sistemas H8606 board
Signed-off-by: Javier Herrero <jherrero@hvsistemas.es>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-29 16:14:44 +08:00
Linus Torvalds 2a397e82c7 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: add SH-S202J to ivb_list[]
  drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings
  drivers/ide/pci/generic: fix build for CONFIG_HOTPLUG=n
  hpt366: fix build for CONFIG_HOTPLUG=n
  cy82c693: fix build for CONFIG_HOTPLUG=n
2007-10-28 12:03:14 -07:00
Francois Romieu d1417862d7 ipg: Kconfig whitepaces/tab damages
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Avuton Olrich <avuton@gmail.com>
Cc: Jesse Huang <jesse@icplus.com.tw>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
2007-10-28 18:21:15 +01:00
Francois Romieu bbd82f956e ipg: missing Kconfig dependency
Fix for the error below while linking vmlinux:
[...]
drivers/built-in.o: In function `ipg_ioctl':
drivers/net/ipg.c:2148: undefined reference to `generic_mii_ioctl'
drivers/built-in.o: In function `ipg_get_settings':
drivers/net/ipg.c:2181: undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `ipg_set_settings':
drivers/net/ipg.c:2193: undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `ipg_nway_reset':
drivers/net/ipg.c:2205: undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Avuton Olrich <avuton@gmail.com>
Cc: Jesse Huang <jesse@icplus.com.tw>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
2007-10-28 18:21:10 +01:00
Stephen Hemminger 93dd79e87b r8169: remove poll_locked logic
Disabling napi polling early is well enough.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-10-28 18:21:06 +01:00
Stephen Hemminger 7fab06c0ca r8169: napi config
Don't call napi_disable if not configured and make sure that any
misuse of napi_xxx in future fails with a compile error.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-10-28 18:21:01 +01:00
Al Viro ea45d15394 duplicate initializer in sound/pci/hda/patch_realtek.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27 22:23:06 -07:00
Al Viro 30e69bf4cc fix breakage in pegasos_eth
Fix fallout from commit b45d9147f1
("mv643xx_eth: Remove unused register defines")

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27 22:23:06 -07:00
Linus Torvalds 6e1b97d899 Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: Dump filtering supports x86_64 sparsemem
  x86: fix compiler warnings in arch/x86/kernel/early-quirks.c
  x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c
  x86: Fix boot protocol KEEP_SEGMENTS check.
  x86: voyager: fix bogus conversion to per_cpu for boot_cpu_info
  x86: export smp_ops to allow modular build of KVM
  Revert "i386: export i386 smp_call_function_mask() to modules"
2007-10-27 22:18:55 -07:00
Al Viro 36ea96a485 cirrusfb nonsense
(pointer > 0) is deeply weird; (pointer >= 0) is even dumber...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27 22:18:12 -07:00
Al Viro 0ada7a02ad scatterlist fallout: mmc
#include <scatterlist/scatterlist.h>
is an odd thing to do...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27 22:18:12 -07:00
Al Viro 4a66fcabd0 ide/arm/icside: fallout from commit 86f3a492bb
struct device doesn't have ->dma; it's in struct expansion_card where
that struct device is embedded into.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27 22:18:11 -07:00
Al Viro 9e6a76b8bb scatterlist fallout: frv
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-27 22:18:11 -07:00
Ken'ichi Ohmichi 69243f9125 x86: Dump filtering supports x86_64 sparsemem
This patch adds the symbol "init_level4_pgt" to the vmcoreinfo data so
that makedumpfile (dump filtering command) supports x86_64 sparsemem 
kernel of linux-2.6.24.

makedumpfile creates a small dumpfile by excluding unnecessary pages for
the analysis. It checks attributes in page structures and distinguishes
necessary pages and unnecessary ones. To check them, makedumpfile gets
the vmcoreinfo data which has the minimum debugging information only for
dump filtering.

For older x86_64 kernel (linux-2.6.23 or before), makedumpfile translates
the virtual address of page structure into physical address by subtracting
PAGE_OFFSET from virtual address, but this translation isn't effective for
linux-2.6.24 sparsemem kernel, because its page structures are in virtual
memmap area. makedumpfile should translate their virtual address by 4-levels
paging and it needs the symbol "init_level4_pgt".

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Jeff Garzik 03d0d20e64 x86: fix compiler warnings in arch/x86/kernel/early-quirks.c
fix this warning:

arch/x86/kernel/early-quirks.c:40: warning: nvidia_hpet_check defined but not used

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Jeff Garzik 74a3d2d331 x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.c
Fix !CONFIG_SMP warning:

arch/x86/kernel/acpi/processor.c: In function arch_acpi_processor_init_pdc:
arch/x86/kernel/acpi/processor.c:65: warning: unused variable cpu

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Eric W. Biederman bd53147db8 x86: Fix boot protocol KEEP_SEGMENTS check.
The kernel only ever supports 1 version of the boot protocol
so there is no need to check the boot protocol revision to
see if a feature is supported.

Both x86 and x86_64 support the same boot protocol so we need
to implement the KEEP_SEGMENTS on x86_64 as well.  It isn't
just paravirt bootloaders that could use this functionality.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
James Bottomley 0cca1ca647 x86: voyager: fix bogus conversion to per_cpu for boot_cpu_info
There were two problems.  Firstly, someone forgot the struct keyword in
front of cpuinfo_x86, so I take it this wasn't even compile checked.
Secondly, the actual definition has this as a SHARED_ALIGNED, so the
definitions mismatch.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27 20:57:43 +02:00
Thomas Gleixner 027447c491 x86: export smp_ops to allow modular build of KVM
KVM uses smp_call_function_mask and therefor need smp_ops to be exported.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-27 20:57:43 +02:00
Thomas Gleixner ceff8d859c Revert "i386: export i386 smp_call_function_mask() to modules"
This reverts commit 6442eea937.

The patch breaks smp_ops and needs to be reverted. The solution to
allow modular build of KVM is to export smp_ops instead.

Pointed-out-by: James Bottomley

  <jejb> tglx, so write out 100 times "voyager is a useful architecture" ...
  <tglx> yes, Sir

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-27 20:57:43 +02:00
Linus Torvalds ef49c32b84 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  [JFFS2] Update MAINTAINERS entry -- the jffs-dev list is dead
  [JFFS2] Prevent return of initialised variable in jffs2_init_acl_post()
2007-10-27 10:14:04 -07:00
Linus Torvalds 3d1343b556 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc_spi: Fix mmc-over-spi regression
  mmc: use common byte swap macros
  mmc: fix cid and csd byte order
  at91_mci: Fix bad reference
2007-10-27 10:12:39 -07:00
Linus Torvalds a2508c0814 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC32]: Fix build-warning in io-unit.c
  [SPARC64]: Fix BACKOFF_SPIN on non-SMP.
  [SPARC32]: __inline__ --> inline
  [SPARC64]: __inline__ --> inline
2007-10-27 10:11:12 -07:00
Linus Torvalds 0f5a2c553d Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [CRYPTO] users: Fix up scatterlist conversion errors
  [CRYPTO] tcrypt: Move sg_init_table out of timing loops
  [NETNS]: Fix get_net_ns_by_pid
  [NET]: Marking struct pernet_operations __net_initdata was inappropriate
  [INET] ESP: Must #include <linux/scatterlist.h>
  [TCP] IPV6: fix softnet build breakage
2007-10-27 10:10:40 -07:00
David Woodhouse 6d85d06673 [JFFS2] Update MAINTAINERS entry -- the jffs-dev list is dead
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-27 10:39:48 -04:00
David Woodhouse 8d6ea587d9 [JFFS2] Prevent return of initialised variable in jffs2_init_acl_post()
Spotted by the Coverity checker, and pointed out by Adrian Bunk.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-10-27 10:36:44 -04:00
David Brownell 460cd0589d mmc_spi: Fix mmc-over-spi regression
Patch 49dce689ad changed the sysfs data
structures for SPI in a way which broke the MMC-over-SPI host driver.

This patch fixes that regression by changing the scheme used to keep
from knowingly trying to use a shared bus segment, and updates the
adjacent comments slightly to better explain the issue.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27 14:47:20 +02:00
Pierre Ossman 1fa8dd146f mmc: use common byte swap macros
Use the more generic byte swapping macros instead of the socket variants.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27 14:41:04 +02:00
Pierre Ossman 78e480731a mmc: fix cid and csd byte order
MMC over SPI sends the CID and CSD registers as data, not responses,
which means that the host driver won't do the necessary byte flipping
for us.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27 14:14:23 +02:00
Pierre Ossman 6356a9d955 at91_mci: Fix bad reference
The flags parameter got removed in a previous commit, but some
references were overlooked.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-27 14:04:10 +02:00
David S. Miller 6ee4e28be8 [SPARC32]: Fix build-warning in io-unit.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:54:14 -07:00
Herbert Xu 68e3f5dd4d [CRYPTO] users: Fix up scatterlist conversion errors
This patch fixes the errors made in the users of the crypto layer during
the sg_init_table conversion.  It also adds a few conversions that were
missing altogether.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:52:07 -07:00
Herbert Xu a5a613a429 [CRYPTO] tcrypt: Move sg_init_table out of timing loops
This patch moves the sg_init_table out of the timing loops for hash
algorithms so that it doesn't impact on the speed test results.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:51:21 -07:00
David S. Miller 0aa031d9e0 [SPARC64]: Fix BACKOFF_SPIN on non-SMP.
It can't be just empty, it has to at least branch
back to 'label'.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:23:22 -07:00
David S. Miller 64d329eec0 [SPARC32]: __inline__ --> inline
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:17:01 -07:00
David S. Miller d979f1792d [SPARC64]: __inline__ --> inline
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-27 00:13:04 -07:00
Eric W. Biederman ceaa79c434 [NETNS]: Fix get_net_ns_by_pid
The pid namespace patches changed the semantics of
find_task_by_pid without breaking the compile resulting
in get_net_ns_by_pid doing the wrong thing.

So switch to using the intended find_task_by_vpid.

Combined with Denis' earlier patch to make netlink traffic
fully synchronous the inadvertent race I introduced with
accessing current is actually removed.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-26 22:56:12 -07:00
Eric W. Biederman 2b008b0a8e [NET]: Marking struct pernet_operations __net_initdata was inappropriate
It is not safe to to place struct pernet_operations in a special section.
We need struct pernet_operations to last until we call unregister_pernet_subsys.
Which doesn't happen until module unload.

So marking struct pernet_operations is a disaster for modules in two ways.
- We discard it before we call the exit method it points to.
- Because I keep struct pernet_operations on a linked list discarding
  it for compiled in code removes elements in the middle of a linked
  list and does horrible things for linked insert.

So this looks safe assuming __exit_refok is not discarded
for modules.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-26 22:54:53 -07:00
Adrian Bunk 72998d8c84 [INET] ESP: Must #include <linux/scatterlist.h>
This patch fixes the following compile errors in some configurations:

<--  snip  -->

...
  CC      net/ipv4/esp4.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv4/esp4.c: In function 'esp_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv4/esp4.c:113: error: implicit declaration of function 'sg_init_table'
make[3]: *** [net/ipv4/esp4.o] Error 1
...
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv6/esp6.c: In function 'esp6_output':
/home/bunk/linux/kernel-2.6/git/linux-2.6/net/ipv6/esp6.c:112: error: implicit declaration of function 'sg_init_table'
make[3]: *** [net/ipv6/esp6.o] Error 1


<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-26 22:53:58 -07:00
Jeff Garzik 18134bed02 [TCP] IPV6: fix softnet build breakage
net/ipv6/tcp_ipv6.c: In function 'tcp_v6_rcv':
net/ipv6/tcp_ipv6.c:1736: error: implicit declaration of function
'get_softnet_dma'
net/ipv6/tcp_ipv6.c:1736: warning: assignment makes pointer from integer
without a cast

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-26 22:53:14 -07:00
Linus Torvalds 26adc0d585 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
  x86 setup: sizeof() is unsigned, unbreak comparisons
  x86 setup: handle boot loaders which set up the stack incorrectly
2007-10-26 13:56:01 -07:00
Linus Torvalds 0e4bd10c9b Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86:
  x86: kill the old i386 and x86_64 directories
  x86: move i386 and x86_64 Kconfig files to x86 directory
  kconfig: small code refactoring in kconfig Makefile
  x86: unification of i386 and x86_64 Kconfig.debug
  x86: move defconfig files for i386 and x86_64 to x86
  x86: move i386 and x86_64 Makefiles to arch/x86
2007-10-26 13:49:29 -07:00
Bartlomiej Zolnierkiewicz 8588a2b732 ide: add SH-S202J to ivb_list[]
From the report by Nick Warne.

Tested-by: Nick Warne <nick@ukfsn.org>
Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-26 20:31:16 +02:00