linux-2.6
17 years ago[PATCH] pcmcia: at91_cf update
Andrew Victor [Mon, 4 Dec 2006 10:26:36 +0000 (12:26 +0200)] 
[PATCH] pcmcia: at91_cf update

This is an update to the AT91 CompactFlash driver.

We replace the hard-coded "chip select 4" with the chip-select value
passed via platform_data.  The configuration of the EBI memory
controller to enable Compact Flash access is now also handled in the
platform setup code and not in the driver.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: fix m32r_cfc.c compilation
Adrian Bunk [Sat, 2 Dec 2006 17:55:06 +0000 (18:55 +0100)] 
[PATCH] pcmcia: fix m32r_cfc.c compilation

More fallout of the post 2.6.19-rc1 IRQ changes...

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: ds.c debug enhancements
Dominik Brodowski [Sat, 2 Dec 2006 20:11:44 +0000 (22:11 +0200)] 
[PATCH] pcmcia: ds.c debug enhancements

Add verbose error messages and debug information to ds.c

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: at91_cf update
Andrew Victor [Mon, 6 Nov 2006 13:56:07 +0000 (15:56 +0200)] 
[PATCH] pcmcia: at91_cf update

This is an update to the AT91RM9200 CompactFlash driver.

The changes include:
- Use the I/O memory address passed via the platform_device resources
  instead of constant global values.
- The IRQ should not be used as a random'ness source.
- Return errors if ioremap() or request_mem_region() fails.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation
Dominik Brodowski [Thu, 26 Oct 2006 01:49:27 +0000 (21:49 -0400)] 
[PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation

struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.

Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: remove prod_id indirection
Dominik Brodowski [Sun, 4 Jun 2006 16:06:13 +0000 (18:06 +0200)] 
[PATCH] pcmcia: remove prod_id indirection

As we read out the product information strings (VERS_1) from the PCMCIA device
in the PCMCIA core, and device drivers can access those reliably in struct
pcmcia_device's fields prod_id[], remove additional product information string
detection logic from PCMCIA device drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: remove manf_id and card_id indirection
Dominik Brodowski [Thu, 26 Oct 2006 01:28:53 +0000 (21:28 -0400)] 
[PATCH] pcmcia: remove manf_id and card_id indirection

As we read out the manufactor and card_id from the PCMCIA device in the
PCMCIA core, and device drivers can access those reliably in struct
pcmcia_device's fields manf_id and card_id, remove additional (and partly
broken) manf_id and card_id detection logic from PCMCIA device drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: IDs for Elan serial PCMCIA devcies
Tony Olech [Wed, 29 Nov 2006 08:54:51 +0000 (08:54 +0000)] 
[PATCH] pcmcia: IDs for Elan serial PCMCIA devcies

Add IDs for Elan serial PCMCIA devices. In addition, move the
pdaudio_cf driver from matching based on manf_id and card_id to
the more specific prod_id1 and prod_id2 to avoid false
positives.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: allow for four multifunction subdevices
Dominik Brodowski [Tue, 28 Nov 2006 02:03:48 +0000 (21:03 -0500)] 
[PATCH] pcmcia: allow for four multifunction subdevices

Some Elan serial cards allow for four (independent) multifunction
subdevices. Teach the PCMCIA core to deal with such devices.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: handle __copy_from_user() return value in ioctl
Dominik Brodowski [Sun, 19 Nov 2006 16:21:27 +0000 (11:21 -0500)] 
[PATCH] pcmcia: handle __copy_from_user() return value in ioctl

Handle __copy_from_user() return value.

drivers/pcmcia/pcmcia_ioctl.c:597: warning: ignoring return value of '__copy_from_user', declared with attribute warn_unused_result

Noticed and first fix by Randy Dunlap.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: multifunction card handling fixes
Dominik Brodowski [Tue, 7 Nov 2006 02:52:16 +0000 (21:52 -0500)] 
[PATCH] pcmcia: multifunction card handling fixes

s->functions needs to be initialized earlier, for the "let's see
how high it increases" approach means that pcmcia_request_irq()
(which makes use of this value) is confused, and might request
an exclusive IRQ first even though it is not supposed to.

Also, a CIS override autoloaded using the firmware loader may
allow for the use of more or less functions in a multifunction
card. Therefore, we may need to schedule a call to add this
second function later on, or simply remove the other function
(it's always the first -valid- function which reaches this
codepath).

Many thanks to Fabrice Bellet for debugging and testing patches.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: allow shared IRQs on pd6729 sockets
Komuro [Sat, 4 Nov 2006 01:00:47 +0000 (10:00 +0900)] 
[PATCH] pcmcia: allow shared IRQs on pd6729 sockets

Use IRQF_PROBE_SHARED flag for request_irq() to find an unused
interrupt for PCMCIA cards.

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: start over after CIS override
Dominik Brodowski [Fri, 3 Nov 2006 15:54:00 +0000 (10:54 -0500)] 
[PATCH] pcmcia: start over after CIS override

When overriding the CIS, re-start the configuration of the card from
scratch. Reported and debugged by Fabrice Bellet <fabrice@bellet.info>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] cm4000_cs: fix return value check
Akinobu Mita [Tue, 17 Oct 2006 06:25:59 +0000 (15:25 +0900)] 
[PATCH] cm4000_cs: fix return value check

The return value of class_create() need to be checked with IS_ERR().
And register_chrdev() returns errno on failure.
This patch includes these fixes for cm4000_cs and cm4040_cs.

Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: yet another IDE ID
Marcin Juszkiewicz [Mon, 30 Oct 2006 21:28:09 +0000 (22:28 +0100)] 
[PATCH] pcmcia: yet another IDE ID

Microdrive reported by one of OpenEmbedded developers.

product info: "WEIDA", "TWTTI", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

(equivalent update to pata_pcmcia.c by Dominik Brodowski)

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years ago[PATCH] pcmcia: Add an id to ide-cs.c
Matt Reimer [Thu, 26 Oct 2006 22:56:00 +0000 (15:56 -0700)] 
[PATCH] pcmcia: Add an id to ide-cs.c

