Commit Graph

28856 Commits (c2803b98557c10464f3a1fc65f56d0c8c01991bd)

Author SHA1 Message Date
Linus Torvalds f778089cb2 Merge branch 'sas-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'sas-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  aic94xx: fix DMA data direction for SMP requests
2007-10-02 10:41:06 -07:00
Linus Torvalds db7a89db5e Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  dm9601: Fix receive MTU
  mv643xx_eth: Do not modify struct netdev tx_queue_len
  qla3xxx: bugfix: Fix VLAN rx completion handling.
  qla3xxx: bugfix: Add memory barrier before accessing rx completion.
2007-10-02 10:40:40 -07:00
Linus Torvalds 2910ca6f8a Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ata_piix: add another TECRA M3 entry to broken suspend list
2007-10-02 10:40:20 -07:00
Jeff Garzik d136552e8b aic94xx: fix DMA data direction for SMP requests
DMA-mapped SMP (scsi management protocol) requests going /to/ the device
need the PCI DMA data direction to indicate such.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-02 13:16:10 -04:00
Peter Korsgaard f662fe5a0b dm9601: Fix receive MTU
dm9601 didn't take the ethernet header into account when calculating
RX MTU, causing packets bigger than 1486 to fail.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:59:10 -04:00
Dale Farnsworth 593ff56ef2 mv643xx_eth: Do not modify struct netdev tx_queue_len
This driver erroneously zeros dev->tx_queue_len, since
mp->tx_ring_size has not yet been initialized.  Actually,
the driver shouldn't modify tx_queue_len at all and should
leave the value set by alloc_etherdev(), currently 1000.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:55:10 -04:00
Ron Mercer 50626297b1 qla3xxx: bugfix: Fix VLAN rx completion handling.
Fix 4032 chip undocumented "feature" where bit-8 is set
if the inbound completion is for a VLAN.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:55:10 -04:00
Ron Mercer b323e0e49f qla3xxx: bugfix: Add memory barrier before accessing rx completion.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:55:10 -04:00
Tejun Heo 4c74d4ec35 ata_piix: add another TECRA M3 entry to broken suspend list
There's a different version of DMI table for TECRA M3 where it has
proper vendor and product name entry.  Add the entry to the broken
suspend list.

Angus Turnbull reported and provided initial patch.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Angus Turnbull <angus@twinhelix.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 10:54:02 -04:00
Eric Dumazet 9b42c336d0 [TCP]: secure_tcp_sequence_number() should not use a too fast clock
TCP V4 sequence numbers are 32bits, and RFC 793 assumed a 250 KHz clock.
In order to follow network speed increase, we can use a faster clock, but
we should limit this clock so that the delay between two rollovers is
greater than MSL (TCP Maximum Segment Lifetime : 2 minutes)

Choosing a 64 nsec clock should be OK, since the rollovers occur every
274 seconds.

Problem spotted by Denys Fedoryshchenko

[ This bug was introduced by f859581519 ]

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-01 21:01:24 -07:00
Linus Torvalds e2cd68f7cd Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
* 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6:
  [PATCH] libertas: build problems when partially modular
2007-10-01 13:11:48 -07:00
Linus Torvalds ca45fe8ea8 Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (6052): ivtv: fix udma yuv bug
2007-10-01 08:02:57 -07:00
Samuel Ortiz 8792f961ba VT ioctl race fix
When calling the RELDISP VT ioctl, we are reading vt_newvt while the
console workqueue could be messing with it (through change_console()).  We
fix this race by taking the console semaphore before reading vt_newvt.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Acked-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-01 07:52:23 -07:00
Randy Dunlap f998351c75 [PATCH] libertas: build problems when partially modular
Fix missing symbols in libertas USB driver when it is modular and rest
of libertas is built-in.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-09-30 20:35:39 -04:00
Ian Armstrong cb50f548c0 V4L/DVB (6052): ivtv: fix udma yuv bug
Using udma yuv causes the driver becomes locked into that mode. This prevents
use of the mpeg decoder & non-udma yuv output. This patch clears the
operating mode when the device is closed.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-09-30 10:31:34 -03:00
Jan Lübbe a64314e62d fix console change race exposed by CFS
The new behaviour of CFS exposes a race which occurs if a switch is
requested when vt_mode.mode is VT_PROCESS.

The process with vc->vt_pid is signaled before vc->vt_newvt is set.
This causes the switch to fail when triggered by the monitoing process
because the target is still -1.

