From c1a9d362df86619b0e2cf1a93fd0e67a6df867be Mon Sep 17 00:00:00 2001 From: Toshiyuki Okajima Date: Fri, 30 Apr 2010 14:32:13 +0100 Subject: [PATCH] --- yaml --- r: 190619 b: refs/heads/master c: cea7daa3589d6b550546a8c8963599f7c1a3ae5c h: refs/heads/master i: 190617: b21c3a369b6f3474fc5c7ef57603b40e99da113b 190615: 561c9c6991dd365750b02b6b4283fe727f33a850 v: v3 --- [refs] | 2 +- trunk/Documentation/input/elantech.txt | 8 +- trunk/crypto/async_tx/async_raid6_recov.c | 21 ++--- trunk/drivers/input/joydev.c | 18 ---- trunk/drivers/input/misc/ati_remote.c | 14 ++- trunk/drivers/input/mouse/alps.c | 1 + trunk/drivers/input/mouse/elantech.c | 84 ++++++----------- trunk/drivers/input/mouse/psmouse-base.c | 18 +--- trunk/drivers/input/mouse/psmouse.h | 1 - trunk/drivers/input/mouse/synaptics.c | 35 ++------ trunk/drivers/input/mouse/synaptics.h | 4 - trunk/drivers/input/touchscreen/eeti_ts.c | 56 +++--------- trunk/drivers/net/arm/ep93xx_eth.c | 10 +-- trunk/drivers/net/e1000e/netdev.c | 3 - trunk/drivers/net/fec.c | 2 +- trunk/drivers/net/phy/Kconfig | 5 -- trunk/drivers/net/phy/Makefile | 1 - trunk/drivers/net/phy/micrel.c | 104 ---------------------- trunk/drivers/net/ppp_generic.c | 34 +++---- trunk/drivers/net/r8169.c | 22 ++--- trunk/drivers/net/sb1250-mac.c | 67 +++++++------- trunk/drivers/net/usb/Kconfig | 1 + trunk/drivers/net/usb/dm9601.c | 2 +- trunk/drivers/net/usb/sierra_net.c | 3 - trunk/drivers/net/wireless/p54/p54pci.c | 2 +- trunk/include/net/sctp/structs.h | 1 - trunk/include/net/sock.h | 2 +- trunk/kernel/workqueue.c | 2 +- trunk/net/ipv6/af_inet6.c | 2 +- trunk/net/sctp/sm_make_chunk.c | 62 ++----------- trunk/security/keys/keyring.c | 18 ++-- trunk/sound/core/timer.c | 5 +- trunk/sound/isa/sb/es968.c | 2 +- trunk/sound/pci/hda/patch_cirrus.c | 2 +- trunk/sound/pci/hda/patch_conexant.c | 8 +- 35 files changed, 148 insertions(+), 474 deletions(-) delete mode 100644 trunk/drivers/net/phy/micrel.c diff --git a/[refs] b/[refs] index 7666e00ff436..4d826c45bec1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8777c793d6a24c7f3adf52b1b1086e9706de4589 +refs/heads/master: cea7daa3589d6b550546a8c8963599f7c1a3ae5c diff --git a/trunk/Documentation/input/elantech.txt b/trunk/Documentation/input/elantech.txt index 56941ae1f5db..a10c3b6ba7c4 100644 --- a/trunk/Documentation/input/elantech.txt +++ b/trunk/Documentation/input/elantech.txt @@ -333,14 +333,14 @@ byte 0: byte 1: bit 7 6 5 4 3 2 1 0 - . . . . . x10 x9 x8 + x15 x14 x13 x12 x11 x10 x9 x8 byte 2: bit 7 6 5 4 3 2 1 0 x7 x6 x5 x4 x4 x2 x1 x0 - x10..x0 = absolute x value (horizontal) + x15..x0 = absolute x value (horizontal) byte 3: @@ -350,14 +350,14 @@ byte 3: byte 4: bit 7 6 5 4 3 2 1 0 - . . . . . . y9 y8 + y15 y14 y13 y12 y11 y10 y8 y8 byte 5: bit 7 6 5 4 3 2 1 0 y7 y6 y5 y4 y3 y2 y1 y0 - y9..y0 = absolute y value (vertical) + y15..y0 = absolute y value (vertical) 4.2.2 Two finger touch diff --git a/trunk/crypto/async_tx/async_raid6_recov.c b/trunk/crypto/async_tx/async_raid6_recov.c index ce038d861eb9..943f2abac9b4 100644 --- a/trunk/crypto/async_tx/async_raid6_recov.c +++ b/trunk/crypto/async_tx/async_raid6_recov.c @@ -324,7 +324,6 @@ struct dma_async_tx_descriptor * async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, struct page **blocks, struct async_submit_ctl *submit) { - void *scribble = submit->scribble; int non_zero_srcs, i; BUG_ON(faila == failb); @@ -333,13 +332,11 @@ async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb, pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); - /* if a dma resource is not available or a scribble buffer is not - * available punt to the synchronous path. In the 'dma not - * available' case be sure to use the scribble buffer to - * preserve the content of 'blocks' as the caller intended. + /* we need to preserve the contents of 'blocks' for the async + * case, so punt to synchronous if a scribble buffer is not available */ - if (!async_dma_find_channel(DMA_PQ) || !scribble) { - void **ptrs = scribble ? scribble : (void **) blocks; + if (!submit->scribble) { + void **ptrs = (void **) blocks; async_tx_quiesce(&submit->depend_tx); for (i = 0; i < disks; i++) @@ -409,13 +406,11 @@ async_raid6_datap_recov(int disks, size_t bytes, int faila, pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes); - /* if a dma resource is not available or a scribble buffer is not - * available punt to the synchronous path. In the 'dma not - * available' case be sure to use the scribble buffer to - * preserve the content of 'blocks' as the caller intended. + /* we need to preserve the contents of 'blocks' for the async + * case, so punt to synchronous if a scribble buffer is not available */ - if (!async_dma_find_channel(DMA_PQ) || !scribble) { - void **ptrs = scribble ? scribble : (void **) blocks; + if (!scribble) { + void **ptrs = (void **) blocks; async_tx_quiesce(&submit->depend_tx); for (i = 0; i < disks; i++) diff --git a/trunk/drivers/input/joydev.c b/trunk/drivers/input/joydev.c index 423e0e6031ab..c52bec4d0530 100644 --- a/trunk/drivers/input/joydev.c +++ b/trunk/drivers/input/joydev.c @@ -929,24 +929,6 @@ static const struct input_device_id joydev_ids[] = { .evbit = { BIT_MASK(EV_ABS) }, .absbit = { BIT_MASK(ABS_THROTTLE) }, }, - { - .flags = INPUT_DEVICE_ID_MATCH_EVBIT | - INPUT_DEVICE_ID_MATCH_KEYBIT, - .evbit = { BIT_MASK(EV_KEY) }, - .keybit = {[BIT_WORD(BTN_JOYSTICK)] = BIT_MASK(BTN_JOYSTICK) }, - }, - { - .flags = INPUT_DEVICE_ID_MATCH_EVBIT | - INPUT_DEVICE_ID_MATCH_KEYBIT, - .evbit = { BIT_MASK(EV_KEY) }, - .keybit = { [BIT_WORD(BTN_GAMEPAD)] = BIT_MASK(BTN_GAMEPAD) }, - }, - { - .flags = INPUT_DEVICE_ID_MATCH_EVBIT | - INPUT_DEVICE_ID_MATCH_KEYBIT, - .evbit = { BIT_MASK(EV_KEY) }, - .keybit = { [BIT_WORD(BTN_TRIGGER_HAPPY)] = BIT_MASK(BTN_TRIGGER_HAPPY) }, - }, { } /* Terminating entry */ }; diff --git a/trunk/drivers/input/misc/ati_remote.c b/trunk/drivers/input/misc/ati_remote.c index e8bbc619f6df..614b65d78fe9 100644 --- a/trunk/drivers/input/misc/ati_remote.c +++ b/trunk/drivers/input/misc/ati_remote.c @@ -98,12 +98,10 @@ * Module and Version Information, Module Parameters */ -#define ATI_REMOTE_VENDOR_ID 0x0bc7 -#define LOLA_REMOTE_PRODUCT_ID 0x0002 -#define LOLA2_REMOTE_PRODUCT_ID 0x0003 -#define ATI_REMOTE_PRODUCT_ID 0x0004 -#define NVIDIA_REMOTE_PRODUCT_ID 0x0005 -#define MEDION_REMOTE_PRODUCT_ID 0x0006 +#define ATI_REMOTE_VENDOR_ID 0x0bc7 +#define ATI_REMOTE_PRODUCT_ID 0x004 +#define LOLA_REMOTE_PRODUCT_ID 0x002 +#define MEDION_REMOTE_PRODUCT_ID 0x006 #define DRIVER_VERSION "2.2.1" #define DRIVER_AUTHOR "Torrey Hoffman " @@ -144,10 +142,8 @@ MODULE_PARM_DESC(repeat_delay, "Delay before sending repeats, default = 500 msec #define err(format, arg...) printk(KERN_ERR format , ## arg) static struct usb_device_id ati_remote_table[] = { - { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) }, - { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA2_REMOTE_PRODUCT_ID) }, { USB_DEVICE(ATI_REMOTE_VENDOR_ID, ATI_REMOTE_PRODUCT_ID) }, - { USB_DEVICE(ATI_REMOTE_VENDOR_ID, NVIDIA_REMOTE_PRODUCT_ID) }, + { USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) }, { USB_DEVICE(ATI_REMOTE_VENDOR_ID, MEDION_REMOTE_PRODUCT_ID) }, {} /* Terminating entry */ }; diff --git a/trunk/drivers/input/mouse/alps.c b/trunk/drivers/input/mouse/alps.c index 99d58764ef03..0d22cb9ce42e 100644 --- a/trunk/drivers/input/mouse/alps.c +++ b/trunk/drivers/input/mouse/alps.c @@ -64,6 +64,7 @@ static const struct alps_model_info alps_model_data[] = { { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ + { { 0x73, 0x02, 0x64 }, 0xf8, 0xf8, 0 }, /* HP Pavilion dm3 */ { { 0x52, 0x01, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ }; diff --git a/trunk/drivers/input/mouse/elantech.c b/trunk/drivers/input/mouse/elantech.c index 0520c2e19927..a138b5da79f9 100644 --- a/trunk/drivers/input/mouse/elantech.c +++ b/trunk/drivers/input/mouse/elantech.c @@ -25,10 +25,6 @@ printk(KERN_DEBUG format, ##arg); \ } while (0) -static bool force_elantech; -module_param_named(force_elantech, force_elantech, bool, 0644); -MODULE_PARM_DESC(force_elantech, "Force the Elantech PS/2 protocol extension to be used, 1 = enabled, 0 = disabled (default)."); - /* * Send a Synaptics style sliced query command */ @@ -186,17 +182,13 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) static int old_fingers; if (etd->fw_version_maj == 0x01) { - /* - * byte 0: D U p1 p2 1 p3 R L - * byte 1: f 0 th tw x9 x8 y9 y8 - */ + /* byte 0: D U p1 p2 1 p3 R L + byte 1: f 0 th tw x9 x8 y9 y8 */ fingers = ((packet[1] & 0x80) >> 7) + ((packet[1] & 0x30) >> 4); } else { - /* - * byte 0: n1 n0 p2 p1 1 p3 R L - * byte 1: 0 0 0 0 x9 x8 y9 y8 - */ + /* byte 0: n1 n0 p2 p1 1 p3 R L + byte 1: 0 0 0 0 x9 x8 y9 y8 */ fingers = (packet[0] & 0xc0) >> 6; } @@ -210,15 +202,13 @@ static void elantech_report_absolute_v1(struct psmouse *psmouse) input_report_key(dev, BTN_TOUCH, fingers != 0); - /* - * byte 2: x7 x6 x5 x4 x3 x2 x1 x0 - * byte 3: y7 y6 y5 y4 y3 y2 y1 y0 - */ + /* byte 2: x7 x6 x5 x4 x3 x2 x1 x0 + byte 3: y7 y6 y5 y4 y3 y2 y1 y0 */ if (fingers) { input_report_abs(dev, ABS_X, ((packet[1] & 0x0c) << 6) | packet[2]); - input_report_abs(dev, ABS_Y, - ETP_YMAX_V1 - (((packet[1] & 0x03) << 8) | packet[3])); + input_report_abs(dev, ABS_Y, ETP_YMAX_V1 - + (((packet[1] & 0x03) << 8) | packet[3])); } input_report_key(dev, BTN_TOOL_FINGER, fingers == 1); @@ -257,47 +247,34 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse) switch (fingers) { case 1: - /* - * byte 1: . . . . . x10 x9 x8 - * byte 2: x7 x6 x5 x4 x4 x2 x1 x0 - */ - input_report_abs(dev, ABS_X, - ((packet[1] & 0x07) << 8) | packet[2]); - /* - * byte 4: . . . . . . y9 y8 - * byte 5: y7 y6 y5 y4 y3 y2 y1 y0 - */ - input_report_abs(dev, ABS_Y, - ETP_YMAX_V2 - (((packet[4] & 0x03) << 8) | packet[5])); + /* byte 1: x15 x14 x13 x12 x11 x10 x9 x8 + byte 2: x7 x6 x5 x4 x4 x2 x1 x0 */ + input_report_abs(dev, ABS_X, (packet[1] << 8) | packet[2]); + /* byte 4: y15 y14 y13 y12 y11 y10 y8 y8 + byte 5: y7 y6 y5 y4 y3 y2 y1 y0 */ + input_report_abs(dev, ABS_Y, ETP_YMAX_V2 - + ((packet[4] << 8) | packet[5])); break; case 2: - /* - * The coordinate of each finger is reported separately - * with a lower resolution for two finger touches: - * byte 0: . . ay8 ax8 . . . . - * byte 1: ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 - */ + /* The coordinate of each finger is reported separately with + a lower resolution for two finger touches */ + /* byte 0: . . ay8 ax8 . . . . + byte 1: ax7 ax6 ax5 ax4 ax3 ax2 ax1 ax0 */ x1 = ((packet[0] & 0x10) << 4) | packet[1]; /* byte 2: ay7 ay6 ay5 ay4 ay3 ay2 ay1 ay0 */ y1 = ETP_2FT_YMAX - (((packet[0] & 0x20) << 3) | packet[2]); - /* - * byte 3: . . by8 bx8 . . . . - * byte 4: bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 - */ + /* byte 3: . . by8 bx8 . . . . + byte 4: bx7 bx6 bx5 bx4 bx3 bx2 bx1 bx0 */ x2 = ((packet[3] & 0x10) << 4) | packet[4]; /* byte 5: by7 by8 by5 by4 by3 by2 by1 by0 */ y2 = ETP_2FT_YMAX - (((packet[3] & 0x20) << 3) | packet[5]); - /* - * For compatibility with the X Synaptics driver scale up - * one coordinate and report as ordinary mouse movent - */ + /* For compatibility with the X Synaptics driver scale up one + coordinate and report as ordinary mouse movent */ input_report_abs(dev, ABS_X, x1 << 2); input_report_abs(dev, ABS_Y, y1 << 2); - /* - * For compatibility with the proprietary X Elantech driver - * report both coordinates as hat coordinates - */ + /* For compatibility with the proprietary X Elantech driver + report both coordinates as hat coordinates */ input_report_abs(dev, ABS_HAT0X, x1); input_report_abs(dev, ABS_HAT0Y, y1); input_report_abs(dev, ABS_HAT1X, x2); @@ -619,12 +596,8 @@ int elantech_detect(struct psmouse *psmouse, bool set_properties) param[0], param[1], param[2]); if (param[0] == 0 || param[1] != 0) { - if (!force_elantech) { - pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); - return -1; - } - - pr_debug("elantech.c: Probably not a real Elantech touchpad. Enabling anyway due to force_elantech.\n"); + pr_debug("elantech.c: Probably not a real Elantech touchpad. Aborting.\n"); + return -1; } if (set_properties) { @@ -693,8 +666,7 @@ int elantech_init(struct psmouse *psmouse) * Assume every version greater than this is new EeePC style * hardware with 6 byte packets */ - if ((etd->fw_version_maj == 0x02 && etd->fw_version_min >= 0x30) || - etd->fw_version_maj > 0x02) { + if (etd->fw_version_maj >= 0x02 && etd->fw_version_min >= 0x30) { etd->hw_version = 2; /* For now show extra debug information */ etd->debug = 1; diff --git a/trunk/drivers/input/mouse/psmouse-base.c b/trunk/drivers/input/mouse/psmouse-base.c index cbc807264940..d8c0c8d6992c 100644 --- a/trunk/drivers/input/mouse/psmouse-base.c +++ b/trunk/drivers/input/mouse/psmouse-base.c @@ -110,7 +110,6 @@ static struct workqueue_struct *kpsmoused_wq; struct psmouse_protocol { enum psmouse_type type; bool maxproto; - bool ignore_parity; /* Protocol should ignore parity errors from KBC */ const char *name; const char *alias; int (*detect)(struct psmouse *, bool); @@ -289,9 +288,7 @@ static irqreturn_t psmouse_interrupt(struct serio *serio, if (psmouse->state == PSMOUSE_IGNORE) goto out; - if (unlikely((flags & SERIO_TIMEOUT) || - ((flags & SERIO_PARITY) && !psmouse->ignore_parity))) { - + if (flags & (SERIO_PARITY|SERIO_TIMEOUT)) { if (psmouse->state == PSMOUSE_ACTIVATED) printk(KERN_WARNING "psmouse.c: bad data from KBC -%s%s\n", flags & SERIO_TIMEOUT ? " timeout" : "", @@ -762,7 +759,6 @@ static const struct psmouse_protocol psmouse_protocols[] = { .name = "PS/2", .alias = "bare", .maxproto = true, - .ignore_parity = true, .detect = ps2bare_detect, }, #ifdef CONFIG_MOUSE_PS2_LOGIPS2PP @@ -790,7 +786,6 @@ static const struct psmouse_protocol psmouse_protocols[] = { .name = "ImPS/2", .alias = "imps", .maxproto = true, - .ignore_parity = true, .detect = intellimouse_detect, }, { @@ -798,7 +793,6 @@ static const struct psmouse_protocol psmouse_protocols[] = { .name = "ImExPS/2", .alias = "exps", .maxproto = true, - .ignore_parity = true, .detect = im_explorer_detect, }, #ifdef CONFIG_MOUSE_PS2_SYNAPTICS @@ -1228,7 +1222,6 @@ static void psmouse_disconnect(struct serio *serio) static int psmouse_switch_protocol(struct psmouse *psmouse, const struct psmouse_protocol *proto) { - const struct psmouse_protocol *selected_proto; struct input_dev *input_dev = psmouse->dev; input_dev->dev.parent = &psmouse->ps2dev.serio->dev; @@ -1252,14 +1245,9 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, return -1; psmouse->type = proto->type; - selected_proto = proto; - } else { + } else psmouse->type = psmouse_extensions(psmouse, psmouse_max_proto, true); - selected_proto = psmouse_protocol_by_type(psmouse->type); - } - - psmouse->ignore_parity = selected_proto->ignore_parity; /* * If mouse's packet size is 3 there is no point in polling the @@ -1279,7 +1267,7 @@ static int psmouse_switch_protocol(struct psmouse *psmouse, psmouse->resync_time = 0; snprintf(psmouse->devname, sizeof(psmouse->devname), "%s %s %s", - selected_proto->name, psmouse->vendor, psmouse->name); + psmouse_protocol_by_type(psmouse->type)->name, psmouse->vendor, psmouse->name); input_dev->name = psmouse->devname; input_dev->phys = psmouse->phys; diff --git a/trunk/drivers/input/mouse/psmouse.h b/trunk/drivers/input/mouse/psmouse.h index 593e910bfc7a..e053bdd137ff 100644 --- a/trunk/drivers/input/mouse/psmouse.h +++ b/trunk/drivers/input/mouse/psmouse.h @@ -47,7 +47,6 @@ struct psmouse { unsigned char pktcnt; unsigned char pktsize; unsigned char type; - bool ignore_parity; bool acks_disable_command; unsigned int model; unsigned long last; diff --git a/trunk/drivers/input/mouse/synaptics.c b/trunk/drivers/input/mouse/synaptics.c index ebd7a99efeae..026df6010161 100644 --- a/trunk/drivers/input/mouse/synaptics.c +++ b/trunk/drivers/input/mouse/synaptics.c @@ -137,8 +137,7 @@ static int synaptics_capability(struct psmouse *psmouse) if (synaptics_send_cmd(psmouse, SYN_QUE_CAPABILITIES, cap)) return -1; priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; - priv->ext_cap = priv->ext_cap_0c = 0; - + priv->ext_cap = 0; if (!SYN_CAP_VALID(priv->capabilities)) return -1; @@ -151,7 +150,7 @@ static int synaptics_capability(struct psmouse *psmouse) if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 1) { if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB, cap)) { printk(KERN_ERR "Synaptics claims to have extended capabilities," - " but I'm not able to read them.\n"); + " but I'm not able to read them."); } else { priv->ext_cap = (cap[0] << 16) | (cap[1] << 8) | cap[2]; @@ -163,16 +162,6 @@ static int synaptics_capability(struct psmouse *psmouse) priv->ext_cap &= 0xff0fff; } } - - if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 4) { - if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_CAPAB_0C, cap)) { - printk(KERN_ERR "Synaptics claims to have extended capability 0x0c," - " but I'm not able to read it.\n"); - } else { - priv->ext_cap_0c = (cap[0] << 16) | (cap[1] << 8) | cap[2]; - } - } - return 0; } @@ -359,15 +348,7 @@ static void synaptics_parse_hw_state(unsigned char buf[], struct synaptics_data hw->left = (buf[0] & 0x01) ? 1 : 0; hw->right = (buf[0] & 0x02) ? 1 : 0; - if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { - /* - * Clickpad's button is transmitted as middle button, - * however, since it is primary button, we will report - * it as BTN_LEFT. - */ - hw->left = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; - - } else if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) { + if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities)) { hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; if (hw->w == 2) hw->scroll = (signed char)(buf[1]); @@ -612,12 +593,6 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv) dev->absres[ABS_X] = priv->x_res; dev->absres[ABS_Y] = priv->y_res; - - if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { - /* Clickpads report only left button */ - __clear_bit(BTN_RIGHT, dev->keybit); - __clear_bit(BTN_MIDDLE, dev->keybit); - } } static void synaptics_disconnect(struct psmouse *psmouse) @@ -722,10 +697,10 @@ int synaptics_init(struct psmouse *psmouse) priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; - printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx/%#lx\n", + printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx\n", SYN_ID_MODEL(priv->identity), SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity), - priv->model_id, priv->capabilities, priv->ext_cap, priv->ext_cap_0c); + priv->model_id, priv->capabilities, priv->ext_cap); set_input_params(psmouse->dev, priv); diff --git a/trunk/drivers/input/mouse/synaptics.h b/trunk/drivers/input/mouse/synaptics.h index ae37c5d162a4..f0f40a331dc8 100644 --- a/trunk/drivers/input/mouse/synaptics.h +++ b/trunk/drivers/input/mouse/synaptics.h @@ -18,7 +18,6 @@ #define SYN_QUE_SERIAL_NUMBER_SUFFIX 0x07 #define SYN_QUE_RESOLUTION 0x08 #define SYN_QUE_EXT_CAPAB 0x09 -#define SYN_QUE_EXT_CAPAB_0C 0x0c /* synatics modes */ #define SYN_BIT_ABSOLUTE_MODE (1 << 7) @@ -49,8 +48,6 @@ #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) -#define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) -#define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100100) /* synaptics modes query bits */ #define SYN_MODE_ABSOLUTE(m) ((m) & (1 << 7)) @@ -99,7 +96,6 @@ struct synaptics_data { unsigned long int model_id; /* Model-ID */ unsigned long int capabilities; /* Capabilities */ unsigned long int ext_cap; /* Extended Capabilities */ - unsigned long int ext_cap_0c; /* Ext Caps from 0x0c query */ unsigned long int identity; /* Identification */ int x_res; /* X resolution in units/mm */ int y_res; /* Y resolution in units/mm */ diff --git a/trunk/drivers/input/touchscreen/eeti_ts.c b/trunk/drivers/input/touchscreen/eeti_ts.c index 75f8b73010fa..204b8a1a601c 100644 --- a/trunk/drivers/input/touchscreen/eeti_ts.c +++ b/trunk/drivers/input/touchscreen/eeti_ts.c @@ -124,25 +124,14 @@ static irqreturn_t eeti_ts_isr(int irq, void *dev_id) return IRQ_HANDLED; } -static void eeti_ts_start(struct eeti_ts_priv *priv) +static int eeti_ts_open(struct input_dev *dev) { + struct eeti_ts_priv *priv = input_get_drvdata(dev); + enable_irq(priv->irq); /* Read the events once to arm the IRQ */ eeti_ts_read(&priv->work); -} - -static void eeti_ts_stop(struct eeti_ts_priv *priv) -{ - disable_irq(priv->irq); - cancel_work_sync(&priv->work); -} - -static int eeti_ts_open(struct input_dev *dev) -{ - struct eeti_ts_priv *priv = input_get_drvdata(dev); - - eeti_ts_start(priv); return 0; } @@ -151,7 +140,8 @@ static void eeti_ts_close(struct input_dev *dev) { struct eeti_ts_priv *priv = input_get_drvdata(dev); - eeti_ts_stop(priv); + disable_irq(priv->irq); + cancel_work_sync(&priv->work); } static int __devinit eeti_ts_probe(struct i2c_client *client, @@ -163,12 +153,10 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, unsigned int irq_flags; int err = -ENOMEM; - /* - * In contrast to what's described in the datasheet, there seems + /* In contrast to what's described in the datasheet, there seems * to be no way of probing the presence of that device using I2C * commands. So we need to blindly believe it is there, and wait - * for interrupts to occur. - */ + * for interrupts to occur. */ priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) { @@ -224,11 +212,9 @@ static int __devinit eeti_ts_probe(struct i2c_client *client, goto err2; } - /* - * Disable the device for now. It will be enabled once the - * input device is opened. - */ - eeti_ts_stop(priv); + /* Disable the irq for now. It will be enabled once the input device + * is opened. */ + disable_irq(priv->irq); device_init_wakeup(&client->dev, 0); return 0; @@ -249,12 +235,6 @@ static int __devexit eeti_ts_remove(struct i2c_client *client) struct eeti_ts_priv *priv = i2c_get_clientdata(client); free_irq(priv->irq, priv); - /* - * eeti_ts_stop() leaves IRQ disabled. We need to re-enable it - * so that device still works if we reload the driver. - */ - enable_irq(priv->irq); - input_unregister_device(priv->input); i2c_set_clientdata(client, NULL); kfree(priv); @@ -266,14 +246,6 @@ static int __devexit eeti_ts_remove(struct i2c_client *client) static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) { struct eeti_ts_priv *priv = i2c_get_clientdata(client); - struct input_dev *input_dev = priv->input; - - mutex_lock(&input_dev->mutex); - - if (input_dev->users) - eeti_ts_stop(priv); - - mutex_unlock(&input_dev->mutex); if (device_may_wakeup(&client->dev)) enable_irq_wake(priv->irq); @@ -284,18 +256,10 @@ static int eeti_ts_suspend(struct i2c_client *client, pm_message_t mesg) static int eeti_ts_resume(struct i2c_client *client) { struct eeti_ts_priv *priv = i2c_get_clientdata(client); - struct input_dev *input_dev = priv->input; if (device_may_wakeup(&client->dev)) disable_irq_wake(priv->irq); - mutex_lock(&input_dev->mutex); - - if (input_dev->users) - eeti_ts_start(priv); - - mutex_unlock(&input_dev->mutex); - return 0; } #else diff --git a/trunk/drivers/net/arm/ep93xx_eth.c b/trunk/drivers/net/arm/ep93xx_eth.c index cd17d09f385c..6995169d285a 100644 --- a/trunk/drivers/net/arm/ep93xx_eth.c +++ b/trunk/drivers/net/arm/ep93xx_eth.c @@ -311,6 +311,11 @@ static int ep93xx_rx(struct net_device *dev, int processed, int budget) processed++; } + if (processed) { + wrw(ep, REG_RXDENQ, processed); + wrw(ep, REG_RXSTSENQ, processed); + } + return processed; } @@ -345,11 +350,6 @@ static int ep93xx_poll(struct napi_struct *napi, int budget) goto poll_some_more; } - if (rx) { - wrw(ep, REG_RXDENQ, rx); - wrw(ep, REG_RXSTSENQ, rx); - } - return rx; } diff --git a/trunk/drivers/net/e1000e/netdev.c b/trunk/drivers/net/e1000e/netdev.c index dbf81788bb40..fb8fc7d1b50d 100644 --- a/trunk/drivers/net/e1000e/netdev.c +++ b/trunk/drivers/net/e1000e/netdev.c @@ -4633,9 +4633,6 @@ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state) reg16 &= ~state; pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16); - if (!pdev->bus->self) - return; - pos = pci_pcie_cap(pdev->bus->self); pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, ®16); reg16 &= ~state; diff --git a/trunk/drivers/net/fec.c b/trunk/drivers/net/fec.c index 9b4e8f797a7a..9f98c1c4a344 100644 --- a/trunk/drivers/net/fec.c +++ b/trunk/drivers/net/fec.c @@ -1653,7 +1653,7 @@ fec_set_mac_address(struct net_device *dev, void *p) (dev->dev_addr[1] << 16) | (dev->dev_addr[0] << 24), fep->hwp + FEC_ADDR_LOW); writel((dev->dev_addr[5] << 16) | (dev->dev_addr[4] << 24), - fep->hwp + FEC_ADDR_HIGH); + fep + FEC_ADDR_HIGH); return 0; } diff --git a/trunk/drivers/net/phy/Kconfig b/trunk/drivers/net/phy/Kconfig index a527e37728cd..fc5938ba3d78 100644 --- a/trunk/drivers/net/phy/Kconfig +++ b/trunk/drivers/net/phy/Kconfig @@ -88,11 +88,6 @@ config LSI_ET1011C_PHY ---help--- Supports the LSI ET1011C PHY. -config MICREL_PHY - tristate "Driver for Micrel PHYs" - ---help--- - Supports the KSZ9021, VSC8201, KS8001 PHYs. - config FIXED_PHY bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" depends on PHYLIB=y diff --git a/trunk/drivers/net/phy/Makefile b/trunk/drivers/net/phy/Makefile index 13bebab65d02..1342585af381 100644 --- a/trunk/drivers/net/phy/Makefile +++ b/trunk/drivers/net/phy/Makefile @@ -20,5 +20,4 @@ obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o obj-$(CONFIG_NATIONAL_PHY) += national.o obj-$(CONFIG_STE10XP) += ste10Xp.o -obj-$(CONFIG_MICREL_PHY) += micrel.o obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o diff --git a/trunk/drivers/net/phy/micrel.c b/trunk/drivers/net/phy/micrel.c deleted file mode 100644 index 0cd80e4d71d9..000000000000 --- a/trunk/drivers/net/phy/micrel.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * drivers/net/phy/micrel.c - * - * Driver for Micrel PHYs - * - * Author: David J. Choi - * - * Copyright (c) 2010 Micrel, Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * Support : ksz9021 , vsc8201, ks8001 - */ - -#include -#include -#include - -#define PHY_ID_KSZ9021 0x00221611 -#define PHY_ID_VSC8201 0x000FC413 -#define PHY_ID_KS8001 0x0022161A - - -static int kszphy_config_init(struct phy_device *phydev) -{ - return 0; -} - - -static struct phy_driver ks8001_driver = { - .phy_id = PHY_ID_KS8001, - .phy_id_mask = 0x00fffff0, - .features = PHY_BASIC_FEATURES, - .flags = PHY_POLL, - .config_init = kszphy_config_init, - .config_aneg = genphy_config_aneg, - .read_status = genphy_read_status, - .driver = { .owner = THIS_MODULE,}, -}; - -static struct phy_driver vsc8201_driver = { - .phy_id = PHY_ID_VSC8201, - .name = "Micrel VSC8201", - .phy_id_mask = 0x00fffff0, - .features = PHY_BASIC_FEATURES, - .flags = PHY_POLL, - .config_init = kszphy_config_init, - .config_aneg = genphy_config_aneg, - .read_status = genphy_read_status, - .driver = { .owner = THIS_MODULE,}, -}; - -static struct phy_driver ksz9021_driver = { - .phy_id = PHY_ID_KSZ9021, - .phy_id_mask = 0x000fff10, - .name = "Micrel KSZ9021 Gigabit PHY", - .features = PHY_GBIT_FEATURES | SUPPORTED_Pause, - .flags = PHY_POLL, - .config_init = kszphy_config_init, - .config_aneg = genphy_config_aneg, - .read_status = genphy_read_status, - .driver = { .owner = THIS_MODULE, }, -}; - -static int __init ksphy_init(void) -{ - int ret; - - ret = phy_driver_register(&ks8001_driver); - if (ret) - goto err1; - ret = phy_driver_register(&vsc8201_driver); - if (ret) - goto err2; - - ret = phy_driver_register(&ksz9021_driver); - if (ret) - goto err3; - return 0; - -err3: - phy_driver_unregister(&vsc8201_driver); -err2: - phy_driver_unregister(&ks8001_driver); -err1: - return ret; -} - -static void __exit ksphy_exit(void) -{ - phy_driver_unregister(&ks8001_driver); - phy_driver_unregister(&vsc8201_driver); - phy_driver_unregister(&ksz9021_driver); -} - -module_init(ksphy_init); -module_exit(ksphy_exit); - -MODULE_DESCRIPTION("Micrel PHY driver"); -MODULE_AUTHOR("David J. Choi"); -MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/net/ppp_generic.c b/trunk/drivers/net/ppp_generic.c index 8518a2e58e53..6e281bc825e5 100644 --- a/trunk/drivers/net/ppp_generic.c +++ b/trunk/drivers/net/ppp_generic.c @@ -405,7 +405,6 @@ static ssize_t ppp_read(struct file *file, char __user *buf, DECLARE_WAITQUEUE(wait, current); ssize_t ret; struct sk_buff *skb = NULL; - struct iovec iov; ret = count; @@ -449,9 +448,7 @@ static ssize_t ppp_read(struct file *file, char __user *buf, if (skb->len > count) goto outf; ret = -EFAULT; - iov.iov_base = buf; - iov.iov_len = count; - if (skb_copy_datagram_iovec(skb, 0, &iov, skb->len)) + if (copy_to_user(buf, skb->data, skb->len)) goto outf; ret = skb->len; @@ -1570,22 +1567,13 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb) struct channel *pch = chan->ppp; int proto; - if (!pch) { + if (!pch || skb->len == 0) { kfree_skb(skb); return; } - read_lock_bh(&pch->upl); - if (!pskb_may_pull(skb, 2)) { - kfree_skb(skb); - if (pch->ppp) { - ++pch->ppp->dev->stats.rx_length_errors; - ppp_receive_error(pch->ppp); - } - goto done; - } - proto = PPP_PROTO(skb); + read_lock_bh(&pch->upl); if (!pch->ppp || proto >= 0xc000 || proto == PPP_CCPFRAG) { /* put it on the channel queue */ skb_queue_tail(&pch->file.rq, skb); @@ -1597,8 +1585,6 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb) } else { ppp_do_recv(pch->ppp, skb, pch); } - -done: read_unlock_bh(&pch->upl); } @@ -1631,8 +1617,7 @@ ppp_input_error(struct ppp_channel *chan, int code) static void ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) { - /* note: a 0-length skb is used as an error indication */ - if (skb->len > 0) { + if (pskb_may_pull(skb, 2)) { #ifdef CONFIG_PPP_MULTILINK /* XXX do channel-level decompression here */ if (PPP_PROTO(skb) == PPP_MP) @@ -1640,10 +1625,15 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch) else #endif /* CONFIG_PPP_MULTILINK */ ppp_receive_nonmp_frame(ppp, skb); - } else { - kfree_skb(skb); - ppp_receive_error(ppp); + return; } + + if (skb->len > 0) + /* note: a 0-length skb is used as an error indication */ + ++ppp->dev->stats.rx_length_errors; + + kfree_skb(skb); + ppp_receive_error(ppp); } static void diff --git a/trunk/drivers/net/r8169.c b/trunk/drivers/net/r8169.c index dd8106ff35aa..4748c21eb72e 100644 --- a/trunk/drivers/net/r8169.c +++ b/trunk/drivers/net/r8169.c @@ -1042,14 +1042,14 @@ static void rtl8169_vlan_rx_register(struct net_device *dev, } static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, - struct sk_buff *skb, int polling) + struct sk_buff *skb) { u32 opts2 = le32_to_cpu(desc->opts2); struct vlan_group *vlgrp = tp->vlgrp; int ret; if (vlgrp && (opts2 & RxVlanTag)) { - __vlan_hwaccel_rx(skb, vlgrp, swab16(opts2 & 0xffff), polling); + vlan_hwaccel_receive_skb(skb, vlgrp, swab16(opts2 & 0xffff)); ret = 0; } else ret = -1; @@ -1066,7 +1066,7 @@ static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, } static int rtl8169_rx_vlan_skb(struct rtl8169_private *tp, struct RxDesc *desc, - struct sk_buff *skb, int polling) + struct sk_buff *skb) { return -1; } @@ -4445,20 +4445,12 @@ static inline bool rtl8169_try_rx_copy(struct sk_buff **sk_buff, return done; } -/* - * Warning : rtl8169_rx_interrupt() might be called : - * 1) from NAPI (softirq) context - * (polling = 1 : we should call netif_receive_skb()) - * 2) from process context (rtl8169_reset_task()) - * (polling = 0 : we must call netif_rx() instead) - */ static int rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp, void __iomem *ioaddr, u32 budget) { unsigned int cur_rx, rx_left; unsigned int delta, count; - int polling = (budget != ~(u32)0) ? 1 : 0; cur_rx = tp->cur_rx; rx_left = NUM_RX_DESC + tp->dirty_rx - cur_rx; @@ -4520,12 +4512,8 @@ static int rtl8169_rx_interrupt(struct net_device *dev, skb_put(skb, pkt_size); skb->protocol = eth_type_trans(skb, dev); - if (rtl8169_rx_vlan_skb(tp, desc, skb, polling) < 0) { - if (likely(polling)) - netif_receive_skb(skb); - else - netif_rx(skb); - } + if (rtl8169_rx_vlan_skb(tp, desc, skb) < 0) + netif_receive_skb(skb); dev->stats.rx_bytes += pkt_size; dev->stats.rx_packets++; diff --git a/trunk/drivers/net/sb1250-mac.c b/trunk/drivers/net/sb1250-mac.c index 04efc0c1bda9..9944e5d662c0 100644 --- a/trunk/drivers/net/sb1250-mac.c +++ b/trunk/drivers/net/sb1250-mac.c @@ -2353,36 +2353,17 @@ static int sbmac_init(struct platform_device *pldev, long long base) sc->mii_bus = mdiobus_alloc(); if (sc->mii_bus == NULL) { - err = -ENOMEM; - goto uninit_ctx; + sbmac_uninitctx(sc); + return -ENOMEM; } - sc->mii_bus->name = sbmac_mdio_string; - snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx); - sc->mii_bus->priv = sc; - sc->mii_bus->read = sbmac_mii_read; - sc->mii_bus->write = sbmac_mii_write; - sc->mii_bus->irq = sc->phy_irq; - for (i = 0; i < PHY_MAX_ADDR; ++i) - sc->mii_bus->irq[i] = SBMAC_PHY_INT; - - sc->mii_bus->parent = &pldev->dev; - /* - * Probe PHY address - */ - err = mdiobus_register(sc->mii_bus); - if (err) { - printk(KERN_ERR "%s: unable to register MDIO bus\n", - dev->name); - goto free_mdio; - } - dev_set_drvdata(&pldev->dev, sc->mii_bus); - err = register_netdev(dev); if (err) { printk(KERN_ERR "%s.%d: unable to register netdev\n", sbmac_string, idx); - goto unreg_mdio; + mdiobus_free(sc->mii_bus); + sbmac_uninitctx(sc); + return err; } pr_info("%s.%d: registered as %s\n", sbmac_string, idx, dev->name); @@ -2398,15 +2379,19 @@ static int sbmac_init(struct platform_device *pldev, long long base) pr_info("%s: SiByte Ethernet at 0x%08Lx, address: %pM\n", dev->name, base, eaddr); + sc->mii_bus->name = sbmac_mdio_string; + snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx); + sc->mii_bus->priv = sc; + sc->mii_bus->read = sbmac_mii_read; + sc->mii_bus->write = sbmac_mii_write; + sc->mii_bus->irq = sc->phy_irq; + for (i = 0; i < PHY_MAX_ADDR; ++i) + sc->mii_bus->irq[i] = SBMAC_PHY_INT; + + sc->mii_bus->parent = &pldev->dev; + dev_set_drvdata(&pldev->dev, sc->mii_bus); + return 0; -unreg_mdio: - mdiobus_unregister(sc->mii_bus); - dev_set_drvdata(&pldev->dev, NULL); -free_mdio: - mdiobus_free(sc->mii_bus); -uninit_ctx: - sbmac_uninitctx(sc); - return err; } @@ -2432,6 +2417,16 @@ static int sbmac_open(struct net_device *dev) goto out_err; } + /* + * Probe PHY address + */ + err = mdiobus_register(sc->mii_bus); + if (err) { + printk(KERN_ERR "%s: unable to register MDIO bus\n", + dev->name); + goto out_unirq; + } + sc->sbm_speed = sbmac_speed_none; sc->sbm_duplex = sbmac_duplex_none; sc->sbm_fc = sbmac_fc_none; @@ -2462,7 +2457,11 @@ static int sbmac_open(struct net_device *dev) return 0; out_unregister: + mdiobus_unregister(sc->mii_bus); + +out_unirq: free_irq(dev->irq, dev); + out_err: return err; } @@ -2651,6 +2650,9 @@ static int sbmac_close(struct net_device *dev) phy_disconnect(sc->phy_dev); sc->phy_dev = NULL; + + mdiobus_unregister(sc->mii_bus); + free_irq(dev->irq, dev); sbdma_emptyring(&(sc->sbm_txdma)); @@ -2758,7 +2760,6 @@ static int __exit sbmac_remove(struct platform_device *pldev) unregister_netdev(dev); sbmac_uninitctx(sc); - mdiobus_unregister(sc->mii_bus); mdiobus_free(sc->mii_bus); iounmap(sc->sbm_base); free_netdev(dev); diff --git a/trunk/drivers/net/usb/Kconfig b/trunk/drivers/net/usb/Kconfig index d7b7018a1de1..5d58abc224f4 100644 --- a/trunk/drivers/net/usb/Kconfig +++ b/trunk/drivers/net/usb/Kconfig @@ -400,6 +400,7 @@ config USB_IPHETH config USB_SIERRA_NET tristate "USB-to-WWAN Driver for Sierra Wireless modems" depends on USB_USBNET + default y help Choose this option if you have a Sierra Wireless USB-to-WWAN device. diff --git a/trunk/drivers/net/usb/dm9601.c b/trunk/drivers/net/usb/dm9601.c index 5dfed9297b22..04b281002a76 100644 --- a/trunk/drivers/net/usb/dm9601.c +++ b/trunk/drivers/net/usb/dm9601.c @@ -240,7 +240,7 @@ static int dm_write_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 valu goto out; dm_write_reg(dev, DM_SHARED_ADDR, phy ? (reg | 0x40) : reg); - dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1a : 0x12); + dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1c : 0x14); for (i = 0; i < DM_TIMEOUT; i++) { u8 tmp; diff --git a/trunk/drivers/net/usb/sierra_net.c b/trunk/drivers/net/usb/sierra_net.c index f1942d69a0d5..a44f9e0ea098 100644 --- a/trunk/drivers/net/usb/sierra_net.c +++ b/trunk/drivers/net/usb/sierra_net.c @@ -789,9 +789,6 @@ static int sierra_net_bind(struct usbnet *dev, struct usb_interface *intf) /* prepare sync message from template */ memcpy(priv->sync_msg, sync_tmplate, sizeof(priv->sync_msg)); - /* initiate the sync sequence */ - sierra_net_dosync(dev); - return 0; } diff --git a/trunk/drivers/net/wireless/p54/p54pci.c b/trunk/drivers/net/wireless/p54/p54pci.c index c24067f1a0cb..269fda362836 100644 --- a/trunk/drivers/net/wireless/p54/p54pci.c +++ b/trunk/drivers/net/wireless/p54/p54pci.c @@ -246,7 +246,7 @@ static void p54p_check_tx_ring(struct ieee80211_hw *dev, u32 *index, u32 idx, i; i = (*index) % ring_limit; - (*index) = idx = le32_to_cpu(ring_control->device_idx[ring_index]); + (*index) = idx = le32_to_cpu(ring_control->device_idx[1]); idx %= ring_limit; while (i != idx) { diff --git a/trunk/include/net/sctp/structs.h b/trunk/include/net/sctp/structs.h index 597f8e27aaf6..ff3017744711 100644 --- a/trunk/include/net/sctp/structs.h +++ b/trunk/include/net/sctp/structs.h @@ -778,7 +778,6 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len, struct iovec *data); void sctp_chunk_free(struct sctp_chunk *); void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data); -void *sctp_addto_chunk_fixed(struct sctp_chunk *, int len, const void *data); struct sctp_chunk *sctp_chunkify(struct sk_buff *, const struct sctp_association *, struct sock *); diff --git a/trunk/include/net/sock.h b/trunk/include/net/sock.h index 1ad6435f252e..b4603cd54fcd 100644 --- a/trunk/include/net/sock.h +++ b/trunk/include/net/sock.h @@ -74,7 +74,7 @@ printk(KERN_DEBUG msg); } while (0) #else /* Validate arguments and do nothing */ -static inline void __attribute__ ((format (printf, 2, 3))) +static void inline int __attribute__ ((format (printf, 2, 3))) SOCK_DEBUG(struct sock *sk, const char *msg, ...) { } diff --git a/trunk/kernel/workqueue.c b/trunk/kernel/workqueue.c index 5bfb213984b2..dee48658805c 100644 --- a/trunk/kernel/workqueue.c +++ b/trunk/kernel/workqueue.c @@ -774,7 +774,7 @@ void flush_delayed_work(struct delayed_work *dwork) { if (del_timer_sync(&dwork->timer)) { struct cpu_workqueue_struct *cwq; - cwq = wq_per_cpu(get_wq_data(&dwork->work)->wq, get_cpu()); + cwq = wq_per_cpu(keventd_wq, get_cpu()); __queue_work(cwq, &dwork->work); put_cpu(); } diff --git a/trunk/net/ipv6/af_inet6.c b/trunk/net/ipv6/af_inet6.c index 3f9e86b15e0d..3192aa02ba5d 100644 --- a/trunk/net/ipv6/af_inet6.c +++ b/trunk/net/ipv6/af_inet6.c @@ -200,7 +200,7 @@ static int inet6_create(struct net *net, struct socket *sock, int protocol, inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk); np->hop_limit = -1; - np->mcast_hops = IPV6_DEFAULT_MCASTHOPS; + np->mcast_hops = -1; np->mc_loop = 1; np->pmtudisc = IPV6_PMTUDISC_WANT; np->ipv6only = net->ipv6.sysctl.bindv6only; diff --git a/trunk/net/sctp/sm_make_chunk.c b/trunk/net/sctp/sm_make_chunk.c index 30c1767186b8..0fd5b4c88358 100644 --- a/trunk/net/sctp/sm_make_chunk.c +++ b/trunk/net/sctp/sm_make_chunk.c @@ -108,7 +108,7 @@ static const struct sctp_paramhdr prsctp_param = { cpu_to_be16(sizeof(struct sctp_paramhdr)), }; -/* A helper to initialize an op error inside a +/* A helper to initialize to initialize an op error inside a * provided chunk, as most cause codes will be embedded inside an * abort chunk. */ @@ -125,29 +125,6 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code, chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err); } -/* A helper to initialize an op error inside a - * provided chunk, as most cause codes will be embedded inside an - * abort chunk. Differs from sctp_init_cause in that it won't oops - * if there isn't enough space in the op error chunk - */ -int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code, - size_t paylen) -{ - sctp_errhdr_t err; - __u16 len; - - /* Cause code constants are now defined in network order. */ - err.cause = cause_code; - len = sizeof(sctp_errhdr_t) + paylen; - err.length = htons(len); - - if (skb_tailroom(chunk->skb) > len) - return -ENOSPC; - chunk->subh.err_hdr = sctp_addto_chunk_fixed(chunk, - sizeof(sctp_errhdr_t), - &err); - return 0; -} /* 3.3.2 Initiation (INIT) (1) * * This chunk is used to initiate a SCTP association between two @@ -1155,24 +1132,6 @@ static struct sctp_chunk *sctp_make_op_error_space( return retval; } -/* Create an Operation Error chunk of a fixed size, - * specifically, max(asoc->pathmtu, SCTP_DEFAULT_MAXSEGMENT) - * This is a helper function to allocate an error chunk for - * for those invalid parameter codes in which we may not want - * to report all the errors, if the incomming chunk is large - */ -static inline struct sctp_chunk *sctp_make_op_error_fixed( - const struct sctp_association *asoc, - const struct sctp_chunk *chunk) -{ - size_t size = asoc ? asoc->pathmtu : 0; - - if (!size) - size = SCTP_DEFAULT_MAXSEGMENT; - - return sctp_make_op_error_space(asoc, chunk, size); -} - /* Create an Operation Error chunk. */ struct sctp_chunk *sctp_make_op_error(const struct sctp_association *asoc, const struct sctp_chunk *chunk, @@ -1415,18 +1374,6 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data) return target; } -/* Append bytes to the end of a chunk. Returns NULL if there isn't sufficient - * space in the chunk - */ -void *sctp_addto_chunk_fixed(struct sctp_chunk *chunk, - int len, const void *data) -{ - if (skb_tailroom(chunk->skb) > len) - return sctp_addto_chunk(chunk, len, data); - else - return NULL; -} - /* Append bytes from user space to the end of a chunk. Will panic if * chunk is not big enough. * Returns a kernel err value. @@ -2030,12 +1977,13 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc, * returning multiple unknown parameters. */ if (NULL == *errp) - *errp = sctp_make_op_error_fixed(asoc, chunk); + *errp = sctp_make_op_error_space(asoc, chunk, + ntohs(chunk->chunk_hdr->length)); if (*errp) { - sctp_init_cause_fixed(*errp, SCTP_ERROR_UNKNOWN_PARAM, + sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM, WORD_ROUND(ntohs(param.p->length))); - sctp_addto_chunk_fixed(*errp, + sctp_addto_chunk(*errp, WORD_ROUND(ntohs(param.p->length)), param.v); } else { diff --git a/trunk/security/keys/keyring.c b/trunk/security/keys/keyring.c index dd7cd0f8e13c..0b27271c670c 100644 --- a/trunk/security/keys/keyring.c +++ b/trunk/security/keys/keyring.c @@ -526,9 +526,8 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check) struct key *keyring; int bucket; - keyring = ERR_PTR(-EINVAL); if (!name) - goto error; + return ERR_PTR(-EINVAL); bucket = keyring_hash(name); @@ -555,17 +554,18 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check) KEY_SEARCH) < 0) continue; - /* we've got a match */ - atomic_inc(&keyring->usage); - read_unlock(&keyring_name_lock); - goto error; + /* we've got a match but we might end up racing with + * key_cleanup() if the keyring is currently 'dead' + * (ie. it has a zero usage count) */ + if (!atomic_inc_not_zero(&keyring->usage)) + continue; + goto out; } } - read_unlock(&keyring_name_lock); keyring = ERR_PTR(-ENOKEY); - - error: +out: + read_unlock(&keyring_name_lock); return keyring; } /* end find_keyring_by_name() */ diff --git a/trunk/sound/core/timer.c b/trunk/sound/core/timer.c index 5040c7b862fe..73943651caed 100644 --- a/trunk/sound/core/timer.c +++ b/trunk/sound/core/timer.c @@ -1160,7 +1160,6 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, { struct snd_timer_user *tu = timeri->callback_data; struct snd_timer_tread r1; - unsigned long flags; if (event >= SNDRV_TIMER_EVENT_START && event <= SNDRV_TIMER_EVENT_PAUSE) @@ -1170,9 +1169,9 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, r1.event = event; r1.tstamp = *tstamp; r1.val = resolution; - spin_lock_irqsave(&tu->qlock, flags); + spin_lock(&tu->qlock); snd_timer_user_append_to_tqueue(tu, &r1); - spin_unlock_irqrestore(&tu->qlock, flags); + spin_unlock(&tu->qlock); kill_fasync(&tu->fasync, SIGIO, POLL_IN); wake_up(&tu->qchange_sleep); } diff --git a/trunk/sound/isa/sb/es968.c b/trunk/sound/isa/sb/es968.c index ff18286fef9d..cafc3a7316a8 100644 --- a/trunk/sound/isa/sb/es968.c +++ b/trunk/sound/isa/sb/es968.c @@ -93,7 +93,7 @@ static int __devinit snd_card_es968_pnp(int dev, struct snd_card_es968 *acard, return err; } port[dev] = pnp_port_start(pdev, 0); - dma8[dev] = pnp_dma(pdev, 0); + dma8[dev] = pnp_dma(pdev, 1); irq[dev] = pnp_irq(pdev, 0); return 0; diff --git a/trunk/sound/pci/hda/patch_cirrus.c b/trunk/sound/pci/hda/patch_cirrus.c index 350ee8ac4153..7de782a5b8f4 100644 --- a/trunk/sound/pci/hda/patch_cirrus.c +++ b/trunk/sound/pci/hda/patch_cirrus.c @@ -766,7 +766,7 @@ static int build_input(struct hda_codec *codec) for (n = 0; n < AUTO_PIN_LAST; n++) { if (!spec->adc_nid[n]) continue; - err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[n]); + err = snd_hda_add_nid(codec, kctl, 0, spec->adc_nid[i]); if (err < 0) return err; } diff --git a/trunk/sound/pci/hda/patch_conexant.c b/trunk/sound/pci/hda/patch_conexant.c index 56e52071c769..61682e1d09da 100644 --- a/trunk/sound/pci/hda/patch_conexant.c +++ b/trunk/sound/pci/hda/patch_conexant.c @@ -1195,10 +1195,9 @@ static int patch_cxt5045(struct hda_codec *codec) switch (codec->subsystem_id >> 16) { case 0x103c: - case 0x1631: case 0x1734: - /* HP, Packard Bell, & Fujitsu-Siemens laptops have really bad - * sound over 0dB on NID 0x17. Fix max PCM level to 0 dB + /* HP & Fujitsu-Siemens laptops have really bad sound over 0dB + * on NID 0x17. Fix max PCM level to 0 dB * (originally it has 0x2b steps with 0dB offset 0x14) */ snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT, @@ -2843,9 +2842,6 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { CXT5066_DELL_LAPTOP), SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO), - SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), - SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5), - SND_PCI_QUIRK(0x1179, 0xffe0, "Toshiba Satellite Pro T130-15F", CXT5066_OLPC_XO_1_5), SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), {} };