Commit Graph

9125 Commits

Author SHA1 Message Date
Jeff Garzik 2f7ccc51db Merge branch 'upstream-fixes' 2006-03-11 19:55:37 -05:00
Jeff Garzik ed071adc97 Merge branch 'master' 2006-03-11 19:55:26 -05:00
Tejun Heo 8645984c35 [PATCH] sata_sil24: lengthen softreset timeout
sil24 softreset timeout was > 100ms (100 loops with msleep(1)), which
turned out to be too short for some devices (ASI ARAID99 2000).  This
patch converts sil24 softreset waiting loop to use proper timeout
condition and lengthen the timeout to ATA_TMOUT_BOOT secs and check
interval to 100ms.  Chisato Yamauchi discovered the problem and
supplied initial patch.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Chisato Yamauchi <cyamauch@plamo.linet.gr.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:29:42 -05:00
Tejun Heo 10d996ad19 [PATCH] sata_sil24: exit early from softreset if SStatus reports no device
sata_sil24 softreset routine used to check sata_dev_present() after
SRST is complete in the hope that SRST may do some good even when
SStatus reports no device.  This is okay as long as SRST timeout is
short (> 100ms in the current code) but it seems that not all SATA
devices are happy with short SRST timeout.

This patch makes softreset exit early without performing actual SRST
if SStatus reports no device in preparation for lengthening SRST
timeout.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:29:42 -05:00
Jeff Garzik 75deb6fa98 Merge branch 'upstream-fixes' 2006-03-11 19:10:06 -05:00
Tejun Heo 6971ed1fbb [PATCH] ahci: fix NULL pointer dereference detected by Coverity
Fix NULL pointer dereference detected by the Coverity checker.  Kill
dev -> pdev -> dev conversion while at it.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:06:02 -05:00
Tejun Heo 2061a47a9b [PATCH] libata: fix missing classes[] initialization in ata_bus_probe()
ata_bus_probe() didn't initialize classes[] properly with
ATA_DEV_UNKNOWN.  As ->probe_reset() is allowed to leave @classes
alone when no device is present, this results in garbage class values.
ATM, the only affected driver is ata_piix.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:04:49 -05:00
Tejun Heo 75f554bc13 [PATCH] libata: kill unused xfer_mode functions
Preceding xfer_mask changes make the following functions unused.

  ata_pio_modes(), base_from_shift(), ata_pr_blacklisted(), fgb()

Kill them.  Also, as xfer_mode_str[] is now only used by
ata_mode_string(), move it into the function.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:03:39 -05:00
Tejun Heo a6d5a51cf1 [PATCH] libata: reimplement ata_set_mode() using xfer_mask helpers
Use xfer_mask helpers to determine transfer mode.  This rewrite also
makes transfer mode determination done before any actual
configuration.  This patch doesn't result in any functional changes.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:03:39 -05:00
Tejun Heo 23e71c3d3e [PATCH] libata: use xfer_mask helpers in ata_dev_set_mode()
Rewrite hardcoded xfer_mode string determination in ata_dev_set_mode()
using xfer_mask helpers.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:03:39 -05:00
Tejun Heo ff8854b271 [PATCH] libata: use ata_id_xfermask() in ata_dev_configure()
Replace quick & dirty max transfer mode determination in
ata_dev_configure() with ata_id_xfermask().  While at it, rename
xfer_modes variable to xfer_mask and make it unsigned int for
consistency.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:03:39 -05:00
Tejun Heo cb95d562e4 [PATCH] libata: add xfer_mask handling functions
Add ata_pack_xfermask(), ata_xfer_mask2mode(), ata_xfer_mode2mask(),
ata_xfer_mode2shift() and ata_id_xfermask().  These functions will be
used by following patches to simplify xfer_mask handling.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:03:39 -05:00
Tejun Heo 1da7b0d01b [PATCH] libata: improve xfer mask constants and update ata_mode_string()
Add ATA_BITS_*, ATA_MASK_* macros and reorder xfer_mask fields such
that higher transfer mode is placed at higher order bit.  As thie
reordering breaks ata_mode_string(), this patch also rewrites
ata_mode_string().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 19:03:38 -05:00
Tejun Heo 2e755f68ee [PATCH] libata: rename ATA_FLAG_FLUSH_PIO_TASK to ATA_FLAG_FLUSH_PORT_TASK
Rename ATA_FLAG_FLUSH_PIO_TASK to ATA_FLAG_FLUSH_PORT_TASK.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 17:57:21 -05:00
Tejun Heo 507ceda003 [PATCH] libata: kill unused pio_task and packet_task
Kill unused pio_task and packet_task.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 17:57:20 -05:00
Tejun Heo 8061f5f0a0 [PATCH] libata: convert pio_task and packet_task to port_task
Make pio_task and atapi_packet_task use port_task.
atapi_packet_task() is moved upward such that it's right after
ata_pio_task().  This position is more natural and makes adding
prototype for ata_qc_issue_prot() unnecessary.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 17:57:20 -05:00
Tejun Heo 86e45b6bd6 [PATCH] libata: implement port_task
Implement port_task.  LLDD's can schedule a function to be executed
with context after specified delay.  libata core takes care of
synchronization against EH.  This is generalized form of pio_task and
packet_task which are tied to PIO hsm implementation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 17:57:20 -05:00
Jeff Garzik d7fc3ca1cd Merge branch 'master' 2006-03-11 17:47:20 -05:00
Andrew Morton 0992a5d029 [PATCH] 3c509: bus registration fix
- Don't call eisa_driver_unregister() if eisa_driver_register() failed.