[ If the signal sending fails, the subsequent "reset_vc(vc)" will then
  reset vt_newvt to -1, so this works for that case too.   - Linus ]

Signed-off-by: Jan Lübbe <jluebbe@lasnet.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-29 10:00:15 -07:00
Dale Farnsworth 2bcff60f7c mv643xx_eth: Check ETH_INT_CAUSE_STATE bit
Commit 468d09f894 masked the "state"
interrupt (bit 20 of the cause register). This results in Radstone's
PPC7D repeatedly re-entering the interrupt routine, locking up the
board. The following patch returns the required handling for this
interrupt.

Signed-off-by: Martyn Welch <martyn.welch@radstone.co.uk>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-29 00:46:30 -04:00
Benjamin Herrenschmidt 1bef7dc00c Fix bogus PCI quirk for e100
Linas reported me that some machines were crashing at boot in
quirk_e100_interrupt. It appears that this quirk is doing an ioremap
directly on a PCI BAR value, which isn't legal and will cause all sorts
of bad things to happen on architectures where PCI BARs don't directly
match processor bus addresses.

This fixes it by using the proper PCI resources instead which is possible
since the quirk has been moved by a previous commit to happen late enough
for that.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-28 16:21:10 -07:00
Dmitry Torokhov b082dff349 Input: xpad - fix dependancy on LEDS class
Input: xpad - fix dependancy on LEDS class

The driver can not be built-in when LEDS class is a module.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-28 15:38:12 -07:00
Linus Torvalds bd89366324 Merge branch 'for-2.6.23' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
* 'for-2.6.23' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc:
  [POWERPC] mpc8349emitx.dts: Setup USB-DR for peripheral mode.
  [POWERPC] Fix mpc834x USB-MPH configuration.
  [POWERPC] Fix cpm_uart driver for cpm1 machines
  [PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
  [POWERPC] Fix copy'n'paste typo in commproc.c
2007-09-28 15:33:03 -07:00
Linus Torvalds f100353ff5 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  e1000: Add device IDs of blade version of the 82571 quad port
  sky2: fix transmit state on resume
  sky2: FE+ vlan workaround
  sky2: sky2 FE+ receive status workaround
2007-09-28 15:32:29 -07:00
Jochen Friedrich d214602804 [POWERPC] Fix cpm_uart driver for cpm1 machines
in cpm_uart_cpm1.h, DPRAM_BASE is assigned an address derived from cpmp.
On ARC=ppc, this is a physical address with 1:1 DMA mapping which can't
be used for arithmetric compare operations with virtual addresses
returned by cpm_dpram_addr. This patch changes the assignment to use
cpm_dpram_addr as well, like in cpm_uart_cpm2.h.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-28 10:26:30 -05:00
Auke Kok f4ec7f9871 e1000: Add device IDs of blade version of the 82571 quad port
This blade-specific board form factor is identical to the 82571EB
board.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-27 23:38:35 -04:00
Stephen Hemminger 88f5f0cad3 sky2: fix transmit state on resume
This should fix http://bugzilla.kernel.org/show_bug.cgi?id=8667

After resume, driver has reset the chip so the current state
of transmit checksum offload state machine and DMA state machine
will be undefined.

The fix is to set the state so that first Tx will set MSS and offset
values.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-27 23:32:29 -04:00
Stephen Hemminger d6c9bc1ed4 sky2: FE+ vlan workaround
The FE+ workaround means the driver can no longer trust the status register
to indicate VLAN tagged frames.  The fix for this is to just disable VLAN
acceleration for that chip version. Tested and works fine.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-27 23:32:28 -04:00
Stephen Hemminger 3b12e0141f sky2: sky2 FE+ receive status workaround
The Yukon FE+ chip appears to have a hardware glitch that causes bogus
receive status values to be posted. The data in the packet is good, but
the status value is random garbage.  As a temporary workaround until the
problem is better understood, implement the workaround the vendor driver
used of ignoring the status value on this chip.

Since this means trusting dodgy hardware values; add additional checking
of the receive packet length.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-27 23:32:28 -04:00
Dave Airlie e4a7b1d1d9 i915: make vbl interrupts work properly on i965g/gm hw.
This code is ported from the DRM git tree and allows the vblank interrupts
to function on the i965 hw. It also requires a change in Mesa's 965 driver
to actually use them.

[ Without this patch, my 965GM drops vblank interrupts  - Jesse ]

Signed-off-by: Dave Airlie <airlied@linux.ie>
Acked-by: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-27 19:47:28 -07:00
S.Çağlar Onur 3dffec45c2 Silent drivers/char/hpet.c build warnings on i386
Following patch silents;

...
drivers/char/hpet.c:72: warning: 'clocksource_hpet' defined but not used
drivers/char/hpet.c:81: warning: 'hpet_clocksource' defined but not used
...

build warnings on i386, they appeared after commit 3b2b64fd31

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
--
 drivers/char/hpet.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
2007-09-26 09:22:04 -07:00
Al Viro d8c4a2f9d9 mv643xx_eth: duplicate methods in initializer
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-26 09:22:04 -07:00
Al Viro ed4d6375a1 usbvision-video: buggered method tables
duplicated .mmap in one, .vidioc_s_audio misspelled as .vidioc_g_audio
in other

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-26 09:22:04 -07:00
Linus Torvalds 5309809129 Add explicit zeroing to "envp" array in device 'show' method
As Stephen Hemminger says, this is a "belt and suspenders" patch that
zeroes the envp array at allocation time, even though all the users
should NULL-terminate it anyway (and we've hopefully fixed everybody
that doesn't do that).

And we'll apparently clean the whole envp thing up for 2.6.24 anyway.

But let's just be robust, and do both this *and* make sure that all
users are doing the right thing.

Acked-by: Stephen Hemminger <shemminger@linux-foundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-26 09:16:21 -07:00
Linus Torvalds 544002ef83 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] esp: fix instance numbering.
2007-09-26 09:08:04 -07:00
Linus Torvalds d85f57938a Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [PPP_MPPE]: Don't put InterimKey on the stack
  SCTP : Add paramters validity check for ASCONF chunk
  SCTP: Discard OOTB packetes with bundled INIT early.
  SCTP: Clean up OOTB handling and fix infinite loop processing
  SCTP: Explicitely discard OOTB chunks
  SCTP: Send ABORT chunk with correct tag in response to INIT ACK
  SCTP: Validate buffer room when processing sequential chunks
  [PATCH] mac80211: fix initialisation when built-in
  [PATCH] net/mac80211/wme.c: fix sparse warning
  [PATCH] cfg80211: fix initialisation if built-in
  [PATCH] net/wireless/sysfs.c: Shut up build warning
2007-09-26 08:59:41 -07:00
Linus Torvalds acbbe6c28a Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SUNSAB]: Fix broken SYSRQ.
2007-09-26 08:58:45 -07:00
Linus Torvalds 9a22e330e9 Merge branch 'trivial' of git://git.kernel.dk/data/git/linux-2.6-block
* 'trivial' of git://git.kernel.dk/data/git/linux-2.6-block:
  cdrom_open() forgets to unlock on -EROFS failure exits
