Archived
14
0
Fork 0
Commit graph

58771 commits

Author SHA1 Message Date
Rene van Paassen
ce0982edae Input: aiptek - fixed mouse button defines
Mouse button defines tested the wrong bits, now fixed

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:16 -04:00
Rene van Paassen
fe981f2340 Input: aiptek - correct the proximity and validity checks
Calculation of proximity bit and of data valid bits were reversed for
stylus reports.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:16 -04:00
Rene van Paassen
2fe574167b Input: aiptek - correct documentation on reports
Small fix that corrects the documentation on the report byte
format produced by the mouse

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:16 -04:00
Dmitry Torokhov
33936fa603 Input: aiptek - use array to list all buttons
When setting up input device use an array to list all the buttons
instead of setting every bit separately.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:16 -04:00
Dmitry Torokhov
37767b66ed Input: aiptek - kill aiptek_convert_from_2s_complement()
There is no reason to do that, just tell the compiler that
we are dealing with signed values in buffer, that's it.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:16 -04:00
Dmitry Torokhov
cd438a58c8 Input: aiptek - use maps in attributes
Use maps to convert for strings to internal constants and vice versa
in aiptek's sysfs attribute methods instead of open-coding it. This
results in smaller code that is also easier to maintain.

[Rene: fix a typo - stylys instead of stylus]

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Dmitry Torokhov
02fb6c385c Input: aiptek - do not check for NULL in attribute methods
It makes no sense to check for NULL in attribute methods -
we do usb_set_intfdata before creating attributes and once
attributes have been removed we are guaranteed to not be
called.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Dmitry Torokhov
b087e1f3ee Input: aiptek - use attribute group
Use attribute group to simplify error handling and reduce code.

[Rene: add missing NULL to properly terminate aiptek_attributes]

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Dmitry Torokhov
5c659c62f9 Input: aiptek - remove vendor and product attributes from sysfs
They are already exported by input core; there is no need to do it twice.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Dmitry Torokhov
9b40ed088b Input: aiptek - do not try to export associated event device
Do not try to export via sysfs associated event device - it does not
work when evdev is a module that is loaded after aiptek; also it pokes
too deply into input core internals.

Userspace should rely on udev to set up permanent device name for
the tablet.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Aristeu Rozanski
aea6a46122 Input: psmouse - add support for Cortron PS/2 Trackballs
Cortron PS/2 Trackballs (700-0001A) report the 4th button using the 4th
bit of the first packet (yes, it breaks the standard PS/2 protocol).
This patch adds an extra protocol to generate BTN_SIDE based on the 4th
bit. There's no way to detect those trackballs using any kind of special
sequence, thus the protocol must be activated explicitely by writing
into 'protocol' sysfs attribute:

	echo -n "cortps" > /sys/devices/platform/i8042/serio1/protocol

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Jan Kratochvil
e01a06e8df Input: xpad - add Xbox360 gamepad rumble support
Implementation is using force feedback support for memoryless devices.

Signed-off-by: Jan Kratochvil <honza@jikos.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Jan Kratochvil
c7d9f7eb30 Input: xpad - add support for Xbox 360 gamepad
Xbox 360 gamepad is slightly different then the previous model so it has
its own version of process_packet method. Detection of this new device
relies on USB_DEVICE_INTERFACE_PROTOCOL macro. This device got vendor
specific subclass so it can't be matched with USB_INTERFACE_INFO and
we need only one interface protocol from four availaible. It means
USB_DEVICE can't be used either.

Added xpad360_btn structure with additional buttons for x360 gamepad.
Added xtype into xpad_device structure to distinguish between different
types of xbox devices.

Signed-off-by: Jan Kratochvil <honza@jikos.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:15 -04:00
Jan Kratochvil
f836ac808f USB: Add USB_DEVICE_INTERFACE_PROTOCOL macro
The USB_DEVICE_INTERFACE_PROTOCOL will allow to match one interface
protocol of vendor specific device. This macro is used in patch adding
support for xbox360 to xpad.c