- Properly propagate error values.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 13:29:09 -05:00
Sam Ravnborg b2cba5b577 [PATCH] de620: fix section mismatch warning
In latest -mm de620 gave following warning:
WARNING: drivers/net/de620.o - Section mismatch: reference to      \
.init.text:de620_probe from .text between 'init_module' (at offset \
0x1682) and 'cleanup_module'

init_module() call de620_probe() which is declared __init.
Fix is to declare init_module() __init too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 13:29:09 -05:00
Jesper Juhl 28beaf651b [PATCH] NE2000 Kconfig help entry improvement
Improve reference to PCI NE2K support in ISA NE2K documentation.
Original 2.4 patch From: Ged Haywood <ged@jubileegroup.co.uk>

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 13:29:09 -05:00
Jon Mason 9ee09d9cd4 [PATCH] dl2k: DMA freeing error
This patch fixes an error in the dl2k driver's DMA mapping/unmapping.
The adapter uses the upper 16bits of the DMA address for the buffer
size.  However, this is not masked off when referencing the DMA
address, and can lead to errors by trying to free a DMA address out of
range.

Thanks,
Jon

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 13:26:51 -05:00
David S. Miller 9e927fb618 [PATCH] Wrong return value corrupts free object in e1000 driver
For some reason, E1000's ->hard_start_xmit() routine returns -EFAULT
instead of one of the NETDEV_TX_* error codes.  In fact, it frees up
the SKB before returning this.  This makes the queueing layer think
the packet should be requeued and subsequently we corrupt a freed
object.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-11 13:25:17 -05:00
Jeff Garzik 5ee33b7adc Merge branch 'for-jeff' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 2006-03-11 13:23:48 -05:00
Antonino A. Daplas ed62178589 [PATCH] radeonfb: Fix static array overrun
radeonfb_parse_monitor_layout() will produce an array overrun if passed with a
substring of length higher than 4 (ie, "XXXXX,YYYYYY").

Coverity Bug 494

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:36 -08:00
Antonino A. Daplas 8e6509876c [PATCH] aty128fb: Fix array overrun
Fix static array overrun

Coverity Bug 556

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:36 -08:00
Antonino A. Daplas 54243cefdd [PATCH] tdfxfb: Fix buffer overrun
The pseudo_palette has room only for 16 entries, but tdfxfb_setcolreg may
attempt to write more.

Coverity Bug 557

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:36 -08:00
Antonino A. Daplas d301524772 [PATCH] intelfb: Fix buffer overrun
The pseudo_palette has room only for 16 entries, but intelfb_setcolreg will
attempt to write more.

Coverity Bug 558

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Antonino A. Daplas 8d57f2210e [PATCH] savagefb: Fix kfree before use
par->edid is kfree'd before using in fb_edid_to_monspecs()

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Antonino A. Daplas 91bc89cf98 [PATCH] imsttfb: Fix resource leak
The struct info and device resource may not be released in the driver's error
path.  Fix.

Coverity Bug 671

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Antonino A. Daplas 98365f5eb4 [PATCH] s1d13xxxfb: Fix resource leak
struct info may not be released in the driver's error path.

Coverity Bug 672

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Antonino A. Daplas 939205b273 [PATCH] arcfb: Fix dereference before NULL check
info->par is dereferenced before info is checked for NULL. Fix.

Coverity Bug 833

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Antonino A. Daplas 16afe814a8 [PATCH] kyrofb: Fix uninitialized value
Initialize Variable 'count' in DisableVGA to zero.