2007-09-26 08:58:13 -07:00
Linus Torvalds 4d3fac0871 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_sis: add missing UDMA5 timing value in sis_66_set_dmamode()
  sata_sil24: fix IRQ clearing race when PCIX_IRQ_WOC is used
2007-09-26 08:57:27 -07:00
Linus Torvalds 1f23f4209f Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: hpet: ACPI Error (utglobal-0126): Unknown exception code: 0xFFFFFFF0
  ACPI: CONFIG_ACPI_SLEEP=n power off regression in 2.6.23-rc8 (NOT in rc7)
  ACPI: suspend: build-fix for CONFIG_SUSPEND=n and CONFIG_HIBERNATION=y
2007-09-26 08:56:28 -07:00
Al Viro ae3ba4fd96 cdrom_open() forgets to unlock on -EROFS failure exits
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-09-26 08:20:44 +02:00
Michal Schmidt 45dfd5b5dd [PPP_MPPE]: Don't put InterimKey on the stack
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-25 23:05:39 -07:00
Thomas Bogendoerfer 744551cceb [SUNSAB]: Fix broken SYSRQ.
Include SYSRQ support for SUNSAB if SUNSAB_CONSOLE is selected

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-25 22:49:37 -07:00
David Miller ff4abd6cfa [SCSI] esp: fix instance numbering.
Because the ->unique_id is set too late, the ESP scsi host
instance numbers in the kernel log during probing are
wrong.