Add an ID entry for:

product info: "TRANSCEND", "TS1GCF80", "", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Mon, 4 Dec 2006 21:12:29 +0000 (13:12 -0800)] 
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: (82 commits)
  [PATCH] pata_ali: small fixes
  [PATCH] pata_via: VIA 8251 bridged systems are now out and about
  [PATCH] trivial piix: swap bogus dot for comma space
  [PATCH] sata_promise: PHYMODE4 fixup
  [PATCH] libata: always use polling IDENTIFY
  [libata] pata_cs5535: fix build
  [PATCH] ahci: do not powerdown during initialization
  [PATCH] libata: prepare ata_sg_clean() for invocation from EH
  [PATCH] libata: separate out rw ATA taskfile building into ata_build_rw_tf()
  [PATCH] libata: implement ata_exec_internal_sg()
  [PATCH] libata: make sure IRQ is cleared after ata_bmdma_freeze()
  [PATCH] libata: move BMDMA host status recording from EH to interrupt handler
  [PATCH] libata: make sure sdev doesn't go away while rescanning
  [PATCH] libata: don't request sense if the port is frozen
  [PATCH] libata: fix READ CAPACITY simulation
  [PATCH] libata: implement ATA_FLAG_SETXFER_POLLING and use it in pata_via, take #2
  [PATCH] libata: set IRQF_SHARED for legacy PCI IDE IRQs
  [PATCH] libata: remove unused HSM_ST_UNKNOWN
  [PATCH] libata: kill unnecessary sht->max_sectors initializations
  [PATCH] libata: add missing sht->slave_destroy
  ...

17 years ago[PATCH] pata_ali: small fixes
Alan [Mon, 4 Dec 2006 16:36:05 +0000 (16:36 +0000)] 
[PATCH] pata_ali: small fixes

Switch to pci_get_bus_and_slot because some x86 systems seem to be
handing us a device with dev->bus = NULL. Also don't apply the isa fixup
to revision C6 and later of the chip.

Really we need to work out wtf is handing us pdev->bus = NULL, but firstly
and more importantly we need the drivers working.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[PATCH] pata_via: VIA 8251 bridged systems are now out and about
Alan [Mon, 4 Dec 2006 16:38:25 +0000 (16:38 +0000)] 
[PATCH] pata_via: VIA 8251 bridged systems are now out and about

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[PATCH] trivial piix: swap bogus dot for comma space
Alan [Mon, 4 Dec 2006 16:33:20 +0000 (16:33 +0000)] 
[PATCH] trivial piix: swap bogus dot for comma space

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[PATCH] fix fallout from header dependency trimming
Al Viro [Mon, 4 Dec 2006 20:41:19 +0000 (20:41 +0000)] 
[PATCH] fix fallout from header dependency trimming

OK, that seems to be enough to deal with the mess.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agonetfilter.h needs rcuupdate.h for RCU locking functions
Linus Torvalds [Mon, 4 Dec 2006 18:52:29 +0000 (10:52 -0800)] 
netfilter.h needs rcuupdate.h for RCU locking functions

This was exposed by Al's recent header file dependency reduction
patches..

Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge branch 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird
Linus Torvalds [Mon, 4 Dec 2006 18:37:06 +0000 (10:37 -0800)] 
Merge branch 'for-linus4' of /linux/kernel/git/viro/bird

* 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird:
  [PATCH] severing poll.h -> mm.h
  [PATCH] severing skbuff.h -> mm.h
  [PATCH] severing skbuff.h -> poll.h
  [PATCH] severing skbuff.h -> highmem.h
  [PATCH] severing uaccess.h -> sched.h
  [PATCH] severing fs.h, radix-tree.h -> sched.h
  [PATCH] severing module.h->sched.h

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 4 Dec 2006 16:41:17 +0000 (08:41 -0800)] 
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [SUNHME]: Fix for sunhme failures on x86
  [XFRM] xfrm_user: Better validation of user templates.
  [DCCP] tfrc: Binary search for reverse TFRC lookup
  [DCCP] ccid3: Deprecate TFRC_SMALLEST_P
  [DCCP] tfrc: Identify TFRC table limits and simplify code
  [DCCP] tfrc: Add protection against invalid parameters to TFRC routines
  [DCCP] tfrc: Fix small error in reverse lookup of p for given f(p)
  [DCCP] tfrc: Document boundaries and limits of the TFRC lookup table
  [DCCP] ccid3: Fix warning message about illegal ACK
  [DCCP] ccid3: Fix bug in calculation of send rate
  [DCCP]: Fix BUG in retransmission delay calculation
  [DCCP]: Use higher RTO default for CCID3

17 years ago[PATCH] Enable RAID autorun on Mac partition tables.
David Woodhouse [Mon, 4 Dec 2006 15:45:46 +0000 (15:45 +0000)] 
[PATCH] Enable RAID autorun on Mac partition tables.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Mon, 4 Dec 2006 16:29:45 +0000 (08:29 -0800)] 
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (34 commits)
  [S390] Don't use small stacks when lockdep is used.
  [S390] cio: Use device_reprobe() instead of bus_rescan_devices().
  [S390] cio: Retry internal operations after vary off.
  [S390] cio: Use path verification for last path gone after vary off.
  [S390] non-unique constant/macro identifiers.
  [S390] Memory detection fixes.
  [S390] cio: Make ccw_dev_id_is_equal() more robust.
  [S390] Convert extmem spin_lock into a mutex.
  [S390] set KBUILD_IMAGE.
  [S390] lockdep: show held locks when showing a stackdump
  [S390] Add dynamic size check for usercopy functions.
  [S390] Use diag260 for memory size detection.
  [S390] pfault code cleanup.
  [S390] Cleanup memory_chunk array usage.
  [S390] Misaligned wait PSW at memory detection.
  [S390] cpu shutdown rework
  [S390] cpcmd <-> __cpcmd calling issues
  [S390] Bad kexec control page allocation.
  [S390] Reset infrastructure for re-IPL.
  [S390] Some documentation typos.
  ...