Signed-off-by: Jan Kratochvil <honza@jikos.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10 00:35:14 -04:00
Linus Torvalds
71780f59e1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (31 commits)
  firewire: fw-sbp2: fix DMA mapping of management ORBs
  firewire: fw-sbp2: fix DMA mapping of command ORBs
  firewire: fw-sbp2: fix DMA mapping of S/G tables
  firewire: fw-sbp2: add a boundary check
  firewire: fw-sbp2: correctly align page tables
  firewire: fw-sbp2: memset wants string.h
  firewire: fw-sbp2: use correct speed in sbp2_agent_reset
  firewire: fw-sbp2: correctly dereference by container_of
  firewire: Document userspace ioctl interface.
  firewire: fw-sbp2: implement nonexclusive login
  firewire: fw-sbp2: let SCSI shutdown commands through before logout
  firewire: fw-sbp2: implement max sectors limit for some old bridges
  firewire: simplify a struct type
  firewire: support S100B...S400B and link slower than PHY
  firewire: optimize gap count with 1394b leaf nodes
  firewire: remove unused macro
  firewire: missing newline in printk
  firewire: fw-sbp2: remove unused struct member
  ieee1394: remove old isochronous ABI
  ieee1394: sbp2: change some module parameters from int to bool
  ...
2007-07-09 15:50:56 -07:00
Linus Torvalds
36b774102e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: handle cases of volume knobs generating relative values
  HID: Logitech keyboard 0xc311 needs reset leds quirk
  HID: support for logitech cordless desktop LX500 special mapping
  HID: fix autocentering of PID devices
  HID: separate quirks for report descriptor fixup
  HID: Add NOGET quirk for all NCR devices
  HID: support for Petalynx Maxter remote control
  HID: fix mismatch between hid-input HUT find/search mapping and the HUT
  HID: support for Gameron dual psx adaptor
  USB HID: avoid flush_scheduled_work()
  HID: Use menuconfig objects
  HID: force hid-input for Microsoft SideWinder GameVoice device
  HID: input mapping for Chicony KU-0418 tactical pad
  HID: make debugging output runtime-configurable
2007-07-09 15:50:31 -07:00
Linus Torvalds
71ba22fa73 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: (75 commits)
  Ethernet driver for EISA only SNI RM200/RM400 machines
  Extract chip specific code out of lasi_82596.c
  ehea: Whitespace cleanup
  pasemi_mac: Fix TX interrupt threshold
  spidernet: Replace literal with const
  r8169: perform RX config change after mac filtering
  r8169: mac address change support
  r8169: display some extra debug information during startup
  r8169: add endianess annotations to [RT]xDesc
  r8169: align the IP header when there is no DMA constraint
  r8169: add bit description for the TxPoll register
  r8169: cleanup
  r8169: remove the media option
  r8169: small 8101 comment
  r8169: confusion between hardware and IP header alignment
  r8169: merge with version 8.001.00 of Realtek's r8168 driver
  r8169: merge with version 6.001.00 of Realtek's r8169 driver
  r8169: prettify mac_version
  r8169: populate the hw_start handler for the 8110
  r8169: populate the hw_start handler for the 8168
  ...
2007-07-09 15:26:43 -07:00
Stefan Richter
7aa484815f firewire: fw-sbp2: fix DMA mapping of management ORBs
The CPU must not touch the buffer after it was DMA-mapped.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:49 +02:00
Stefan Richter
8526392ae8 firewire: fw-sbp2: fix DMA mapping of command ORBs
The CPU must not touch the buffer after it was DMA-mapped.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:48 +02:00
Stefan Richter
b4be016ad8 firewire: fw-sbp2: fix DMA mapping of S/G tables
- The CPU must not touch the buffer after it was DMA-mapped.
  - The size argument of dma_unmap_single(...page_table...) was bogus.
  - Move a comment closer to the code to which it refers to.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:48 +02:00
Stefan Richter
332ef3310b firewire: fw-sbp2: add a boundary check
Add rudimentary check for the case that the page table overflows due to
merging of s/g elements by the IOMMU.  This would have lead to
overwriting of arbitrary memory.