Bug reported by Meelis Roos.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-09-25 20:55:02 -05:00
Tejun Heo edeb614c1c pata_sis: add missing UDMA5 timing value in sis_66_set_dmamode()
sis_66_set_dmamode() also handles early UDMA100 (SIS630 ET) but is
missing udma timing value for UDMA100.  According to sis5513, this
should be 0x8000.  This caused UDMA100 device to fail on pata_sis till
it downgrades to UDMA66 while it works fine on sis5513 at UDMA100.

Reported by Adam Blech.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Adam Blech <desaster.area@addcom.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-25 21:30:56 -04:00
Tejun Heo 228f47b959 sata_sil24: fix IRQ clearing race when PCIX_IRQ_WOC is used
When PCIX_IRQ_WOC is used, sil24 has an inherent race condition
between clearing IRQ pending and reading IRQ status.  If IRQ pending
is cleared after reading IRQ status, there's possibility of lost IRQ.
If IRQ pending is cleared before reading IRQ status, spurious IRQs
will occur.

sata_sil24 till now cleared IRQ pending after reading IRQ status thus
losing IRQs on machines where PCIX_IRQ_WOC was used.  Reverse the
order and ignore spurious IRQs if PCIX_IRQ_WOC.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-25 21:30:56 -04:00
Zhao Yakui 78e1ca49c7 ACPI: hpet: ACPI Error (utglobal-0126): Unknown exception code: 0xFFFFFFF0
If hpet has been initialized before registering hpet driver, the callback
function of hpet_resources will return the status code of -EBUSY, which is
not defined in the ACPI exception table.  So when ACPI checks the status
code of callback function, it will report the unknown exception code.

So the status code in ACPI is used instead of the generic error code in the
ACPI callback function of hpet_resources.
For example: -EBUSY is replaced by AE_ALREADY_EXISTS
	     -EINVAL is replaced by AE_NO_MEMORY

http://bugzilla.kernel.org/show_bug.cgi?id=8630

Signed-off-by: Zhao Yakui  <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-09-25 17:59:00 -04:00
Alexey Starikovskiy 853298bc03 ACPI: CONFIG_ACPI_SLEEP=n power off regression in 2.6.23-rc8 (NOT in rc7)
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-09-25 17:58:52 -04:00
Alexey Starikovskiy 2f3f22269b ACPI: suspend: build-fix for CONFIG_SUSPEND=n and CONFIG_HIBERNATION=y
This fixes compilation with CONFIG_SUSPEND unset and CONFIG_HIBERNATION set
(raf. http://marc.info/?l=linux-acpi&m=119055289723895&w=4).

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-09-25 17:58:43 -04:00
Linus Torvalds 4aee491cd4 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] scsi_transport_spi: fix domain validation failure from incorrect width setting
2007-09-25 11:19:03 -07:00
Linus Torvalds 973ed7c49a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: appletouch - fix idle reset logic
2007-09-25 11:18:10 -07:00
Linus Torvalds f3fe81d9c9 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  Revert "drivers/net/pcmcia/3c589_cs: fix port configuration switcheroo"
  sky2: be more selective about FIFO watchdog
  sky2: FE+ Phy initialization
  r8169: workaround against ignored TxPoll writes (8168)
  r8169: correct phy parameters for the 8110SC