17 years ago[PATCH] m68knommu: fix missing bracket in scatterlist.h
Greg Ungerer [Mon, 4 Dec 2006 07:28:03 +0000 (17:28 +1000)] 
[PATCH] m68knommu: fix missing bracket in scatterlist.h

This patch adds missing bracket.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: fix dma-mapping.h
Greg Ungerer [Mon, 4 Dec 2006 07:27:58 +0000 (17:27 +1000)] 
[PATCH] m68knommu: fix dma-mapping.h

Make the m68knommu DMA handling consistent with other architectures.
Compile problems pointed out by Adrian Bunk <bunk@stusta.de>

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: remove __rom_end from 68360 startup code
Greg Ungerer [Mon, 4 Dec 2006 07:27:42 +0000 (17:27 +1000)] 
[PATCH] m68knommu: remove __rom_end from 68360 startup code

Remove use of __rom_end symbol all together. This helps clean out the
miscellaneous symbols lying around in the m68knommu linker script.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: memory register defines for 520x ColdFire CPU's
Greg Ungerer [Mon, 4 Dec 2006 07:27:36 +0000 (17:27 +1000)] 
[PATCH] m68knommu: memory register defines for 520x ColdFire CPU's

Here is a small patch to automatically detect the DRAM size on m520x.
It was generated against 2.6.17-uc0, and tested on an Intec 5208 dev board.

(This part of the patch if the memory register defines for the 520x
ColdFire CPU family - Greg).

Signed-off-by: Michael Broughton <mbobowik@telusplanet.net>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: auto detect memory size on M5208EVB board
Michael Broughton [Mon, 4 Dec 2006 07:27:29 +0000 (17:27 +1000)] 
[PATCH] m68knommu: auto detect memory size on M5208EVB board

Here is a small patch to automatically detect the DRAM size on m520x.
It was generated against 2.6.17-uc0, and tested on an Intec 5208 dev board.

Signed-off-by: Michael Broughton <mbobowik@telusplanet.net>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: add SHM support
David Wu [Mon, 4 Dec 2006 07:27:22 +0000 (17:27 +1000)] 
[PATCH] m68knommu: add SHM support

It turns out SHMAT, SHMDT, SHMGET and SHMCTL support in sys_ipc() for
m68knommu in 2.6 kernel(uClinux-dist-20060803 release) is missing.
(copied from m68k sources, report by David Wu <davidwu@arcturusnetworks.com>)

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: add printk level for stack dump
Greg Ungerer [Mon, 4 Dec 2006 07:27:09 +0000 (17:27 +1000)] 
[PATCH] m68knommu: add printk level for stack dump

Specify printk level in m68knommu stack dump code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: add printk level for oops dumps
Greg Ungerer [Mon, 4 Dec 2006 07:26:55 +0000 (17:26 +1000)] 
[PATCH] m68knommu: add printk level for oops dumps

Specify printk level in m68knommu oops dump code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: fix compile when CONFIG_BLK_DEV_INITRD=n
Adrian Bunk [Mon, 4 Dec 2006 07:26:44 +0000 (17:26 +1000)] 
[PATCH] m68knommu: fix compile when CONFIG_BLK_DEV_INITRD=n

This patch fixes the following compile error with
CONFIG_BLK_DEV_INITRD=n and -Werror-implicit-function-declaration:

  ...
    CC      arch/m68knommu/kernel/setup.o
  /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/arch/m68knommu/kernel/setup.c: In function 'setup_arch':
  /home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/arch/m68knommu/kernel/setup.c:268: error: implicit declaration of function 'paging_init'
  make[2]: *** [arch/m68knommu/kernel/setup.o] Error 1

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] m68knommu: formatting cleanup in Kconfig
Greg Ungerer [Mon, 4 Dec 2006 06:40:58 +0000 (16:40 +1000)] 
[PATCH] m68knommu: formatting cleanup in Kconfig

Formatting and a spelling cleanup in m68knommu Kconfig.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[S390] Don't use small stacks when lockdep is used.
Heiko Carstens [Mon, 4 Dec 2006 14:41:10 +0000 (15:41 +0100)] 
[S390] Don't use small stacks when lockdep is used.

The lock dependency validator adds a bunch of extra stack frames to
the stack, which can cause stack overflows. Especially seen on 31 bit
where the small stack is only 4k.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Use device_reprobe() instead of bus_rescan_devices().
Cornelia Huck [Mon, 4 Dec 2006 14:41:07 +0000 (15:41 +0100)] 
[S390] cio: Use device_reprobe() instead of bus_rescan_devices().

In io_subchannel_register(), it is better to just reprobe the current
device if it hasn't a driver yet than to rescan the whole bus.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Retry internal operations after vary off.
Cornelia Huck [Mon, 4 Dec 2006 14:41:04 +0000 (15:41 +0100)] 
[S390] cio: Retry internal operations after vary off.

If I/O was running on a just varied off chpid, it will be terminated.
If this was a common I/O layer internal I/O, it needs to be retried.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Use path verification for last path gone after vary off.
Cornelia Huck [Mon, 4 Dec 2006 14:41:01 +0000 (15:41 +0100)] 
[S390] cio: Use path verification for last path gone after vary off.

If the last path to a device is gone after a chpid has been varied
off, putting it on the slow queue doesn't prevent a device driver
from still attempting to use it (it may stay on the slow queue for a
long time). Instead, trigger a verify event which will prevent I/O
attempts from the device driver immediately.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] non-unique constant/macro identifiers.
Ursula Braun [Mon, 4 Dec 2006 14:40:59 +0000 (15:40 +0100)] 
[S390] non-unique constant/macro identifiers.