Coverity Bug 874

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Antonino A. Daplas 604cc999fd [PATCH] arcfb: Fix uninitialized value
Remove insignificant and uninitialized variable "count" from
arcfb_lcd_update_page.

Coverity Bug 894

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Antonino A. Daplas 6af7ffc414 [PATCH] neofb: Fix uninitialized value
Remove insignificant and unitialized variable "waitcycles" from neo2200_sync.

Coverity Bug 895

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:35 -08:00
Pat Gefre 27d162e26a [PATCH] Altix: small ioc4 oversight
Get rid of the local 'flip' variable and no need to 'trim' the buffer.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:34 -08:00
Arjan van de Ven 4136cabff3 [PATCH] edac: disable a few sysfs files to avoid them becoming an ABI
Disable (via ugly #if 0's) the 3 sysfs files that I think by now we all
agree are very much wrong.  These files shouldn't become part of the ABI by
the 2.6.16 release, so I rather have this minimal patch merged to disable
them for now, the real fix can then come during the 2.6.17 devel window.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-11 09:19:34 -08:00
Dmitry Torokhov 8bd0ee93fe [PATCH] Input: psmouse - disable autoresync
Automatic resynchronization in psmouse driver causes problems on some
hardware so disable it by default for now. People with KVM switches
that require resync can still enable it via module parameter or sysfs
attribute.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-10 22:09:33 -08:00
Hugh Dickins 4ceadbf519 [PATCH] fix pcmcia_device_probe oops
Fix pcmcia_device_probe NULL pointer dereference at startup.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-10 13:40:26 -08:00
Horst Hummel b707dbe6c5 [PATCH] s390: dasd proc interface typo
This fixes a typo introduced with 90f0094dc6.

Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-09 19:47:38 -08:00
Tim Small 57c432b54b [PATCH] edac: mark as experimental
EDAC is still causing a few problems and the code is relatively green.  Mark
it as experimental until thing settle down.

Also, provide some documentation pointers in Kconfig help.

Signed-off-by: Tim Small <tim@buttersideup.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-09 19:47:38 -08:00
Max Asbock 6a88231fc7 [PATCH] ibmasm: use after free fix
The kobject_put() can free the memory at *cmd, but cmd->lock points to a
persistent lock that is not freed with cmd.

Signed-off-by: Max Asbock <masbock@us.ibm.com>
Cc: Vernon Mauery <vernux@us.ibm.com>
Cc: Srihari Vijayaraghavan <sriharivijayaraghavan@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-09 19:47:37 -08:00
NeilBrown 04b857f74c [PATCH] md: Fix several raid1 bugs which cause a memory leak
- wrong test for 'is this a BARRIER bio'
- not freeing on all possible paths.
- using r1_bio after freeing it.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-09 19:47:37 -08:00
Jean Delvare 10ad1b7363 [PATCH] Fix error handling in backlight drivers
ERR_PTR() is supposed to be passed a negative value.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-09 19:47:37 -08:00
Doug Warzecha 435a80f610 [PATCH] dcdbas: dcdbas_pdev referenced after platform_device_unregister on exit
smi_data_buf_free() references dcdbas_pdev when calling
dma_free_coherent().  In dcdbas_exit(), smi_data_buf_free() is called after
platform_device_unregister(dcdbas_pdev).

This patch moves platform_device_unregister(dcdbas_pdev) after
smi_data_buf_free() in dcdbas_exit().

Signed-off-by: Doug Warzecha <Douglas_Warzecha@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-09 19:47:36 -08:00
Stephen Hemminger 70f1be4812 sky2: truncate oversize packets
Turn on truncation to prevent getting choked by frames larger than expected.
Without this fix, driver hangs after receiving an oversize packet.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-03-09 23:19:03 +01:00
Stephen Hemminger b19666d920 sky2: force early transmit interrupts
Avoid premature transmit ring full conditions.
Force a transmit status interrupt if transmit ring gets nearly full
and after a TSO send.

Allow more entries in transmit ring to be used if dma_addr is 32 bits

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-03-09 23:19:02 +01:00
Stephen Hemminger 28a3186019 sky2: not random enough
Don't use sky2 to seed random pool beacause the network packet arrival time
will not be truly random due to NAPI and interrupt mitigation.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-03-09 23:19:01 +01:00
Francois Romieu 39bf4295bb de2104x: fix the TX watchdog
Insert de_init_rings() to reinit the rings before de_init_hw()
tries to access them again.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2006-03-09 23:09:43 +01:00
Francois Romieu 3f735b76a4 de2104x: prevent interrupt before the interrupt handler is registered
de_init_hw enables the irq thus it must be issued after request_irq.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2006-03-09 23:09:43 +01:00