Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91902
b: refs/heads/master
c: 38477ad
h: refs/heads/master
v: v3
  • Loading branch information
Hidetoshi Seto authored and Tony Luck committed Apr 22, 2008
1 parent b3cc32d commit c0c4443
Show file tree
Hide file tree
Showing 101 changed files with 2,516 additions and 4,223 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16abef0e9e79643827fd5a2a14a07bced851ae72
refs/heads/master: 38477ad75188b2a7370fef7145f956e6c446928b
1 change: 1 addition & 0 deletions trunk/arch/ia64/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ GLOBAL_ENTRY(ia64_trace_syscall)
br.call.sptk.many rp=syscall_trace_leave // give parent a chance to catch return value
.ret3:
(pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk
(pUStk) rsm psr.i // disable interrupts
br.cond.sptk .work_pending_syscall_end

strace_error:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/brd.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector)
#ifndef CONFIG_BLK_DEV_XIP
gfp_flags |= __GFP_HIGHMEM;
#endif
page = alloc_page(gfp_flags);
page = alloc_page(GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO);
if (!page)
return NULL;

Expand Down
19 changes: 7 additions & 12 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@

#ifdef CONFIG_HID_DEBUG
int hid_debug = 0;
module_param_named(debug, hid_debug, int, 0600);
MODULE_PARM_DESC(debug, "HID debugging (0=off, 1=probing info, 2=continuous data dumping)");
module_param_named(debug, hid_debug, bool, 0600);
MODULE_PARM_DESC(debug, "Turn HID debugging mode on and off");
EXPORT_SYMBOL_GPL(hid_debug);
#endif

Expand Down Expand Up @@ -97,7 +97,7 @@ static struct hid_field *hid_register_field(struct hid_report *report, unsigned
field->index = report->maxfield++;
report->field[field->index] = field;
field->usage = (struct hid_usage *)(field + 1);
field->value = (s32 *)(field->usage + usages);
field->value = (unsigned *)(field->usage + usages);
field->report = report;

return field;
Expand Down Expand Up @@ -830,8 +830,7 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field, s
* reporting to the layer).
*/

static void hid_input_field(struct hid_device *hid, struct hid_field *field,
__u8 *data, int interrupt)
void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt)
{
unsigned n;
unsigned count = field->report_count;
Expand Down Expand Up @@ -877,6 +876,7 @@ static void hid_input_field(struct hid_device *hid, struct hid_field *field,
exit:
kfree(value);
}
EXPORT_SYMBOL_GPL(hid_input_field);

/*
* Output the field into the report.
Expand Down Expand Up @@ -988,13 +988,8 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i

if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
hid->hiddev_report_event(hid, report);
if (hid->claimed & HID_CLAIMED_HIDRAW) {
/* numbered reports need to be passed with the report num */
if (report_enum->numbered)
hidraw_report_event(hid, data - 1, size + 1);
else
hidraw_report_event(hid, data, size);
}
if (hid->claimed & HID_CLAIMED_HIDRAW)
hidraw_report_event(hid, data, size);