Add some prefixes to constands defined in drivers/s390/net/qdio.h
and drivers/s390/lcs.h to make it possible to include the three
header files drivers/s390/net/qeth.h, drivers/s390/net/qdio.h and
drivers/net/s390/lcs.h in one C file. This is required for the
patch that generates the kerntypes.o file for use by lcrash.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Memory detection fixes.
Heiko Carstens [Mon, 4 Dec 2006 14:40:56 +0000 (15:40 +0100)] 
[S390] Memory detection fixes.

VMALLOC_END on 31bit should be 0x8000000UL instead of 0x7fffffffL.
The page mask which is used to make sure memory_end is on 4MB/2MB
boundary is wrong and not needed. Therefore remove it.
Make sure a vmalloc area does also exist and work on (future)
machines with 4TB and more memory.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cio: Make ccw_dev_id_is_equal() more robust.
Cornelia Huck [Mon, 4 Dec 2006 14:40:54 +0000 (15:40 +0100)] 
[S390] cio: Make ccw_dev_id_is_equal() more robust.

Using memcmp to compare ccw_dev_id implies that the whole structure (incl.
padding) has always been completely initialized to sane values. Comparing
the structures field by field doesn't make such assumptions.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Convert extmem spin_lock into a mutex.
Heiko Carstens [Mon, 4 Dec 2006 14:40:51 +0000 (15:40 +0100)] 
[S390] Convert extmem spin_lock into a mutex.

There's no need to have a spin_lock here, but need sleepable context
for vmem_map. Therefore convert the spin_lock into a mutex.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] set KBUILD_IMAGE.
Christian Borntraeger [Mon, 4 Dec 2006 14:40:49 +0000 (15:40 +0100)] 
[S390] set KBUILD_IMAGE.

Set KBUILD_IMAGE to a sane value. This enables "make rpm"

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] lockdep: show held locks when showing a stackdump
Heiko Carstens [Mon, 4 Dec 2006 14:40:47 +0000 (15:40 +0100)] 
[S390] lockdep: show held locks when showing a stackdump

Follow i386/x86_64:
lockdep can be used to print held locks when printing a
backtrace. This can be useful when debugging things like
'scheduling while atomic' asserts.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Add dynamic size check for usercopy functions.
Gerald Schaefer [Mon, 4 Dec 2006 14:40:45 +0000 (15:40 +0100)] 
[S390] Add dynamic size check for usercopy functions.

Use a wrapper for copy_to/from_user to chose the best usercopy method.
The mvcos instruction is better for sizes greater than 256 bytes, if
mvcos is not available a page table walk is better for sizes greater
than 1024 bytes. Also removed the redundant copy_to/from_user_std_small
functions.

Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Use diag260 for memory size detection.
Heiko Carstens [Mon, 4 Dec 2006 14:40:42 +0000 (15:40 +0100)] 
[S390] Use diag260 for memory size detection.

Avoid the tprot loop if diag260 works and reports that there are no
holes in memory. The tprot instruction can lead to a significant delay
in the ipl process if the virtual guest has a lot of memory and the
host is under memory pressure.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] pfault code cleanup.
Heiko Carstens [Mon, 4 Dec 2006 14:40:40 +0000 (15:40 +0100)] 
[S390] pfault code cleanup.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Cleanup memory_chunk array usage.
Heiko Carstens [Mon, 4 Dec 2006 14:40:38 +0000 (15:40 +0100)] 
[S390] Cleanup memory_chunk array usage.

Need this at yet another file and don't want to add yet another
extern...

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Misaligned wait PSW at memory detection.
Heiko Carstens [Mon, 4 Dec 2006 14:40:36 +0000 (15:40 +0100)] 
[S390] Misaligned wait PSW at memory detection.

If the memory detection code would ever reach the point where it would
load the wait psw, it would generate a specification exception and the
system would crash at ipl time. This is because of a misaligned wait
psw. It needs to be on a double word boundary instead of a word
boundary.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cpu shutdown rework
Heiko Carstens [Mon, 4 Dec 2006 14:40:33 +0000 (15:40 +0100)] 
[S390] cpu shutdown rework

Let one master cpu kill all other cpus instead of sending an external
interrupt to all other cpus so they can kill themselves.
Simplifies reipl/shutdown functions a lot.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] cpcmd <-> __cpcmd calling issues
Heiko Carstens [Mon, 4 Dec 2006 14:40:30 +0000 (15:40 +0100)] 
[S390] cpcmd <-> __cpcmd calling issues

In case of reipl cpcmd gets called when all other cpus are not running
anymore. To prevent deadlocks change __cpcmd so that it doesn't take
any locks and call cpcmd or __cpcmd, whatever is correct in the current
context.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Bad kexec control page allocation.
Heiko Carstens [Mon, 4 Dec 2006 14:40:28 +0000 (15:40 +0100)] 
[S390] Bad kexec control page allocation.

KEXEC_CONTROL_MEMORY_LIMIT is an unsigned long value and therefore
should be defined as one. Otherwise the kexec control page can be
allocated above 2GB which will cause a specification exception on the
sam31 instruction in the s390 kexec relocation code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Reset infrastructure for re-IPL.
Heiko Carstens [Mon, 4 Dec 2006 14:40:26 +0000 (15:40 +0100)] 
[S390] Reset infrastructure for re-IPL.

In case of re-IPL and diag308 doesn't work we have to reset all devices
manually and wait synchronously that each reset finished.
This patch adds the necessary infrastucture and the first exploiter of it.

Subsystems that need to add a function that needs to be called at re-IPL
may register/unregister this function via

struct reset_call {
struct reset_call *next;
void (*fn)(void);
};

void register_reset_call(struct reset_call *reset);
void unregister_reset_call(struct reset_call *reset);

When the registered function get called the context is:

- all cpus beside the current one are stopped
- all machine checks and interrupts are disabled
- prefixing is disabled
- a default machine check handler is available for use

The registered functions may not take any locks are sleep.

For the common I/O layer part of this patch:

Introduce a reset_call css_reset that does the following:
- clear all subchannels
- perform a rchp on all channel paths and wait for the resulting
  machine checks
This replaces the calls to clear_all_subchannels() and
cio_reset_channel_paths() for kexec and ccw reipl. reipl_ccw_dev() now
uses reipl_find_schid() to determine the subchannel id for a given
device id.
Also remove cio_reset_channel_paths() and friends since they are not
needed anymore.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Some documentation typos.
Nicolas Kaiser [Mon, 4 Dec 2006 14:40:23 +0000 (15:40 +0100)] 
[S390] Some documentation typos.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] extmem unbalanced spin_lock.
Heiko Carstens [Mon, 4 Dec 2006 14:40:20 +0000 (15:40 +0100)] 
[S390] extmem unbalanced spin_lock.

segment save will exit with a lock held if the passed segment doesn't
exist. Any subsequent call to segment_save will lead to a deadlock.
Fix this and give up the lock before returning.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] return 'count' for successful execution of dasd_eer_enable.
Horst Hummel [Mon, 4 Dec 2006 14:40:18 +0000 (15:40 +0100)] 
[S390] return 'count' for successful execution of dasd_eer_enable.

Currently the return value of 'dasd_eer_enable' is returned - even if the
function returned '0'. Now return 'count' for successful execution.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Enhanced handling of failed termination requests.
Horst Hummel [Mon, 4 Dec 2006 14:40:15 +0000 (15:40 +0100)] 
[S390] Enhanced handling of failed termination requests.

In case a request timed out and termination did not work, the console was
flooded with retry messages (every 1/10s). Now we use a 5s delay per retry and
generate a more precise message.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Use diag instead of ccw reipl.
Michael Holzheu [Mon, 4 Dec 2006 14:40:13 +0000 (15:40 +0100)] 
[S390] Use diag instead of ccw reipl.

Since the diag 308 reipl method is superior to the ccw method, we should
use it whenever it is possible. We can do that, if the user has not
specified a new reipl ccw device and the system has been ipled from
a ccw device.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Add MODALIAS= to the uevent for the ap bus.
Cornelia Huck [Mon, 4 Dec 2006 14:40:10 +0000 (15:40 +0100)] 
[S390] Add MODALIAS= to the uevent for the ap bus.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] 3215 device locking.
Martin Schwidefsky [Mon, 4 Dec 2006 14:40:07 +0000 (15:40 +0100)] 
[S390] 3215 device locking.

Remove lock pointer from 3215 device structure. Use get_ccwdev_lock
for each use of the lock in the ccw-device structure.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] No panic for failed reboot
Michael Holzheu [Mon, 4 Dec 2006 14:40:05 +0000 (15:40 +0100)] 
[S390] No panic for failed reboot

If reboot fails (e.g. because wrong devno has been specified by the user),
we should just stop all cpus, but should not trigger a kernel panic.

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] termio <-> termios conversion error handling.
Heiko Carstens [Mon, 4 Dec 2006 14:40:02 +0000 (15:40 +0100)] 
[S390] termio <-> termios conversion error handling.

Get rid of our own user_termio_to_kernel_termios() and
kernel_termios_to_user_termio() macros which didn't check for errors
on user space accesses. Instead use the generic functions which
handle this properly.
In addition the generic version of user_termio_to_kernel_termios()
also copies the c_line member which was missing in our variant.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] update interface notes in zcrypt.h
Ralph Wuerthner [Mon, 4 Dec 2006 14:40:00 +0000 (15:40 +0100)] 
[S390] update interface notes in zcrypt.h

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Add ipl/reipl loadparm attribute.
Michael Holzheu [Mon, 4 Dec 2006 14:39:58 +0000 (15:39 +0100)] 
[S390] Add ipl/reipl loadparm attribute.

If multiple kernel images are installed on one DASD, the loadparm can be used
to select the boot configuration. This patch introduces the following two new
sysfs attributes:

/sys/firmware/ipl/loadparm: shows loadparm of current system (ro)
/sys/firmware/reipl/ccw/loadparm: loadparm used for next reboot (rw)

Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Add __must_check to uaccess functions.
Heiko Carstens [Mon, 4 Dec 2006 14:39:55 +0000 (15:39 +0100)] 
[S390] Add __must_check to uaccess functions.

Follow other architectures and add __must_check to uaccess functions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] Remove unused GENERIC_BUST_SPINLOCK from Kconfig.
Heiko Carstens [Mon, 4 Dec 2006 14:39:52 +0000 (15:39 +0100)] 
[S390] Remove unused GENERIC_BUST_SPINLOCK from Kconfig.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] handle incorrect values when writing to dasd sysfs attributes.
Horst Hummel [Mon, 4 Dec 2006 14:39:50 +0000 (15:39 +0100)] 
[S390] handle incorrect values when writing to dasd sysfs attributes.

When writing to dasd attributes (e.g. readonly), all values besides '1'
are handled like '0'.
Other sysfs-attributes like 'online' are checking for '1' and for '0'
and do not accept other values. Therefore enhanced checking and error
handling in dasd_devmap attribute store functions.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[S390] remove salipl memory detection.
Christian Borntraeger [Mon, 4 Dec 2006 14:39:47 +0000 (15:39 +0100)] 
[S390] remove salipl memory detection.