2007-09-25 08:52:26 -07:00
Rusty Russell bbbd2bf00b fix modules oopsing in lguest guests
The assembly templates for lguest guest patching are in the .init.text
section.  This means that modules get patched with "cc cc cc cc" or similar
junk.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-25 08:51:04 -07:00
Stephen Hemminger d1cf16c916 missing null termination in one wire uevent
Need to null terminate environment.  Found by inspection while looking for
similar problems to platform uevent bug

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-25 08:51:04 -07:00
Cliff Wickman afa684f6fd fix "mspec: handle shrinking virtual memory areas"
The vma_data structure may be shared by vma's from multiple tasks, with no
way of knowing which areas are shared or not shared, so release/clear pages
only when the refcount (of vma's) goes to zero.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Cc: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-25 08:51:04 -07:00
Jeff Garzik 402c79fb19 Merge branch 'r8169-for-jeff-20070919' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into tmp 2007-09-25 00:14:03 -04:00
Jeff Garzik 21c0f27508 Revert "drivers/net/pcmcia/3c589_cs: fix port configuration switcheroo"
This reverts commit fadacb1b80.

The change being reverted made the driver consistent with
include/linux/netdevice.h, but then inconsistent with the other PCMCIA
ethernet drivers.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-25 00:11:34 -04:00
Thomas Rohwer cb56073767 Input: appletouch - fix idle reset logic
Idle count should only be incremented when touchpad button
is not pressed, otherwise reset may happen at a wrong time
and touchpad will never report button release event.

Signed-off-by: Thomas Rohwer <trohwer@tng.de>
Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-09-25 00:06:25 -04:00
Stephen Hemminger e0c281163d sky2: be more selective about FIFO watchdog
Be more selective about when to enable the ram buffer watchdog code.
It is unnecessary on XL A3 or later revs, and with Yukon FE
the buffer is so small (4K) that the watchdog detects false positives.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-25 00:04:17 -04:00
Stephen Hemminger 6d3105d538 sky2: FE+ Phy initialization
One more snippet of PHY initialization required for FE+ chips.
Discovered in latest sk98lin 10.21.1.3 driver.

Please apply to 2.6.23.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-25 00:04:17 -04:00
Dan Williams e4d84909dd raid5: fix 2 bugs in ops_complete_biofill
1/ ops_complete_biofill tried to avoid calling handle_stripe since all the
state necessary to return read completions is available.  However the
process of determining whether more read requests are pending requires
locking the stripe (to block add_stripe_bio from updating dev->toead).
ops_complete_biofill can run in tasklet context, so rather than upgrading
all the stripe locks from spin_lock to spin_lock_bh this patch just
unconditionally reschedules handle_stripe after completing the read
request.

2/ ops_complete_biofill needlessly qualified processing R5_Wantfill with
dev->toread.  The result being that the 'biofill' pending bit is cleared
before handling the pending read-completions on dev->read.  R5_Wantfill can
be unconditionally handled because the 'biofill' pending bit prevents new
R5_Wantfill requests from being seen by ops_run_biofill and
ops_complete_biofill.

Found-by: Yuri Tikhonov <yur@emcraft.com>
[neilb@suse.de: simpler fix for bug 1 than moving code]
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2007-09-24 13:23:35 -07:00
Linus Torvalds 7bae705ef2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Fix data corruption triggered by wrong headroom marking order
2007-09-23 22:39:57 -07:00
Linus Torvalds 562b4b632c Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6:
  [PATCH] missing null termination in power supply uevent
2007-09-23 13:04:01 -07:00
Jack Morgenstein 6e694ea33e IB/mlx4: Fix data corruption triggered by wrong headroom marking order
This is an addendum to commit 0e6e7416 ("IB/mlx4: Handle new FW
requirement for send request prefetching").  We also need to handle
prefetch marking properly for S/G segments, or else the HCA may end up
processing S/G segments that are not fully written and end up sending
the wrong data.  This can actually cause data corruption in practice,
especially on systems with relatively slow CPUs (where the HCA is more
likely to prefetch while the CPU is in the middle of writing a work
request into memory).

We write S/G segments in reverse order into the WQE, in order to
guarantee that the first dword of all cachelines containing S/G
segments is written last (overwriting the headroom invalidation
pattern).  The entire cacheline will thus contain valid data when the
invalidation pattern is overwritten.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-09-23 13:03:22 -07:00
Thomas Gleixner b04e7bdb98 ACPI: disable lower idle C-states across suspend/resume
device_suspend() calls ACPI suspend functions, which seems to have undesired
side effects on lower idle C-states. It took me some time to realize that
especially the VAIO BIOSes (both Andrews jinxed UP and my elfstruck SMP one)
show this effect. I'm quite sure that other bug reports against suspend/resume
about turning the system into a brick have the same root cause.

After fishing in the dark for quite some time, I realized that removing the ACPI
processor module before suspend (this removes the lower C-state functionality)
made the problem disappear. Interestingly enough the propability of having a
bricked box is influenced by various factors (interrupts, size of the ram image,
...). Even adding a bunch of printks in the wrong places made the problem go
away. The previous periodic tick implementation simply pampered over the
problem, which explains why the dyntick / clockevents changes made this more
prominent.

We avoid complex functionality during the boot process and we have to do the
same during suspend/resume. It is a similar scenario and equaly fragile.

Add suspend / resume functions to the ACPI processor code and disable the lower
idle C-states across suspend/resume. Fall back to the default idle
implementation (halt) instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-22 17:15:34 -07:00
Linus Torvalds 1f0cff6e4d Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: suspend: consolidate handling of Sx states addendum
  ACPI: suspend: consolidate handling of Sx states.
  ACPI: video: remove dmesg spam
  ACPI: video: _DOS=0 by default to prevent hotkey hang
2007-09-22 12:56:48 -07:00
Avi Kivity 36a7409741 KVM: Fix virtualization menu help text
What guest drivers?

Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-22 12:55:18 -07:00
James Bottomley 2302827c95 [SCSI] scsi_transport_spi: fix domain validation failure from incorrect width setting
Domain Validation in the SPI transport class is failing on boxes with
damaged cables (and failing to the extent that the box hangs).  The
problem is that the first test it does is a cable integrity test for
wide transfers and if this fails, it turns the wide bit off.  The
problem is that the next set of tests it does turns wide back on
again, with the result that it runs through the entirety of DV with a
known bad setting and then hangs the system.

The attached patch fixes the problem by physically nailing the wide
setting to what it deduces it should be for the whole of Domain
Validation.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-09-22 08:52:12 -05:00
Len Brown e5c86b5d4a Pull suspend.now into release branch 2007-09-21 21:55:34 -04:00
Len Brown 19adc6ba6c Pull now into release branch 2007-09-21 21:55:29 -04:00
Frans Pop 5a50fe709d ACPI: suspend: consolidate handling of Sx states addendum
Make the S0 state be always reported as supported

Signed-off: Frans Pop <elendil@planet.nl>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-09-21 21:53:18 -04:00
Alexey Starikovskiy f216cc3748 ACPI: suspend: consolidate handling of Sx states.
Recent changes to sleep initialization in ACPI dropped reporting of supported Sx
states above S3. Fix that and also move S5 init into same file as other Sx.
The only functional change is adding printk() for S4 and S5 cases.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-09-20 20:46:55 -04:00
Stephen Hemminger ed2ba977d4 [PATCH] missing null termination in power supply uevent
Need to null terminate environment. Found by inspection
while looking for similar problems to platform uevent bug

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-09-21 01:22:23 +04:00
Linus Torvalds 335fb8fc71 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] ahci: add ATI SB800 PCI IDs
  libata-sff: Fix documentation
  libata: Update the blacklist with a few more devices
2007-09-20 13:25:35 -07:00
henry su c69c0892d8 [libata] ahci: add ATI SB800 PCI IDs
ATI/AMD SB800 shares some device IDs with SB700,
and SB800 adds two more device IDs:0x4394,0x4395.

Signed-off-by: henry su <henry.su.ati@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 16:07:33 -04:00
Alan Cox e1cc9de836 libata-sff: Fix documentation
Code moved to ioread/iowrite but the comment didn't
Also note a posting issue

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:58:26 -04:00
Alan Cox 0e3dbc01d5 libata: Update the blacklist with a few more devices
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:58:26 -04:00
Linus Torvalds f685ddaf0f Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [BNX2]: Add PHY workaround for 5709 A1.
  [PPP] L2TP: Fix skb handling in pppol2tp_xmit
  [PPP] L2TP: Fix skb handling in pppol2tp_recv_core
  [PPP] L2TP: Disallow non-UDP datagram sockets
  [PPP] pppoe: Fix double-free on skb after transmit failure
  [PKT_SCHED]: Fix 'SFQ qdisc crashes with limit of 2 packets'
  [NETFILTER]: MAINTAINERS update
  [NETFILTER]: nfnetlink_log: fix sending of multipart messages
2007-09-20 12:42:47 -07:00
Linus Torvalds 460edb3cd0 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  sky2: version 1.18
  sky2: receive FIFO checking
  sky2: fe+ chip support
  sky2: reorganize chip revision features
  sky2: ethtool speed report bug
  sky2: fix VLAN receive processing (resend)
  phy: export phy_mii_ioctl
  myri10ge: Add support for PCI device id 9
2007-09-20 12:42:23 -07:00
Stephen Hemminger faf60e72d0 sky2: version 1.18
Update version number

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:23:00 -04:00
Stephen Hemminger 75e806838a sky2: receive FIFO checking
A driver writer from another operating system hinted that
the versions of Yukon 2 chip with rambuffer (EC and XL) have
a hardware bug that if the FIFO ever gets completely full it
will hang. Sounds like a classic ring full vs ring empty wrap around
bug.

As a workaround, use the existing watchdog timer to check for
ring full lockup.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:23:00 -04:00
Stephen Hemminger 05745c4ab1 sky2: fe+ chip support
Add support for newest Marvell chips.
The Yukon FE plus chip is found in some not yet released laptops.
Tested on hardware evaluation boards.

This version of the patch is for 2.6.23. It supersedes
the two previous patches that are sitting in netdev-2.6 (upstream branch).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:23:00 -04:00
Stephen Hemminger ea76e63598 sky2: reorganize chip revision features
This patch should cause no functional changes in driver behaviour.
There are (too) many revisions of the Yukon 2 chip now. Instead of
adding more conditionals based on chip revision; rerganize into a
set of feature flags so adding new versions is less problematic.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:23:00 -04:00
Stephen Hemminger c99210b50f sky2: ethtool speed report bug
On 100mbit versions, the driver always reports gigabit speed
available. The correct modes are already computed, then overwritten.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:23:00 -04:00
Stephen Hemminger d6532232cd sky2: fix VLAN receive processing (resend)
The length check for truncated frames was not correctly handling
the case where VLAN acceleration had already read the tag.
Also, the Yukon EX has some features that use high bit of status
as security tag.

Signed-off-by: Pierre-Yves Ritschard <pyr@spootnik.org>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 15:22:59 -04:00
Stefan Richter be7963b7e7 ieee1394: ohci1394: fix initialization if built non-modular
Initialization of ohci1394 was broken according to one reporter if the
driver was statically linked, i.e. not built as loadable module.  Dmesg:

  PCI: Device 0000:02:07.0 not available because of resource collisions
  ohci1394: Failed to enable OHCI hardware.

This was reported for a Toshiba Satellite 5100-503.  The cause is commit
8df4083c52 in Linux 2.6.19-rc1 which only
served purposes of early remote debugging via FireWire.  This
functionality is better provided by the currently out-of-tree driver
ohci1394_earlyinit.  Reversal of the commit was OK'd by Andi Kleen.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-09-20 21:19:45 +02:00
Michael Chan cd46171c72 [BNX2]: Add PHY workaround for 5709 A1.
Add the DIS_EARLY_DAC PHY workaround for 5709 A1.  Without it, link
sometimes does not come up.

Update version to 1.6.5.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-20 12:14:21 -07:00
Herbert Xu f3d5e3a415 [PPP] L2TP: Fix skb handling in pppol2tp_xmit
This patch makes pppol2tp_xmit call skb_cow_head so that we don't modify
cloned skb data.  It also gets rid of skb2 we only need to preserve the
original skb for congestion notification, which is only applicable for
ppp_async and ppp_sync.

The other semantic change made here is the removal of socket accounting
for data tranmitted out of pppol2tp_xmit.  The original code leaked any
existing socket skb accounting.  We could fix this by dropping the
original skb owner.  However, this is undesirable as the packet has not
physically left the host yet.

In fact, all other tunnels in the kernel do not account skb's passing
through to their own socket.  In partciular, ESP over UDP does not do
so and it is the closest tunnel type to PPPoL2TP.  So this patch simply
removes the socket accounting in pppol2tp_xmit.  The accounting still
applies to control packets of course.

I've also added a reminder that the outgoing checksum here doesn't work.
I suppose existing deployments don't actually enable checksums.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-20 12:14:18 -07:00
Herbert Xu 7a70e39b66 [PPP] L2TP: Fix skb handling in pppol2tp_recv_core
The function pppol2tp_recv_core doesn't handle non-linear packets properly.
It also fails to check the remote offset field.

This patch fixes these problems.  It also removes an unnecessary check on
the UDP header which has already been performed by the UDP layer.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-20 12:14:17 -07:00
Herbert Xu a14d6abc94 [PPP] L2TP: Disallow non-UDP datagram sockets
With the addition of UDP-Lite we need to refine the socket check so
that only genuine UDP sockets are allowed through.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-20 12:14:17 -07:00
Herbert Xu 21d0c83302 [PPP] pppoe: Fix double-free on skb after transmit failure
When I got rid of the second packet in __pppoe_xmit I created
a double-free on the skb because of the goto abort on failure.
This patch removes that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-20 12:14:16 -07:00
Domen Puncer 680e9fe9d6 phy: export phy_mii_ioctl
Export phy_mii_ioctl, so network drivers can use it when built
as modules too.

Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-20 02:35:50 -04:00
Brice Goglin a07bc1ffae myri10ge: Add support for PCI device id 9
Add support for new Myri-10G boards with PCI device id 9.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-09-19 16:22:09 -04:00
Francois Romieu d78ae2dcc2 r8169: workaround against ignored TxPoll writes (8168)
The 8168 ignores the requests to fetch the Tx descriptors when
the relevant TxPoll bit is already set. It easily kills the
performances of the 8168. David Gundersen has noticed that it
is enough to wait for the completion of the DMA transfer (NPQ
bit is cleared) before writing the TxPoll register again.

The extra IO traffic added by the proposed workaround could be
minimalized but it is not a high-priority task.

Fix for:
http://bugzilla.kernel.org/show_bug.cgi?id=7924
http://bugzilla.kernel.org/show_bug.cgi?id=8688
(http://bugzilla.kernel.org/show_bug.cgi?id=7555 ?)

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Gundersen <gundy@iinet.net.au>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
2007-09-19 21:52:18 +02:00
Edward Hsu 65d916d953 r8169: correct phy parameters for the 8110SC
The phys of the 8110SC (RTL_GIGA_MAC_VER_{05/06}) act abnormally in
gigabit mode if they are applied the parameters in rtl8169_hw_phy_config
which actually aim the 8110S/SB.

It is ok to return early from rtl8169_hw_phy_config as it does not
apply to the 8101 and 8168 families.

Signed-off-by: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2007-09-19 21:52:18 +02:00
Linus Torvalds 91fe7d7cdd Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SUNSAB]: Fix several bugs.
2007-09-19 11:39:39 -07:00
Linus Torvalds d56c5c414c Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: remove unused variables from drivers/ide/ppc/pmac.c
  ide: ST320413A has the same problem as ST340823A
2007-09-19 11:39:10 -07:00
Dmitry Torokhov 4f01a757e7 Driver core: fix deprectated sysfs structure for nested class devices
Nested class devices used to have 'device' symlink point to a real
(physical) device instead of a parent class device.  When converting
subsystems to struct device we need to keep doing what class devices did if
CONFIG_SYSFS_DEPRECATED is Y, otherwise parts of udev break.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Greg KH <greg@kroah.com>
Tested-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:18 -07:00
Dave Airlie e67aa27a61 intel-agp: Fix i830 mask variable that changed with G33 support
The mask on i830 should be 0x70 always, later chips 0xF0 should be okay.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Acked-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Cc: Michael Haas <laga@laga.ath.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:18 -07:00
Antonino A. Daplas 8c8bd037e5 intelfb: Fix bug in DPLL disable
Reported in Kernel Bugzilla 9006

Fix an obvious bug in DPLL disable.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:18 -07:00
Kees Cook 248bdd5efc pci: fix unterminated pci_device_id lists
Fix a couple drivers that do not correctly terminate their pci_device_id
lists.  This results in garbage being spewed into modules.pcimap when the
module happens to not have 28 NULL bytes following the table, and/or the
last PCI ID is actually truncated from the table when calculating the
modules.alias PCI aliases, cause those unfortunate device IDs to not
auto-load.

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-by: Corey Minyard <minyard@acm.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:17 -07:00
Cliff Wickman 4191ba26da mspec: handle shrinking virtual memory areas
The shrinking of a virtual memory area that is mmap(2)'d to a memory
special file (device drivers/char/mspec.c) can cause a panic.

If the mapped size of the vma (vm_area_struct) is very large, mspec allocates
a large vma_data structure with vmalloc(). But such a vma can be shrunk by
an munmap(2).  The current driver uses the current size of each vma to
deduce whether its vma_data structure was allocated by kmalloc() or vmalloc().
So if the vma was shrunk it appears to have been allocated by kmalloc(),
and mspec attempts to free it with kfree().  This results in a panic.

This patch avoids the panic (by preserving the type of the allocation) and
also makes mspec work correctly as the vma is split into pieces by the
munmap(2)'s.

All vma's derived from such a split vma share the same vma_data structure that
represents all the pages mapped into this set of vma's.  The mpec driver
must be made capable of using the right portion of the structure for each
member vma.  In other words, it must index into the array of page addresses
using the portion of the array that represents the current vma. This is
enabled by storing the vma group's vm_start in the vma_data structure.

The shared vma_data's are not protected by mm->mmap_sem in the fork() case
so the reference count is left as atomic_t.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:17 -07:00
Atsushi Nemoto 49cc886aea rtc: rtc-ds1553.c should use resource_size_t for base address
Currently the rtc driver, rtc-ds1552.c uses an unsigned long to store the
base mmio address of the NVRAM/RTC.  This breaks on 32-bit systems with
larger physical addresses.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:17 -07:00