aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-11-14raid5: fix unending write sequenceDan Williams
<debug output from Joel's system> handling stripe 7629696, state=0x14 cnt=1, pd_idx=2 ops=0:0:0 check 5: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800ffcffcc0 written 0000000000000000 check 4: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800fdd4e360 written 0000000000000000 check 3: state 0x1 toread 0000000000000000 read 0000000000000000 write 0000000000000000 written 0000000000000000 check 2: state 0x1 toread 0000000000000000 read 0000000000000000 write 0000000000000000 written 0000000000000000 check 1: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800ff517e40 written 0000000000000000 check 0: state 0x6 toread 0000000000000000 read 0000000000000000 write fffff800fd4cae60 written 0000000000000000 locked=4 uptodate=2 to_read=0 to_write=4 failed=0 failed_num=0 for sector 7629696, rmw=0 rcw=0 </debug> These blocks were prepared to be written out, but were never handled in ops_run_biodrain(), so they remain locked forever. The operations flags are all clear which means handle_stripe() thinks nothing else needs to be done. This state suggests that the STRIPE_OP_PREXOR bit was sampled 'set' when it should not have been. This patch cleans up cases where the code looks at sh->ops.pending when it should be looking at the consistent stack-based snapshot of the operations flags. Report from Joel: Resync done. Patch fix this bug. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Tested-by: Joel Bertrand <joel.bertrand@systella.fr> Cc: <stable@kernel.org> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14atmel_serial build warnings begoneDavid Brownell
Remove annoying build warnings about unused variables in atmel_serial, which afflict both AT91 and AVR32 builds. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14dmaengine: fix broken device refcountingHaavard Skinnemoen
When a DMA device is unregistered, its reference count is decremented twice for each channel: Once dma_class_dev_release() and once in dma_chan_cleanup(). This may result in the DMA device driver's remove() function completing before all channels have been cleaned up, causing lots of use-after-free fun. Fix it by incrementing the device's reference count twice for each channel during registration. [dan.j.williams@intel.com: kill unnecessary client refcounting] Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14drivers/misc: Move misplaced pci_dev_put'sJulia Lawall
Move pci_dev_put outside the loops in which it occurs. Within the loop, pci_dev_put is done implicitly by pci_get_device. The problem was detected using the following semantic patch, and corrected by hand. @@ expression dev; expression E; @@ - pci_dev_put(dev) ... when != dev = E - pci_get_device(...,dev) Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14paride: pf driver fixesOndrej Zary
The pf driver for parallel port floppy drives seems to be broken. At least with Imation SuperDisk with EPAT chip, the driver calls pi_connect() and pi_disconnect after each transferred sector. At least with EPAT, this operation is very expensive - causes drive recalibration. Thus, transferring even a single byte (dd if=/dev/pf0 of=/dev/null bs=1 count=1) takes 20 seconds, making the driver useless. The pf_next_buf() function seems to be broken as it returns 1 always (except when pf_run is non-zero), causing the loop in do_pf_read_drq (and do_pf_write_drq) to be executed only once. The following patch fixes this problem. It also fixes swapped descriptions in pf_lock() function and removes DBMSG macro, which seems useless. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14spi: fix error paths on txx9spi_probeAtsushi Nemoto
Some error paths in txx9spi_probe wrongly return 0. This patch fixes them by using the devres interfaces. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14spi: fix double-free on spi_unregister_masterAtsushi Nemoto
After 49dce689ad4ef0fd1f970ef762168e4bd46f69a3, device_for_each_child iteration hits the master device itself. Do not call spi_unregister_device() for the master device. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: David Brownell <david-b@pacbell.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14acpi: make ACPI_PROCFS default to yAndrew Morton
Zillions of people are getting my-battery-monitor-doesnt-work problems (including me). Lessen the damage by making ACPI_PROCFS default to on. Cc: Len Brown <lenb@kernel.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-148250_pnp: add support for "LG C1 EXPRESS DUAL" machinesDamian Jurd
The following is an extra entry to enable the touch screen on the new LG C1 EXPRESS DUAL machine. Cc: Russell King <rmk@arm.linux.org.uk> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14video/sis/: fix negative array indexAdrian Bunk
This patch fixes the possible usage of a negative value as an array index spotted by the Coverity checker. sisfb_validate_mode() could return a negative error code and we must check for that prior to using its return value as an array index. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14lguest_user.c: fix memory leakAdrian Bunk
This patch fixes a memory leak spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: 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-11-14LXFB: use the correct MSR number for panel supportJordan Crouse
A relatively recent version of the Geode LX datasheet listed the wrong address for one of the MSRs that controls TFT panels, resulting in breakage. This patch corrects the MSR address. Signed-off-by: Jordan Crouse <jordan.crouse@amd.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14drivers/video/s1d13xxxfb.c: fix build as module with dbgStanislav Brabec
Attached patch fixes two compilation problems of s1d13xxxfb.c: - Fixes outdated dbg() message to fix compilation error with debugging enabled. - Do not read kernel command line options when compiled as module. Signed-off-by: Stanislav Brabec <utx@penguin.cz> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14oProfile: oops when profile_pc() returns ~0LUPhilippe Elie
Instruction pointer returned by profile_pc() can be a random value. This break the assumption than we can safely set struct op_sample.eip field to a magic value to signal to the per-cpu buffer reader side special event like task switch ending up in a segfault in get_task_mm() when profile_pc() return ~0UL. Fixed by sanitizing the sampled eip and reject/log invalid eip. Problem reported by Sami Farin, patch tested by him. Signed-off-by: Philippe Elie <phil.el@wanadoo.fr> Tested-by: Sami Farin <safari-kernel@safari.iki.fi> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14uvesafb: fix warnings about unused variables on non-x86Frank Lichtenheld
Variables that are only used in #ifdef CONFIG_X86 should also only be declared there. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Cc: Michal Januszewski <spock@gentoo.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14chipsfb: uses/depends on PCIRandy Dunlap
chipsfb uses PCI interfaces and should depend on PCI. CC drivers/video/chipsfb.o drivers/video/chipsfb.c: In function 'chipsfb_pci_init': drivers/video/chipsfb.c:378: error: implicit declaration of function 'pci_request_region' drivers/video/chipsfb.c:435: error: implicit declaration of function 'pci_release_region' make[2]: *** [drivers/video/chipsfb.o] Error 1 make[1]: *** [drivers/video] Error 2 make: *** [drivers] Error 2 !CONFIG_PCI causes the build to fail. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cm40x0_cs.c: fix debug macrosPascal Terjan
When PCMCIA_DEBUG is set, cm40x0_cs.c and cm4000_cs.c don't build because the definition of reader_to_dev uses a non-existent handle field of the struct pcmcia_device in the call to handle_to_dev. As handle_to_dev works on struct pcmcia_device, the fix is quite trivial. Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Cc: Harald Welte <laforge@gnumonks.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14serial: add PNP ID for Davicom ISA 33.6K modemBjorn Helgaas
This should resolve these bug reports of the modem not working: http://bugzilla.kernel.org/show_bug.cgi?id=4355 http://www.linuxquestions.org/questions/linux-newbie-8/connect-script-failed-on-ppp-go-123975/ I don't have hardware to test this, but the initial report in the kernel bugzilla indicates that this change fixed the problem. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Dmitry Vavilov <vavilov@ihep.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14W1: fix memset size errorLi Zefan
The size argument passed to memset is wrong. Signed-off-by Li Zefan <lizf@cn.fujitsu.com> Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14drivers/video/ps3fb: fix memset size errorLi Zefan
The size passed to memset is wrong. Signed-off-by Li Zefan <lizf@cn.fujitsu.com> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14rtc-ds1307 exports NVRAMDavid Brownell
Export the NVRAM on DS1307 and DS1338 chips, like several of the other drivers do for such combination RTC-and-NVRAM chips. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: 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-11-14RTCs: handle NVRAM betterDavid Brownell
Several of the RTC drivers are exporting binary "nvram" files in sysfs. Such NVRAM (or on many systems, EEPROM) data is often initialized during system manufacture to hold data about identity (serial numbers, Ethernet addresses, etc), configuration, calibration, and so forth. This patch improves integrity and security of those files: - Correctly initializes the size in one of the two cases where that was not yet being done. - Improves system security/integrity by making this state not be world-writable by default. Letting arbitrary userspace code mangle such state by default is at least Not A Good Thing; and it could sometimes be worse, depending on the particular data that might be corrupted. (I disregard the paranoiac "don't let anyone read it either" approach. Anyone storing passwords in such memory doesn't really care about security.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Torsten Ertbjerg Rasmussen <tr@newtec.dk> Cc: Mark Zhan <rongkai.zhan@windriver.com> Cc: Thomas Hommel <thomas.hommel@gefanuc.com> Acked-by: 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-11-14rtc_hctosys expects RTCs in UTC (doc)David Brownell
The RTC "hctosys" mechanism expects that RTC clock will use UTC, not local time (e.g. PST). Say so in Kconfig and in the kernel message. (Strictly speaking, the RTC clock should be tracking the POSIX epoch. That's not worth going into here. Goofing timezones means clocks are wrong by many hours; the POSIX-v-UTC differences just cost seconds.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: 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-11-14Fix Oops in toshiba_acpi error return pathAndrey Borzenkov
When backlight_device_register() fails, return after undo initialization, do not try to use pointer that just was reset to NULL This fixes this oops: [ 1595.177672] [<c010480a>] show_trace_log_lvl+0x1a/0x30 [ 1595.177706] [<c01052a2>] show_trace+0x12/0x20 [ 1595.177718] [<c0105305>] dump_stack+0x15/0x20 [ 1595.177728] [<c01c9375>] kobject_shadow_add+0x125/0x1c0 [ 1595.177754] [<c01c941a>] kobject_add+0xa/0x10 [ 1595.177764] [<c0239a37>] device_add+0x97/0x5d0 [ 1595.177776] [<c0239f82>] device_register+0x12/0x20 [ 1595.177786] [<dfd912df>] backlight_device_register+0x9f/0x110 [backlight] [ 1595.177814] [<df861117>] toshiba_acpi_init+0x117/0x15e [toshiba_acpi] [ 1595.177834] [<c013e28d>] sys_init_module+0xfd/0x14e0 [ 1595.177871] [<c0104112>] sysenter_past_esp+0x5f/0x99 [ 1595.177883] ======================= [ 1595.177890] Could not register toshiba backlight device [ 1595.177985] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000004 ... [ 1595.394097] EIP: 0060:[<df861143>] Not tainted VLI [ 1595.394101] EFLAGS: 00010282 (2.6.23-rc9-1avb #24) [ 1595.480081] EIP is at toshiba_acpi_init+0x143/0x15e [toshiba_acpi] Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru> Cc: John Belmonte <toshiba_acpi@memebeam.org> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-13ide: remove stale/incorrect comment from setup-pci.cBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13it821x/jmicron: fix return value of {it821x,jmicron}_init_one()Bartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: don't BUG() on unsupported transfer modesBartlomiej Zolnierkiewicz
Fix ide-cris, cs5530, sc1200 and sis5513 host drivers to just return instead of OOPS-ing for unsupported modes in ->set_dma_mode methods. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: use drive->select.all for REQ_TYPE_ATA_TASK in execute_drive_cmd()Bartlomiej Zolnierkiewicz
Use drive->select.all for REQ_TYPE_ATA_TASK requests in execute_drive_cmd() (the obsolete bits 7 and 5 of the Device register need to be set). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: add missing HOB bit clearing to ide_dump_ata_status()Bartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide-pmac: skip conservative PIO "downgrade"Bartlomiej Zolnierkiewicz
We can skip conservative PIO "downgrade" (PIO3 becomes PIO2 etc.) on PMAC. Problem reported by Mikael. Cc: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13ide: BLK_DEV_IDECD help: remove outdated noteAdrian Bunk
LILO version 16 was released on 26-02-1995 (sic), so telling people to not use older versions no longer has any value. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13cmd64x: don't clear the other channel's interruptSergei Shtylyov
Make sure to not clear the other IDE channel's interrupt when clearing an IDE interrupt via the MRDMODE register. Thanks to Bart for finding a coding mistake. Bart: This fixes regression from commit 66602c83dcb6a5d82772d88ae7a32cd4a1213528 ("cmd64x: use interrupt status from MRDMODE register (take 2)"). Extra thanks to Martin for reporting and bisecting the issue. From: Sergei Shtylyov <sshtylyov@ru.mvista.com> Tested-by: Martin Rogge <marogge@onlinehome.de> Tested-by: Milan Kocian <milon@wq.cz> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-13Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6Linus Torvalds
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: hwmon: (i5k_amb) Convert macros to C functions hwmon: (w83781d) Add missing curly braces hwmon: (abituguru3) Identify ABit IP35 Pro as such hwmon: (f75375s) pwmX_mode sysfs files writable for f75375 variant hwmon: (f75375s) On n2100 systems, set fans to full speed on boot hwmon: (f75375s) Allow setting up fans with platform_data hwmon: (f75375s) Add new style bindings hwmon: (lm70) Convert semaphore to mutex hwmon: (applesmc) Add support for Mac Pro 2 x Quad-Core hwmon: (abituguru3) Add support for 2 new motherboards hwmon: (ibmpex) Change printk to dev_{info,err} macros hwmon: (i5k_amb) New memory temperature sensor driver hwmon: (f75375s) fix pwm mode setting hwmon: (ibmpex.c) fix NULL dereference hwmon: (sis5595) Split sis5595_attributes_opt hwmon: (sis5595) Add individual alarm files hwmon: (w83627hf) push nr+1 offset into *_REG_FAN macros and simplify hwmon: (w83627hf) hoist nr-1 offset out of show-store-temp-X hwmon: Add power meter spec to Documentation/hwmon/sysfs-interface
2007-11-13Merge branch 'master' of ↵Linus Torvalds
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: (45 commits) [NETFILTER]: xt_time should not assume CONFIG_KTIME_SCALAR [NET]: Move unneeded data to initdata section. [NET]: Cleanup pernet operation without CONFIG_NET_NS [TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo() [MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks. [NETFILTER]: bridge: fix double POSTROUTING hook invocation [NETFILTER]: Consolidate nf_sockopt and compat_nf_sockopt [NETFILTER]: nf_nat: fix memset error [INET]: Use list_head-s in inetpeer.c [IPVS]: Remove unused exports. [NET]: Unexport sysctl_{r,w}mem_max. [TG3]: Update version to 3.86 [TG3]: MII => TP [TG3]: Add A1 revs [TG3]: Increase the PCI MRRS [TG3]: Prescaler fix [TG3]: Limit 5784 / 5764 to MAC LED mode [TG3]: Disable GPHY autopowerdown [TG3]: CPMU adjustments for loopback tests [TG3]: Fix nvram selftest failures ...
2007-11-13ACPI: Battery: remove cycle from battery removal.Alexey Starikovskiy
get_property() should not call battery_update(), it also should call get_status() only if battery is present to avoid cycle and oops. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Tested-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Acked-by: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-13[NET]: Move unneeded data to initdata section.Denis V. Lunev
This patch reverts Eric's commit 2b008b0a8e96b726c603c5e1a5a7a509b5f61e35 It diets .text & .data section of the kernel if CONFIG_NET_NS is not set. This is safe after list operations cleanup. Signed-of-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-13[TEHUTI]: Fix incorrect usage of strncat in bdx_get_drvinfo()Roel Kluin
Fix incorrect length for strncat by replacing it with strlcat Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-13[MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks.Roel Kluin
With '<=' tick can be incremented up to 26, The last loop is redundant since even when 'softstate' becomes 'STATE_READY', 'if (tick > 25)' will still cause the function to return -1, Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: Update version to 3.86Matt Carlson
This patch updates the version number to 3.86 Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: MII => TPMatt Carlson
This patch changes the PHY type reported through ethtool for copper devices from MII to TP. The latter is more accurate. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: Add A1 revsMatt Carlson
This patch adds the A1 revision of 5784, 5764, and 5761, and applies all previous bugfixes. In places where the list of devices gets too long, the patch uses a new TG3_FLG3_5761_5784_AX_FIXES flag instead. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: Increase the PCI MRRSMatt Carlson
Previous devices hardcoded the PCI Maximum Read Request Size to 4K. To better comply with the PCI spec, the hardware now defaults the MRRS to 512 bytes. This will yield poor driver performance if left untouched. This patch increases the MRRS to 4K on driver initialization. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: Prescaler fixMatt Carlson
Internal hardware timers become inaccurate after link events. Clock frequency switches performed by the CPMU fail to adjust timer prescalers. The fix is to detect core clock frequency changes during link events and adjust the timer prescalers accordingly. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: Limit 5784 / 5764 to MAC LED modeMatt Carlson
Most 5784 / 5764 LED modes do not work as expected because of a hardware bug. This patch forces the LED mode to be in MAC LED mode. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: Disable GPHY autopowerdownMatt Carlson
New CPMU devices contend with the GPHY for power management. The GPHY autopowerdown feature is enabled by default in the PHY and thus needs to be disabled after every PHY reset. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: CPMU adjustments for loopback testsMatt Carlson
This patch adds the LINK_SPEED mode to the list of CPMU modes that can cause the loopback tests to fail. These bugs are planned to be fixed in future revisions of the chip, so the patch qualifies the fixes as such. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: Fix nvram selftest failuresMatt Carlson
Newer devices contain bootcode in the chip's private ROM area. This bootcode is called selfboot. Selfboot can be patched in the device's NVRAM and the patches can have several formats. In one particular format, the checksum calculation needs to be slightly modified. This patch adjusts the NVRAM test code for that case, and add support for the missing formats. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: 5784 / 5764 DMA engine lockup fixMatt Carlson
5784 and 5764 devices lock up when the link speed is 10Mbps, the CPMU link speed mode is enabled, and the MAC clock is running at 1.5Mhz. The fix is to run the MAC clock at faster speeds. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: APE flag fixMatt Carlson
This patch corrects a bug where the ENABLE_APE flag was tested against the wrong flag variable. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-12[TG3]: 5784 / 5764 GPHY power down fixMatt Carlson
5784 and 5764 devices fail to link / pass traffic after one load / unload cycle. This happens because of a hardware bug in the new CPMU. During normal operation, the MAC depends on the PHY clock being available. When the PHY is powered down, the clock the MAC depends on is disabled. The fix is to switch the MAC clock to an alternate source before powering down the PHY, and to restore the MAC clock to the PHY source upon device resume. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>