The SALIPL entry point has an needless memory detection routine as we
later check the memory size again. The SALIPL code also uses diagnose
0x060 if we are running under VM, but this diagnose is not compatible
with the 64 bit addressing mode. The solution is to get rid of this
code and rely on the memory detection in the startup code.

Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
17 years ago[PATCH] severing poll.h -> mm.h
Al Viro [Fri, 20 Oct 2006 19:17:02 +0000 (15:17 -0400)] 
[PATCH] severing poll.h -> mm.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] severing skbuff.h -> mm.h
Al Viro [Mon, 4 Dec 2006 04:15:30 +0000 (23:15 -0500)] 
[PATCH] severing skbuff.h -> mm.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] severing skbuff.h -> poll.h
Al Viro [Thu, 19 Oct 2006 21:23:57 +0000 (17:23 -0400)] 
[PATCH] severing skbuff.h -> poll.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] severing skbuff.h -> highmem.h
Al Viro [Thu, 19 Oct 2006 20:08:53 +0000 (16:08 -0400)] 
[PATCH] severing skbuff.h -> highmem.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] severing uaccess.h -> sched.h
Al Viro [Thu, 19 Oct 2006 14:29:02 +0000 (10:29 -0400)] 
[PATCH] severing uaccess.h -> sched.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] severing fs.h, radix-tree.h -> sched.h
Al Viro [Wed, 18 Oct 2006 17:55:46 +0000 (13:55 -0400)] 
[PATCH] severing fs.h, radix-tree.h -> sched.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] severing module.h->sched.h
Al Viro [Wed, 18 Oct 2006 05:47:25 +0000 (01:47 -0400)] 
[PATCH] severing module.h->sched.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[SUNHME]: Fix for sunhme failures on x86
Jurij Smakov [Mon, 4 Dec 2006 03:33:02 +0000 (19:33 -0800)] 
[SUNHME]: Fix for sunhme failures on x86

The following patch fixes the failure of sunhme drivers on x86 hosts
due to missing pci_enable_device() and pci_set_master() calls, lost
during code refactoring. It has been filed as bugzilla bug #7502 [0]
and Debian bug #397460 [1].

[0] http://bugzilla.kernel.org/show_bug.cgi?id=7502
[1] http://bugs.debian.org/397460

Signed-off-by: Jurij Smakov <jurij@wooyd.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
David S. Miller [Mon, 4 Dec 2006 03:24:40 +0000 (19:24 -0800)] 
Merge /pub/scm/linux/kernel/git/acme/net-2.6

17 years agoRemove long-unmaintained ftape driver subsystem.
Jeff Garzik [Mon, 4 Dec 2006 03:22:41 +0000 (22:22 -0500)] 
Remove long-unmaintained ftape driver subsystem.

It's bitrotten, long unmaintained, long hidden under BROKEN_ON_SMP,
etc.  As scheduled in feature-removal-schedule.txt, and ack'd several
times on lkml.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[XFRM] xfrm_user: Better validation of user templates.
David S. Miller [Mon, 4 Dec 2006 03:19:26 +0000 (19:19 -0800)] 
[XFRM] xfrm_user: Better validation of user templates.

Since we never checked the ->family value of templates
before, many applications simply leave it at zero.
Detect this and fix it up to be the pol->family value.

Also, do not clobber xp->family while reading in templates,
that is not necessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[DCCP] tfrc: Binary search for reverse TFRC lookup
Gerrit Renker [Sun, 3 Dec 2006 16:53:27 +0000 (14:53 -0200)] 
[DCCP] tfrc: Binary search for reverse TFRC lookup

This replaces the linear search algorithm for reverse lookup with
binary search.

It has the advantage of better scalability: O(log2(N)) instead of O(N).
This means that the average number of iterations is reduced from 250
(linear search if each value appears equally likely) down to at most 9.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP] ccid3: Deprecate TFRC_SMALLEST_P
Gerrit Renker [Sun, 3 Dec 2006 16:53:07 +0000 (14:53 -0200)] 
[DCCP] ccid3: Deprecate TFRC_SMALLEST_P

 This patch deprecates the existing use of an arbitrary value TFRC_SMALLEST_P
 for low-threshold values of p. This avoids masking low-resolution errors.
 Instead, the code now checks against real boundaries (implemented by preceding
 patch) and provides warnings whenever a real value falls below the threshold.

 If such messages are observed, it is a better solution to take this as an
 indication that the lookup table needs to be re-engineered.

Changelog:
----------
 This patch
   * makes handling all TFRC resolution errors local to the TFRC library

   * removes unnecessary test whether X_calc is 'infinity' due to p==0 -- this
     condition is already caught by tfrc_calc_x()

   * removes setting ccid3hctx_p = TFRC_SMALLEST_P in ccid3_hc_tx_packet_recv
     since this is now done by the TFRC library

   * updates BUG_ON test in ccid3_hc_tx_no_feedback_timer to take into account
     that p now is either 0 (and then X_calc is irrelevant), or it is > 0; since
     the handling of TFRC_SMALLEST_P is now taken care of in the tfrc library

Justification:
--------------
 The TFRC code uses a lookup table which has a bounded resolution.
 The lowest possible value of the loss event rate `p' which can be
 resolved is currently 0.0001.  Substituting this lower threshold for
 p when p is less than 0.0001 results in a huge, exponentially-growing
 error.  The error can be computed by the following formula:

    (f(0.0001) - f(p))/f(p) * 100      for p < 0.0001

 Currently the solution is to use an (arbitrary) value
     TFRC_SMALLEST_P  =   40 * 1E-6   =   0.00004
 and to consider all values below this value as `virtually zero'.  Due to
 the exponentially growing resolution error, this is not a good idea, since
 it hides the fact that the table can not resolve practically occurring cases.
 Already at p == TFRC_SMALLEST_P, the error is as high as 58.19%!

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP] tfrc: Identify TFRC table limits and simplify code
Gerrit Renker [Sun, 3 Dec 2006 16:52:41 +0000 (14:52 -0200)] 
[DCCP] tfrc: Identify TFRC table limits and simplify code

This
 * adds documentation about the lowest resolution that is possible within
   the bounds of the current lookup table
 * defines a constant TFRC_SMALLEST_P which defines this resolution
 * issues a warning if a given value of p is below resolution
 * combines two previously adjacent if-blocks of nearly identical
   structure into one