After this change I expect that an offending command will be
unsuccessfully retried until the scsi_device is taken offline by SCSI
core.  It's a border case and not worth to implement a recovery
strategy.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:47 +02:00
Stefan Richter
9fb2dd12c0 firewire: fw-sbp2: correctly align page tables
This is required per SBP-2 clause 5.2.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:47 +02:00
Stefan Richter
e7cdf237b2 firewire: fw-sbp2: memset wants string.h
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:47 +02:00
Stefan Richter
ffd0db26dd firewire: fw-sbp2: use correct speed in sbp2_agent_reset
noticed by Jay Fenlason

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:46 +02:00
Jay Fenlason
6f061487f7 firewire: fw-sbp2: correctly dereference by container_of
Replace a cast with a container_of().  As long as nobody reorders the
structure elements, they do the same thing, but container_of() is more
readable.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added complete_command_orb)
Acked-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:46 +02:00
Kristian Høgsberg
7ada60e367 firewire: Document userspace ioctl interface.
The isochronous packet format is still not documented, but this
is a good first step.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (format, wording)
2007-07-10 00:07:45 +02:00
Stefan Richter
5cd54c94b0 firewire: fw-sbp2: implement nonexclusive login
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:45 +02:00
Stefan Richter
79352e9f94 firewire: fw-sbp2: let SCSI shutdown commands through before logout
This affects of course only the "soft shutdown" case, e.g. "modprobe -r
firewire-sbp2", while it doesn't matter for hot unplug.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:44 +02:00
Stefan Richter
cf47c7a26c firewire: fw-sbp2: implement max sectors limit for some old bridges
This currently only affects one bridge in the hardwired blacklist.
I don't own one of those, hence haven't tested it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:44 +02:00
Stefan Richter
dae1a3aa8e firewire: simplify a struct type
cleanup after "firewire: support S100B...S400B and link slower than PHY"

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:44 +02:00
Stefan Richter
f139749001 firewire: support S100B...S400B and link slower than PHY
Use a speed probe to determine the speed over 1394b buses and of nodes
which report a link speed less than their PHY speed.

Log the effective maximum speed of newly created nodes in dmesg.

Also, read the config ROM (except bus info block) at the maximum speed
rather than S100.  This isn't a real optimization though because we
still only use quadlet read requests for the entire ROM.

The patch also adds support for S1600 and S3200, although such hardware
does not exist yet.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:43 +02:00
Stefan Richter
24d40125f1 firewire: optimize gap count with 1394b leaf nodes
Table-based gap count optimization cannot be used if 1394b repeater PHYs
are present.  But it does work with 1394b leaf nodes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-07-10 00:07:43 +02:00
Stefan Richter
25d83f583b firewire: remove unused macro
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:42 +02:00
Stefan Richter
8a8cea2734 firewire: missing newline in printk
Also remove some errno printouts which will be shown by infrastructure
code anyway.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:42 +02:00
Stefan Richter
b8f106570f firewire: fw-sbp2: remove unused struct member
cleanup after support of single-buffer requests was dropped

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
2007-07-10 00:07:42 +02:00
Stefan Richter
53c96b4174 ieee1394: remove old isochronous ABI
Based on patch "the scheduled removal of RAW1394_REQ_ISO_{SEND,LISTEN}"
from Adrian Bunk, November 20 2006.

This patch also removes the underlying facilities in ohci1394 and
disables them in pcilynx.  That is, hpsb_host_driver.devctl() and
hpsb_host_driver.transmit_packet() are no longer used for iso reception
and transmission.

Since video1394 and dv1394 only work with ohci1394 and raw1394's rawiso
interface has never been implemented in pcilynx, pcilynx is now no
longer useful for isochronous applications.

raw1394 will still handle the request types but will complete the
requests with errors that indicate API version conflicts.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:41 +02:00
Stefan Richter
77bba7aea7 ieee1394: sbp2: change some module parameters from int to bool
This is upwards compatible, except that integer values other than 0 or 1
are no longer accepted.  But values like "Y", "N", "no", "nnoooh!" work
now.

Also, improve a comment on the serialize_io parameter and make the
ORB_SET_EXCLUSIVE macro ultra-safe.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:41 +02:00
Stefan Richter
93f2e0259a ieee1394: first minimal NUMA awareness
Association of a host device with a node on NUMA machines optimizes
allocations of skbs given from the networking stack to eth1394.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:40 +02:00
Stefan Richter
8e4dc400b7 ieee1394: eth1394: revert parent device to that in 2.6.20
After ieee1394 was converted away from class_device like the networking
subsystem was already in 2.6.21, eth1394's device may point to the
fw-host device as its parent again like in 2.6.20.

