Al Viro [Sun, 14 Oct 2007 18:36:00 +0000 (19:36 +0100)]
endianness annotations in arm io.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:35:50 +0000 (19:35 +0100)]
more low-hanging fruits - kernel, fs, lib signedness
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:35:40 +0000 (19:35 +0100)]
more trivial signedness fixes in drivers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:35:30 +0000 (19:35 +0100)]
signedness: module_param_array nump argument
... should be unsigned int
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:35:20 +0000 (19:35 +0100)]
long vs. unsigned long - low-hanging fruits in drivers
deal with signedness of the stuff passed to set_bit() et.al.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:35:10 +0000 (19:35 +0100)]
frv: missing casts in cmpxchg()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:34:30 +0000 (19:34 +0100)]
synclink_gt endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:35:00 +0000 (19:35 +0100)]
endian-clean in_le64/out_le64
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:34:50 +0000 (19:34 +0100)]
fs/partitions/sun.c endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:34:40 +0000 (19:34 +0100)]
fw-cdev __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:34:20 +0000 (19:34 +0100)]
mpc5200_wdt: __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:34:10 +0000 (19:34 +0100)]
mm/migrate.c __user annotation
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:21:20 +0000 (19:21 +0100)]
fix breakage in sctp getsockopt
copy_to_user() into on-stack array
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:22:59 +0000 (19:22 +0100)]
remove duplicate initializer (macvlan)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 18:20:30 +0000 (19:20 +0100)]
skb->tail in ibm_newemac should be skb_tail_pointer()
... since that sucker is not 32bit-only and on 64bit skb->tail is an
offset, not a pointer.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 14 Oct 2007 16:03:42 +0000 (09:03 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (21 commits)
HID: hidraw_connect() memleak fix
HID: add hidraw interface
USB HID: provide hook for hidraw write()
HID: hiddev: Add 32bit ioctl compatibilty
HID: Add GeneralTouch touchscreen to the blacklist
HID: add support for Microsoft Wireless Laser Keyboard 6000
Input: add KEY_LOGOFF
USBHID: report descriptor fix for MacBook JIS keyboard
HID: trivial fixes in hid-debug
HID: fix input mapping for Microsoft Ergonomic Keyboard
HID: use hid-plff driver for GreenAsia 0e8f:0003 devices
USBHID: Add HID_QUIRK_NOGET for ELO Touch Screen 2700 display
HID: enable hiddev for the SantaRosa MacBookPro IR receiver
USBHID: add CM109 device to blacklist
HID: Report usage codes of keys as EV_MSC scancode events
HID: ignore all non-LED usages in output fields in hid-input
HID: fix whitespace damage
HID: add support for Thrustmaster FGT Force Feedback wheel
HID: minimal autosuspend support for USB HID devices
HID: add support for Microsoft Natural Ergonomic Keyboard 4000
...
Linus Torvalds [Sun, 14 Oct 2007 16:02:40 +0000 (09:02 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
[MTD] fix mtdconcat for subpage-write NAND
[MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first.
[MTD] [OneNAND] Return only negative error codes
[MTD] [OneNAND] Synchronize block locking operations
UBI: return correct error code
UBI: remove useless inlines
UBI: fix atomic LEB change problems
UBI: use byte hexdump
UBI: do not use vmalloc on I/O path
UBI: allocate memory with GFP_NOFS
UBI: use linux print_hex_dump(), not home-grown one
UBI: don't use array index before testing if it is negative
UBI: add more prints
UBI: fix sparse warnings
UBI: fix leak in ubi_scan_erase_peb
Linus Torvalds [Sun, 14 Oct 2007 15:59:48 +0000 (08:59 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (23 commits)
[SPARC64]: virt_to_real_irq_table --> virt_irq_table
[SPARC64]: virt_irq --> bucket mapping no longer necessary
[SPARC64]: Kill ugly __bucket() macro.
[SPARC64]: Kill ugly __irq_ino() macro.
[SPARC64]: Only use bypass accesses to INO buckets.
[SPARC64]: Update defconfig.
[SPARC64]: Use sun4v VIRQ interfaces as intended.
[SPARC64]: Allocate ivector_table dynamically.
[SPARC64]: Access ivector_table[] using physical addresses.
[SPARC64]: Make IVEC pointers 64-bit.
[SPARC64]: Fix register usage in xor_raid_4().
[SPARC64]: Kill pci_memspace_mask.
[SPARC64]: Consolidate MSI support code.
[SPARC/64]: Move of_platform_driver initialisations: arch/sparc{,64}.
[SPARC64]: Fix bugs in SYSV IPC handling in 64-bit processes.
[SPARC/64]: Prepare to remove of_platform_driver name.
[SPARC32]: Add irqflags.h to sparc32 and use it from generic code.
[SPARC64]: beautify vmlinux.lds
[SPARC]: beautify vmlinux.lds
[SPARC64]: Enable MSI on sun4u Fire PCI-E controllers.
...
Grant Likely [Sun, 14 Oct 2007 04:37:02 +0000 (22:37 -0600)]
mpc52xx-uart: fix compile warning (format type mismatch)
Trivial compile warning fix
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grant Likely [Sun, 14 Oct 2007 04:36:57 +0000 (22:36 -0600)]
mpc52xx-ata: fix compile warning (unused variable)
Trivial unused variable fix
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grant Likely [Sun, 14 Oct 2007 04:13:32 +0000 (22:13 -0600)]
XilinxFB: typo bugfix
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grant Likely [Sun, 14 Oct 2007 04:13:27 +0000 (22:13 -0600)]
Lite5200 shouldn't mess with ROOT_DEV
There is no good reason for board platform code to mess with the ROOT_DEV.
Remove it from all in-tree platforms except powermac
This is a follow on to commit
745e1027751acbc1f14f8bbef378b491242b9c83.
The original patch had this change to lite5200.c, but it got dropped in
the psycho madness that is the 2.6.24 merge window.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 05:53:45 +0000 (06:53 +0100)]
more uevent fallout (drivers/base/memory.c)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 04:51:51 +0000 (05:51 +0100)]
missing include in ssb
Using readw() and friends => needs to pull io.h and not all targets are
doing that via indirect chains.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 04:50:12 +0000 (05:50 +0100)]
typo in ibm_newemac/rgmii.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sun, 14 Oct 2007 04:46:09 +0000 (05:46 +0100)]
uevent environment changes fallout
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Woodhouse [Sun, 14 Oct 2007 13:29:00 +0000 (14:29 +0100)]
Merge branch 'master' of git://git.infradead.org/~dedekind/ubi-2.6
Jiri Kosina [Sun, 14 Oct 2007 12:47:56 +0000 (14:47 +0200)]
Merge branch 'hidraw' into for-linus
Mariusz Kozlowski [Thu, 27 Sep 2007 09:24:55 +0000 (11:24 +0200)]
HID: hidraw_connect() memleak fix
It looks like hidraw_connect() is leaking memory in case of failure.
Also it should return -ENOMEM when kzalloc fails.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Mon, 14 May 2007 07:57:40 +0000 (09:57 +0200)]
HID: add hidraw interface
hidraw is an interface that is going to obsolete hiddev one
day.
Many userland applications are using libusb instead of using
kernel-provided hiddev interface. This is caused by various
reasons - the HID parser in kernel doesn't handle all the
HID hardware on the planet properly, some devices might require
its own specific quirks/drivers, etc.
hiddev interface tries to do its best to parse all the received
reports properly, and presents only parsed usages into userspace.
This is however often not enough, and that's the reason why
many userland applications just don't use hiddev at all, and
rather use libusb to read raw USB events and process them on
their own.
Another drawback of hiddev is that it is USB-specific.
hidraw interface provides userspace readers with really raw HID
reports, no matter what the low-level transport layer is (USB/BT),
and gives the userland applications all the freedom to process
the HID reports in a way they wish to.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Mon, 14 May 2007 07:54:30 +0000 (09:54 +0200)]
USB HID: provide hook for hidraw write()
Add hook in usbhid for write() callback from hidraw. Sends the
report to the device through control pipe.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Chris Paulson-Ellis [Fri, 12 Oct 2007 09:54:06 +0000 (10:54 +0100)]
[MTD] fix mtdconcat for subpage-write NAND
This allows the mtdconcat driver to work with NAND flash devices that
support sub-page writes.
Signed-off-by: Chris Paulson-Ellis <chris@edesix.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Adrian Hunter [Fri, 12 Oct 2007 07:34:01 +0000 (10:34 +0300)]
[MTD] [OneNAND] Avoid deadlock in erase callback; release chip lock first.
When the erase callback performs some other action on the flash, it's
highly likely to deadlock unless we actually release the chip lock
before calling it.
This patch mirrors that same change already done for NAND.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Adrian Hunter [Fri, 12 Oct 2007 07:19:38 +0000 (10:19 +0300)]
[MTD] [OneNAND] Return only negative error codes
The OneNAND driver was confusing JFFS2 by returning positive error
codes.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Adrian Hunter [Fri, 12 Oct 2007 07:19:26 +0000 (10:19 +0300)]
[MTD] [OneNAND] Synchronize block locking operations
Ensure OneNAND's block locking operations are synchronized
like all other operations.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Philip Langdale [Sun, 14 Oct 2007 10:03:58 +0000 (12:03 +0200)]
HID: hiddev: Add 32bit ioctl compatibilty
The hiddev driver currently lacks 32bit ioctl compatibility, so
if you're running with a 64bit kernel and 32bit userspace, it won't
work.
I'm pretty sure that the only thing missing is a compat_ioctl
implementation as all structs have fixed size fields.
With this change I can use revoco to configure my MX Revolution mouse.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Ilya Frolov [Thu, 11 Oct 2007 12:21:23 +0000 (14:21 +0200)]
HID: Add GeneralTouch touchscreen to the blacklist
GeneralTouch touchscreens are handled by usbtouchscreen driver,
make sure HID ignores them.
Signed-off-by: Ilya Frolov <zeylie@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Khelben Blackstaff [Thu, 4 Oct 2007 08:35:41 +0000 (10:35 +0200)]
HID: add support for Microsoft Wireless Laser Keyboard 6000
This keyboard emits a few usages that are not handled properly by
hid-input.
Changed IS_MS_NEK4K macro to IS_MS_KB to reflect the addition
of another keyboard.
Signed-off-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Khelben Blackstaff [Thu, 4 Oct 2007 08:32:03 +0000 (10:32 +0200)]
Input: add KEY_LOGOFF
HUT 1.12 defines Logoff usage 0x19c in Consumer page. There are
keyboards out there emitting this usage code (for example Microsoft
Wireless Laser Keyboard 6000). Add this key so that HID code could
map usages to it.
Signed-off-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Tomoya Adachi [Wed, 3 Oct 2007 21:27:49 +0000 (23:27 +0200)]
USBHID: report descriptor fix for MacBook JIS keyboard
This patch fixes the problem, that Japanese MacBook doesn't recognize some keys
like '\'(yen, or backslash), '|'(pipe), and '_'(underscore).
It is due to that MacBook JIS keyboard (jp106) sends wrong report descriptor.
It saids "logical maximum = 0x65", so Keyboard.0089 is mapped to Key.Unknown,
while it should be accepted as Key.Yen.
Signed-off-by: Tomoya Adachi <adachi@il.is.s.u-tokyo.ac.jp>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Joe Perches [Wed, 26 Sep 2007 14:29:53 +0000 (16:29 +0200)]
HID: trivial fixes in hid-debug
- added KERN_DEBUG to output lines
- fixed preffered -> preferred typo
- added const to char *'s
Also, exported symbol hid_resolv_event is unused by the current
kernel tree and perhaps should be removed.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Tue, 25 Sep 2007 14:32:08 +0000 (16:32 +0200)]
HID: fix input mapping for Microsoft Ergonomic Keyboard
Special keys 1-5 on Microsoft Ergonomic Keyboard were mistakenly
mapped to buttons, which doesn't make a lot of sense. Fix this
mapping to KEY_F{13,18}.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Anssi Hannula [Wed, 19 Sep 2007 14:13:20 +0000 (16:13 +0200)]
HID: use hid-plff driver for GreenAsia 0e8f:0003 devices
Add 0e8f:0003 into the list of devices supported by the hid-plff
force feedback driver. These devices identify themselves as
"GreenAsia Inc. USB Joystick " and can be either adapters or
actual game controllers. The testing was done with a Köng Gaming
gamepad.
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Mike Crowe [Fri, 14 Sep 2007 08:18:07 +0000 (10:18 +0200)]
USBHID: Add HID_QUIRK_NOGET for ELO Touch Screen 2700 display
Use HID_QUIRK_NOGET for the ELO TS2700 touch screen USB HID device in
order to avoid a timeout during initialisation.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Stelian Pop [Tue, 11 Sep 2007 21:34:55 +0000 (23:34 +0200)]
HID: enable hiddev for the SantaRosa MacBookPro IR receiver
The infrared remote receiver found in the SantaRosa MacBookPro
laptops (MacBookPro3,1) need to be forced to expose a HIDDEV
interface (instead of HIDINPUT) so that lirc can access it using
the 'macmini' driver.
The patch below adds the required quirk for forcing the HIDDEV
interface to be activated (HID_QUIRK_HIDDEV) and introduces a new
quirk which forces the HIDINPUT interface to be ignored
(HID_QUIRK_IGNORE_HIDINPUT).
Note that Apple calls this receiver 'IRController4' (info taken
from Apple's driver Info.plist). Older Mac{Book,Mini,Pro}s seem
to all use the 'IRController1' device (USB id 05ac:8240) which
doesn't need those quirks.
Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Alfred E. Heggestad [Wed, 29 Aug 2007 13:53:03 +0000 (15:53 +0200)]
USBHID: add CM109 device to blacklist
There is a separate driver cm109 for handling this device.
Signed-off-by: Alfred E. Heggestad <aeh@db.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Mon, 20 Aug 2007 10:13:34 +0000 (12:13 +0200)]
HID: Report usage codes of keys as EV_MSC scancode events
Current HID layer does not report usage codes to the input layer. This feature
was previously removed, because it caused unnecessary storm of events in cases
of positioning devices, etc.
This patch adds reporting of usage codes as EV_MSC events only for key events.
We issue the EV_MSC event only if the state of the key corresponding to the
given code has changed, so that we don't report usages that are sent in every
report even if the state hasn't changed (for example Shift/Caps Lock/...
states as sent by various keyboards).
This functionality is required at least by KeyTouch in order to provide
convenient means for remapping the usage codes.
Cc: Marvin Raaijmakers <marvin.nospam@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Sat, 11 Aug 2007 21:39:42 +0000 (23:39 +0200)]
HID: ignore all non-LED usages in output fields in hid-input
We have to ignore all non-LED usages in output fields if the
report descriptor of the device specifies any. If we don't do
so, the devices which contain the same usages both in input and
output reports with different parameters will mess things up. In
hid-input, we currently care only for the input usages, with exception
for LEDs. All other output usages should be properly handled by
appropriate force-feedback driver.
Fixes auto-calibration for Saitek Cyborg Evo Force joystick.
Reported-by: Renato Golin <rengolin@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Thu, 9 Aug 2007 12:04:56 +0000 (14:04 +0200)]
HID: fix whitespace damage
Fixes some trivial whitespace damage in hid-input.c
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Dmitry Torokhov [Mon, 30 Jul 2007 12:56:26 +0000 (14:56 +0200)]
HID: add support for Thrustmaster FGT Force Feedback wheel
Rework thrustmaster force-feedback module to support devices having
different types of force feedback effects. Add signatures of
Thrustmaster FGT Rumble Force and Thrustmaster FGT Force Feedback
wheels to the list of devices dupported by the module.
Parts of the patch were lifted off a simalar patch by
Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Oliver Neukum [Wed, 11 Jul 2007 12:48:58 +0000 (14:48 +0200)]
HID: minimal autosuspend support for USB HID devices
Autosuspend for USB HID devices remains problematic as far as mice
and keyboards are concerned. While I am working on a grand solution,
here's a minimalist patch that works for those devices not continously
in use.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Thu, 9 Aug 2007 11:24:11 +0000 (13:24 +0200)]
HID: add support for Microsoft Natural Ergonomic Keyboard 4000
This keyboard emits a few usages that are not handled properly by
hid-input.
The usages from MSVENDOR page are colliding with Chicony Tactical
Pad device, so we have to distinguish in runtime. Ugly ...
Also, the buttons 1-5 have to be handled in a non-standard way,
as they are emitted by the keyboard in a bitfield-like fashion, but
the field is not presented as bit-field by the keyboard. The keys can't
be pressed simultaneously, so the handling we have is correct.
This patch also extends hid_keyboard[] with KPLeftParenthesis and
KPRightParenthesis as defined by Keyboard page in HUT 1.12. The
corresponding usages are also emitted by this keyboard.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Jiri Kosina [Wed, 8 Aug 2007 15:19:08 +0000 (17:19 +0200)]
Input: add KEY_SPELLCHECK
HUT 1.12 defines Spell Check usage 0x1ab in Consumer page. There are
keyboards out there emitting this usage code (for example Microsoft
Natural Ergonomic Keyboard 4000). Add this key so that HID code could
map usages to it.
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Artem Bityutskiy [Sun, 14 Oct 2007 10:01:58 +0000 (13:01 +0300)]
UBI: return correct error code
Fix the following warning:
drivers/mtd/ubi/eba.c: In function 'ubi_eba_init_scan':
drivers/mtd/ubi/eba.c:1116: warning: 'err' may be used uninitialized in this function
Pointed-to-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Thu, 13 Sep 2007 11:48:20 +0000 (14:48 +0300)]
UBI: remove useless inlines
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Thu, 13 Sep 2007 11:28:14 +0000 (14:28 +0300)]
UBI: fix atomic LEB change problems
When the UBI device is nearly full, i.e. all LEBs are mapped, we have
only one spare LEB left - the one we reserved for WL purposes. Well,
I do not count the LEBs which were reserved for bad PEB handling -
suppose NOR flash for simplicity. If an "atomic LEB change operation"
is run, and the WL unit is moving a LEB, we have no spare LEBs to
finish the operation and fail, which is not good. Moreover, if there
are 2 or more simultanious "atomic LEB change" requests, only one of
them has chances to succeed, the other will fail with -ENOSPC. Not
good either.
This patch does 2 things:
1. Reserves one PEB for the "atomic LEB change" operation.
2. Serealize the operations so that only on of them may run
at a time (by means of a mutex).
Pointed-to-by: Brijesh Singh <brijesh.s.singh@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Wed, 29 Aug 2007 11:56:20 +0000 (14:56 +0300)]
UBI: use byte hexdump
More handy since word hexdump prints in host endian.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Wed, 29 Aug 2007 11:51:52 +0000 (14:51 +0300)]
UBI: do not use vmalloc on I/O path
Similar reason as in case of the previous patch: it causes
deadlocks if a filesystem with writeback support works on top
of UBI. So pre-allocate needed buffers when attaching MTD device.
We also need mutexes to protect the buffers, but they do not
cause much contantion because they are used in recovery, torture,
and WL copy routines, which are called seldom.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Tue, 28 Aug 2007 18:29:32 +0000 (21:29 +0300)]
UBI: allocate memory with GFP_NOFS
Use GFP_NOFS flag when allocating memory on I/O path, because otherwise
we may deadlock the filesystem which works on top of us. We observed
the deadlocks with UBIFS. Example:
VFS->FS lock a lock->UBI->kmalloc()->VFS writeback->FS locks the same
lock again.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Tue, 7 Aug 2007 20:34:20 +0000 (23:34 +0300)]
UBI: use linux print_hex_dump(), not home-grown one
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Jesper Juhl [Fri, 3 Aug 2007 23:25:26 +0000 (01:25 +0200)]
UBI: don't use array index before testing if it is negative
I can't find anything guaranteeing that 'ubi_num' cannot be <0 in
drivers/mtd/ubi/kapi.c::ubi_open_volume(), and in fact the code
even tests for that and errors out if so. Unfortunately the test
for "ubi_num < 0" happens after we've already used 'ubi_num' as
an array index - bad thing to do if it is negative.
This patch moves the test earlier in the function and then moves
the indexing using that variable after the check. A bit safer :-)
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Sun, 22 Jul 2007 19:32:51 +0000 (22:32 +0300)]
UBI: add more prints
I hit those situations and found out lack of print messages. Add more prints
when erase problems occur.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Sun, 22 Jul 2007 12:25:02 +0000 (15:25 +0300)]
UBI: fix sparse warnings
Fix "symbol shadows an earlier one" warnings. Although they are harmless
but it does not hurt to fix them and make sparse happy.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Florin Malita [Thu, 19 Jul 2007 19:22:41 +0000 (15:22 -0400)]
UBI: fix leak in ubi_scan_erase_peb
Coverity (1769) found the following problem: if the erase counter
overflow check triggers, ec_hdr is leaked.
Moving the allocation after the overflow check should take care of it.
Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
David S. Miller [Sun, 14 Oct 2007 06:52:14 +0000 (23:52 -0700)]
[SPARC64]: virt_to_real_irq_table --> virt_irq_table
It no longer translates to "real irqs" (aka. INO buckets)
so reflect that by using a simpler name for it.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 06:50:38 +0000 (23:50 -0700)]
[SPARC64]: virt_irq --> bucket mapping no longer necessary
We used to need this to compute virt_irq --> ino, but that
is no longer necessary.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 06:41:28 +0000 (23:41 -0700)]
[SPARC64]: Kill ugly __bucket() macro.
All the users go through virt_irq_to_bucket() and essentially
want to go from a virt_irq to an INO, but we have a way
to do that already via virt_to_real_irq_table[].dev_ino.
This also allows us to kill both virt_to_real_irq() and
virt_irq_to_bucket().
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 06:27:48 +0000 (23:27 -0700)]
[SPARC64]: Kill ugly __irq_ino() macro.
We have a place to stick INO information in the
virt_to_real_irq_table[], which is currently only used for VIRQs.
And that is readily accessible from the one __irq_ino() call site.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 06:03:21 +0000 (23:03 -0700)]
[SPARC64]: Only use bypass accesses to INO buckets.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 04:54:12 +0000 (21:54 -0700)]
[SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 04:51:37 +0000 (21:51 -0700)]
[SPARC64]: Use sun4v VIRQ interfaces as intended.
We were simply concatenating the devhandle and devino and using that
as the cookie, which defeats the entire purpose of the VIRQ hypervisor
interfaces.
Now that we use physical addresses for the INO buckets, we can
allocate them dynamically for VIRQs and encode the cookies as
~__pa(bucket). This allows us to test for and decode the cookie with
a simple:
brlz $reg1, 1f
xnor $reg1, %g0, $reg2
sequence.
This works because bit 64 is never set in traditional
INO vectors, and it is also never set in a physical
address. So xnor'ing the physical address of the bucket
always gives us a negative number, and thus a unique
condition we can test cheaply.
Inspired by ideas from Greg Onufer.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 04:43:31 +0000 (21:43 -0700)]
[SPARC64]: Allocate ivector_table dynamically.
Shrinks kernel by 16K compared to before the IVEC physical
address changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sun, 14 Oct 2007 04:42:46 +0000 (21:42 -0700)]
[SPARC64]: Access ivector_table[] using physical addresses.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 12 Oct 2007 09:59:40 +0000 (02:59 -0700)]
[SPARC64]: Make IVEC pointers 64-bit.
Currently we chain IVEC entries using 32-bit "pointers"
because we know that the ivector_table is in the main
kernel image, thus below 4GB.
This uses proper 64-bit pointers instead.
Whilst this bloats up the kernel image size, this sets
the infrastructure necessary to significantly shrink the
kernel size by using physical addresses and dynamically
allocating the ivector table.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 12 Oct 2007 08:52:19 +0000 (01:52 -0700)]
[SPARC64]: Fix register usage in xor_raid_4().
Some typos led to using %i6/%i7 instead of %l6/%l7 in loads which is
really really bad because those are the frame pointer and return PC.
Based upon a raid5 crash report by Bertrand Joel.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 11 Oct 2007 22:41:01 +0000 (15:41 -0700)]
[SPARC64]: Kill pci_memspace_mask.
It is totally unnecessary as the needed information is properly
encoded in the resources.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 11 Oct 2007 10:16:13 +0000 (03:16 -0700)]
[SPARC64]: Consolidate MSI support code.
This also makes us use the MSI queues correctly.
Each MSI queue is serviced by a normal sun4u/sun4v INO interrupt
handler. This handler runs the MSI queue and dispatches the
virtual interrupts indicated by arriving MSIs in that MSI queue.
All of the common logic is placed in pci_msi.c, with callbacks to
handle the PCI controller specific aspects of the operations.
This common infrastructure will make it much easier to add MSG
support.
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Rothwell [Thu, 11 Oct 2007 06:27:34 +0000 (23:27 -0700)]
[SPARC/64]: Move of_platform_driver initialisations: arch/sparc{,64}.
We no longer initialise the name field of the of_platform_driver, but
use the name field of the embedded device_driver's name field instead.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 10 Oct 2007 03:56:31 +0000 (20:56 -0700)]
[SPARC64]: Fix bugs in SYSV IPC handling in 64-bit processes.
Thanks to Tom Callaway for the excellent bug report and
test case.
sys_ipc() has several problems, most to due with semaphore
call handling:
1) 'err' return should be a 'long'
2) "union semun" is passed in a register on 64-bit compared
to 32-bit which provides it on the stack and therefore
by reference
3) Second and third arguments to SEMCTL are swapped compared
to 32-bit.
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Rothwell [Thu, 27 Sep 2007 20:21:43 +0000 (13:21 -0700)]
[SPARC/64]: Prepare to remove of_platform_driver name.
The name field of of_platform_driver is just copied into the
included device_driver. By not overriding an already initialised
device_driver name, we can convert the drivers over time to stop using
the of_platform_driver name.
Also we were not copying the owner field from of_platform_driver, so do
the same with it.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Reif [Thu, 27 Sep 2007 20:15:31 +0000 (13:15 -0700)]
[SPARC32]: Add irqflags.h to sparc32 and use it from generic code.
Added asm-sparc/irqflags.h and moved irq related code from system.h to it.
Renamed local_irq functions to raw_local_irq in irq.c.
Modified system.h to include linux/irqflags.h which includes asm/irqflags.h.
Added TRACE_IRQFLAGS_SUPPORT to Kconfig.debug.
This is the first step in adding IRQ-flags state tracing as outlined in
Documentation/irqflags-tracing.txt. These changes should be harmless
because they just move things around and rename them.
The next step is making the lowlevel entry code modifications which
to be honest are beyond my capabilities at this point.
Boot tested on an ss20 running an SMP kernel.
Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Tue, 18 Sep 2007 02:02:57 +0000 (19:02 -0700)]
[SPARC64]: beautify vmlinux.lds
Apply a consistent format to vmlinux.lds.
The file is now to some degree readable.
In addition move several labels inside the braces
such that they reflect the actual start address of a section.
Without this the label would not reflect if ld added alignment.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Tue, 18 Sep 2007 02:02:30 +0000 (19:02 -0700)]
[SPARC]: beautify vmlinux.lds
Make vmlinux.lds almost readable.
When going through the file fixed the following:
- Use PAGE_SIZE as replacement for hardcoded 4096
- Moves label definitions inside {} to avoid ld alignment
that may be added between label and section
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 31 Aug 2007 05:33:25 +0000 (22:33 -0700)]
[SPARC64]: Enable MSI on sun4u Fire PCI-E controllers.
The support code is identical to the hypervisor sun4v stuff,
just replacing the hypervisor calls with register reads and
writes in the Fire controller.
Signed-off-by: David S. Miller <davem@davemloft.net>
Krzysztof Helt [Mon, 6 Aug 2007 01:06:52 +0000 (18:06 -0700)]
[FFB]: source cleanup
This patch cleans up the driver a bit. It contains
coding style fixes (pointed by Lindent and checkpatch)
and white space clean ups.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Krzysztof Helt [Mon, 6 Aug 2007 01:05:29 +0000 (18:05 -0700)]
[CG6]: accelerated copyarea
This patch adds accelerated copyarea and sets READS_FAST flag.
This doubles scrolling speed on SparcStation20 85MHz.
It also fixes a comment in cg6_fillrect function.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Krzysztof Helt [Mon, 6 Aug 2007 01:04:18 +0000 (18:04 -0700)]
[CG6]: code cleanup
This patch:
- corrects coding style errors pointed by Lindent and checkpatch
- replaces space chunks with tabs
- removes one redundant include
- improves indentations of defines
- removes from comments leftovers from skeletonfb
- adds __devinit attribute to two init functions
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Sat, 13 Oct 2007 21:29:47 +0000 (22:29 +0100)]
Fix ohci-ssb with !CONFIG_PM
ohci_bus_{suspend,resume} exists only if we have CONFIG_PM; do the same
thing as other subdrivers...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 14 Oct 2007 01:16:49 +0000 (18:16 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
mlx4_core: Fix infinite loop on device initialization
Jean Delvare [Sat, 13 Oct 2007 21:56:33 +0000 (23:56 +0200)]
i2c-nforce2: Declare PEC as supported
The i2c-nforce2 driver has SMBus PEC support, so it should say so.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Oleg Ryjkov [Sat, 13 Oct 2007 21:56:33 +0000 (23:56 +0200)]
i2c-nforce2: Abort the transaction on error
This patch is to add an abort function that will bring back the MCP51/55
controller if it was blocked by a block-read operation, in particular.
(When a slave sends a wrong byte count on a byte read, the host gets
locked up). I've only tested it on an MCP51 and MCP55. However, I'm
almost certain it will also work on MCP65, I just did not have the board
to test it on. Thus for now the abort function will only be called
if an MCP51/55 was detected.
Signed-off-by: Oleg Ryjkov <olegr@olegr.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Oleg Ryjkov [Sat, 13 Oct 2007 21:56:33 +0000 (23:56 +0200)]
i2c-nforce2: Move status checking to a separate function
This is the first part of the patch that adds a function to reset the
nvidia MCP51/55 i2c controller, if something bad happens to it (e.g.
a slave sends a wrong byte count during a block transaction).
This patch just adds nforce2_check_status function. It was originally
written by Hans-Frieder Vogt.
The reason that I'm the one sending it is:
- I relied on it for the second part of the patch,
- It makes the driver code cleaner/better.
Signed-off-by: Oleg Ryjkov <olegr@olegr.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Chris David [Sat, 13 Oct 2007 21:56:33 +0000 (23:56 +0200)]
i2c-au1550: Fix a misused register problem
Fix a "mis-used register" problem on the AMD MIPS Alchemy au1550
I2C interface.
In summary, the programmable serial controller seems to hang the kernel
when I send a single 'address' byte on the I2C bus. The patch
essentially uses the PSC_SMBSTAT register's TE (transmit FIFO empty)
bit to check when the transmit FIFO is empty, instead of using the
PSC_SMBEVNT register's TU (transmit underflow) bit. Using the TE bit
fixed the hang problem.
Signed-off-by: Chris David <cd@chrisdavid.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:33 +0000 (23:56 +0200)]
i2c: Rename the PEC functionality bit
Rename I2C_FUNC_SMBUS_HWPEC_CALC as I2C_FUNC_SMBUS_PEC, and list that
functionality as always available through the software implementation.
Update documentation accordingly (and list similar requirements).
The way it's currently packaged doesn't present the capability in a
useful way.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
i2c-at91: Mark as broken
Mark the i2c-at91 driver BROKEN in Kconfig, and explain just
why it's broken. (Summary: hardware design issues.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
i2c: Move i2c-dev interfaces to i2c-dev.h
Move the i2c-dev support into <linux/i2c-dev.h> where it should always
have lived. Now <linux/i2c.h> no longer holds stuff related to the
optional userspace /dev/i2c-X interface. Improve the descriptions
for these ioctl requests.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
i2c: Remove i2c_algorithm.algo_control()
This removes:
- An effectively unused hook: i2c_algorithm.algo_control.
- The i2c_control() call, used only by i2c-dev to call that
unused hook or set two barely supported adapter params.
(That param setting moves into i2c-dev.c ... still iffy
due to lack of locking, but no other changes.)
As shown by diffstat, this is a net code shrink. It also reduces the
complexity of the I2C adapter and /dev interfaces.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
cx23885: Drop empty i2c algorithm control callback
i2c_algorithm.algo_control is about to be removed.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
David Brownell [Sat, 13 Oct 2007 21:56:32 +0000 (23:56 +0200)]
i2c: Remove NOP i2c_algorithm.algo_control() methods
This removes NOP implementations of i2c_algorithm.algo_control.
With this change, there are no implementations of this hook in
the kernel.org tree ... that hook seems about ripe to remove.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sat, 13 Oct 2007 21:56:31 +0000 (23:56 +0200)]
i2c-dev: Reject I2C_M_RECV_LEN
The I2C_M_RECV_LEN calling convention for i2c_mesg.flags involves
playing games with reported buffer lengths. (They start out less
than their actual size, and the length is then modified to reflect
how many bytes were delivered ... which one hopes is less than the
presumed actual size.) Refuse to play such error prone games across
the boundary between userspace and kernel.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>