for (n = 0; n < report->maxfield; n++)
hid_input_field(hid, report->field[n], data, interrupt);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/hid/hid-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ void hid_dump_device(struct hid_device *device) {
EXPORT_SYMBOL_GPL(hid_dump_device);

void hid_dump_input(struct hid_usage *usage, __s32 value) {
if (hid_debug < 2)
if (!hid_debug)
return;

printk(KERN_DEBUG "hid-debug: input ");
Expand Down
24 changes: 2 additions & 22 deletions trunk/drivers/hid/hid-input-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,21 +276,6 @@ static int quirk_btc_8193(struct hid_usage *usage, struct input_dev *input,
return 1;
}

static int quirk_sunplus_wdesktop(struct hid_usage *usage, struct input_dev *input,
unsigned long **bit, int *max)
{
if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER)
return 0;

switch (usage->hid & HID_USAGE) {
case 0x2003: map_key_clear(KEY_ZOOMIN); break;
case 0x2103: map_key_clear(KEY_ZOOMOUT); break;
default:
return 0;
}
return 1;
}

#define VENDOR_ID_BELKIN 0x1020
#define DEVICE_ID_BELKIN_WIRELESS_KEYBOARD 0x0006

Expand Down Expand Up @@ -321,9 +306,6 @@ static int quirk_sunplus_wdesktop(struct hid_usage *usage, struct input_dev *inp
#define VENDOR_ID_PETALYNX 0x18b1
#define DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037

#define VENDOR_ID_SUNPLUS 0x04fc
#define DEVICE_ID_SUNPLUS_WDESKTOP 0x05d8

static const struct hid_input_blacklist {
__u16 idVendor;
__u16 idProduct;
Expand All @@ -350,10 +332,8 @@ static const struct hid_input_blacklist {
{ VENDOR_ID_MONTEREY, DEVICE_ID_GENIUS_KB29E, quirk_cherry_genius_29e },

{ VENDOR_ID_PETALYNX, DEVICE_ID_PETALYNX_MAXTER_REMOTE, quirk_petalynx_remote },

{ VENDOR_ID_SUNPLUS, DEVICE_ID_SUNPLUS_WDESKTOP, quirk_sunplus_wdesktop },

{ 0, 0, NULL }

{ 0, 0, 0 }
};

int hidinput_mapping_quirks(struct hid_usage *usage,
Expand Down
12 changes: 2 additions & 10 deletions trunk/drivers/hid/usbhid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ config LOGITECH_FF
Note: if you say N here, this device will still be supported, but without
force feedback.

config LOGIRUMBLEPAD2_FF
bool "Logitech Rumblepad 2 support"
depends on HID_FF
select INPUT_FF_MEMLESS if USB_HID
help
Say Y here if you want to enable force feedback support for Logitech
Rumblepad 2 devices.

config PANTHERLORD_FF
bool "PantherLord/GreenAsia based device support"
depends on HID_FF
Expand All @@ -88,8 +80,8 @@ config PANTHERLORD_FF
or adapter and want to enable force feedback support for it.

config THRUSTMASTER_FF
bool "ThrustMaster devices support"
depends on HID_FF
bool "ThrustMaster devices support (EXPERIMENTAL)"
depends on HID_FF && EXPERIMENTAL
select INPUT_FF_MEMLESS if USB_HID
help
Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/hid/usbhid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ endif
ifeq ($(CONFIG_LOGITECH_FF),y)
usbhid-objs += hid-lgff.o
endif
ifeq ($(CONFIG_LOGIRUMBLEPAD2_FF),y)
usbhid-objs += hid-lg2ff.o
endif
ifeq ($(CONFIG_PANTHERLORD_FF),y)
usbhid-objs += hid-plff.o
endif
Expand Down
69 changes: 29 additions & 40 deletions trunk/drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ static int hid_start_in(struct hid_device *hid)

spin_lock_irqsave(&usbhid->inlock, flags);
if (hid->open > 0 && !test_bit(HID_SUSPENDED, &usbhid->iofl) &&
!test_bit(HID_DISCONNECTED, &usbhid->iofl) &&
!test_and_set_bit(HID_IN_RUNNING, &usbhid->iofl)) {
rc = usb_submit_urb(usbhid->urbin, GFP_ATOMIC);
if (rc != 0)
Expand Down Expand Up @@ -156,7 +155,7 @@ static void hid_io_error(struct hid_device *hid)
spin_lock_irqsave(&usbhid->inlock, flags);

/* Stop when disconnected */
if (test_bit(HID_DISCONNECTED, &usbhid->iofl))
if (usb_get_intfdata(usbhid->intf) == NULL)
goto done;

/* If it has been a while since the last error, we'll assume
Expand Down Expand Up @@ -342,15 +341,15 @@ static void hid_irq_out(struct urb *urb)
if (usbhid->outhead != usbhid->outtail) {
if (hid_submit_out(hid)) {
clear_bit(HID_OUT_RUNNING, &usbhid->iofl);
wake_up(&usbhid->wait);
wake_up(&hid->wait);
}
spin_unlock_irqrestore(&usbhid->outlock, flags);
return;
}

clear_bit(HID_OUT_RUNNING, &usbhid->iofl);
spin_unlock_irqrestore(&usbhid->outlock, flags);
wake_up(&usbhid->wait);
wake_up(&hid->wait);
}

/*
Expand Down Expand Up @@ -392,15 +391,15 @@ static void hid_ctrl(struct urb *urb)
if (usbhid->ctrlhead != usbhid->ctrltail) {
if (hid_submit_ctrl(hid)) {
clear_bit(HID_CTRL_RUNNING, &usbhid->iofl);
wake_up(&usbhid->wait);
wake_up(&hid->wait);
}
spin_unlock_irqrestore(&usbhid->ctrllock, flags);
return;
}

clear_bit(HID_CTRL_RUNNING, &usbhid->iofl);
spin_unlock_irqrestore(&usbhid->ctrllock, flags);
wake_up(&usbhid->wait);
wake_up(&hid->wait);
}

void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, unsigned char dir)
Expand Down Expand Up @@ -479,9 +478,8 @@ int usbhid_wait_io(struct hid_device *hid)
{
struct usbhid_device *usbhid = hid->driver_data;

if (!wait_event_timeout(usbhid->wait,
(!test_bit(HID_CTRL_RUNNING, &usbhid->iofl) &&
!test_bit(HID_OUT_RUNNING, &usbhid->iofl)),
if (!wait_event_timeout(hid->wait, (!test_bit(HID_CTRL_RUNNING, &usbhid->iofl) &&
!test_bit(HID_OUT_RUNNING, &usbhid->iofl)),
10*HZ)) {
dbg_hid("timeout waiting for ctrl or out queue to clear\n");
return -1;
Expand Down Expand Up @@ -612,11 +610,10 @@ static void usbhid_set_leds(struct hid_device *hid)
/*
* Traverse the supplied list of reports and find the longest
*/
static void hid_find_max_report(struct hid_device *hid, unsigned int type,
unsigned int *max)
static void hid_find_max_report(struct hid_device *hid, unsigned int type, int *max)
{
struct hid_report *report;
unsigned int size;
int size;

list_for_each_entry(report, &hid->report_enum[type].report_list, list) {
size = ((report->size - 1) >> 3) + 1;
Expand Down Expand Up @@ -708,9 +705,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
struct hid_descriptor *hdesc;
struct hid_device *hid;
u32 quirks = 0;
unsigned int insize = 0, rsize = 0;
unsigned rsize = 0;
char *rdesc;
int n, len;
int n, len, insize = 0;
struct usbhid_device *usbhid;

quirks = usbhid_lookup_quirk(le16_to_cpu(dev->descriptor.idVendor),
Expand Down Expand Up @@ -803,22 +800,6 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
goto fail;
}

hid->name[0] = 0;

if (dev->manufacturer)
strlcpy(hid->name, dev->manufacturer, sizeof(hid->name));

if (dev->product) {
if (dev->manufacturer)
strlcat(hid->name, " ", sizeof(hid->name));
strlcat(hid->name, dev->product, sizeof(hid->name));
}

if (!strlen(hid->name))
snprintf(hid->name, sizeof(hid->name), "HID %04x:%04x",
le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct));

for (n = 0; n < interface->desc.bNumEndpoints; n++) {

struct usb_endpoint_descriptor *endpoint;
Expand All @@ -831,14 +812,6 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)

interval = endpoint->bInterval;

/* Some vendors give fullspeed interval on highspeed devides */
if (quirks & HID_QUIRK_FULLSPEED_INTERVAL &&
dev->speed == USB_SPEED_HIGH) {
interval = fls(endpoint->bInterval*8);
printk(KERN_INFO "%s: Fixing fullspeed to highspeed interval: %d -> %d\n",
hid->name, endpoint->bInterval, interval);
}

/* Change the polling interval of mice. */
if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0)
interval = hid_mousepoll_interval;
Expand Down Expand Up @@ -871,7 +844,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
goto fail;
}

init_waitqueue_head(&usbhid->wait);
init_waitqueue_head(&hid->wait);

INIT_WORK(&usbhid->reset_work, hid_reset);
setup_timer(&usbhid->io_retry, hid_retry_timeout, (unsigned long) hid);

Expand All @@ -885,6 +859,22 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
usbhid->intf = intf;
usbhid->ifnum = interface->desc.bInterfaceNumber;

hid->name[0] = 0;

if (dev->manufacturer)
strlcpy(hid->name, dev->manufacturer, sizeof(hid->name));

if (dev->product) {
if (dev->manufacturer)
strlcat(hid->name, " ", sizeof(hid->name));
strlcat(hid->name, dev->product, sizeof(hid->name));
}

if (!strlen(hid->name))
snprintf(hid->name, sizeof(hid->name), "HID %04x:%04x",
le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct));

hid->bus = BUS_USB;
hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
hid->product = le16_to_cpu(dev->descriptor.idProduct);
Expand Down Expand Up @@ -942,7 +932,6 @@ static void hid_disconnect(struct usb_interface *intf)

spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
usb_set_intfdata(intf, NULL);
set_bit(HID_DISCONNECTED, &usbhid->iofl);
spin_unlock_irq(&usbhid->inlock);
usb_kill_urb(usbhid->urbin);
usb_kill_urb(usbhid->urbout);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/hid/usbhid/hid-ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ static struct hid_ff_initializer inits[] = {
{ 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */
{ 0x46d, 0xca03, hid_lgff_init }, /* Logitech MOMO force wheel */
#endif
#ifdef CONFIG_LOGIRUMBLEPAD2_FF
{ 0x46d, 0xc218, hid_lg2ff_init }, /* Logitech Rumblepad 2 */
#endif
#ifdef CONFIG_PANTHERLORD_FF
{ 0x810, 0x0001, hid_plff_init }, /* "Twin USB Joystick" */
{ 0xe8f, 0x0003, hid_plff_init }, /* "GreenAsia Inc. USB Joystick " */
Expand Down
Loading

0 comments on commit c0c4443

Please sign in to comment.