This patch does not change the algorithm as such.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP] tfrc: Add protection against invalid parameters to TFRC routines
Gerrit Renker [Sun, 3 Dec 2006 16:52:26 +0000 (14:52 -0200)] 
[DCCP] tfrc: Add protection against invalid parameters to TFRC routines

 1) For the forward X_calc lookup, it
    * protects effectively against RTT=0 (this case is possible), by
      returning the maximal lookup value instead of just setting it to 1
    * reformulates the array-bounds exceeded condition: this only happens
      if p is greater than 1E6 (due to the scaling)
    * the case of negative indices can now with certainty be excluded,
      since documentation shows that the formulas are within bounds
    * additional protection against p = 0 (would give divide-by-zero)

 2) For the reverse lookup, it warns against
    * protects against exceeding array bounds
    * now returns 0 if f(p) = 0, due to function definition
    * warns about minimal resolution error and returns the smallest table
      value instead of p=0 [this would mask congestion conditions]

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP] tfrc: Fix small error in reverse lookup of p for given f(p)
Gerrit Renker [Sun, 3 Dec 2006 16:52:01 +0000 (14:52 -0200)] 
[DCCP] tfrc: Fix small error in reverse lookup of p for given f(p)

This fixes the following small error in tfrc_calc_x_reverse_lookup.

 1) The table is generated by the following equations:
lookup[index][0] = g((index+1) * 1000000/TFRC_CALC_X_ARRSIZE);
lookup[index][1] = g((index+1) * TFRC_CALC_X_SPLIT/TFRC_CALC_X_ARRSIZE);
    where g(q) is 1E6 * f(q/1E6)

 2) The reverse lookup assigns an entry in lookup[index][small]

 3) This index needs to match the above, i.e.
    * if small=0 then

       p  = (index + 1) * 1000000/TFRC_CALC_X_ARRSIZE

    * if small=1 then

p = (index+1) * TFRC_CALC_X_SPLIT/TFRC_CALC_X_ARRSIZE

These are exactly the changes that the patch makes; previously the code did
not conform to the way the lookup table was generated (this difference resulted
in a mean error of about 1.12%).

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP] tfrc: Document boundaries and limits of the TFRC lookup table
Gerrit Renker [Sun, 3 Dec 2006 16:51:29 +0000 (14:51 -0200)] 
[DCCP] tfrc: Document boundaries and limits of the TFRC lookup table

This adds documentation for the TCP Reno throughput equation which is at
the heart of the TFRC sending rate / loss rate calculations.

It spells out precisely how the values were determined and what they mean.
The equations were derived through reverse engineering and found to be
fully accurate (verified using test programs).

This patch does not change any code.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP] ccid3: Fix warning message about illegal ACK
Gerrit Renker [Sun, 3 Dec 2006 16:51:14 +0000 (14:51 -0200)] 
[DCCP] ccid3: Fix warning message about illegal ACK

This avoids a (harmless) warning message being printed at the DCCP server
(the receiver of a DCCP half connection).

Incoming packets are both directed to

 * ccid_hc_rx_packet_recv() for the server half
 * ccid_hc_tx_packet_recv() for the client half

The message gets printed since on a server the client half is currently not
sending data packets.
This is resolved for the moment by checking the DCCP-role first. In future
times (bidirectional DCCP connections), this test may have to be more
sophisticated.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP] ccid3: Fix bug in calculation of send rate
Gerrit Renker [Sun, 3 Dec 2006 16:50:56 +0000 (14:50 -0200)] 
[DCCP] ccid3: Fix bug in calculation of send rate

The main object of this patch is the following bug:
 ==> In ccid3_hc_tx_packet_recv, the parameters p and X_recv were updated
     _after_ the send rate was calculated. This is clearly an error and is
     resolved by re-ordering statements.

In addition,
  * r_sample is converted from u32 to long to check whether the time difference
    was negative (it would otherwise be converted to a large u32 value)
  * protection against RTT=0 (this is possible) is provided in a further patch
  * t_elapsed is also converted to long, to match the type of r_sample
  * adds a a more debugging information regarding current send rates
  * various trivial comment/documentation updates

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP]: Fix BUG in retransmission delay calculation
Gerrit Renker [Sun, 3 Dec 2006 16:50:42 +0000 (14:50 -0200)] 
[DCCP]: Fix BUG in retransmission delay calculation

This bug resulted in ccid3_hc_tx_send_packet returning negative
delay values, which in turn triggered silently dequeueing packets in
dccp_write_xmit. As a result, only a few out of the submitted packets made
it at all onto the network.  Occasionally, when dccp_wait_for_ccid was
involved, this also triggered a bug warning since ccid3_hc_tx_send_packet
returned a negative value (which in reality was a negative delay value).

The cause for this bug lies in the comparison

 if (delay >= hctx->ccid3hctx_delta)
return delay / 1000L;