This affects userspace tools which examine the sysfs representation of
eth1394's device.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:40 +02:00
Stefan Richter
a0e857eeff ieee1394: nodemgr: parallelize between several hosts
Remove the global nodemgr_serialize mutex which enclosed most of the
host thread event loop.  This allows for parallelism between several
host adapter cards.

Properly serialize the driver hooks .update(), .suspend(), .resume(),
and .remove() by means of device->sem.  These hooks can be called from
outside the host threads' contexts.

Get() and put() the device.driver when calling its hooks.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:39 +02:00
Kay Sievers
dd7f2928d8 ieee1394: convert ieee1394 from "struct class_device" to "struct device"
Here is a straightforward conversion to "struct device". The "struct
class_device" will be removed from the kernel.

It seems to work fine for me with and without CONFIG_SYSFS_DEPRECATED
set.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:39 +02:00
Stefan Richter
59337087cb ieee1394: raw1394: fix a 32/64-bits compat fix
I was told that only i386 aligns 64 bit integers at 4 bytes boundaries
while all other architectures (32 bit architectures with 64 bit
siblings) align it on 8 bytes boundaries.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:39 +02:00
Stefan Richter
19f00e66f8 ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel, amendment
Pointed out by Arnd Bergmann:  PPC32 aligns this at 64bit, IA32 packs
it.  A kernel-wide available __compat_u64 which is 4-byte aligned on
AMD64 and IA64 would be nicer though.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:38 +02:00
Petr Vandrovec
650c12c528 ieee1394: raw1394: Add ioctl() for 32bit userland on 64bit kernel
Add compat_ioctl.  Although all structures are more or less same,
raw1394_iso_packets got pointer inside, and raw1394_cycle_timer got unwanted
padding in the middle.  I did not add any translation for ioctls passing array
of integers around as integers seem to have same size (32 bits) on all
architectures supported by Linux.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
2007-07-10 00:07:38 +02:00
Petr Vandrovec
883b97eaf2 ieee1394: raw1394: Fix write() for 32bit userland on 64bit kernel
* write(fd, buf, 52) from 32bit app was returning 56.  Most of callers did not
  care, but some (arm registration) did, and anyway it looks bad if request for
  writing 52 bytes returns 56.  And returning sizeof anything in 'int' is not
  good as well.  So all functions now return '0' instead of
  sizeof(struct raw1394_request) on success, and write() itself provides correct
  return value (it just returns value it was asked to write on success as raw1394
  does not do any partial writes at all).

* Related to this was problem that write() could have returned 0 when kernel
  state would become corrupted and moved to different state than
  opened/initialized/connected.  Now it returns -EBADFD which seemed appropriate.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
2007-07-10 00:07:37 +02:00
Petr Vandrovec
ee9be42596 ieee1394: raw1394: Fix read() for 32bit userland on 64bit kernel
read() always failed with -EFAULT.  This was happening due to
raw1394_compat_read copying data to wrong location - access_ok always
failed as 'r' is kernel address, not user.  Whole function just tried to
copy data from 'r' to 'r', which is not good.

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Acked-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (split into 3 patches)
2007-07-10 00:07:37 +02:00
Stefan Richter
6552731a05 ieee1394: add comments in struct hpsb_packet
to clarify who is supposed to set what

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:36 +02:00
Stefan Richter
17a624869e ieee1394: ohci1394: remove dead CONFIG variable
spotted by Robert P. J. Day <rpjday@mindspring.com>

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-07-10 00:07:36 +02:00
Adrian Bunk
27a278aa43 drivers/ide/ide-dma.c: unexport ide_set_dma
ide_set_dma no longer has any modular user.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09 23:17:59 +02:00
Bartlomiej Zolnierkiewicz
bdab00b73d via82cxxx: backport short cables support from pata_via.c
Backport short cables support from pata_via.c.

This patch should allow UDMA > 2 modes on Acer Ferrari 3400.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-07-09 23:17:58 +02:00