GitHub/mt8127/android_kernel_alcatel_ttab.git
17 years agox86-64: update calgary iommu to sg helpers
Jens Axboe [Tue, 24 Jul 2007 10:38:15 +0000 (12:38 +0200)]
x86-64: update calgary iommu to sg helpers

Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoswiotlb: sg chaining support
Jens Axboe [Fri, 11 May 2007 12:56:18 +0000 (14:56 +0200)]
swiotlb: sg chaining support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoi386: enable sg chaining
Jens Axboe [Fri, 11 May 2007 10:57:30 +0000 (12:57 +0200)]
i386: enable sg chaining

We don't need to do more on x86, there's no iommu to be worried about.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoi386 dma_map_sg: convert to using sg helpers
Jens Axboe [Wed, 9 May 2007 07:15:27 +0000 (09:15 +0200)]
i386 dma_map_sg: convert to using sg helpers

The dma mapping helpers need to be converted to using
sg helpers as well, so they will work with a chained
sglist setup.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agommc: need to zero sglist on init
Jens Axboe [Thu, 4 Oct 2007 18:11:30 +0000 (20:11 +0200)]
mmc: need to zero sglist on init

Otherwise we could have junk in the sg fields, fooling
the sg chaining into thinking ->page is valid.

Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoPanic in blk_rq_map_sg() from CCISS driver
Lee Schermerhorn [Fri, 21 Sep 2007 06:33:55 +0000 (08:33 +0200)]
Panic in blk_rq_map_sg() from CCISS driver

New scatter/gather list chaining [sg_next()] treats 'page' member of
struct scatterlist with low bit set [0x01] as a chain pointer to
another struct scatterlist [array].  The CCISS driver request function
passes an uninitialized, temporary, on-stack scatterlist array to
blk_rq_map_sq().  sg_next() interprets random data on the stack as a
chain pointer and eventually tries to de-reference an invalid pointer,
resulting in:

[<ffffffff8031dd70>] blk_rq_map_sg+0x70/0x170
PGD 6090c3067 PUD 0
Oops: 0000 [1] SMP
last sysfs file: /block/cciss!c0d0/cciss!c0d0p1/dev
CPU 6
Modules linked in: ehci_hcd ohci_hcd uhci_hcd
Pid: 1, comm: init Not tainted 2.6.23-rc6-mm1 #3
RIP: 0010:[<ffffffff8031dd70>] [<ffffffff8031dd70>] blk_rq_map_sg+0x70/0x170
RSP: 0018:ffff81060901f768 EFLAGS: 00010206
RAX: 000000040b161000 RBX: ffff81060901f7d8 RCX: 000000040b162c00
RDX: 0000000000000000 RSI: ffff81060b13a260 RDI: ffff81060b139600
RBP: 0000000000001400 R08: 00000000fffffffe R09: 0000000000000400
R10: 0000000000000000 R11: 000000040b163000 R12: ffff810102fe0000
R13: 0000000000000001 R14: 0000000000000001 R15: 00001e0000000000
FS: 00000000026108f0(0063) GS:ffff810409000b80(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 000000010000001e CR3: 00000006090c6000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process init (pid: 1, threadinfo ffff81060901e000, task ffff810409020800)
last branch before last exception/interrupt
from [<ffffffff8031de0a>] blk_rq_map_sg+0x10a/0x170
to [<ffffffff8031dd70>] blk_rq_map_sg+0x70/0x170
Stack: 000000018068ea00 ffff810102fe0000 0000000000000000 ffff810011400000
0000000000000002 0000000000000000 ffff81040b172000 ffffffff803acd3d
0000000000003ec1 ffff8106090d5000 ffff8106090d5000 ffff810102fe0000
Call Trace:
[<ffffffff803acd3d>] do_cciss_request+0x15d/0x4c0
[<ffffffff80298968>] new_slab+0x1c8/0x270
[<ffffffff80298ffd>] __slab_alloc+0x22d/0x470
[<ffffffff8027327b>] mempool_alloc+0x4b/0x130
[<ffffffff8032b21e>] cfq_set_request+0xee/0x380
[<ffffffff8027327b>] mempool_alloc+0x4b/0x130
[<ffffffff8031ff98>] get_request+0x168/0x360
[<ffffffff80331b0d>] rb_insert_color+0x8d/0x110
[<ffffffff8031cfd8>] elv_rb_add+0x58/0x60
[<ffffffff8032a329>] cfq_add_rq_rb+0x69/0xa0
[<ffffffff8031c1ab>] elv_merged_request+0x5b/0x60
[<ffffffff803224fd>] __make_request+0x23d/0x650
[<ffffffff80298ffd>] __slab_alloc+0x22d/0x470
[<ffffffff80270000>] generic_write_checks+0x140/0x190
[<ffffffff8031f012>] generic_make_request+0x1c2/0x3a0
<etc>
Kernel panic - not syncing: Attempted to kill init!

This patch initializes the tmp_sg array to zeroes.  Perhaps not the ultimate
fix, but an effective work-around.  I can now boot 23-rc6-mm1 on an HP
Proliant x86_64 with CCISS boot disk.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
 drivers/block/cciss.c |    1 +
 1 file changed, 1 insertion(+)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoremove sglist_len
FUJITA Tomonori [Tue, 18 Sep 2007 10:17:28 +0000 (12:17 +0200)]
remove sglist_len

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoremove blk_queue_max_phys_segments in libata
FUJITA Tomonori [Tue, 18 Sep 2007 10:16:45 +0000 (12:16 +0200)]
remove blk_queue_max_phys_segments in libata

LIBATA_MAX_PRD is the maximum number of DMA scatter/gather elements
permitted by the HBA's DMA engine. It's properly set to
q->max_hw_segments via the sg_tablesize parameter.

libata shouldn't call blk_queue_max_phys_segments. Now LIBATA_MAX_PRD
is equal to SCSI_MAX_PHYS_SEGMENTS by default (both is 128), so
everything is fine. But if they are changed, some code (like the scsi
mid layer, sg chaining, etc) might not work properly.

(Addition from Jens) The basic issue is that the physical segment
setting is purely a driver issue. And since SCSI is managing the sglist,
libata has no business changing the setting. All libata should care
about is the hw segment setting.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agorevert sg segment size ifdefs
FUJITA Tomonori [Tue, 18 Sep 2007 10:14:37 +0000 (12:14 +0200)]
revert sg segment size ifdefs

This reverts sg segment size ifdefs that the current code has in order
to provide a way to reduce sgpool memory consumption.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFixup u14-34f ENABLE_SG_CHAINING
Andrew Morton [Mon, 17 Sep 2007 13:29:44 +0000 (15:29 +0200)]
Fixup u14-34f ENABLE_SG_CHAINING

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoqla1280: enable use_sg_chaining option
FUJITA Tomonori [Mon, 17 Sep 2007 13:28:22 +0000 (15:28 +0200)]
qla1280: enable use_sg_chaining option

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[SCSI] add use_sg_chaining option to scsi_host_template
FUJITA Tomonori [Tue, 16 Oct 2007 09:24:32 +0000 (11:24 +0200)]
[SCSI] add use_sg_chaining option to scsi_host_template

This option is true if a low-level driver can support sg
chaining. This will be removed eventually when all the drivers are
converted to support sg chaining. q->max_phys_segments is set to
SCSI_MAX_SG_SEGMENTS if false.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoqla1280: sg chaining fixes
FUJITA Tomonori [Mon, 10 Sep 2007 03:17:13 +0000 (04:17 +0100)]
qla1280: sg chaining fixes

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agolibata sg chaining support fix
FUJITA Tomonori [Sat, 18 Aug 2007 09:27:36 +0000 (18:27 +0900)]
libata sg chaining support fix

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agozfcp: sg chaining support
FUJITA Tomonori [Mon, 30 Jul 2007 14:01:32 +0000 (23:01 +0900)]
zfcp: sg chaining support

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoips: sg chaining support
FUJITA Tomonori [Mon, 16 Jul 2007 13:24:14 +0000 (15:24 +0200)]
ips: sg chaining support

ips properly uses scsi_for_each_sg for the normal I/O path, however,
the breakup path doesn't.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoIDE: sg chaining support
Jens Axboe [Wed, 25 Jul 2007 06:13:56 +0000 (08:13 +0200)]
IDE: sg chaining support

Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoi2o: sg chaining support
Jens Axboe [Tue, 24 Jul 2007 12:42:11 +0000 (14:42 +0200)]
i2o: sg chaining support

Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoFusion: sg chaining support
Jens Axboe [Mon, 16 Jul 2007 13:30:33 +0000 (15:30 +0200)]
Fusion: sg chaining support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoUSB storage: sg chaining support
Jens Axboe [Fri, 11 May 2007 10:33:09 +0000 (12:33 +0200)]
USB storage: sg chaining support

[PATCH] USB storage: sg chaining support

Modify usb_stor_access_xfer_buf() to take a pointer to an sg
entry pointer, so we can keep track of that instead of passing
around an integer index (which we can't use when dealing with
multiple scatterlist arrays).

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoinfiniband: sg chaining support
Jens Axboe [Tue, 24 Jul 2007 12:41:13 +0000 (14:41 +0200)]
infiniband: sg chaining support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoaha1542: convert to use the data buffer accessors
Jens Axboe [Mon, 16 Jul 2007 08:00:31 +0000 (10:00 +0200)]
aha1542: convert to use the data buffer accessors

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoide-scsi: sg chaining support
Jens Axboe [Tue, 16 Oct 2007 09:20:52 +0000 (11:20 +0200)]
ide-scsi: sg chaining support

Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoqlogicpti: sg chaining support
Jens Axboe [Wed, 9 May 2007 11:43:12 +0000 (13:43 +0200)]
qlogicpti: sg chaining support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoaic94xx: sg chaining support
Jens Axboe [Wed, 9 May 2007 11:18:54 +0000 (13:18 +0200)]
aic94xx: sg chaining support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoqla1280: sg chaining support
Jens Axboe [Wed, 9 May 2007 11:02:43 +0000 (13:02 +0200)]
qla1280: sg chaining support

Interesting hardware setup...

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoscsi generic: sg chaining support
Jens Axboe [Fri, 11 May 2007 13:01:01 +0000 (15:01 +0200)]
scsi generic: sg chaining support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoscsi_debug: support sg chaining
Jens Axboe [Mon, 16 Jul 2007 08:19:24 +0000 (10:19 +0200)]
scsi_debug: support sg chaining

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agolibata: convert to using sg helpers
Jens Axboe [Tue, 16 Oct 2007 09:14:12 +0000 (11:14 +0200)]
libata: convert to using sg helpers

This converts libata to using the sg helpers for looking up sg
elements, instead of doing it manually.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoSCSI: support for allocating large scatterlists
Jens Axboe [Tue, 7 Aug 2007 07:02:51 +0000 (09:02 +0200)]
SCSI: support for allocating large scatterlists

This is what enables large commands. If we need to allocate an
sgtable that doesn't fit in a single page, allocate several
SCSI_MAX_SG_SEGMENTS sized tables and chain them together.

SCSI defaults to large chained sg tables, if the arch supports it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoscsi: simplify scsi_free_sgtable()
Jens Axboe [Tue, 16 Oct 2007 09:12:37 +0000 (11:12 +0200)]
scsi: simplify scsi_free_sgtable()

Just pass in the command, no point in passing in the scatterlist
and scatterlist pool index seperately.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agouse sg helper function in DMA mapping documentation
saeed bishara [Wed, 8 Aug 2007 11:09:00 +0000 (13:09 +0200)]
use sg helper function in DMA mapping documentation

Signed-off-by: Saeed Bishara <saeed.bishara@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoll_rw_blk: temporarily enable max_segments tweaking
Jens Axboe [Thu, 10 May 2007 11:29:51 +0000 (13:29 +0200)]
ll_rw_blk: temporarily enable max_segments tweaking

Expose this setting for now, so that users can play with enabling
large commands without defaulting it to on globally. This is a debug
patch, it will be dropped for the final versions.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAdd chained sg support to linux/scatterlist.h
Jens Axboe [Mon, 16 Jul 2007 19:17:16 +0000 (21:17 +0200)]
Add chained sg support to linux/scatterlist.h

The core of the patch - allow the last sg element in a scatterlist
table to point to the start of a new table. We overload the LSB of
the page pointer to indicate whether this is a valid sg entry, or
merely a link to the next list.

Includes a fix from Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
correcting the ifdef ARCH_HAS_SG_CHAIN guarding sg_last().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoscsi: convert to using sg helpers
Jens Axboe [Tue, 16 Oct 2007 09:08:49 +0000 (11:08 +0200)]
scsi: convert to using sg helpers

This converts the SCSI mid layer to using the sg helpers for looking up
sg elements, instead of doing it manually.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock: convert to using sg helpers
Jens Axboe [Fri, 21 Sep 2007 08:44:19 +0000 (10:44 +0200)]
block: convert to using sg helpers

Convert the main rq mapper (blk_rq_map_sg()) to the sg helper setup.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoAdd sg helpers for iterating over a scatterlist table
Jens Axboe [Wed, 9 May 2007 07:02:57 +0000 (09:02 +0200)]
Add sg helpers for iterating over a scatterlist table

First step to being able to change the scatterlist setup without
having to modify drivers (a lot :-)

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agocrypto: don't pollute the global namespace with sg_next()
Jens Axboe [Wed, 9 May 2007 06:58:32 +0000 (08:58 +0200)]
crypto: don't pollute the global namespace with sg_next()

It's a subsystem function, prefix it as such.

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agopktcdvd: don't rely on bio_init() preserving bio->bi_destructor
Laurent Riffard [Fri, 21 Sep 2007 06:32:28 +0000 (08:32 +0200)]
pktcdvd: don't rely on bio_init() preserving bio->bi_destructor

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agopktcdvd: don't rely on bio_init() preserving bio->bi_io_vec
Jens Axboe [Fri, 14 Sep 2007 11:06:53 +0000 (13:06 +0200)]
pktcdvd: don't rely on bio_init() preserving bio->bi_io_vec

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoremove ide_get_error_location()
Adrian Bunk [Fri, 14 Sep 2007 08:02:06 +0000 (10:02 +0200)]
remove ide_get_error_location()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock: convert blkdev_issue_flush() to use empty barriers
Jens Axboe [Tue, 16 Oct 2007 09:05:02 +0000 (11:05 +0200)]
block: convert blkdev_issue_flush() to use empty barriers

Then we can get rid of ->issue_flush_fn() and all the driver private
implementations of that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock: Initial support for data-less (or empty) barrier support
Jens Axboe [Thu, 27 Sep 2007 11:01:25 +0000 (13:01 +0200)]
block: Initial support for data-less (or empty) barrier support

This implements functionality to pass down or insert a barrier
in a queue, without having data attached to it. The ->prepare_flush_fn()
infrastructure from data barriers are reused to provide this
functionality.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock: factor our bio_check_eod()
Jens Axboe [Wed, 18 Jul 2007 11:27:58 +0000 (13:27 +0200)]
block: factor our bio_check_eod()

End of device check is done twice in __generic_make_request() and it's
fully inlined each time.  Factor out bio_check_eod().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock: add end_queued_request() and end_dequeued_request() helpers
Jens Axboe [Fri, 21 Sep 2007 08:41:07 +0000 (10:41 +0200)]
block: add end_queued_request() and end_dequeued_request() helpers

We can use this helper in the elevator core for BLKPREP_KILL, and it'll
also be useful for the empty barrier patch.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agobio: make freeing of ->bi_io_vec conditional in bio_free()
Jens Axboe [Wed, 18 Jul 2007 11:18:08 +0000 (13:18 +0200)]
bio: make freeing of ->bi_io_vec conditional in bio_free()

The empty barrier patches do not carry data, so they have no
iovec attached.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agobio: use memset() in bio_init()
Jens Axboe [Wed, 18 Jul 2007 11:14:03 +0000 (13:14 +0200)]
bio: use memset() in bio_init()

Use memset() to clear the bio, instead of doing each field manually.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoblock: ll_rw_blk.c: cosmetics
Jens Axboe [Wed, 18 Jul 2007 11:13:10 +0000 (13:13 +0200)]
block: ll_rw_blk.c: cosmetics

Fix ?: construct, a typo, whitespace, and similar.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoMerge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 15 Oct 2007 23:08:50 +0000 (16:08 -0700)]
Merge branch 'devel' of /home/rmk/linux-2.6-arm

* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (95 commits)
  [ARM] 4578/1: CM-x270: PCMCIA support
  [ARM] 4577/1: ITE 8152 PCI bridge support
  [ARM] 4576/1: CM-X270 machine support
  [ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put()
  [ARM] pxa: move pxa_set_mode() from pxa2xx_mainstone.c to mainstone.c
  [ARM] pxa: move pxa_set_mode() from pxa2xx_lubbock.c to lubbock.c
  [ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbols
  [ARM] pxa: PXA3xx base support
  [NET] smc91x: fix PXA DMA support code
  [SERIAL] Fix console initialisation ordering
  [ARM] pxa: tidy up arch/arm/mach-pxa/Makefile
  [ARM] Update arch/arm/Kconfig for drivers/Kconfig changes
  [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils
  [ARM] 4599/1: Preserve ATAG list for use with kexec (2.6.23)
  [ARM] Rename consistent_sync() as dma_cache_maint()
  [ARM] 4572/1: ep93xx: add cirrus logic edb9307 support
  [ARM] 4596/1: S3C2412: Correct IRQs for SDI+CF and add decoding support
  [ARM] 4595/1: ns9xxx: define registers as void __iomem * instead of volatile u32
  [ARM] 4594/1: ns9xxx: use the new gpio functions
  [ARM] 4593/1: ns9xxx: implement generic clockevents
  ...

17 years agoMerge branch 'locks' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Mon, 15 Oct 2007 23:07:40 +0000 (16:07 -0700)]
Merge branch 'locks' of git://linux-nfs.org/~bfields/linux

* 'locks' of git://linux-nfs.org/~bfields/linux:
  nfsd: remove IS_ISMNDLCK macro
  Rework /proc/locks via seq_files and seq_list helpers
  fs/locks.c: use list_for_each_entry() instead of list_for_each()
  NFS: clean up explicit check for mandatory locks
  AFS: clean up explicit check for mandatory locks
  9PFS: clean up explicit check for mandatory locks
  GFS2: clean up explicit check for mandatory locks
  Cleanup macros for distinguishing mandatory locks
  Documentation: move locks.txt in filesystems/
  locks: add warning about mandatory locking races
  Documentation: move mandatory locking documentation to filesystems/
  locks: Fix potential OOPS in generic_setlease()
  Use list_first_entry in locks_wake_up_blocks
  locks: fix flock_lock_file() comment
  Memory shortage can result in inconsistent flocks state
  locks: kill redundant local variable
  locks: reverse order of posix_locks_conflict() arguments

17 years agoMerge branch 'release' of ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 15 Oct 2007 22:32:57 +0000 (15:32 -0700)]
Merge branch 'release' of ssh:///linux/kernel/git/aegl/linux-2.6

* 'release' of ssh://master.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] build fix for scatterlist

17 years ago[libata] pata_cs5536: new API build fix
Jeff Garzik [Mon, 15 Oct 2007 22:10:12 +0000 (18:10 -0400)]
[libata] pata_cs5536: new API build fix

This driver was using hooks that were very recently removed.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 15 Oct 2007 21:06:58 +0000 (14:06 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  [IPV6]: Consolidate the ip6_pol_route_(input|output) pair
  [TCP]: Make snd_cwnd_cnt 32-bit
  [TCP]: Update the /proc/net/tcp documentation
  [NETNS]: Don't panic on creating the namespace's loopback
  [NEIGH]: Ensure that pneigh_lookup is protected with RTNL
  [INET]: kmalloc+memset -> kzalloc in frag_alloc_queue
  [ISDN]: Fix compile with CONFIG_ISDN_X25 disabled.
  [IPV6]: Replace sk_buff ** with sk_buff * in input handlers
  [SELINUX]: Update for netfilter ->hook() arg changes.
  [INET]: Consolidate the xxx_put
  [INET]: Small cleanup for xxx_put after evictor consolidation
  [INET]: Consolidate the xxx_evictor
  [INET]: Consolidate the xxx_frag_destroy
  [INET]: Consolidate xxx_the secret_rebuild
  [INET]: Consolidate the xxx_frag_kill
  [INET]: Collect common frag sysctl variables together
  [INET]: Collect frag queues management objects together
  [INET]: Move common fields from frag_queues in one place.
  [TG3]: Fix performance regression on 5705.
  [ISDN]: Remove local copy of device name to make sure renames work.
  ...

17 years agoMap volume and brightness events on thinkpads
Jeremy Katz [Mon, 15 Oct 2007 20:45:10 +0000 (16:45 -0400)]
Map volume and brightness events on thinkpads

There are standard keycodes for brightness and volume; map the events to
emit them so that things work properly

Signed-off-by: Jeremy Katz <katzj@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[IA64] build fix for scatterlist
Tony Luck [Mon, 15 Oct 2007 20:49:43 +0000 (13:49 -0700)]
[IA64] build fix for scatterlist

include/scsi/scsi_eh.h:79: error: field `sense_sgl' has incomplete type

x86 resolves this by including scatterlist.h from dma-mapping.h which
seems as good a place as any.

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Mon, 15 Oct 2007 20:41:39 +0000 (13:41 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits)
  Input: use full RCU API
  Input: remove tsdev interface
  Input: add support for Blackfin BF54x Keypad controller
  Input: appletouch - another fix for idle reset logic
  HWMON: hdaps - switch to using input-polldev
  Input: add support for SEGA Dreamcast keyboard
  Input: omap-keyboard - don't pretend we support changing keymap
  Input: lifebook - fix X and Y axis range
  Input: usbtouchscreen - add support for GeneralTouch devices
  Input: fix open count handling in input interfaces
  Input: keyboard - add CapsShift lock
  Input: adbhid - produce all CapsLock key events
  Input: ALPS - add signature for ThinkPad R61
  Input: jornada720_kbd - send MSC_SCAN events
  Input: add support for the HP Jornada 7xx (710/720/728) touchscreen
  Input: add support for HP Jornada 7xx onboard keyboard
  Input: add support for HP Jornada onboard keyboard (HP6XX)
  Input: ucb1400_ts - use schedule_timeout_uninterruptible
  Input: xpad - fix dependancy on LEDS class
  Input: auto-select INPUT for MAC_EMUMOUSEBTN option
  ...

Resolved conflicts manually in drivers/hwmon/applesmc.c: converting from
a class device to a device and converting to use input-polldev created a
few apparently trivial clashes..

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 15 Oct 2007 20:31:14 +0000 (13:31 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] pata_pcmcia: Add additional id string (corsair, 1GB)
  libata: prevent devices with blank model names from being DMA blacklisted
  ata_piix: SATA 2port controller port map fix
  pata_cs5536: ATA driver for Geode companion chip
  libata: add ST9160821AS / 3.CCD to NCQ blacklist
  libata: fix revalidation issuing after configuration commands
  [libata] sata_nv: add SW NCQ support for MCP51/MCP55/MCP61
  [libata] pata_sil680: Add MMIO support

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 15 Oct 2007 20:30:35 +0000 (13:30 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (35 commits)
  xen-netfront: rearrange netfront structure to separate tx and rx
  netdev: convert non-obvious instances to use ARRAY_SIZE()
  ucc_geth: Fix build break introduced by commit 09f75cd7bf13720738e6a196cc0107ce9a5bd5a0
  gianfar: Fix regression caused by new napi interface
  gianfar: Cleanup compile warning caused by 0795af57
  gianfar: Fix compile regression caused by bea3348e
  add new prom.h for AU1x00
  update AU1000 get_ethernet_addr()
  MIPSsim: General cleanup
  Jazzsonic: Fix warning about unused variable.
  Remove msic_dcr_read() in axon_msi.c
  Use dcr_host_t.base in dcr_unmap()
  Add dcr_host_t.base in dcr_read()/dcr_write()
  Use dcr_host_t.base in ibm_emac_mal
  Update ibm_newemac to use dcr_host_t.base
  tehuti: possible leak in bdx_probe
  TC35815: Fix build
  SAA9730: Fix build
  AR7 ethernet
  myri10ge: update driver version to 1.3.2-1.287
  ...

17 years agoxen-netfront: rearrange netfront structure to separate tx and rx
Jeremy Fitzhardinge [Mon, 15 Oct 2007 19:59:53 +0000 (12:59 -0700)]
xen-netfront: rearrange netfront structure to separate tx and rx

Keep tx and rx elements separate on different cachelines to prevent
bouncing.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoAtari keyboard: incorporate additional review comments
Geert Uytterhoeven [Mon, 15 Oct 2007 19:51:10 +0000 (21:51 +0200)]
Atari keyboard: incorporate additional review comments

Atari keyboard: incorporate additional review comments:
  o Kill reference to source file name
  o Return error value from input_register_device() instead of -ENOMEM

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[IPV6]: Consolidate the ip6_pol_route_(input|output) pair
Pavel Emelyanov [Mon, 15 Oct 2007 20:02:51 +0000 (13:02 -0700)]
[IPV6]: Consolidate the ip6_pol_route_(input|output) pair

The difference in both functions is in the "id" passed to
the rt6_select, so just pass it as an extra argument from
two outer helpers.

This is minus 60 lines of code and 360 bytes of .text

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Make snd_cwnd_cnt 32-bit
Ilpo Järvinen [Mon, 15 Oct 2007 19:59:43 +0000 (12:59 -0700)]
[TCP]: Make snd_cwnd_cnt 32-bit

Very little point of having 32-bit snd_cnwd if this is not
32-bit as well, as a number of snd_cwnd incrementation formulas
assume that snd_cwnd_cnt can be at least as large as snd_cwnd.

Whether 32-bit is useful was discussed when e0ef57cc56c3c96
was made:
  http://marc.info/?l=linux-netdev&m=117218144409825&w=2

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Update the /proc/net/tcp documentation
Jean Delvare [Mon, 15 Oct 2007 19:58:35 +0000 (12:58 -0700)]
[TCP]: Update the /proc/net/tcp documentation

* Say that this interface is deprecated.
* Update function name references to match the current code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetdev: convert non-obvious instances to use ARRAY_SIZE()
Alejandro Martinez Ruiz [Mon, 15 Oct 2007 01:37:43 +0000 (03:37 +0200)]
netdev: convert non-obvious instances to use ARRAY_SIZE()

This will convert remaining non-obvious or naive calculations of array
sizes to use ARRAY_SIZE() macro.

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[NETNS]: Don't panic on creating the namespace's loopback
Pavel Emelyanov [Mon, 15 Oct 2007 19:55:33 +0000 (12:55 -0700)]
[NETNS]: Don't panic on creating the namespace's loopback

When the loopback device is failed to initialize inside the new
namespaces, panic() is called. Do not do it when the namespace
in question is not the init_net.

Plus cleanup the error path a bit.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoReinstate lost flush_ioremap_region() fix to pxa2xx-flash driver
Linus Torvalds [Mon, 15 Oct 2007 19:55:20 +0000 (12:55 -0700)]
Reinstate lost flush_ioremap_region() fix to pxa2xx-flash driver

Commit 90833fdab89da02fc0276224167f0a42e5176f41 ("[ARM] 4554/1: replace
consistent_sync() with flush_ioremap_region()") introduced a new
"flush_ioremap_region()" function to be used by the MTD mainstone-flash
and lubbock-flash drivers to fix a regression from around 2.6.18.

Those drivers were independently merged into a single driver by Todd
Poynor in commit e644f7d6289456657996df4192de76c5d0a9f9c7 ("[MTD] MAPS:
Merge Lubbock and Mainstone drivers into common PXA2xx driver")

Later, those two commits were merged into the main MTD tree by commit
b160292cc216a50fd0cd386b0bda2cd48352c73b ("Merge Linux 2.6.23") by David
Woodhouse, but in that merge, the fix to use flush_iomap_region() got
lost (as it was to files that now no longer existed).

This reinstates the fix in the new driver.

Noticed-by: Russell King <rmk@arm.linux.org.uk>
Tested-and-acked-by: Nicolas Pitre <nico@cam.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jared Hulbert <jaredeh@gmail.com>
Cc: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[NEIGH]: Ensure that pneigh_lookup is protected with RTNL
Pavel Emelyanov [Mon, 15 Oct 2007 19:54:15 +0000 (12:54 -0700)]
[NEIGH]: Ensure that pneigh_lookup is protected with RTNL

The pnigh_lookup is used to lookup proxy entries and to
create them in case lookup failed.

However, the "creation" code does not perform the re-lookup
after GFP_KERNEL allocation. This is done because the code
is expected to be protected with the RTNL lock, so add the
assertion (mainly to address future questions from new network
developers like me :) ).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: kmalloc+memset -> kzalloc in frag_alloc_queue
Denis V. Lunev [Mon, 15 Oct 2007 19:53:13 +0000 (12:53 -0700)]
[INET]: kmalloc+memset -> kzalloc in frag_alloc_queue

kmalloc + memset -> kzalloc in frag_alloc_queue

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[ISDN]: Fix compile with CONFIG_ISDN_X25 disabled.
Denis V. Lunev [Mon, 15 Oct 2007 19:52:20 +0000 (12:52 -0700)]
[ISDN]: Fix compile with CONFIG_ISDN_X25 disabled.

On Mon, Oct 15, 2007 at 06:44:56PM +0400, Denis V. Lunev wrote:
Compilation fix. The problem appears after
7c076d1de869256848dacb8de0050a3a390f95df by Karsten Keil <kkeil@suse.de>

Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[libata] pata_pcmcia: Add additional id string (corsair, 1GB)
Kristoffer Ericson [Mon, 15 Oct 2007 19:51:42 +0000 (15:51 -0400)]
[libata] pata_pcmcia: Add additional id string (corsair, 1GB)

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years ago[IPV6]: Replace sk_buff ** with sk_buff * in input handlers
Herbert Xu [Mon, 15 Oct 2007 19:50:28 +0000 (12:50 -0700)]
[IPV6]: Replace sk_buff ** with sk_buff * in input handlers

With all the users of the double pointers removed from the IPv6 input path,
this patch converts all occurances of sk_buff ** to sk_buff * in IPv6 input
handlers.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoscsi/gdth: fix crash in gdth_timeout if no gdth controllers found
Linus Torvalds [Mon, 15 Oct 2007 19:46:16 +0000 (12:46 -0700)]
scsi/gdth: fix crash in gdth_timeout if no gdth controllers found

If the gdth module is loaded (or compiled in), the gdth_timeout function
gets started even if no actual gdth controllers are found b the probing.

That ends up not only being unnecessary, but also causes a crash due to
the function blindly just trying to pick the first entry off the
"gdth_instances" list, and accessing it - which obviously doesn't work
if the list is empty!

Noticed by Ingo Molnar.

Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agolibata: prevent devices with blank model names from being DMA blacklisted
Andrew Paprocki [Mon, 15 Oct 2007 19:43:12 +0000 (15:43 -0400)]
libata: prevent devices with blank model names from being DMA blacklisted

The strn_pattern_cmp routine does not handle a blank name parameter
properly. The only patterns which should match a blank name are "*"
and an explicit "". If the function is passed a blank name in current
code, it will always match against the patt parameter. The bug manifests
itself as the device with the empty model name always matching the first
device in the DMA blacklist, forcing it to revert to PIO mode.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
17 years agoata_piix: SATA 2port controller port map fix
Jason Gaston [Thu, 11 Oct 2007 23:05:15 +0000 (16:05 -0700)]
ata_piix: SATA 2port controller port map fix

This patch adds a port map for ICH9 and ICH8 SATA controllers that have only 2 ports available in that mode.

Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_cs5536: ATA driver for Geode companion chip
Martin K. Petersen [Thu, 11 Oct 2007 07:38:19 +0000 (03:38 -0400)]
pata_cs5536: ATA driver for Geode companion chip

This is a driver for the ATA controller on the Geode CS5536 companion
chip.  The PCI device ID for this device was previously claimed by
pata_amd.c but the PIO timings were not correct.  This driver also
works around a bug in some BIOSes that handle unaligned access to the
PCI config registers poorly.  Finally, the driver allows fallback to
using MSR registers for configuration on BIOSes that are truly
broken.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[SELINUX]: Update for netfilter ->hook() arg changes.
David S. Miller [Mon, 15 Oct 2007 09:58:25 +0000 (02:58 -0700)]
[SELINUX]: Update for netfilter ->hook() arg changes.

They take a "struct sk_buff *" instead of a "struct sk_buff **" now.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Consolidate the xxx_put
Pavel Emelyanov [Mon, 15 Oct 2007 09:41:56 +0000 (02:41 -0700)]
[INET]: Consolidate the xxx_put

These ones use the generic data types too, so move
them in one place.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Small cleanup for xxx_put after evictor consolidation
Pavel Emelyanov [Mon, 15 Oct 2007 09:41:09 +0000 (02:41 -0700)]
[INET]: Small cleanup for xxx_put after evictor consolidation

After the evictor code is consolidated there is no need in
passing the extra pointer to the xxx_put() functions.

The only place when it made sense was the evictor code itself.

Maybe this change must got with the previous (or with the
next) patch, but I try to make them shorter as much as
possible to simplify the review (but they are still large
anyway), so this change goes in a separate patch.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Consolidate the xxx_evictor
Pavel Emelyanov [Mon, 15 Oct 2007 09:40:06 +0000 (02:40 -0700)]
[INET]: Consolidate the xxx_evictor

The evictors collect some statistics for ipv4 and ipv6,
so make it return the number of evicted queues and account
them all at once in the caller.

The XXX_ADD_STATS_BH() macros are just for this case,
but maybe there are places in code, that can make use of
them as well.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Consolidate the xxx_frag_destroy
Pavel Emelyanov [Mon, 15 Oct 2007 09:39:14 +0000 (02:39 -0700)]
[INET]: Consolidate the xxx_frag_destroy

To make in possible we need to know the exact frag queue
size for inet_frags->mem management and two callbacks:

 * to destoy the skb (optional, used in conntracks only)
 * to free the queue itself (mandatory, but later I plan to
   move the allocation and the destruction of frag_queues
   into the common place, so this callback will most likely
   be optional too).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Consolidate xxx_the secret_rebuild
Pavel Emelyanov [Mon, 15 Oct 2007 09:38:08 +0000 (02:38 -0700)]
[INET]: Consolidate xxx_the secret_rebuild

This code works with the generic data types as well, so
move this into inet_fragment.c

This move makes it possible to hide the secret_timer
management and the secret_rebuild routine completely in
the inet_fragment.c

Introduce the ->hashfn() callback in inet_frags() to get
the hashfun for a given inet_frag_queue() object.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Consolidate the xxx_frag_kill
Pavel Emelyanov [Mon, 15 Oct 2007 09:37:18 +0000 (02:37 -0700)]
[INET]: Consolidate the xxx_frag_kill

Since now all the xxx_frag_kill functions now work
with the generic inet_frag_queue data type, this can
be moved into a common place.

The xxx_unlink() code is moved as well.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Collect common frag sysctl variables together
Pavel Emelyanov [Mon, 15 Oct 2007 09:33:45 +0000 (02:33 -0700)]
[INET]: Collect common frag sysctl variables together

Some sysctl variables are used to tune the frag queues
management and it will be useful to work with them in
a common way in the future, so move them into one
structure, moreover they are the same for all the frag
management codes.

I don't place them in the existing inet_frags object,
introduced in the previous patch for two reasons:

 1. to keep them in the __read_mostly section;
 2. not to export the whole inet_frags objects outside.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Collect frag queues management objects together
Pavel Emelyanov [Mon, 15 Oct 2007 09:31:52 +0000 (02:31 -0700)]
[INET]: Collect frag queues management objects together

There are some objects that are common in all the places
which are used to keep track of frag queues, they are:

 * hash table
 * LRU list
 * rw lock
 * rnd number for hash function
 * the number of queues
 * the amount of memory occupied by queues
 * secret timer

Move all this stuff into one structure (struct inet_frags)
to make it possible use them uniformly in the future. Like
with the previous patch this mostly consists of hunks like

-    write_lock(&ipfrag_lock);
+    write_lock(&ip4_frags.lock);

To address the issue with exporting the number of queues and
the amount of memory occupied by queues outside the .c file
they are declared in, I introduce a couple of helpers.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Move common fields from frag_queues in one place.
Pavel Emelyanov [Mon, 15 Oct 2007 09:24:19 +0000 (02:24 -0700)]
[INET]: Move common fields from frag_queues in one place.

Introduce the struct inet_frag_queue in include/net/inet_frag.h
file and place there all the common fields from three structs:

 * struct ipq in ipv4/ip_fragment.c
 * struct nf_ct_frag6_queue in nf_conntrack_reasm.c
 * struct frag_queue in ipv6/reassembly.c

After this, replace these fields on appropriate structures with
this structure instance and fix the users to use correct names
i.e. hunks like

-    atomic_dec(&fq->refcnt);
+    atomic_dec(&fq->q.refcnt);

(these occupy most of the patch)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TG3]: Fix performance regression on 5705.
Michael Chan [Mon, 15 Oct 2007 09:12:26 +0000 (02:12 -0700)]
[TG3]: Fix performance regression on 5705.

A performance regression was introduced by the following commit:

    commit ee6a99b539a50b4e9398938a0a6d37f8bf911550
    Author: Michael Chan <mchan@broadcom.com>
    Date:   Wed Jul 18 21:49:10 2007 -0700

    [TG3]: Fix msi issue with kexec/kdump.

In making that change, the PCI latency timer and cache line size
registers were not restored after chip reset.  On the 5705, the
latency timer gets reset to 0 during chip reset and this causes
very poor performance.

Update version to 3.84.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[ISDN]: Remove local copy of device name to make sure renames work.
Karsten Keil [Mon, 15 Oct 2007 09:11:44 +0000 (02:11 -0700)]
[ISDN]: Remove local copy of device name to make sure renames work.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: high_seq parameter removed (all callers use tp->high_seq)
Ilpo Järvinen [Mon, 15 Oct 2007 09:10:32 +0000 (02:10 -0700)]
[TCP]: high_seq parameter removed (all callers use tp->high_seq)

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6]: Uninline netfilter okfns
Patrick McHardy [Mon, 15 Oct 2007 08:51:38 +0000 (01:51 -0700)]
[IPV6]: Uninline netfilter okfns

Uninline netfilter okfns for those cases where gcc can generate tail-calls.

Before:
   text    data     bss     dec     hex filename
8994153 1016524  524652 10535329         a0c1a1 vmlinux

After:
   text    data     bss     dec     hex filename
8992761 1016524  524652 10533937         a0bc31 vmlinux
-------------------------------------------------------
  -1392

All cases have been verified to generate tail-calls with and without netfilter.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[BRIDGE]: Remove SKB share checks in br_nf_pre_routing().
Patrick McHardy [Mon, 15 Oct 2007 08:50:09 +0000 (01:50 -0700)]
[BRIDGE]: Remove SKB share checks in br_nf_pre_routing().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: Uninline netfilter okfns
Patrick McHardy [Mon, 15 Oct 2007 08:48:39 +0000 (01:48 -0700)]
[IPV4]: Uninline netfilter okfns

Now that we don't pass double skb pointers to nf_hook_slow anymore, gcc
can generate tail calls for some of the netfilter hook okfn invocations,
so there is no need to inline the functions anymore. This caused huge
code bloat since we ended up with one inlined version and one out-of-line
version since we pass the address to nf_hook_slow.

Before:
   text    data     bss     dec     hex filename
8997385 1016524  524652 10538561         a0ce41 vmlinux

After:
   text    data     bss     dec     hex filename
8994009 1016524  524652 10535185         a0c111 vmlinux
-------------------------------------------------------
  -3376

All cases have been verified to generate tail-calls with and without
netfilter. The okfns in ipmr and xfrm4_input still remain inline because
gcc can't generate tail-calls for them.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Avoid copying TCP packets unnecessarily
Herbert Xu [Mon, 15 Oct 2007 08:47:15 +0000 (01:47 -0700)]
[NET]: Avoid copying TCP packets unnecessarily

TCP packets all have writable heads, that is, even though it's cloned, it is
writable up to the end of the TCP header.  This patch makes skb_checksum_help
aware of this fact by using skb_clone_writable and avoiding a copy for TCP.

I've also modified the BUG_ON tests to be unsigned.  The only case where this
makes a difference is if csum_start points to a location before skb->data.
Since skb->data should always include the header where the checksum field
is (and all currently callers adhere to that), this change is safe and may
uncover bugs later.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Fix csum_start update in pskb_expand_head
Herbert Xu [Mon, 15 Oct 2007 08:46:08 +0000 (01:46 -0700)]
[NET]: Fix csum_start update in pskb_expand_head

I got confused by the dual nature of the off variable in the
function pskb_expand_head.  The csum_start offset should use
nhead instead of off which can change depending on whether we
are using offsets or pointers.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NIU]: getting rid of __ucmpdi2 in niu.o
Al Viro [Mon, 15 Oct 2007 08:42:31 +0000 (01:42 -0700)]
[NIU]: getting rid of __ucmpdi2 in niu.o

By the time we get to that switch by PHY type, we have 8bit
value.  No need to keep it in u64 when u8 would do.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: Don't leak 'listeners' in netlink_kernel_create()
Jesper Juhl [Mon, 15 Oct 2007 08:39:12 +0000 (01:39 -0700)]
[NETLINK]: Don't leak 'listeners' in netlink_kernel_create()

The Coverity checker spotted that we'll leak the storage allocated
to 'listeners' in netlink_kernel_create() when the
  if (!nl_table[unit].registered)
check is false.

This patch avoids the leak.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6] __inet6_csk_dst_store(): fix check-after-use
Adrian Bunk [Mon, 15 Oct 2007 08:37:55 +0000 (01:37 -0700)]
[IPV6] __inet6_csk_dst_store(): fix check-after-use

The Coverity checker spotted that we have already oops'ed if "dst" was
NULL.

Since "dst" being NULL doesn't seem to be possible at this point this
patch removes the NULL check.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Acked-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NIU]: Fix write past end of array in niu_pci_probe_sprom().
David S. Miller [Mon, 15 Oct 2007 08:36:24 +0000 (01:36 -0700)]
[NIU]: Fix write past end of array in niu_pci_probe_sprom().

Noticed by Coverity checker and reported by Adrian Bunk.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6]: Avoid skb_copy/pskb_copy/skb_realloc_headroom on input
Herbert Xu [Mon, 15 Oct 2007 08:29:10 +0000 (01:29 -0700)]
[IPV6]: Avoid skb_copy/pskb_copy/skb_realloc_headroom on input

This patch replaces unnecessary uses of skb_copy by pskb_expand_head
on the IPv6 input path.

This allows us to remove the double pointers later.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV6]: Make ipv6_frag_rcv return the same packet
Herbert Xu [Mon, 15 Oct 2007 08:28:47 +0000 (01:28 -0700)]
[IPV6]: Make ipv6_frag_rcv return the same packet

This patch implements the same change taht was done to ip_defrag.  It
makes ipv6_frag_rcv return the last packet received of a train of fragments
rather than the head of that sequence.

This allows us to get rid of the sk_buff ** argument later.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: Replace sk_buff ** with sk_buff *
Herbert Xu [Mon, 15 Oct 2007 07:53:15 +0000 (00:53 -0700)]
[NETFILTER]: Replace sk_buff ** with sk_buff *

With all the users of the double pointers removed, this patch mops up by
finally replacing all occurances of sk_buff ** in the netfilter API by
sk_buff *.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>