The type of `delay' is `long', that of ccid3hctx_delta is `u32'. When comparing
negative long values against u32 values, the test returned `true' whenever delay
was smaller than 0 (meaning the packet was overdue to send).

The fix is by casting, subtracting, and then testing the difference with
regard to 0.

This has been tested and shown to work.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[DCCP]: Use higher RTO default for CCID3
Gerrit Renker [Sun, 3 Dec 2006 16:50:23 +0000 (14:50 -0200)] 
[DCCP]: Use higher RTO default for CCID3

The TFRC nofeedback timer normally expires after the maximum of 4
RTTs and twice the current send interval (RFC 3448, 4.3). On LANs
with a small RTT this can mean a high processing load and reduced
performance, since then the nofeedback timer is triggered very
frequently.

This patch provides a configuration option to set the bound for the
nofeedback timer, using as default 100 milliseconds.

By setting the configuration option to 0, strict RFC 3448 behaviour
can be enforced for the nofeedback timer.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
17 years ago[PATCH] sata_promise: PHYMODE4 fixup
Mikael Pettersson [Fri, 1 Dec 2006 09:55:58 +0000 (10:55 +0100)] 
[PATCH] sata_promise: PHYMODE4 fixup

This patch adds code to fix up the PHYMODE4 "align timing"
register value on second-generation Promise SATA chips.
Failure to correct this value on non-x86 machines makes
drive detection prone to failure due to timeouts. (I've
observed about 50% detection failure rates on SPARC64.)

The HW boots with a bad value in this register, but on x86
machines the Promise BIOS corrects it to the value recommended
by the manual, so most people have been unaffected by this issue.

After developing the patch I checked Promise's SATAII driver,
and discovered that it also corrects PHYMODE4 just like this
patch does.

This patch depends on the sata_promise SATAII updates
patch I sent recently.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[PATCH] libata: always use polling IDENTIFY
Tejun Heo [Sun, 3 Dec 2006 12:34:13 +0000 (21:34 +0900)] 
[PATCH] libata: always use polling IDENTIFY

libata switched to IRQ-driven IDENTIFY when IRQ-driven PIO was
introduced.  This has caused a lot of problems including device
misdetection and phantom device.

ATA_FLAG_DETECT_POLLING was added recently to selectively use polling
IDENTIFY on problemetic drivers but many controllers and devices are
affected by this problem and trying to adding ATA_FLAG_DETECT_POLLING
for each such case is diffcult and not very rewarding.

This patch makes libata always use polling IDENTIFY.  This is
consistent with libata's original behavior and drivers/ide's behavior.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] pata_cs5535: fix build
Jeff Garzik [Sun, 3 Dec 2006 12:57:21 +0000 (07:57 -0500)] 
[libata] pata_cs5535: fix build

Noticed by Tejun and others.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[PATCH] ahci: do not powerdown during initialization
Tejun Heo [Mon, 20 Nov 2006 06:42:36 +0000 (15:42 +0900)] 
[PATCH] ahci: do not powerdown during initialization

ahci_init_controller() calls ahci_deinit_port() to make sure the
controller is stopped before initializing the controller.  In turn,
ahci_deinit_port() invokes ahci_power_down() to power down the port.
If the controller supports slumber mode, the link is put into it.

Unfortunately, some devices don't implement link powersaving mode
properly and show erratic behavior after link is put into slumber
mode.  For example, HL-DT-ST DVD-RAM GSA-H30N completely locks up on
slumber transition and can only be recovered with the *REAL* hard
reset - power removal and reapply.

Note that this makes the first probing reset different from all
others.  If the above dvd-ram is hotplugged after ahci is initialized,
no problem occurs because ahci is already fully initialized with phy
powered up.  So, this might also be the reason for other weird AHCI
initial probing abnormalities.

This patch moves power up/down out of port init/deinit and call them
only when needed.

Power down is now called only when suspending.  As system suspend
usually involves powering down 12v for storage devices, this shouldn't
cause problem even if the attached device doesn't support slumber
mode.  However, in partial power management and suspend failure cases,
devices might lock up after suspend attempt.  I thought about removing
transition to slumber mode altogether but ahci spec mandates it before
HBA D3 state transition.  Blacklisting such devices might be the
solution.

Signed-off-by: Tejun Heo <htejun@gmail.com>
17 years ago[PATCH] libata: prepare ata_sg_clean() for invocation from EH
Tejun Heo [Tue, 14 Nov 2006 13:47:10 +0000 (22:47 +0900)] 
[PATCH] libata: prepare ata_sg_clean() for invocation from EH

Make ata_sg_clean() global and don't allow NCQ for internal commands.

Signed-off-by: Tejun Heo <htejun@gmail.com>
17 years ago[PATCH] libata: separate out rw ATA taskfile building into ata_build_rw_tf()
Tejun Heo [Tue, 14 Nov 2006 13:47:10 +0000 (22:47 +0900)] 
[PATCH] libata: separate out rw ATA taskfile building into ata_build_rw_tf()

Separate out rw ATA taskfile building from ata_scsi_rw_xlat() into
ata_build_rw_tf().  This will be used to improve media error handling.

Signed-off-by: Tejun Heo <htejun@gmail.com>
17 years ago[PATCH] libata: implement ata_exec_internal_sg()
Tejun Heo [Tue, 14 Nov 2006 13:47:09 +0000 (22:47 +0900)] 
[PATCH] libata: implement ata_exec_internal_sg()

Sg'ify ata_exec_internal() and call it ata_exec_internal_sg().
Wrapper function around ata_exec_internal_sg() is implemented to
provide ata_exec_internal() interface.

Signed-off-by: Tejun Heo <htejun@gmail.com>
17 years ago[PATCH] libata: make sure IRQ is cleared after ata_bmdma_freeze()
Tejun Heo [Fri, 17 Nov 2006 03:24:22 +0000 (12:24 +0900)] 
[PATCH] libata: make sure IRQ is cleared after ata_bmdma_freeze()

Now that BMDMA status is recorded in irq handler.  ata_bmdma_freeze()
is free to manipulate host status.  Under certain circumstances, some
controllers (ICH7 in enhanced mode w/ IRQ shared) raise IRQ when CTL
register is written to and ATA_NIEN doesn't mask it.

This patch makes ata_bmdma_freeze() clear all pending IRQs after
freezing a port.  This change makes explicit clearing in
ata_device_add() unnecessary and thus kills it.  The removed code was
SFF-specific and was in the wrong place.

Note that ->freeze() handler is always called under ap->lock held and
irq disabled.  Even if CTL manipulation causes stuck IRQ, it's cleared
immediately.  This should be safe (enough) even in SMP environment.
More correct solution is to mask the IRQ from IRQ controller but that
would be an overkill.

Signed-off-by: Tejun Heo <htejun@gmail.com>
17 years ago[PATCH] libata: move BMDMA host status recording from EH to interrupt handler
Tejun Heo [Fri, 17 Nov 2006 03:06:21 +0000 (12:06 +0900)] 
[PATCH] libata: move BMDMA host status recording from EH to interrupt handler

For certain errors, interrupt handler alter BMDMA host status before
entering EH (clears active and intr).  Thus altered BMDMA host status
value is recorded by BMDMA EH and reported to user.  Move BMDMA host
status recording from EH to interrupt handler.

Signed-off-by: Tejun Heo <htejun@gmail.com>