diff --git a/0001-bluetooth-Add-support-for-atheros-04ca-3004-device-t.patch b/0001-bluetooth-Add-support-for-atheros-04ca-3004-device-t.patch deleted file mode 100644 index cfa1710de..000000000 --- a/0001-bluetooth-Add-support-for-atheros-04ca-3004-device-t.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 95e9fe367b98a8f4f3c7538fc40a4f94d7f5e35f Mon Sep 17 00:00:00 2001 -From: Josh Boyer -Date: Mon, 18 Feb 2013 10:32:13 -0500 -Subject: [PATCH] bluetooth: Add support for atheros 04ca:3004 device to ath3k - -Yet another version of the atheros bluetooth chipset - -Reported-by: niktr@mail.ru -Signed-off-by: Josh Boyer ---- - drivers/bluetooth/ath3k.c | 2 ++ - drivers/bluetooth/btusb.c | 1 + - 2 files changed, 3 insertions(+) - - -diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c -index b00000e..284658c 100644 ---- a/drivers/bluetooth/ath3k.c -+++ b/drivers/bluetooth/ath3k.c -@@ -76,6 +76,7 @@ static struct usb_device_id ath3k_table[] = { - { USB_DEVICE(0x0CF3, 0x3004) }, - { USB_DEVICE(0x0CF3, 0x311D) }, - { USB_DEVICE(0x13d3, 0x3375) }, -+ { USB_DEVICE(0x04CA, 0x3004) }, - { USB_DEVICE(0x04CA, 0x3005) }, - { USB_DEVICE(0x13d3, 0x3362) }, - { USB_DEVICE(0x0CF3, 0xE004) }, -@@ -103,6 +104,7 @@ static struct usb_device_id ath3k_blist_tbl[] = { - { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, -+ { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, -diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c -index a1d4ede..fa59179 100644 ---- a/drivers/bluetooth/btusb.c -+++ b/drivers/bluetooth/btusb.c -@@ -134,6 +134,7 @@ static struct usb_device_id blacklist_table[] = { - { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 }, -+ { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 }, - { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, diff --git a/8139cp-re-enable-interrupts-after-tx-timeout.patch b/8139cp-re-enable-interrupts-after-tx-timeout.patch deleted file mode 100644 index c0196188e..000000000 --- a/8139cp-re-enable-interrupts-after-tx-timeout.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 01ffc0a7f1c1801a2354719dedbc32aff45b987d Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Sat, 24 Nov 2012 12:11:21 +0000 -Subject: [PATCH] 8139cp: re-enable interrupts after tx timeout - -Recovery doesn't work too well if we leave interrupts disabled... - -Signed-off-by: David Woodhouse -Acked-by: Francois Romieu -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/realtek/8139cp.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c -index 3de318d..6cb96b4 100644 ---- a/drivers/net/ethernet/realtek/8139cp.c -+++ b/drivers/net/ethernet/realtek/8139cp.c -@@ -1219,6 +1219,7 @@ static void cp_tx_timeout(struct net_device *dev) - cp_clean_rings(cp); - rc = cp_init_rings(cp); - cp_start_hw(cp); -+ cp_enable_irq(cp); - - netif_wake_queue(dev); - --- -1.7.6.5 - diff --git a/8139cp-revert-set-ring-address-before-enabling-receiver.patch b/8139cp-revert-set-ring-address-before-enabling-receiver.patch deleted file mode 100644 index 07ae2c28d..000000000 --- a/8139cp-revert-set-ring-address-before-enabling-receiver.patch +++ /dev/null @@ -1,64 +0,0 @@ -From b26623dab7eeb1e9f5898c7a49458789dd492f20 Mon Sep 17 00:00:00 2001 -From: Francois Romieu -Date: Wed, 21 Nov 2012 10:07:29 +0000 -Subject: 8139cp: revert "set ring address before enabling receiver" - -From: Francois Romieu - -commit b26623dab7eeb1e9f5898c7a49458789dd492f20 upstream. - -This patch reverts b01af4579ec41f48e9b9c774e70bd6474ad210db. - -The original patch was tested with emulated hardware. Real -hardware chokes. - -Fixes https://bugzilla.kernel.org/show_bug.cgi?id=47041 - -Signed-off-by: Francois Romieu -Acked-by: Jeff Garzik -Signed-off-by: David S. Miller -Signed-off-by: CAI Qian -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/net/ethernet/realtek/8139cp.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - ---- a/drivers/net/ethernet/realtek/8139cp.c -+++ b/drivers/net/ethernet/realtek/8139cp.c -@@ -979,17 +979,6 @@ static void cp_init_hw (struct cp_privat - cpw32_f (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0))); - cpw32_f (MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4))); - -- cpw32_f(HiTxRingAddr, 0); -- cpw32_f(HiTxRingAddr + 4, 0); -- -- ring_dma = cp->ring_dma; -- cpw32_f(RxRingAddr, ring_dma & 0xffffffff); -- cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16); -- -- ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE; -- cpw32_f(TxRingAddr, ring_dma & 0xffffffff); -- cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16); -- - cp_start_hw(cp); - cpw8(TxThresh, 0x06); /* XXX convert magic num to a constant */ - -@@ -1003,6 +992,17 @@ static void cp_init_hw (struct cp_privat - - cpw8(Config5, cpr8(Config5) & PMEStatus); - -+ cpw32_f(HiTxRingAddr, 0); -+ cpw32_f(HiTxRingAddr + 4, 0); -+ -+ ring_dma = cp->ring_dma; -+ cpw32_f(RxRingAddr, ring_dma & 0xffffffff); -+ cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16); -+ -+ ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE; -+ cpw32_f(TxRingAddr, ring_dma & 0xffffffff); -+ cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16); -+ - cpw16(MultiIntr, 0); - - cpw8_f(Cfg9346, Cfg9346_Lock); diff --git a/8139cp-set-ring-address-after-enabling-C-mode.patch b/8139cp-set-ring-address-after-enabling-C-mode.patch deleted file mode 100644 index 33bd340e9..000000000 --- a/8139cp-set-ring-address-after-enabling-C-mode.patch +++ /dev/null @@ -1,100 +0,0 @@ -From a9dbe40fc10cea2efe6e1ff9e03c62dd7579c5ba Mon Sep 17 00:00:00 2001 -From: David Woodhouse -Date: Wed, 21 Nov 2012 10:27:19 +0000 -Subject: [PATCH] 8139cp: set ring address after enabling C+ mode - -This fixes (for me) a regression introduced by commit b01af457 ("8139cp: -set ring address before enabling receiver"). That commit configured the -descriptor ring addresses earlier in the initialisation sequence, in -order to avoid the possibility of triggering stray DMA before the -correct address had been set up. - -Unfortunately, it seems that the hardware will scribble garbage into the -TxRingAddr registers when we enable "plus mode" Tx in the CpCmd -register. Observed on a Traverse Geos router board. - -To deal with this, while not reintroducing the problem which led to the -original commit, we augment cp_start_hw() to write to the CpCmd register -*first*, then set the descriptor ring addresses, and then finally to -enable Rx and Tx in the original 8139 Cmd register. The datasheet -actually indicates that we should enable Tx/Rx in the Cmd register -*before* configuring the descriptor addresses, but that would appear to -re-introduce the problem that the offending commit b01af457 was trying -to solve. And this variant appears to work fine on real hardware. - -Signed-off-by: David Woodhouse -Cc: stable@kernel.org [3.5+] -Signed-off-by: David S. Miller ---- - drivers/net/ethernet/realtek/8139cp.c | 40 +++++++++++++++++++++++---------- - 1 files changed, 28 insertions(+), 12 deletions(-) - -diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c -index 1c81825..5166d94 100644 ---- a/drivers/net/ethernet/realtek/8139cp.c -+++ b/drivers/net/ethernet/realtek/8139cp.c -@@ -957,7 +957,35 @@ static void cp_reset_hw (struct cp_private *cp) - - static inline void cp_start_hw (struct cp_private *cp) - { -+ dma_addr_t ring_dma; -+ - cpw16(CpCmd, cp->cpcmd); -+ -+ /* -+ * These (at least TxRingAddr) need to be configured after the -+ * corresponding bits in CpCmd are enabled. Datasheet v1.6 §6.33 -+ * (C+ Command Register) recommends that these and more be configured -+ * *after* the [RT]xEnable bits in CpCmd are set. And on some hardware -+ * it's been observed that the TxRingAddr is actually reset to garbage -+ * when C+ mode Tx is enabled in CpCmd. -+ */ -+ cpw32_f(HiTxRingAddr, 0); -+ cpw32_f(HiTxRingAddr + 4, 0); -+ -+ ring_dma = cp->ring_dma; -+ cpw32_f(RxRingAddr, ring_dma & 0xffffffff); -+ cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16); -+ -+ ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE; -+ cpw32_f(TxRingAddr, ring_dma & 0xffffffff); -+ cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16); -+ -+ /* -+ * Strictly speaking, the datasheet says this should be enabled -+ * *before* setting the descriptor addresses. But what, then, would -+ * prevent it from doing DMA to random unconfigured addresses? -+ * This variant appears to work fine. -+ */ - cpw8(Cmd, RxOn | TxOn); - } - -@@ -969,7 +997,6 @@ static void cp_enable_irq(struct cp_private *cp) - static void cp_init_hw (struct cp_private *cp) - { - struct net_device *dev = cp->dev; -- dma_addr_t ring_dma; - - cp_reset_hw(cp); - -@@ -979,17 +1006,6 @@ static void cp_init_hw (struct cp_private *cp) - cpw32_f (MAC0 + 0, le32_to_cpu (*(__le32 *) (dev->dev_addr + 0))); - cpw32_f (MAC0 + 4, le32_to_cpu (*(__le32 *) (dev->dev_addr + 4))); - -- cpw32_f(HiTxRingAddr, 0); -- cpw32_f(HiTxRingAddr + 4, 0); -- -- ring_dma = cp->ring_dma; -- cpw32_f(RxRingAddr, ring_dma & 0xffffffff); -- cpw32_f(RxRingAddr + 4, (ring_dma >> 16) >> 16); -- -- ring_dma += sizeof(struct cp_desc) * CP_RX_RING_SIZE; -- cpw32_f(TxRingAddr, ring_dma & 0xffffffff); -- cpw32_f(TxRingAddr + 4, (ring_dma >> 16) >> 16); -- - cp_start_hw(cp); - cpw8(TxThresh, 0x06); /* XXX convert magic num to a constant */ - --- -1.7.6.5 - diff --git a/Makefile.config b/Makefile.config index 2ac1fa9da..015f8343f 100644 --- a/Makefile.config +++ b/Makefile.config @@ -14,10 +14,9 @@ CONFIGFILES = \ $(CFG)-armv7l-omap.config $(CFG)-armv7hl-omap.config \ $(CFG)-armv7l-tegra.config $(CFG)-armv7hl-tegra.config \ $(CFG)-ppc.config $(CFG)-ppc-smp.config \ - $(CFG)-sparc64.config \ $(CFG)-ppc64.config $(CFG)-ppc64-debug.config -PLATFORMS = x86 x86_64 powerpc powerpc32 powerpc64 s390x sparc64 arm +PLATFORMS = x86 x86_64 powerpc powerpc32 powerpc64 s390x arm TEMPFILES = $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS))) configs: $(CONFIGFILES) @@ -68,9 +67,6 @@ temp-x86_64-generic: temp-x86-64 temp-generic temp-x86_64-debug-generic: temp-x86-64 temp-debug-generic perl merge.pl $^ > $@ -temp-sparc64-generic: config-sparc64-generic temp-generic - perl merge.pl $^ > $@ - temp-powerpc-generic: config-powerpc-generic temp-generic perl merge.pl $^ > $@ @@ -101,9 +97,6 @@ kernel-$(VERSION)-x86_64.config: /dev/null temp-x86_64-generic kernel-$(VERSION)-x86_64-debug.config: /dev/null temp-x86_64-debug-generic perl merge.pl $^ x86_64 > $@ -kernel-$(VERSION)-sparc64.config: /dev/null temp-sparc64-generic - perl merge.pl $^ sparc64 > $@ - kernel-$(VERSION)-ppc64.config: config-powerpc64 temp-powerpc-generic perl merge.pl $^ powerpc > $@ diff --git a/USB-report-submission-of-active-URBs.patch b/USB-report-submission-of-active-URBs.patch deleted file mode 100644 index 4496c913a..000000000 --- a/USB-report-submission-of-active-URBs.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit 2f02bc8af3abb846823811af65ec6cc46a4d525d -Author: Alan Stern -Date: Wed Nov 7 16:35:00 2012 -0500 - - USB: report submission of active URBs - - This patch (as1633) changes slightly the way usbcore handled - submissions of URBs that are already active. It will now return - -EBUSY rather than -EINVAL, and it will call WARN_ONCE to draw - people's attention to the bug. - - Signed-off-by: Alan Stern - Signed-off-by: Greg Kroah-Hartman - -diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt -index 8d1e2a9..9c3eb84 100644 ---- a/Documentation/usb/error-codes.txt -+++ b/Documentation/usb/error-codes.txt -@@ -21,6 +21,8 @@ Non-USB-specific: - - USB-specific: - -+-EBUSY The URB is already active. -+ - -ENODEV specified USB-device or bus doesn't exist - - -ENOENT specified interface or endpoint does not exist or -diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c -index 3662287..e0d9d94 100644 ---- a/drivers/usb/core/urb.c -+++ b/drivers/usb/core/urb.c -@@ -321,8 +321,13 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) - struct usb_host_endpoint *ep; - int is_out; - -- if (!urb || urb->hcpriv || !urb->complete) -+ if (!urb || !urb->complete) - return -EINVAL; -+ if (urb->hcpriv) { -+ WARN_ONCE(1, "URB %p submitted while active\n", urb); -+ return -EBUSY; -+ } -+ - dev = urb->dev; - if ((!dev) || (dev->state < USB_STATE_UNAUTHENTICATED)) - return -ENODEV; diff --git a/acpi-debug-infinite-loop.patch b/acpi-debug-infinite-loop.patch new file mode 100644 index 000000000..f2cc1a55e --- /dev/null +++ b/acpi-debug-infinite-loop.patch @@ -0,0 +1,25 @@ +--- linux-2.6.34.noarch/include/acpi/acconfig.h~ 2010-07-01 14:49:03.000000000 -0400 ++++ linux-2.6.34.noarch/include/acpi/acconfig.h 2010-07-01 14:49:17.000000000 -0400 +@@ -117,7 +117,7 @@ + + /* Maximum number of While() loop iterations before forced abort */ + +-#define ACPI_MAX_LOOP_ITERATIONS 0xFFFF ++#define ACPI_MAX_LOOP_ITERATIONS 0xFFFFFF + + /* Maximum sleep allowed via Sleep() operator */ + +--- a/drivers/acpi/acpica/dscontrol.c ++++ b/drivers/acpi/acpica/dscontrol.c +@@ -212,6 +212,11 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, + * loop does not implement a timeout. + */ + control_state->control.loop_count++; ++ if ((control_state->control.loop_count > 1) && ++ (control_state->control.loop_count % 0xffff == 0)) ++ printk("ACPI: While loop taking a really long time. loop_count=0x%x\n", ++ control_state->control.loop_count); ++ + if (control_state->control.loop_count > + ACPI_MAX_LOOP_ITERATIONS) { + status = AE_AML_INFINITE_LOOP; diff --git a/linux-2.6-acpi-video-dos.patch b/acpi-video-dos.patch similarity index 100% rename from linux-2.6-acpi-video-dos.patch rename to acpi-video-dos.patch diff --git a/alps-v2-3.7.patch b/alps.patch similarity index 51% rename from alps-v2-3.7.patch rename to alps.patch index 262cd0d92..83d3cfe0a 100644 --- a/alps-v2-3.7.patch +++ b/alps.patch @@ -1,139 +1,42 @@ -From 2c5e103a6d0a2a0c74cd8b299d58c4ca07911aad Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 20:55:19 -0800 -Subject: [PATCH 01/15] Input: ALPS - document the alps.h data structures - -Add kernel-doc markup. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.h | 74 ++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 61 insertions(+), 13 deletions(-) - -diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h -index ae1ac35..67be4e5 100644 ---- a/drivers/input/mouse/alps.h -+++ b/drivers/input/mouse/alps.h -@@ -17,30 +17,78 @@ - #define ALPS_PROTO_V3 2 - #define ALPS_PROTO_V4 3 - -+/** -+ * struct alps_model_info - touchpad ID table -+ * @signature: E7 response string to match. -+ * @command_mode_resp: For V3/V4 touchpads, the final byte of the EC response -+ * (aka command mode response) identifies the firmware minor version. This -+ * can be used to distinguish different hardware models which are not -+ * uniquely identifiable through their E7 responses. -+ * @proto_version: Indicates V1/V2/V3/... -+ * @byte0: Helps figure out whether a position report packet matches the -+ * known format for this model. The first byte of the report, ANDed with -+ * mask0, should match byte0. -+ * @mask0: The mask used to check the first byte of the report. -+ * @flags: Additional device capabilities (passthrough port, trackstick, etc.). -+ * -+ * Many (but not all) ALPS touchpads can be identified by looking at the -+ * values returned in the "E7 report" and/or the "EC report." This table -+ * lists a number of such touchpads. -+ */ - struct alps_model_info { -- unsigned char signature[3]; -- unsigned char command_mode_resp; /* v3/v4 only */ -+ unsigned char signature[3]; -+ unsigned char command_mode_resp; - unsigned char proto_version; -- unsigned char byte0, mask0; -- unsigned char flags; -+ unsigned char byte0, mask0; -+ unsigned char flags; - }; - -+/** -+ * struct alps_nibble_commands - encodings for register accesses -+ * @command: PS/2 command used for the nibble -+ * @data: Data supplied as an argument to the PS/2 command, if applicable -+ * -+ * The ALPS protocol uses magic sequences to transmit binary data to the -+ * touchpad, as it is generally not OK to send arbitrary bytes out the -+ * PS/2 port. Each of the sequences in this table sends one nibble of the -+ * register address or (write) data. Different versions of the ALPS protocol -+ * use slightly different encodings. -+ */ - struct alps_nibble_commands { - int command; - unsigned char data; - }; - -+/** -+ * struct alps_data - private data structure for the ALPS driver -+ * @dev2: "Relative" device used to report trackstick or mouse activity. -+ * @phys: Physical path for the relative device. -+ * @i: Information on the detected touchpad model. -+ * @nibble_commands: Command mapping used for touchpad register accesses. -+ * @addr_command: Command used to tell the touchpad that a register address -+ * follows. -+ * @prev_fin: Finger bit from previous packet. -+ * @multi_packet: Multi-packet data in progress. -+ * @multi_data: Saved multi-packet data. -+ * @x1: First X coordinate from last MT report. -+ * @x2: Second X coordinate from last MT report. -+ * @y1: First Y coordinate from last MT report. -+ * @y2: Second Y coordinate from last MT report. -+ * @fingers: Number of fingers from last MT report. -+ * @quirks: Bitmap of ALPS_QUIRK_*. -+ * @timer: Timer for flushing out the final report packet in the stream. -+ */ - struct alps_data { -- struct input_dev *dev2; /* Relative device */ -- char phys[32]; /* Phys */ -- const struct alps_model_info *i;/* Info */ -+ struct input_dev *dev2; -+ char phys[32]; -+ const struct alps_model_info *i; - const struct alps_nibble_commands *nibble_commands; -- int addr_command; /* Command to set register address */ -- int prev_fin; /* Finger bit from previous packet */ -- int multi_packet; /* Multi-packet data in progress */ -- unsigned char multi_data[6]; /* Saved multi-packet data */ -- int x1, x2, y1, y2; /* Coordinates from last MT report */ -- int fingers; /* Number of fingers from MT report */ -+ int addr_command; -+ int prev_fin; -+ int multi_packet; -+ unsigned char multi_data[6]; -+ int x1, x2, y1, y2; -+ int fingers; - u8 quirks; - struct timer_list timer; - }; --- -1.8.1.2 - - -From 80378616e681afdc14b236c99a77c1296f0b8031 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 20:56:33 -0800 -Subject: [PATCH 02/15] Input: ALPS - copy "model" info into alps_data struct - -Not every type of ALPS touchpad is well-suited to table-based detection. -Start moving the various alps_model_data attributes into the alps_data -struct so that we don't need a unique table entry for every possible -permutation of protocol version, flags, byte0/mask0, etc. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 63 +++++++++++++++++++++++----------------------- - drivers/input/mouse/alps.h | 14 +++++++++-- - 2 files changed, 43 insertions(+), 34 deletions(-) - diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index cf5af1f..9664e94 100644 +index e229fa3..7b99fc7 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c +@@ -27,14 +27,11 @@ + /* + * Definitions for ALPS version 3 and 4 command mode protocol + */ +-#define ALPS_V3_X_MAX 2000 +-#define ALPS_V3_Y_MAX 1400 +- +-#define ALPS_BITMAP_X_BITS 15 +-#define ALPS_BITMAP_Y_BITS 11 +- + #define ALPS_CMD_NIBBLE_10 0x01f2 + ++#define ALPS_REG_BASE_RUSHMORE 0xc2c0 ++#define ALPS_REG_BASE_PINNACLE 0x0000 ++ + static const struct alps_nibble_commands alps_v3_nibble_commands[] = { + { PSMOUSE_CMD_SETPOLL, 0x00 }, /* 0 */ + { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */ +@@ -109,11 +106,14 @@ static const struct alps_model_info alps_model_data[] = { + { { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ + { { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff, + ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ +- { { 0x73, 0x02, 0x64 }, 0x9b, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT }, +- { { 0x73, 0x02, 0x64 }, 0x9d, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT }, + { { 0x73, 0x02, 0x64 }, 0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 }, + }; + ++static void alps_set_abs_params_st(struct alps_data *priv, ++ struct input_dev *dev1); ++static void alps_set_abs_params_mt(struct alps_data *priv, ++ struct input_dev *dev1); ++ + /* + * XXX - this entry is suspicious. First byte has zero lower nibble, + * which is what a normal mouse would report. Also, the value 0x0e @@ -122,10 +122,10 @@ static const struct alps_model_info alps_model_data[] = { /* Packet formats are described in Documentation/input/alps.txt */ @@ -206,27 +109,304 @@ index cf5af1f..9664e94 100644 input_report_key(dev, BTN_0, packet[2] & 4); input_report_key(dev, BTN_1, packet[0] & 0x10); input_report_key(dev, BTN_2, packet[3] & 4); -@@ -699,9 +698,8 @@ static void alps_process_packet_v4(struct psmouse *psmouse) - static void alps_process_packet(struct psmouse *psmouse) +@@ -267,7 +266,8 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse) + * These points are returned in x1, y1, x2, and y2 when the return value + * is greater than 0. + */ +-static int alps_process_bitmap(unsigned int x_map, unsigned int y_map, ++static int alps_process_bitmap(struct alps_data *priv, ++ unsigned int x_map, unsigned int y_map, + int *x1, int *y1, int *x2, int *y2) + { + struct alps_bitmap_point { +@@ -309,7 +309,7 @@ static int alps_process_bitmap(unsigned int x_map, unsigned int y_map, + * y bitmap is reversed for what we need (lower positions are in + * higher bits), so we process from the top end. + */ +- y_map = y_map << (sizeof(y_map) * BITS_PER_BYTE - ALPS_BITMAP_Y_BITS); ++ y_map = y_map << (sizeof(y_map) * BITS_PER_BYTE - priv->y_bits); + prev_bit = 0; + point = &y_low; + for (i = 0; y_map != 0; i++, y_map <<= 1) { +@@ -355,16 +355,18 @@ static int alps_process_bitmap(unsigned int x_map, unsigned int y_map, + } + } + +- *x1 = (ALPS_V3_X_MAX * (2 * x_low.start_bit + x_low.num_bits - 1)) / +- (2 * (ALPS_BITMAP_X_BITS - 1)); +- *y1 = (ALPS_V3_Y_MAX * (2 * y_low.start_bit + y_low.num_bits - 1)) / +- (2 * (ALPS_BITMAP_Y_BITS - 1)); ++ *x1 = (priv->x_max * (2 * x_low.start_bit + x_low.num_bits - 1)) / ++ (2 * (priv->x_bits - 1)); ++ *y1 = (priv->y_max * (2 * y_low.start_bit + y_low.num_bits - 1)) / ++ (2 * (priv->y_bits - 1)); + + if (fingers > 1) { +- *x2 = (ALPS_V3_X_MAX * (2 * x_high.start_bit + x_high.num_bits - 1)) / +- (2 * (ALPS_BITMAP_X_BITS - 1)); +- *y2 = (ALPS_V3_Y_MAX * (2 * y_high.start_bit + y_high.num_bits - 1)) / +- (2 * (ALPS_BITMAP_Y_BITS - 1)); ++ *x2 = (priv->x_max * ++ (2 * x_high.start_bit + x_high.num_bits - 1)) / ++ (2 * (priv->x_bits - 1)); ++ *y2 = (priv->y_max * ++ (2 * y_high.start_bit + y_high.num_bits - 1)) / ++ (2 * (priv->y_bits - 1)); + } + + return fingers; +@@ -448,17 +450,57 @@ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse) + return; + } + ++static void alps_decode_buttons_v3(struct alps_fields *f, unsigned char *p) ++{ ++ f->left = !!(p[3] & 0x01); ++ f->right = !!(p[3] & 0x02); ++ f->middle = !!(p[3] & 0x04); ++ ++ f->ts_left = !!(p[3] & 0x10); ++ f->ts_right = !!(p[3] & 0x20); ++ f->ts_middle = !!(p[3] & 0x40); ++} ++ ++static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p) ++{ ++ f->first_mp = !!(p[4] & 0x40); ++ f->is_mp = !!(p[0] & 0x40); ++ ++ f->fingers = (p[5] & 0x3) + 1; ++ f->x_map = ((p[4] & 0x7e) << 8) | ++ ((p[1] & 0x7f) << 2) | ++ ((p[0] & 0x30) >> 4); ++ f->y_map = ((p[3] & 0x70) << 4) | ++ ((p[2] & 0x7f) << 1) | ++ (p[4] & 0x01); ++ ++ f->x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | ++ ((p[0] & 0x30) >> 4); ++ f->y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); ++ f->z = p[5] & 0x7f; ++ ++ alps_decode_buttons_v3(f, p); ++} ++ ++static void alps_decode_rushmore(struct alps_fields *f, unsigned char *p) ++{ ++ alps_decode_pinnacle(f, p); ++ ++ f->x_map |= (p[5] & 0x10) << 11; ++ f->y_map |= (p[5] & 0x20) << 6; ++} ++ + static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; -- const struct alps_model_info *model = priv->i; + unsigned char *packet = psmouse->packet; + struct input_dev *dev = psmouse->dev; + struct input_dev *dev2 = priv->dev2; +- int x, y, z; +- int left, right, middle; + int x1 = 0, y1 = 0, x2 = 0, y2 = 0; + int fingers = 0, bmap_fingers; +- unsigned int x_bitmap, y_bitmap; ++ struct alps_fields f; ++ ++ priv->decode_fields(&f, packet); + /* + * There's no single feature of touchpad position and bitmap packets +@@ -473,16 +515,10 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) + * packet. Check for this, and when it happens process the + * position packet as usual. + */ +- if (packet[0] & 0x40) { +- fingers = (packet[5] & 0x3) + 1; +- x_bitmap = ((packet[4] & 0x7e) << 8) | +- ((packet[1] & 0x7f) << 2) | +- ((packet[0] & 0x30) >> 4); +- y_bitmap = ((packet[3] & 0x70) << 4) | +- ((packet[2] & 0x7f) << 1) | +- (packet[4] & 0x01); +- +- bmap_fingers = alps_process_bitmap(x_bitmap, y_bitmap, ++ if (f.is_mp) { ++ fingers = f.fingers; ++ bmap_fingers = alps_process_bitmap(priv, ++ f.x_map, f.y_map, + &x1, &y1, &x2, &y2); + + /* +@@ -493,7 +529,7 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) + fingers = bmap_fingers; + + /* Now process position packet */ +- packet = priv->multi_data; ++ priv->decode_fields(&f, priv->multi_data); + } else { + priv->multi_packet = 0; + } +@@ -507,10 +543,10 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) + * out misidentified bitmap packets, we reject anything with this + * bit set. + */ +- if (packet[0] & 0x40) ++ if (f.is_mp) + return; + +- if (!priv->multi_packet && (packet[4] & 0x40)) { ++ if (!priv->multi_packet && f.first_mp) { + priv->multi_packet = 1; + memcpy(priv->multi_data, packet, sizeof(priv->multi_data)); + return; +@@ -518,22 +554,13 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) + + priv->multi_packet = 0; + +- left = packet[3] & 0x01; +- right = packet[3] & 0x02; +- middle = packet[3] & 0x04; +- +- x = ((packet[1] & 0x7f) << 4) | ((packet[4] & 0x30) >> 2) | +- ((packet[0] & 0x30) >> 4); +- y = ((packet[2] & 0x7f) << 4) | (packet[4] & 0x0f); +- z = packet[5] & 0x7f; +- + /* + * Sometimes the hardware sends a single packet with z = 0 + * in the middle of a stream. Real releases generate packets + * with x, y, and z all zero, so these seem to be flukes. + * Ignore them. + */ +- if (x && y && !z) ++ if (f.x && f.y && !f.z) + return; + + /* +@@ -541,12 +568,12 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) + * to rely on ST data. + */ + if (!fingers) { +- x1 = x; +- y1 = y; +- fingers = z > 0 ? 1 : 0; ++ x1 = f.x; ++ y1 = f.y; ++ fingers = f.z > 0 ? 1 : 0; + } + +- if (z >= 64) ++ if (f.z >= 64) + input_report_key(dev, BTN_TOUCH, 1); + else + input_report_key(dev, BTN_TOUCH, 0); +@@ -555,26 +582,22 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) + + input_mt_report_finger_count(dev, fingers); + +- input_report_key(dev, BTN_LEFT, left); +- input_report_key(dev, BTN_RIGHT, right); +- input_report_key(dev, BTN_MIDDLE, middle); ++ input_report_key(dev, BTN_LEFT, f.left); ++ input_report_key(dev, BTN_RIGHT, f.right); ++ input_report_key(dev, BTN_MIDDLE, f.middle); + +- if (z > 0) { +- input_report_abs(dev, ABS_X, x); +- input_report_abs(dev, ABS_Y, y); ++ if (f.z > 0) { ++ input_report_abs(dev, ABS_X, f.x); ++ input_report_abs(dev, ABS_Y, f.y); + } +- input_report_abs(dev, ABS_PRESSURE, z); ++ input_report_abs(dev, ABS_PRESSURE, f.z); + + input_sync(dev); + + if (!(priv->quirks & ALPS_QUIRK_TRACKSTICK_BUTTONS)) { +- left = packet[3] & 0x10; +- right = packet[3] & 0x20; +- middle = packet[3] & 0x40; +- +- input_report_key(dev2, BTN_LEFT, left); +- input_report_key(dev2, BTN_RIGHT, right); +- input_report_key(dev2, BTN_MIDDLE, middle); ++ input_report_key(dev2, BTN_LEFT, f.ts_left); ++ input_report_key(dev2, BTN_RIGHT, f.ts_right); ++ input_report_key(dev2, BTN_MIDDLE, f.ts_middle); + input_sync(dev2); + } + } +@@ -639,7 +662,7 @@ static void alps_process_packet_v4(struct psmouse *psmouse) + ((priv->multi_data[3] & 0x1f) << 5) | + (priv->multi_data[1] & 0x1f); + +- fingers = alps_process_bitmap(x_bitmap, y_bitmap, ++ fingers = alps_process_bitmap(priv, x_bitmap, y_bitmap, + &x1, &y1, &x2, &y2); + + /* Store MT data.*/ +@@ -696,25 +719,6 @@ static void alps_process_packet_v4(struct psmouse *psmouse) + input_sync(dev); + } + +-static void alps_process_packet(struct psmouse *psmouse) +-{ +- struct alps_data *priv = psmouse->private; +- const struct alps_model_info *model = priv->i; +- - switch (model->proto_version) { -+ switch (priv->proto_version) { - case ALPS_PROTO_V1: - case ALPS_PROTO_V2: - alps_process_packet_v1_v2(psmouse); -@@ -765,7 +763,7 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse) +- case ALPS_PROTO_V1: +- case ALPS_PROTO_V2: +- alps_process_packet_v1_v2(psmouse); +- break; +- case ALPS_PROTO_V3: +- alps_process_packet_v3(psmouse); +- break; +- case ALPS_PROTO_V4: +- alps_process_packet_v4(psmouse); +- break; +- } +-} +- + static void alps_report_bare_ps2_packet(struct psmouse *psmouse, + unsigned char packet[], + bool report_buttons) +@@ -765,14 +769,14 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse) if (((psmouse->packet[3] | psmouse->packet[4] | psmouse->packet[5]) & 0x80) || - (!alps_is_valid_first_byte(priv->i, psmouse->packet[6]))) { + (!alps_is_valid_first_byte(priv, psmouse->packet[6]))) { psmouse_dbg(psmouse, - "refusing packet %x %x %x %x (suspected interleaved ps/2)\n", - psmouse->packet[3], psmouse->packet[4], -@@ -846,7 +844,6 @@ static void alps_flush_packet(unsigned long data) + "refusing packet %4ph (suspected interleaved ps/2)\n", + psmouse->packet + 3); + return PSMOUSE_BAD_DATA; + } + +- alps_process_packet(psmouse); ++ priv->process_packet(psmouse); + + /* Continue with the next packet */ + psmouse->packet[0] = psmouse->packet[6]; +@@ -816,6 +820,7 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse) + static void alps_flush_packet(unsigned long data) + { + struct psmouse *psmouse = (struct psmouse *)data; ++ struct alps_data *priv = psmouse->private; + + serio_pause_rx(psmouse->ps2dev.serio); + +@@ -833,7 +838,7 @@ static void alps_flush_packet(unsigned long data) + "refusing packet %3ph (suspected interleaved ps/2)\n", + psmouse->packet + 3); + } else { +- alps_process_packet(psmouse); ++ priv->process_packet(psmouse); + } + psmouse->pktcnt = 0; + } +@@ -844,7 +849,6 @@ static void alps_flush_packet(unsigned long data) static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; @@ -234,7 +414,7 @@ index cf5af1f..9664e94 100644 if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */ if (psmouse->pktcnt == 3) { -@@ -859,15 +856,15 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) +@@ -857,15 +861,15 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) /* Check for PS/2 packet stuffed in the middle of ALPS packet. */ @@ -253,181 +433,67 @@ index cf5af1f..9664e94 100644 return PSMOUSE_BAD_DATA; } -@@ -1192,16 +1189,16 @@ static int alps_poll(struct psmouse *psmouse) - unsigned char buf[sizeof(psmouse->packet)]; - bool poll_failed; - -- if (priv->i->flags & ALPS_PASS) -+ if (priv->flags & ALPS_PASS) - alps_passthrough_mode_v2(psmouse, true); - - poll_failed = ps2_command(&psmouse->ps2dev, buf, - PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0; - -- if (priv->i->flags & ALPS_PASS) -+ if (priv->flags & ALPS_PASS) - alps_passthrough_mode_v2(psmouse, false); - -- if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0) -+ if (poll_failed || (buf[0] & priv->mask0) != priv->byte0) - return -1; - - if ((psmouse->badbyte & 0xc8) == 0x08) { -@@ -1219,9 +1216,8 @@ static int alps_poll(struct psmouse *psmouse) - static int alps_hw_init_v1_v2(struct psmouse *psmouse) - { - struct alps_data *priv = psmouse->private; -- const struct alps_model_info *model = priv->i; - -- if ((model->flags & ALPS_PASS) && -+ if ((priv->flags & ALPS_PASS) && - alps_passthrough_mode_v2(psmouse, true)) { - return -1; - } -@@ -1236,7 +1232,7 @@ static int alps_hw_init_v1_v2(struct psmouse *psmouse) - return -1; +@@ -879,7 +883,7 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) } -- if ((model->flags & ALPS_PASS) && -+ if ((priv->flags & ALPS_PASS) && - alps_passthrough_mode_v2(psmouse, false)) { - return -1; - } -@@ -1522,10 +1518,9 @@ error: - static int alps_hw_init(struct psmouse *psmouse) - { - struct alps_data *priv = psmouse->private; -- const struct alps_model_info *model = priv->i; - int ret = -1; - -- switch (model->proto_version) { -+ switch (priv->proto_version) { - case ALPS_PROTO_V1: - case ALPS_PROTO_V2: - ret = alps_hw_init_v1_v2(psmouse); -@@ -1587,7 +1582,10 @@ int alps_init(struct psmouse *psmouse) - if (!model) - goto init_fail; - -- priv->i = model; -+ priv->proto_version = model->proto_version; -+ priv->byte0 = model->byte0; -+ priv->mask0 = model->mask0; -+ priv->flags = model->flags; - - if (alps_hw_init(psmouse)) - goto init_fail; -@@ -1611,7 +1609,7 @@ int alps_init(struct psmouse *psmouse) - - dev1->evbit[BIT_WORD(EV_ABS)] |= BIT_MASK(EV_ABS); - -- switch (model->proto_version) { -+ switch (priv->proto_version) { - case ALPS_PROTO_V1: - case ALPS_PROTO_V2: - input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0); -@@ -1635,17 +1633,17 @@ int alps_init(struct psmouse *psmouse) - - input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); - -- if (model->flags & ALPS_WHEEL) { -+ if (priv->flags & ALPS_WHEEL) { - dev1->evbit[BIT_WORD(EV_REL)] |= BIT_MASK(EV_REL); - dev1->relbit[BIT_WORD(REL_WHEEL)] |= BIT_MASK(REL_WHEEL); + if (psmouse->pktcnt == psmouse->pktsize) { +- alps_process_packet(psmouse); ++ priv->process_packet(psmouse); + return PSMOUSE_FULL_PACKET; } -- if (model->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) { -+ if (priv->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) { - dev1->keybit[BIT_WORD(BTN_FORWARD)] |= BIT_MASK(BTN_FORWARD); - dev1->keybit[BIT_WORD(BTN_BACK)] |= BIT_MASK(BTN_BACK); - } +@@ -967,24 +971,42 @@ static int alps_command_mode_write_reg(struct psmouse *psmouse, int addr, + return __alps_command_mode_write_reg(psmouse, value); + } -- if (model->flags & ALPS_FOUR_BUTTONS) { -+ if (priv->flags & ALPS_FOUR_BUTTONS) { - dev1->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_0); - dev1->keybit[BIT_WORD(BTN_1)] |= BIT_MASK(BTN_1); - dev1->keybit[BIT_WORD(BTN_2)] |= BIT_MASK(BTN_2); -@@ -1656,7 +1654,8 @@ int alps_init(struct psmouse *psmouse) - - snprintf(priv->phys, sizeof(priv->phys), "%s/input1", psmouse->ps2dev.serio->phys); - dev2->phys = priv->phys; -- dev2->name = (model->flags & ALPS_DUALPOINT) ? "DualPoint Stick" : "PS/2 Mouse"; -+ dev2->name = (priv->flags & ALPS_DUALPOINT) ? -+ "DualPoint Stick" : "PS/2 Mouse"; - dev2->id.bustype = BUS_I8042; - dev2->id.vendor = 0x0002; - dev2->id.product = PSMOUSE_ALPS; -@@ -1675,7 +1674,7 @@ int alps_init(struct psmouse *psmouse) - psmouse->poll = alps_poll; - psmouse->disconnect = alps_disconnect; - psmouse->reconnect = alps_reconnect; -- psmouse->pktsize = model->proto_version == ALPS_PROTO_V4 ? 8 : 6; -+ psmouse->pktsize = priv->proto_version == ALPS_PROTO_V4 ? 8 : 6; - - /* We are having trouble resyncing ALPS touchpads so disable it for now */ - psmouse->resync_time = 0; -diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h -index 67be4e5..efd0eea 100644 ---- a/drivers/input/mouse/alps.h -+++ b/drivers/input/mouse/alps.h -@@ -63,10 +63,15 @@ struct alps_nibble_commands { - * struct alps_data - private data structure for the ALPS driver - * @dev2: "Relative" device used to report trackstick or mouse activity. - * @phys: Physical path for the relative device. -- * @i: Information on the detected touchpad model. - * @nibble_commands: Command mapping used for touchpad register accesses. - * @addr_command: Command used to tell the touchpad that a register address - * follows. -+ * @proto_version: Indicates V1/V2/V3/... -+ * @byte0: Helps figure out whether a position report packet matches the -+ * known format for this model. The first byte of the report, ANDed with -+ * mask0, should match byte0. -+ * @mask0: The mask used to check the first byte of the report. -+ * @flags: Additional device capabilities (passthrough port, trackstick, etc.). - * @prev_fin: Finger bit from previous packet. - * @multi_packet: Multi-packet data in progress. - * @multi_data: Saved multi-packet data. -@@ -81,9 +86,14 @@ struct alps_nibble_commands { - struct alps_data { - struct input_dev *dev2; - char phys[32]; -- const struct alps_model_info *i; ++static int alps_rpt_cmd(struct psmouse *psmouse, int init_command, ++ int repeated_command, unsigned char *param) ++{ ++ struct ps2dev *ps2dev = &psmouse->ps2dev; + -+ /* these are autodetected when the device is identified */ - const struct alps_nibble_commands *nibble_commands; - int addr_command; -+ unsigned char proto_version; -+ unsigned char byte0, mask0; -+ unsigned char flags; ++ param[0] = 0; ++ if (init_command && ps2_command(ps2dev, param, init_command)) ++ return -EIO; + - int prev_fin; - int multi_packet; - unsigned char multi_data[6]; --- -1.8.1.2 - - -From 7b9d630645b501a484e498461259167858d331e6 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 20:57:04 -0800 -Subject: [PATCH 03/15] Input: ALPS - move alps_get_model() down below hw_init - code - -This will minimize the number of forward declarations needed when -alps_get_model() starts assigning function pointers. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 186 ++++++++++++++++++++++----------------------- - 1 file changed, 93 insertions(+), 93 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 9664e94..3c15fd3 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -1000,99 +1000,6 @@ static inline int alps_exit_command_mode(struct psmouse *psmouse) ++ if (ps2_command(ps2dev, NULL, repeated_command) || ++ ps2_command(ps2dev, NULL, repeated_command) || ++ ps2_command(ps2dev, NULL, repeated_command)) ++ return -EIO; ++ ++ param[0] = param[1] = param[2] = 0xff; ++ if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) ++ return -EIO; ++ ++ psmouse_dbg(psmouse, "%2.2X report: %2.2x %2.2x %2.2x\n", ++ repeated_command, param[0], param[1], param[2]); ++ return 0; ++} ++ + static int alps_enter_command_mode(struct psmouse *psmouse, + unsigned char *resp) + { + unsigned char param[4]; +- struct ps2dev *ps2dev = &psmouse->ps2dev; + +- if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) || +- ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) || +- ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) || +- ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) { ++ if (alps_rpt_cmd(psmouse, 0, PSMOUSE_CMD_RESET_WRAP, param)) { + psmouse_err(psmouse, "failed to enter command mode\n"); + return -1; + } + +- if (param[0] != 0x88 && param[1] != 0x07) { ++ if (param[0] != 0x88 || (param[1] != 0x07 && param[1] != 0x08)) { + psmouse_dbg(psmouse, +- "unknown response while entering command mode: %2.2x %2.2x %2.2x\n", +- param[0], param[1], param[2]); ++ "unknown response while entering command mode\n"); + return -1; + } + +@@ -1001,99 +1023,6 @@ static inline int alps_exit_command_mode(struct psmouse *psmouse) return 0; } @@ -527,182 +593,7 @@ index 9664e94..3c15fd3 100644 /* * For DualPoint devices select the device that should respond to * subsequent commands. It looks like glidepad is behind stickpointer, -@@ -1536,6 +1443,99 @@ static int alps_hw_init(struct psmouse *psmouse) - return ret; - } - -+static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int *version) -+{ -+ struct ps2dev *ps2dev = &psmouse->ps2dev; -+ static const unsigned char rates[] = { 0, 10, 20, 40, 60, 80, 100, 200 }; -+ unsigned char param[4]; -+ const struct alps_model_info *model = NULL; -+ int i; -+ -+ /* -+ * First try "E6 report". -+ * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed. -+ * The bits 0-2 of the first byte will be 1s if some buttons are -+ * pressed. -+ */ -+ param[0] = 0; -+ if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || -+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) || -+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) || -+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11)) -+ return NULL; -+ -+ param[0] = param[1] = param[2] = 0xff; -+ if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) -+ return NULL; -+ -+ psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x", -+ param[0], param[1], param[2]); -+ -+ if ((param[0] & 0xf8) != 0 || param[1] != 0 || -+ (param[2] != 10 && param[2] != 100)) -+ return NULL; -+ -+ /* -+ * Now try "E7 report". Allowed responses are in -+ * alps_model_data[].signature -+ */ -+ param[0] = 0; -+ if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || -+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) || -+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) || -+ ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21)) -+ return NULL; -+ -+ param[0] = param[1] = param[2] = 0xff; -+ if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) -+ return NULL; -+ -+ psmouse_dbg(psmouse, "E7 report: %2.2x %2.2x %2.2x", -+ param[0], param[1], param[2]); -+ -+ if (version) { -+ for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++) -+ /* empty */; -+ *version = (param[0] << 8) | (param[1] << 4) | i; -+ } -+ -+ for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) { -+ if (!memcmp(param, alps_model_data[i].signature, -+ sizeof(alps_model_data[i].signature))) { -+ model = alps_model_data + i; -+ break; -+ } -+ } -+ -+ if (model && model->proto_version > ALPS_PROTO_V2) { -+ /* -+ * Need to check command mode response to identify -+ * model -+ */ -+ model = NULL; -+ if (alps_enter_command_mode(psmouse, param)) { -+ psmouse_warn(psmouse, -+ "touchpad failed to enter command mode\n"); -+ } else { -+ for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) { -+ if (alps_model_data[i].proto_version > ALPS_PROTO_V2 && -+ alps_model_data[i].command_mode_resp == param[0]) { -+ model = alps_model_data + i; -+ break; -+ } -+ } -+ alps_exit_command_mode(psmouse); -+ -+ if (!model) -+ psmouse_dbg(psmouse, -+ "Unknown command mode response %2.2x\n", -+ param[0]); -+ } -+ } -+ -+ return model; -+} -+ - static int alps_reconnect(struct psmouse *psmouse) - { - const struct alps_model_info *model; --- -1.8.1.2 - - -From 59f721fed5e707eeae2d084dff0963f0cb02901a Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:19:01 -0800 -Subject: [PATCH 04/15] Input: ALPS - introduce helper function for repeated - commands - -Several ALPS driver init sequences repeat a command three times, then -issue PSMOUSE_CMD_GETINFO to read the result. Move this into a helper -function to simplify the code. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 71 ++++++++++++++++++++-------------------------- - 1 file changed, 30 insertions(+), 41 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 3c15fd3..c03ce3f 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -966,24 +966,42 @@ static int alps_command_mode_write_reg(struct psmouse *psmouse, int addr, - return __alps_command_mode_write_reg(psmouse, value); - } - -+static int alps_rpt_cmd(struct psmouse *psmouse, int init_command, -+ int repeated_command, unsigned char *param) -+{ -+ struct ps2dev *ps2dev = &psmouse->ps2dev; -+ -+ param[0] = 0; -+ if (init_command && ps2_command(ps2dev, param, init_command)) -+ return -EIO; -+ -+ if (ps2_command(ps2dev, NULL, repeated_command) || -+ ps2_command(ps2dev, NULL, repeated_command) || -+ ps2_command(ps2dev, NULL, repeated_command)) -+ return -EIO; -+ -+ param[0] = param[1] = param[2] = 0xff; -+ if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) -+ return -EIO; -+ -+ psmouse_dbg(psmouse, "%2.2X report: %2.2x %2.2x %2.2x\n", -+ repeated_command, param[0], param[1], param[2]); -+ return 0; -+} -+ - static int alps_enter_command_mode(struct psmouse *psmouse, - unsigned char *resp) - { - unsigned char param[4]; -- struct ps2dev *ps2dev = &psmouse->ps2dev; - -- if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_RESET_WRAP) || -- ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) { -+ if (alps_rpt_cmd(psmouse, 0, PSMOUSE_CMD_RESET_WRAP, param)) { - psmouse_err(psmouse, "failed to enter command mode\n"); - return -1; - } - - if (param[0] != 0x88 && param[1] != 0x07) { - psmouse_dbg(psmouse, -- "unknown response while entering command mode: %2.2x %2.2x %2.2x\n", -- param[0], param[1], param[2]); -+ "unknown response while entering command mode\n"); - return -1; - } - -@@ -1043,18 +1061,10 @@ static int alps_absolute_mode_v1_v2(struct psmouse *psmouse) +@@ -1137,18 +1066,10 @@ static int alps_absolute_mode_v1_v2(struct psmouse *psmouse) static int alps_get_status(struct psmouse *psmouse, char *param) { @@ -722,1273 +613,47 @@ index 3c15fd3..c03ce3f 100644 return 0; } -@@ -1445,7 +1455,6 @@ static int alps_hw_init(struct psmouse *psmouse) +@@ -1190,16 +1111,16 @@ static int alps_poll(struct psmouse *psmouse) + unsigned char buf[sizeof(psmouse->packet)]; + bool poll_failed; - static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int *version) - { -- struct ps2dev *ps2dev = &psmouse->ps2dev; - static const unsigned char rates[] = { 0, 10, 20, 40, 60, 80, 100, 200 }; - unsigned char param[4]; - const struct alps_model_info *model = NULL; -@@ -1457,20 +1466,10 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int - * The bits 0-2 of the first byte will be 1s if some buttons are - * pressed. - */ -- param[0] = 0; -- if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11)) -- return NULL; -- -- param[0] = param[1] = param[2] = 0xff; -- if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) -+ if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, PSMOUSE_CMD_SETSCALE11, -+ param)) - return NULL; +- if (priv->i->flags & ALPS_PASS) ++ if (priv->flags & ALPS_PASS) + alps_passthrough_mode_v2(psmouse, true); -- psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x", -- param[0], param[1], param[2]); -- - if ((param[0] & 0xf8) != 0 || param[1] != 0 || - (param[2] != 10 && param[2] != 100)) - return NULL; -@@ -1479,20 +1478,10 @@ static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int - * Now try "E7 report". Allowed responses are in - * alps_model_data[].signature - */ -- param[0] = 0; -- if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21) || -- ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE21)) -- return NULL; -- -- param[0] = param[1] = param[2] = 0xff; -- if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETINFO)) -+ if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, PSMOUSE_CMD_SETSCALE21, -+ param)) - return NULL; + poll_failed = ps2_command(&psmouse->ps2dev, buf, + PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)) < 0; -- psmouse_dbg(psmouse, "E7 report: %2.2x %2.2x %2.2x", -- param[0], param[1], param[2]); -- - if (version) { - for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++) - /* empty */; --- -1.8.1.2 - - -From b07564337687bf94d1872b0bb0d072e56434d821 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:19:59 -0800 -Subject: [PATCH 05/15] Input: ALPS - rework detection sequence - -If the E6 report test passes, get the E7 and EC reports right away and -then try to match an entry in the table. - -Pass in the alps_data struct, so that the detection code will be able to -set operating parameters based on information found during detection. - -Change the version (psmouse->model) to report the protocol version only, -in preparation for supporting models that do not show up in the ID table. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 124 +++++++++++++++++++-------------------------- - drivers/input/mouse/alps.h | 8 +-- - 2 files changed, 56 insertions(+), 76 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index c03ce3f..c11b47e 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -1453,86 +1453,76 @@ static int alps_hw_init(struct psmouse *psmouse) - return ret; - } +- if (priv->i->flags & ALPS_PASS) ++ if (priv->flags & ALPS_PASS) + alps_passthrough_mode_v2(psmouse, false); --static const struct alps_model_info *alps_get_model(struct psmouse *psmouse, int *version) -+static int alps_match_table(struct psmouse *psmouse, struct alps_data *priv, -+ unsigned char *e7, unsigned char *ec) - { -- static const unsigned char rates[] = { 0, 10, 20, 40, 60, 80, 100, 200 }; -- unsigned char param[4]; -- const struct alps_model_info *model = NULL; -+ const struct alps_model_info *model; - int i; - -+ for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) { -+ model = &alps_model_data[i]; -+ -+ if (!memcmp(e7, model->signature, sizeof(model->signature)) && -+ (!model->command_mode_resp || -+ model->command_mode_resp == ec[2])) { -+ -+ priv->proto_version = model->proto_version; -+ priv->flags = model->flags; -+ priv->byte0 = model->byte0; -+ priv->mask0 = model->mask0; -+ -+ return 0; -+ } -+ } -+ -+ return -EINVAL; -+} -+ -+static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) -+{ -+ unsigned char e6[4], e7[4], ec[4]; -+ - /* - * First try "E6 report". - * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed. - * The bits 0-2 of the first byte will be 1s if some buttons are - * pressed. - */ -- if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, PSMOUSE_CMD_SETSCALE11, -- param)) -- return NULL; -+ if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, -+ PSMOUSE_CMD_SETSCALE11, e6)) -+ return -EIO; - -- if ((param[0] & 0xf8) != 0 || param[1] != 0 || -- (param[2] != 10 && param[2] != 100)) -- return NULL; -+ if ((e6[0] & 0xf8) != 0 || e6[1] != 0 || (e6[2] != 10 && e6[2] != 100)) -+ return -EINVAL; - - /* -- * Now try "E7 report". Allowed responses are in -- * alps_model_data[].signature -+ * Now get the "E7" and "EC" reports. These will uniquely identify -+ * most ALPS touchpads. - */ -- if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, PSMOUSE_CMD_SETSCALE21, -- param)) -- return NULL; -- -- if (version) { -- for (i = 0; i < ARRAY_SIZE(rates) && param[2] != rates[i]; i++) -- /* empty */; -- *version = (param[0] << 8) | (param[1] << 4) | i; -- } -- -- for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) { -- if (!memcmp(param, alps_model_data[i].signature, -- sizeof(alps_model_data[i].signature))) { -- model = alps_model_data + i; -- break; -- } -- } -+ if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, -+ PSMOUSE_CMD_SETSCALE21, e7) || -+ alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, -+ PSMOUSE_CMD_RESET_WRAP, ec) || -+ alps_exit_command_mode(psmouse)) -+ return -EIO; - -- if (model && model->proto_version > ALPS_PROTO_V2) { -- /* -- * Need to check command mode response to identify -- * model -- */ -- model = NULL; -- if (alps_enter_command_mode(psmouse, param)) { -- psmouse_warn(psmouse, -- "touchpad failed to enter command mode\n"); -- } else { -- for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) { -- if (alps_model_data[i].proto_version > ALPS_PROTO_V2 && -- alps_model_data[i].command_mode_resp == param[0]) { -- model = alps_model_data + i; -- break; -- } -- } -- alps_exit_command_mode(psmouse); -+ if (alps_match_table(psmouse, priv, e7, ec) == 0) -+ return 0; - -- if (!model) -- psmouse_dbg(psmouse, -- "Unknown command mode response %2.2x\n", -- param[0]); -- } -- } -+ psmouse_info(psmouse, -+ "Unknown ALPS touchpad: E7=%2.2x %2.2x %2.2x, EC=%2.2x %2.2x %2.2x\n", -+ e7[0], e7[1], e7[2], ec[0], ec[1], ec[2]); - -- return model; -+ return -EINVAL; - } - - static int alps_reconnect(struct psmouse *psmouse) - { -- const struct alps_model_info *model; -+ struct alps_data *priv = psmouse->private; - - psmouse_reset(psmouse); - -- model = alps_get_model(psmouse, NULL); -- if (!model) -+ if (alps_identify(psmouse, priv) < 0) +- if (poll_failed || (buf[0] & priv->i->mask0) != priv->i->byte0) ++ if (poll_failed || (buf[0] & priv->mask0) != priv->byte0) return -1; - return alps_hw_init(psmouse); -@@ -1551,9 +1541,7 @@ static void alps_disconnect(struct psmouse *psmouse) - int alps_init(struct psmouse *psmouse) - { - struct alps_data *priv; -- const struct alps_model_info *model; - struct input_dev *dev1 = psmouse->dev, *dev2; -- int version; - - priv = kzalloc(sizeof(struct alps_data), GFP_KERNEL); - dev2 = input_allocate_device(); -@@ -1567,15 +1555,9 @@ int alps_init(struct psmouse *psmouse) - - psmouse_reset(psmouse); - -- model = alps_get_model(psmouse, &version); -- if (!model) -+ if (alps_identify(psmouse, priv) < 0) - goto init_fail; - -- priv->proto_version = model->proto_version; -- priv->byte0 = model->byte0; -- priv->mask0 = model->mask0; -- priv->flags = model->flags; -- - if (alps_hw_init(psmouse)) - goto init_fail; - -@@ -1680,18 +1662,16 @@ init_fail: - - int alps_detect(struct psmouse *psmouse, bool set_properties) - { -- int version; -- const struct alps_model_info *model; -+ struct alps_data dummy; - -- model = alps_get_model(psmouse, &version); -- if (!model) -+ if (alps_identify(psmouse, &dummy) < 0) - return -1; - - if (set_properties) { - psmouse->vendor = "ALPS"; -- psmouse->name = model->flags & ALPS_DUALPOINT ? -+ psmouse->name = dummy.flags & ALPS_DUALPOINT ? - "DualPoint TouchPad" : "GlidePoint"; -- psmouse->model = version; -+ psmouse->model = dummy.proto_version << 8; - } - return 0; - } -diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h -index efd0eea..a81b318 100644 ---- a/drivers/input/mouse/alps.h -+++ b/drivers/input/mouse/alps.h -@@ -12,10 +12,10 @@ - #ifndef _ALPS_H - #define _ALPS_H - --#define ALPS_PROTO_V1 0 --#define ALPS_PROTO_V2 1 --#define ALPS_PROTO_V3 2 --#define ALPS_PROTO_V4 3 -+#define ALPS_PROTO_V1 1 -+#define ALPS_PROTO_V2 2 -+#define ALPS_PROTO_V3 3 -+#define ALPS_PROTO_V4 4 - - /** - * struct alps_model_info - touchpad ID table --- -1.8.1.2 - - -From 3291afbdc14314b4eb4b97efc9017a26f00bb143 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:22:08 -0800 -Subject: [PATCH 06/15] Input: ALPS - use function pointers for different - protocol handlers - -In anticipation of adding more ALPS protocols and more per-device quirks, -use function pointers instead of switch statements to call functions that -differ from one device to the next. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 101 +++++++++++++++++++++------------------------ - drivers/input/mouse/alps.h | 7 ++++ - 2 files changed, 54 insertions(+), 54 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index c11b47e..3cca3ef 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -114,6 +114,11 @@ static const struct alps_model_info alps_model_data[] = { - { { 0x73, 0x02, 0x64 }, 0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 }, - }; - -+static void alps_set_abs_params_st(struct alps_data *priv, -+ struct input_dev *dev1); -+static void alps_set_abs_params_mt(struct alps_data *priv, -+ struct input_dev *dev1); -+ - /* - * XXX - this entry is suspicious. First byte has zero lower nibble, - * which is what a normal mouse would report. Also, the value 0x0e -@@ -695,24 +700,6 @@ static void alps_process_packet_v4(struct psmouse *psmouse) - input_sync(dev); - } - --static void alps_process_packet(struct psmouse *psmouse) --{ -- struct alps_data *priv = psmouse->private; -- -- switch (priv->proto_version) { -- case ALPS_PROTO_V1: -- case ALPS_PROTO_V2: -- alps_process_packet_v1_v2(psmouse); -- break; -- case ALPS_PROTO_V3: -- alps_process_packet_v3(psmouse); -- break; -- case ALPS_PROTO_V4: -- alps_process_packet_v4(psmouse); -- break; -- } --} -- - static void alps_report_bare_ps2_packet(struct psmouse *psmouse, - unsigned char packet[], - bool report_buttons) -@@ -771,7 +758,7 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse) - return PSMOUSE_BAD_DATA; - } - -- alps_process_packet(psmouse); -+ priv->process_packet(psmouse); - - /* Continue with the next packet */ - psmouse->packet[0] = psmouse->packet[6]; -@@ -815,6 +802,7 @@ static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse) - static void alps_flush_packet(unsigned long data) - { - struct psmouse *psmouse = (struct psmouse *)data; -+ struct alps_data *priv = psmouse->private; - - serio_pause_rx(psmouse->ps2dev.serio); - -@@ -833,7 +821,7 @@ static void alps_flush_packet(unsigned long data) - psmouse->packet[3], psmouse->packet[4], - psmouse->packet[5]); - } else { -- alps_process_packet(psmouse); -+ priv->process_packet(psmouse); - } - psmouse->pktcnt = 0; - } -@@ -878,7 +866,7 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) - } - - if (psmouse->pktcnt == psmouse->pktsize) { -- alps_process_packet(psmouse); -+ priv->process_packet(psmouse); - return PSMOUSE_FULL_PACKET; - } - -@@ -1432,25 +1420,26 @@ error: - return -1; - } - --static int alps_hw_init(struct psmouse *psmouse) -+static void alps_set_defaults(struct alps_data *priv) - { -- struct alps_data *priv = psmouse->private; -- int ret = -1; -- - switch (priv->proto_version) { - case ALPS_PROTO_V1: - case ALPS_PROTO_V2: -- ret = alps_hw_init_v1_v2(psmouse); -+ priv->hw_init = alps_hw_init_v1_v2; -+ priv->process_packet = alps_process_packet_v1_v2; -+ priv->set_abs_params = alps_set_abs_params_st; - break; - case ALPS_PROTO_V3: -- ret = alps_hw_init_v3(psmouse); -+ priv->hw_init = alps_hw_init_v3; -+ priv->process_packet = alps_process_packet_v3; -+ priv->set_abs_params = alps_set_abs_params_mt; - break; - case ALPS_PROTO_V4: -- ret = alps_hw_init_v4(psmouse); -+ priv->hw_init = alps_hw_init_v4; -+ priv->process_packet = alps_process_packet_v4; -+ priv->set_abs_params = alps_set_abs_params_mt; - break; - } -- -- return ret; - } - - static int alps_match_table(struct psmouse *psmouse, struct alps_data *priv, -@@ -1467,6 +1456,8 @@ static int alps_match_table(struct psmouse *psmouse, struct alps_data *priv, - model->command_mode_resp == ec[2])) { - - priv->proto_version = model->proto_version; -+ alps_set_defaults(priv); -+ - priv->flags = model->flags; - priv->byte0 = model->byte0; - priv->mask0 = model->mask0; -@@ -1525,7 +1516,7 @@ static int alps_reconnect(struct psmouse *psmouse) - if (alps_identify(psmouse, priv) < 0) - return -1; - -- return alps_hw_init(psmouse); -+ return priv->hw_init(psmouse); - } - - static void alps_disconnect(struct psmouse *psmouse) -@@ -1538,6 +1529,29 @@ static void alps_disconnect(struct psmouse *psmouse) - kfree(priv); - } - -+static void alps_set_abs_params_st(struct alps_data *priv, -+ struct input_dev *dev1) -+{ -+ input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0); -+ input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0); -+} -+ -+static void alps_set_abs_params_mt(struct alps_data *priv, -+ struct input_dev *dev1) -+{ -+ set_bit(INPUT_PROP_SEMI_MT, dev1->propbit); -+ input_mt_init_slots(dev1, 2, 0); -+ input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, ALPS_V3_X_MAX, 0, 0); -+ input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, ALPS_V3_Y_MAX, 0, 0); -+ -+ set_bit(BTN_TOOL_DOUBLETAP, dev1->keybit); -+ set_bit(BTN_TOOL_TRIPLETAP, dev1->keybit); -+ set_bit(BTN_TOOL_QUADTAP, dev1->keybit); -+ -+ input_set_abs_params(dev1, ABS_X, 0, ALPS_V3_X_MAX, 0, 0); -+ input_set_abs_params(dev1, ABS_Y, 0, ALPS_V3_Y_MAX, 0, 0); -+} -+ - int alps_init(struct psmouse *psmouse) - { - struct alps_data *priv; -@@ -1558,7 +1572,7 @@ int alps_init(struct psmouse *psmouse) - if (alps_identify(psmouse, priv) < 0) - goto init_fail; - -- if (alps_hw_init(psmouse)) -+ if (priv->hw_init(psmouse)) - goto init_fail; - - /* -@@ -1580,28 +1594,7 @@ int alps_init(struct psmouse *psmouse) - - dev1->evbit[BIT_WORD(EV_ABS)] |= BIT_MASK(EV_ABS); - -- switch (priv->proto_version) { -- case ALPS_PROTO_V1: -- case ALPS_PROTO_V2: -- input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0); -- input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0); -- break; -- case ALPS_PROTO_V3: -- case ALPS_PROTO_V4: -- set_bit(INPUT_PROP_SEMI_MT, dev1->propbit); -- input_mt_init_slots(dev1, 2, 0); -- input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, ALPS_V3_X_MAX, 0, 0); -- input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, ALPS_V3_Y_MAX, 0, 0); -- -- set_bit(BTN_TOOL_DOUBLETAP, dev1->keybit); -- set_bit(BTN_TOOL_TRIPLETAP, dev1->keybit); -- set_bit(BTN_TOOL_QUADTAP, dev1->keybit); -- -- input_set_abs_params(dev1, ABS_X, 0, ALPS_V3_X_MAX, 0, 0); -- input_set_abs_params(dev1, ABS_Y, 0, ALPS_V3_Y_MAX, 0, 0); -- break; -- } -- -+ priv->set_abs_params(priv, dev1); - input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); - - if (priv->flags & ALPS_WHEEL) { -diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h -index a81b318..0934f8b 100644 ---- a/drivers/input/mouse/alps.h -+++ b/drivers/input/mouse/alps.h -@@ -72,6 +72,9 @@ struct alps_nibble_commands { - * mask0, should match byte0. - * @mask0: The mask used to check the first byte of the report. - * @flags: Additional device capabilities (passthrough port, trackstick, etc.). -+ * @hw_init: Protocol-specific hardware init function. -+ * @process_packet: Protocol-specific function to process a report packet. -+ * @set_abs_params: Protocol-specific function to configure the input_dev. - * @prev_fin: Finger bit from previous packet. - * @multi_packet: Multi-packet data in progress. - * @multi_data: Saved multi-packet data. -@@ -94,6 +97,10 @@ struct alps_data { - unsigned char byte0, mask0; - unsigned char flags; - -+ int (*hw_init)(struct psmouse *psmouse); -+ void (*process_packet)(struct psmouse *psmouse); -+ void (*set_abs_params)(struct alps_data *priv, struct input_dev *dev1); -+ - int prev_fin; - int multi_packet; - unsigned char multi_data[6]; --- -1.8.1.2 - - -From 9984c4d8611c9ecb4942349f1058b4ad1fcfb7c8 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:23:04 -0800 -Subject: [PATCH 07/15] Input: ALPS - move {addr,nibble}_command settings into - alps_set_defaults() - -This allows alps_identify() to override these settings based on the -device characteristics, if it is ever necessary. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 12 ++++-------- - 1 file changed, 4 insertions(+), 8 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 3cca3ef..22f5ef1 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -1192,14 +1192,10 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse) - - static int alps_hw_init_v3(struct psmouse *psmouse) - { -- struct alps_data *priv = psmouse->private; - struct ps2dev *ps2dev = &psmouse->ps2dev; - int reg_val; - unsigned char param[4]; - -- priv->nibble_commands = alps_v3_nibble_commands; -- priv->addr_command = PSMOUSE_CMD_RESET_WRAP; -- - if (alps_enter_command_mode(psmouse, NULL)) - goto error; - -@@ -1345,13 +1341,9 @@ static int alps_absolute_mode_v4(struct psmouse *psmouse) - - static int alps_hw_init_v4(struct psmouse *psmouse) - { -- struct alps_data *priv = psmouse->private; - struct ps2dev *ps2dev = &psmouse->ps2dev; - unsigned char param[4]; - -- priv->nibble_commands = alps_v4_nibble_commands; -- priv->addr_command = PSMOUSE_CMD_DISABLE; -- - if (alps_enter_command_mode(psmouse, NULL)) - goto error; - -@@ -1433,11 +1425,15 @@ static void alps_set_defaults(struct alps_data *priv) - priv->hw_init = alps_hw_init_v3; - priv->process_packet = alps_process_packet_v3; - priv->set_abs_params = alps_set_abs_params_mt; -+ priv->nibble_commands = alps_v3_nibble_commands; -+ priv->addr_command = PSMOUSE_CMD_RESET_WRAP; - break; - case ALPS_PROTO_V4: - priv->hw_init = alps_hw_init_v4; - priv->process_packet = alps_process_packet_v4; - priv->set_abs_params = alps_set_abs_params_mt; -+ priv->nibble_commands = alps_v4_nibble_commands; -+ priv->addr_command = PSMOUSE_CMD_DISABLE; - break; - } - } --- -1.8.1.2 - - -From a8e2c2b0cc44c0ec2cb59a79c1a341f5608248cc Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:23:34 -0800 -Subject: [PATCH 08/15] Input: ALPS - rework detection of Pinnacle AGx - touchpads - -The official ALPS driver uses the EC report, not the E7 report, to detect -these devices. Also, they check for a range of values; the original -table-based code only checked for two specific ones. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 22f5ef1..f70a930 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -109,8 +109,6 @@ static const struct alps_model_info alps_model_data[] = { - { { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ - { { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff, - ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ -- { { 0x73, 0x02, 0x64 }, 0x9b, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT }, -- { { 0x73, 0x02, 0x64 }, 0x9d, ALPS_PROTO_V3, 0x8f, 0x8f, ALPS_DUALPOINT }, - { { 0x73, 0x02, 0x64 }, 0x8a, ALPS_PROTO_V4, 0x8f, 0x8f, 0 }, - }; - -@@ -1414,6 +1412,10 @@ error: - - static void alps_set_defaults(struct alps_data *priv) - { -+ priv->byte0 = 0x8f; -+ priv->mask0 = 0x8f; -+ priv->flags = ALPS_DUALPOINT; -+ - switch (priv->proto_version) { - case ALPS_PROTO_V1: - case ALPS_PROTO_V2: -@@ -1493,8 +1495,15 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) - alps_exit_command_mode(psmouse)) - return -EIO; - -- if (alps_match_table(psmouse, priv, e7, ec) == 0) -+ if (alps_match_table(psmouse, priv, e7, ec) == 0) { -+ return 0; -+ } else if (ec[0] == 0x88 && ec[1] == 0x07 && -+ ec[2] >= 0x90 && ec[2] <= 0x9d) { -+ priv->proto_version = ALPS_PROTO_V3; -+ alps_set_defaults(priv); -+ - return 0; -+ } - - psmouse_info(psmouse, - "Unknown ALPS touchpad: E7=%2.2x %2.2x %2.2x, EC=%2.2x %2.2x %2.2x\n", --- -1.8.1.2 - - -From a5f89d7393f5582efeb3e83bd4bc3eb146528371 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:24:22 -0800 -Subject: [PATCH 09/15] Input: ALPS - fix command mode check - -Pinnacle class devices should return "88 07 xx" or "88 08 xx" when -entering command mode. If either the first byte or the second byte is -invalid, return an error. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index f70a930..15c1eb5 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -985,7 +985,7 @@ static int alps_enter_command_mode(struct psmouse *psmouse, - return -1; - } - -- if (param[0] != 0x88 && param[1] != 0x07) { -+ if (param[0] != 0x88 || (param[1] != 0x07 && param[1] != 0x08)) { - psmouse_dbg(psmouse, - "unknown response while entering command mode\n"); - return -1; --- -1.8.1.2 - - -From 8b9993ec92c4ba02b2c155da6d5f5aa3502aa672 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:24:55 -0800 -Subject: [PATCH 10/15] Input: ALPS - move pixel and bitmap info into alps_data - struct - -Newer touchpads use different constants, so make them runtime- -configurable. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 47 ++++++++++++++++++++++++---------------------- - drivers/input/mouse/alps.h | 8 ++++++++ - 2 files changed, 33 insertions(+), 22 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 15c1eb5..9199d2d 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -27,12 +27,6 @@ - /* - * Definitions for ALPS version 3 and 4 command mode protocol - */ --#define ALPS_V3_X_MAX 2000 --#define ALPS_V3_Y_MAX 1400 -- --#define ALPS_BITMAP_X_BITS 15 --#define ALPS_BITMAP_Y_BITS 11 -- - #define ALPS_CMD_NIBBLE_10 0x01f2 - - static const struct alps_nibble_commands alps_v3_nibble_commands[] = { -@@ -269,7 +263,8 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse) - * These points are returned in x1, y1, x2, and y2 when the return value - * is greater than 0. - */ --static int alps_process_bitmap(unsigned int x_map, unsigned int y_map, -+static int alps_process_bitmap(struct alps_data *priv, -+ unsigned int x_map, unsigned int y_map, - int *x1, int *y1, int *x2, int *y2) - { - struct alps_bitmap_point { -@@ -311,7 +306,7 @@ static int alps_process_bitmap(unsigned int x_map, unsigned int y_map, - * y bitmap is reversed for what we need (lower positions are in - * higher bits), so we process from the top end. - */ -- y_map = y_map << (sizeof(y_map) * BITS_PER_BYTE - ALPS_BITMAP_Y_BITS); -+ y_map = y_map << (sizeof(y_map) * BITS_PER_BYTE - priv->y_bits); - prev_bit = 0; - point = &y_low; - for (i = 0; y_map != 0; i++, y_map <<= 1) { -@@ -357,16 +352,18 @@ static int alps_process_bitmap(unsigned int x_map, unsigned int y_map, - } - } - -- *x1 = (ALPS_V3_X_MAX * (2 * x_low.start_bit + x_low.num_bits - 1)) / -- (2 * (ALPS_BITMAP_X_BITS - 1)); -- *y1 = (ALPS_V3_Y_MAX * (2 * y_low.start_bit + y_low.num_bits - 1)) / -- (2 * (ALPS_BITMAP_Y_BITS - 1)); -+ *x1 = (priv->x_max * (2 * x_low.start_bit + x_low.num_bits - 1)) / -+ (2 * (priv->x_bits - 1)); -+ *y1 = (priv->y_max * (2 * y_low.start_bit + y_low.num_bits - 1)) / -+ (2 * (priv->y_bits - 1)); - - if (fingers > 1) { -- *x2 = (ALPS_V3_X_MAX * (2 * x_high.start_bit + x_high.num_bits - 1)) / -- (2 * (ALPS_BITMAP_X_BITS - 1)); -- *y2 = (ALPS_V3_Y_MAX * (2 * y_high.start_bit + y_high.num_bits - 1)) / -- (2 * (ALPS_BITMAP_Y_BITS - 1)); -+ *x2 = (priv->x_max * -+ (2 * x_high.start_bit + x_high.num_bits - 1)) / -+ (2 * (priv->x_bits - 1)); -+ *y2 = (priv->y_max * -+ (2 * y_high.start_bit + y_high.num_bits - 1)) / -+ (2 * (priv->y_bits - 1)); - } - - return fingers; -@@ -484,7 +481,8 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - ((packet[2] & 0x7f) << 1) | - (packet[4] & 0x01); - -- bmap_fingers = alps_process_bitmap(x_bitmap, y_bitmap, -+ bmap_fingers = alps_process_bitmap(priv, -+ x_bitmap, y_bitmap, - &x1, &y1, &x2, &y2); - - /* -@@ -641,7 +639,7 @@ static void alps_process_packet_v4(struct psmouse *psmouse) - ((priv->multi_data[3] & 0x1f) << 5) | - (priv->multi_data[1] & 0x1f); - -- fingers = alps_process_bitmap(x_bitmap, y_bitmap, -+ fingers = alps_process_bitmap(priv, x_bitmap, y_bitmap, - &x1, &y1, &x2, &y2); - - /* Store MT data.*/ -@@ -1416,6 +1414,11 @@ static void alps_set_defaults(struct alps_data *priv) - priv->mask0 = 0x8f; - priv->flags = ALPS_DUALPOINT; - -+ priv->x_max = 2000; -+ priv->y_max = 1400; -+ priv->x_bits = 15; -+ priv->y_bits = 11; -+ - switch (priv->proto_version) { - case ALPS_PROTO_V1: - case ALPS_PROTO_V2: -@@ -1546,15 +1549,15 @@ static void alps_set_abs_params_mt(struct alps_data *priv, - { - set_bit(INPUT_PROP_SEMI_MT, dev1->propbit); - input_mt_init_slots(dev1, 2, 0); -- input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, ALPS_V3_X_MAX, 0, 0); -- input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, ALPS_V3_Y_MAX, 0, 0); -+ input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, priv->x_max, 0, 0); -+ input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, priv->y_max, 0, 0); - - set_bit(BTN_TOOL_DOUBLETAP, dev1->keybit); - set_bit(BTN_TOOL_TRIPLETAP, dev1->keybit); - set_bit(BTN_TOOL_QUADTAP, dev1->keybit); - -- input_set_abs_params(dev1, ABS_X, 0, ALPS_V3_X_MAX, 0, 0); -- input_set_abs_params(dev1, ABS_Y, 0, ALPS_V3_Y_MAX, 0, 0); -+ input_set_abs_params(dev1, ABS_X, 0, priv->x_max, 0, 0); -+ input_set_abs_params(dev1, ABS_Y, 0, priv->y_max, 0, 0); - } - - int alps_init(struct psmouse *psmouse) -diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h -index 0934f8b..5e638be 100644 ---- a/drivers/input/mouse/alps.h -+++ b/drivers/input/mouse/alps.h -@@ -72,6 +72,10 @@ struct alps_nibble_commands { - * mask0, should match byte0. - * @mask0: The mask used to check the first byte of the report. - * @flags: Additional device capabilities (passthrough port, trackstick, etc.). -+ * @x_max: Largest possible X position value. -+ * @y_max: Largest possible Y position value. -+ * @x_bits: Number of X bits in the MT bitmap. -+ * @y_bits: Number of Y bits in the MT bitmap. - * @hw_init: Protocol-specific hardware init function. - * @process_packet: Protocol-specific function to process a report packet. - * @set_abs_params: Protocol-specific function to configure the input_dev. -@@ -96,6 +100,10 @@ struct alps_data { - unsigned char proto_version; - unsigned char byte0, mask0; - unsigned char flags; -+ int x_max; -+ int y_max; -+ int x_bits; -+ int y_bits; - - int (*hw_init)(struct psmouse *psmouse); - void (*process_packet)(struct psmouse *psmouse); --- -1.8.1.2 - - -From 3e8674cc18aece18d3a9cdd484f157d44a5682b8 Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:26:11 -0800 -Subject: [PATCH 11/15] Input: ALPS - make the V3 packet field decoder - "pluggable" - -A number of different ALPS touchpad protocols can reuse -alps_process_touchpad_packet_v3() with small tweaks to the bitfield -decoding. Create a new priv->decode_fields() callback that handles the -per-model differences. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 101 +++++++++++++++++++++++++-------------------- - drivers/input/mouse/alps.h | 38 +++++++++++++++++ - 2 files changed, 95 insertions(+), 44 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 9199d2d..7f0855e 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -447,17 +447,49 @@ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse) - return; - } - -+static void alps_decode_buttons_v3(struct alps_fields *f, unsigned char *p) -+{ -+ f->left = !!(p[3] & 0x01); -+ f->right = !!(p[3] & 0x02); -+ f->middle = !!(p[3] & 0x04); -+ -+ f->ts_left = !!(p[3] & 0x10); -+ f->ts_right = !!(p[3] & 0x20); -+ f->ts_middle = !!(p[3] & 0x40); -+} -+ -+static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p) -+{ -+ f->first_mp = !!(p[4] & 0x40); -+ f->is_mp = !!(p[0] & 0x40); -+ -+ f->fingers = (p[5] & 0x3) + 1; -+ f->x_map = ((p[4] & 0x7e) << 8) | -+ ((p[1] & 0x7f) << 2) | -+ ((p[0] & 0x30) >> 4); -+ f->y_map = ((p[3] & 0x70) << 4) | -+ ((p[2] & 0x7f) << 1) | -+ (p[4] & 0x01); -+ -+ f->x = ((p[1] & 0x7f) << 4) | ((p[4] & 0x30) >> 2) | -+ ((p[0] & 0x30) >> 4); -+ f->y = ((p[2] & 0x7f) << 4) | (p[4] & 0x0f); -+ f->z = p[5] & 0x7f; -+ -+ alps_decode_buttons_v3(f, p); -+} -+ - static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) + if ((psmouse->badbyte & 0xc8) == 0x08) { +@@ -1217,9 +1138,8 @@ static int alps_poll(struct psmouse *psmouse) + static int alps_hw_init_v1_v2(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; - unsigned char *packet = psmouse->packet; - struct input_dev *dev = psmouse->dev; - struct input_dev *dev2 = priv->dev2; -- int x, y, z; -- int left, right, middle; - int x1 = 0, y1 = 0, x2 = 0, y2 = 0; - int fingers = 0, bmap_fingers; -- unsigned int x_bitmap, y_bitmap; -+ struct alps_fields f; -+ -+ priv->decode_fields(&f, packet); +- const struct alps_model_info *model = priv->i; - /* - * There's no single feature of touchpad position and bitmap packets -@@ -472,17 +504,10 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - * packet. Check for this, and when it happens process the - * position packet as usual. - */ -- if (packet[0] & 0x40) { -- fingers = (packet[5] & 0x3) + 1; -- x_bitmap = ((packet[4] & 0x7e) << 8) | -- ((packet[1] & 0x7f) << 2) | -- ((packet[0] & 0x30) >> 4); -- y_bitmap = ((packet[3] & 0x70) << 4) | -- ((packet[2] & 0x7f) << 1) | -- (packet[4] & 0x01); -- -+ if (f.is_mp) { -+ fingers = f.fingers; - bmap_fingers = alps_process_bitmap(priv, -- x_bitmap, y_bitmap, -+ f.x_map, f.y_map, - &x1, &y1, &x2, &y2); - - /* -@@ -493,7 +518,7 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - fingers = bmap_fingers; - - /* Now process position packet */ -- packet = priv->multi_data; -+ priv->decode_fields(&f, priv->multi_data); - } else { - priv->multi_packet = 0; - } -@@ -507,10 +532,10 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - * out misidentified bitmap packets, we reject anything with this - * bit set. - */ -- if (packet[0] & 0x40) -+ if (f.is_mp) - return; - -- if (!priv->multi_packet && (packet[4] & 0x40)) { -+ if (!priv->multi_packet && f.first_mp) { - priv->multi_packet = 1; - memcpy(priv->multi_data, packet, sizeof(priv->multi_data)); - return; -@@ -518,22 +543,13 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - - priv->multi_packet = 0; - -- left = packet[3] & 0x01; -- right = packet[3] & 0x02; -- middle = packet[3] & 0x04; -- -- x = ((packet[1] & 0x7f) << 4) | ((packet[4] & 0x30) >> 2) | -- ((packet[0] & 0x30) >> 4); -- y = ((packet[2] & 0x7f) << 4) | (packet[4] & 0x0f); -- z = packet[5] & 0x7f; -- - /* - * Sometimes the hardware sends a single packet with z = 0 - * in the middle of a stream. Real releases generate packets - * with x, y, and z all zero, so these seem to be flukes. - * Ignore them. - */ -- if (x && y && !z) -+ if (f.x && f.y && !f.z) - return; - - /* -@@ -541,12 +557,12 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - * to rely on ST data. - */ - if (!fingers) { -- x1 = x; -- y1 = y; -- fingers = z > 0 ? 1 : 0; -+ x1 = f.x; -+ y1 = f.y; -+ fingers = f.z > 0 ? 1 : 0; +- if ((model->flags & ALPS_PASS) && ++ if ((priv->flags & ALPS_PASS) && + alps_passthrough_mode_v2(psmouse, true)) { + return -1; + } +@@ -1234,7 +1154,7 @@ static int alps_hw_init_v1_v2(struct psmouse *psmouse) + return -1; } -- if (z >= 64) -+ if (f.z >= 64) - input_report_key(dev, BTN_TOUCH, 1); - else - input_report_key(dev, BTN_TOUCH, 0); -@@ -555,26 +571,22 @@ static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - - input_mt_report_finger_count(dev, fingers); - -- input_report_key(dev, BTN_LEFT, left); -- input_report_key(dev, BTN_RIGHT, right); -- input_report_key(dev, BTN_MIDDLE, middle); -+ input_report_key(dev, BTN_LEFT, f.left); -+ input_report_key(dev, BTN_RIGHT, f.right); -+ input_report_key(dev, BTN_MIDDLE, f.middle); - -- if (z > 0) { -- input_report_abs(dev, ABS_X, x); -- input_report_abs(dev, ABS_Y, y); -+ if (f.z > 0) { -+ input_report_abs(dev, ABS_X, f.x); -+ input_report_abs(dev, ABS_Y, f.y); +- if ((model->flags & ALPS_PASS) && ++ if ((priv->flags & ALPS_PASS) && + alps_passthrough_mode_v2(psmouse, false)) { + return -1; } -- input_report_abs(dev, ABS_PRESSURE, z); -+ input_report_abs(dev, ABS_PRESSURE, f.z); - - input_sync(dev); - - if (!(priv->quirks & ALPS_QUIRK_TRACKSTICK_BUTTONS)) { -- left = packet[3] & 0x10; -- right = packet[3] & 0x20; -- middle = packet[3] & 0x40; -- -- input_report_key(dev2, BTN_LEFT, left); -- input_report_key(dev2, BTN_RIGHT, right); -- input_report_key(dev2, BTN_MIDDLE, middle); -+ input_report_key(dev2, BTN_LEFT, f.ts_left); -+ input_report_key(dev2, BTN_RIGHT, f.ts_right); -+ input_report_key(dev2, BTN_MIDDLE, f.ts_middle); - input_sync(dev2); - } - } -@@ -1430,6 +1442,7 @@ static void alps_set_defaults(struct alps_data *priv) - priv->hw_init = alps_hw_init_v3; - priv->process_packet = alps_process_packet_v3; - priv->set_abs_params = alps_set_abs_params_mt; -+ priv->decode_fields = alps_decode_pinnacle; - priv->nibble_commands = alps_v3_nibble_commands; - priv->addr_command = PSMOUSE_CMD_RESET_WRAP; - break; -diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h -index 5e638be..9704805 100644 ---- a/drivers/input/mouse/alps.h -+++ b/drivers/input/mouse/alps.h -@@ -60,6 +60,42 @@ struct alps_nibble_commands { - }; - - /** -+ * struct alps_fields - decoded version of the report packet -+ * @x_map: Bitmap of active X positions for MT. -+ * @y_map: Bitmap of active Y positions for MT. -+ * @fingers: Number of fingers for MT. -+ * @x: X position for ST. -+ * @y: Y position for ST. -+ * @z: Z position for ST. -+ * @first_mp: Packet is the first of a multi-packet report. -+ * @is_mp: Packet is part of a multi-packet report. -+ * @left: Left touchpad button is active. -+ * @right: Right touchpad button is active. -+ * @middle: Middle touchpad button is active. -+ * @ts_left: Left trackstick button is active. -+ * @ts_right: Right trackstick button is active. -+ * @ts_middle: Middle trackstick button is active. -+ */ -+struct alps_fields { -+ unsigned int x_map; -+ unsigned int y_map; -+ unsigned int fingers; -+ unsigned int x; -+ unsigned int y; -+ unsigned int z; -+ unsigned int first_mp:1; -+ unsigned int is_mp:1; -+ -+ unsigned int left:1; -+ unsigned int right:1; -+ unsigned int middle:1; -+ -+ unsigned int ts_left:1; -+ unsigned int ts_right:1; -+ unsigned int ts_middle:1; -+}; -+ -+/** - * struct alps_data - private data structure for the ALPS driver - * @dev2: "Relative" device used to report trackstick or mouse activity. - * @phys: Physical path for the relative device. -@@ -78,6 +114,7 @@ struct alps_nibble_commands { - * @y_bits: Number of Y bits in the MT bitmap. - * @hw_init: Protocol-specific hardware init function. - * @process_packet: Protocol-specific function to process a report packet. -+ * @decode_fields: Protocol-specific function to read packet bitfields. - * @set_abs_params: Protocol-specific function to configure the input_dev. - * @prev_fin: Finger bit from previous packet. - * @multi_packet: Multi-packet data in progress. -@@ -107,6 +144,7 @@ struct alps_data { - - int (*hw_init)(struct psmouse *psmouse); - void (*process_packet)(struct psmouse *psmouse); -+ void (*decode_fields)(struct alps_fields *f, unsigned char *p); - void (*set_abs_params)(struct alps_data *priv, struct input_dev *dev1); - - int prev_fin; --- -1.8.1.2 - - -From 8852c5c13a191156db0f4d4428165f0dee9ce29e Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:27:08 -0800 -Subject: [PATCH 12/15] Input: ALPS - add support for "Rushmore" touchpads - -Rushmore touchpads are found on Dell E6230/E6430/E6530. They use the V3 -protocol with slightly tweaked init sequences and report formats. - -The E7 report is 73 03 0a, and the EC report is 88 08 1d - -Credits: Emmanuel Thome reported the MT bitmap changes. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 52 insertions(+) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 7f0855e..956c523 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -479,6 +479,14 @@ static void alps_decode_pinnacle(struct alps_fields *f, unsigned char *p) - alps_decode_buttons_v3(f, p); - } - -+static void alps_decode_rushmore(struct alps_fields *f, unsigned char *p) -+{ -+ alps_decode_pinnacle(f, p); -+ -+ f->x_map |= (p[5] & 0x10) << 11; -+ f->y_map |= (p[5] & 0x20) << 6; -+} -+ - static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - { - struct alps_data *priv = psmouse->private; -@@ -1331,6 +1339,40 @@ error: - return -1; - } - -+static int alps_hw_init_rushmore_v3(struct psmouse *psmouse) -+{ -+ struct ps2dev *ps2dev = &psmouse->ps2dev; -+ int reg_val, ret = -1; -+ -+ if (alps_enter_command_mode(psmouse, NULL) || -+ alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 || -+ alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00)) -+ goto error; -+ -+ reg_val = alps_command_mode_read_reg(psmouse, 0xc2c6); -+ if (reg_val == -1) -+ goto error; -+ if (__alps_command_mode_write_reg(psmouse, reg_val & 0xfd)) -+ goto error; -+ -+ if (alps_command_mode_write_reg(psmouse, 0xc2c9, 0x64)) -+ goto error; -+ -+ /* enter absolute mode */ -+ reg_val = alps_command_mode_read_reg(psmouse, 0xc2c4); -+ if (reg_val == -1) -+ goto error; -+ if (__alps_command_mode_write_reg(psmouse, reg_val | 0x02)) -+ goto error; -+ -+ alps_exit_command_mode(psmouse); -+ return ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); -+ -+error: -+ alps_exit_command_mode(psmouse); -+ return ret; -+} -+ - /* Must be in command mode when calling this function */ - static int alps_absolute_mode_v4(struct psmouse *psmouse) - { -@@ -1513,6 +1555,16 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) - - if (alps_match_table(psmouse, priv, e7, ec) == 0) { - return 0; -+ } else if (ec[0] == 0x88 && ec[1] == 0x08) { -+ priv->proto_version = ALPS_PROTO_V3; -+ alps_set_defaults(priv); -+ -+ priv->hw_init = alps_hw_init_rushmore_v3; -+ priv->decode_fields = alps_decode_rushmore; -+ priv->x_bits = 16; -+ priv->y_bits = 12; -+ -+ return 0; - } else if (ec[0] == 0x88 && ec[1] == 0x07 && - ec[2] >= 0x90 && ec[2] <= 0x9d) { - priv->proto_version = ALPS_PROTO_V3; --- -1.8.1.2 - - -From dd22ae0f4aad37dc8371fe265e43a8426a3d4b1d Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 13 Feb 2013 22:28:07 -0800 -Subject: [PATCH 13/15] Input: ALPS - enable trackstick on Rushmore touchpads - -Separate out the common trackstick probe/setup sequences, then call them -from each of the v3 init functions. - -Credits: Emmanual Thome furnished the information on the trackstick init -and how it affected the report format. - -Signed-off-by: Kevin Cernekee -Tested-by: Dave Turvene -Signed-off-by: Dmitry Torokhov ---- - drivers/input/mouse/alps.c | 185 ++++++++++++++++++++++++++++----------------- - 1 file changed, 115 insertions(+), 70 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 956c523..618ae44 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -29,6 +29,9 @@ - */ - #define ALPS_CMD_NIBBLE_10 0x01f2 - -+#define ALPS_REG_BASE_RUSHMORE 0xc2c0 -+#define ALPS_REG_BASE_PINNACLE 0x0000 -+ - static const struct alps_nibble_commands alps_v3_nibble_commands[] = { - { PSMOUSE_CMD_SETPOLL, 0x00 }, /* 0 */ - { PSMOUSE_CMD_RESET_DIS, 0x00 }, /* 1 */ -@@ -1168,26 +1171,31 @@ static int alps_hw_init_v1_v2(struct psmouse *psmouse) +@@ -1249,26 +1169,31 @@ static int alps_hw_init_v1_v2(struct psmouse *psmouse) } /* @@ -2029,16 +694,20 @@ index 956c523..618ae44 100644 } /* Must be in command mode when calling this function */ -@@ -1206,69 +1214,102 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse) +@@ -1287,73 +1212,102 @@ static int alps_absolute_mode_v3(struct psmouse *psmouse) return 0; } -static int alps_hw_init_v3(struct psmouse *psmouse) +static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base) { +- struct alps_data *priv = psmouse->private; - struct ps2dev *ps2dev = &psmouse->ps2dev; - int reg_val; - unsigned char param[4]; +- +- priv->nibble_commands = alps_v3_nibble_commands; +- priv->addr_command = PSMOUSE_CMD_RESET_WRAP; + int ret = -EIO, reg_val; if (alps_enter_command_mode(psmouse, NULL)) @@ -2181,7 +850,7 @@ index 956c523..618ae44 100644 psmouse_err(psmouse, "Failed to enter absolute mode\n"); goto error; } -@@ -1305,14 +1346,6 @@ static int alps_hw_init_v3(struct psmouse *psmouse) +@@ -1390,14 +1344,6 @@ static int alps_hw_init_v3(struct psmouse *psmouse) if (alps_command_mode_write_reg(psmouse, 0x0162, 0x04)) goto error; @@ -2196,7 +865,7 @@ index 956c523..618ae44 100644 alps_exit_command_mode(psmouse); /* Set rate and enable data reporting */ -@@ -1325,10 +1358,6 @@ static int alps_hw_init_v3(struct psmouse *psmouse) +@@ -1410,10 +1356,6 @@ static int alps_hw_init_v3(struct psmouse *psmouse) return 0; @@ -2207,14 +876,16 @@ index 956c523..618ae44 100644 error: /* * Leaving the touchpad in command mode will essentially render -@@ -1341,9 +1370,19 @@ error: +@@ -1424,6 +1366,50 @@ error: + return -1; + } - static int alps_hw_init_rushmore_v3(struct psmouse *psmouse) - { ++static int alps_hw_init_rushmore_v3(struct psmouse *psmouse) ++{ + struct alps_data *priv = psmouse->private; - struct ps2dev *ps2dev = &psmouse->ps2dev; - int reg_val, ret = -1; - ++ struct ps2dev *ps2dev = &psmouse->ps2dev; ++ int reg_val, ret = -1; ++ + if (priv->flags & ALPS_DUALPOINT) { + reg_val = alps_setup_trackstick_v3(psmouse, + ALPS_REG_BASE_RUSHMORE); @@ -2224,271 +895,511 @@ index 956c523..618ae44 100644 + priv->flags &= ~ALPS_DUALPOINT; + } + - if (alps_enter_command_mode(psmouse, NULL) || - alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 || - alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00)) -@@ -1564,6 +1603,12 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) - priv->x_bits = 16; - priv->y_bits = 12; ++ if (alps_enter_command_mode(psmouse, NULL) || ++ alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 || ++ alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00)) ++ goto error; ++ ++ reg_val = alps_command_mode_read_reg(psmouse, 0xc2c6); ++ if (reg_val == -1) ++ goto error; ++ if (__alps_command_mode_write_reg(psmouse, reg_val & 0xfd)) ++ goto error; ++ ++ if (alps_command_mode_write_reg(psmouse, 0xc2c9, 0x64)) ++ goto error; ++ ++ /* enter absolute mode */ ++ reg_val = alps_command_mode_read_reg(psmouse, 0xc2c4); ++ if (reg_val == -1) ++ goto error; ++ if (__alps_command_mode_write_reg(psmouse, reg_val | 0x02)) ++ goto error; ++ ++ alps_exit_command_mode(psmouse); ++ return ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); ++ ++error: ++ alps_exit_command_mode(psmouse); ++ return ret; ++} ++ + /* Must be in command mode when calling this function */ + static int alps_absolute_mode_v4(struct psmouse *psmouse) + { +@@ -1442,13 +1428,9 @@ static int alps_absolute_mode_v4(struct psmouse *psmouse) + static int alps_hw_init_v4(struct psmouse *psmouse) + { +- struct alps_data *priv = psmouse->private; + struct ps2dev *ps2dev = &psmouse->ps2dev; + unsigned char param[4]; + +- priv->nibble_commands = alps_v4_nibble_commands; +- priv->addr_command = PSMOUSE_CMD_DISABLE; +- + if (alps_enter_command_mode(psmouse, NULL)) + goto error; + +@@ -1517,39 +1499,140 @@ error: + return -1; + } + +-static int alps_hw_init(struct psmouse *psmouse) ++static void alps_set_defaults(struct alps_data *priv) + { +- struct alps_data *priv = psmouse->private; +- const struct alps_model_info *model = priv->i; +- int ret = -1; ++ priv->byte0 = 0x8f; ++ priv->mask0 = 0x8f; ++ priv->flags = ALPS_DUALPOINT; ++ ++ priv->x_max = 2000; ++ priv->y_max = 1400; ++ priv->x_bits = 15; ++ priv->y_bits = 11; + +- switch (model->proto_version) { ++ switch (priv->proto_version) { + case ALPS_PROTO_V1: + case ALPS_PROTO_V2: +- ret = alps_hw_init_v1_v2(psmouse); ++ priv->hw_init = alps_hw_init_v1_v2; ++ priv->process_packet = alps_process_packet_v1_v2; ++ priv->set_abs_params = alps_set_abs_params_st; + break; + case ALPS_PROTO_V3: +- ret = alps_hw_init_v3(psmouse); ++ priv->hw_init = alps_hw_init_v3; ++ priv->process_packet = alps_process_packet_v3; ++ priv->set_abs_params = alps_set_abs_params_mt; ++ priv->decode_fields = alps_decode_pinnacle; ++ priv->nibble_commands = alps_v3_nibble_commands; ++ priv->addr_command = PSMOUSE_CMD_RESET_WRAP; + break; + case ALPS_PROTO_V4: +- ret = alps_hw_init_v4(psmouse); ++ priv->hw_init = alps_hw_init_v4; ++ priv->process_packet = alps_process_packet_v4; ++ priv->set_abs_params = alps_set_abs_params_mt; ++ priv->nibble_commands = alps_v4_nibble_commands; ++ priv->addr_command = PSMOUSE_CMD_DISABLE; + break; + } ++} + +- return ret; ++static int alps_match_table(struct psmouse *psmouse, struct alps_data *priv, ++ unsigned char *e7, unsigned char *ec) ++{ ++ const struct alps_model_info *model; ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(alps_model_data); i++) { ++ model = &alps_model_data[i]; ++ ++ if (!memcmp(e7, model->signature, sizeof(model->signature)) && ++ (!model->command_mode_resp || ++ model->command_mode_resp == ec[2])) { ++ ++ priv->proto_version = model->proto_version; ++ alps_set_defaults(priv); ++ ++ priv->flags = model->flags; ++ priv->byte0 = model->byte0; ++ priv->mask0 = model->mask0; ++ ++ return 0; ++ } ++ } ++ ++ return -EINVAL; ++} ++ ++static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) ++{ ++ unsigned char e6[4], e7[4], ec[4]; ++ ++ /* ++ * First try "E6 report". ++ * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed. ++ * The bits 0-2 of the first byte will be 1s if some buttons are ++ * pressed. ++ */ ++ if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, ++ PSMOUSE_CMD_SETSCALE11, e6)) ++ return -EIO; ++ ++ if ((e6[0] & 0xf8) != 0 || e6[1] != 0 || (e6[2] != 10 && e6[2] != 100)) ++ return -EINVAL; ++ ++ /* ++ * Now get the "E7" and "EC" reports. These will uniquely identify ++ * most ALPS touchpads. ++ */ ++ if (alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, ++ PSMOUSE_CMD_SETSCALE21, e7) || ++ alps_rpt_cmd(psmouse, PSMOUSE_CMD_SETRES, ++ PSMOUSE_CMD_RESET_WRAP, ec) || ++ alps_exit_command_mode(psmouse)) ++ return -EIO; ++ ++ if (alps_match_table(psmouse, priv, e7, ec) == 0) { ++ return 0; ++ } else if (ec[0] == 0x88 && ec[1] == 0x08) { ++ priv->proto_version = ALPS_PROTO_V3; ++ alps_set_defaults(priv); ++ ++ priv->hw_init = alps_hw_init_rushmore_v3; ++ priv->decode_fields = alps_decode_rushmore; ++ priv->x_bits = 16; ++ priv->y_bits = 12; ++ + /* hack to make addr_command, nibble_command available */ + psmouse->private = priv; + + if (alps_probe_trackstick_v3(psmouse, ALPS_REG_BASE_RUSHMORE)) + priv->flags &= ~ALPS_DUALPOINT; + - return 0; - } else if (ec[0] == 0x88 && ec[1] == 0x07 && - ec[2] >= 0x90 && ec[2] <= 0x9d) { --- -1.8.1.2 - - -From 1c89f1435ea5344dc2dbb5c59f56b2d12d852fdc Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Sat, 16 Feb 2013 22:40:03 -0800 -Subject: [PATCH 14/15] Input: ALPS - Remove unused argument to - alps_enter_command_mode() - -Now that alps_identify() explicitly issues an EC report using -alps_rpt_cmd(), we no longer need to look at the magic numbers returned -by alps_enter_command_mode(). - -Signed-off-by: Kevin Cernekee ---- - drivers/input/mouse/alps.c | 18 +++++++----------- - 1 file changed, 7 insertions(+), 11 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 618ae44..8e01c31 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -996,8 +996,7 @@ static int alps_rpt_cmd(struct psmouse *psmouse, int init_command, - return 0; - } - --static int alps_enter_command_mode(struct psmouse *psmouse, -- unsigned char *resp) -+static int alps_enter_command_mode(struct psmouse *psmouse) - { - unsigned char param[4]; - -@@ -1011,9 +1010,6 @@ static int alps_enter_command_mode(struct psmouse *psmouse, - "unknown response while entering command mode\n"); - return -1; - } -- -- if (resp) -- *resp = param[2]; - return 0; - } - -@@ -1178,7 +1174,7 @@ static int alps_passthrough_mode_v3(struct psmouse *psmouse, - { - int reg_val, ret = -1; - -- if (alps_enter_command_mode(psmouse, NULL)) -+ if (alps_enter_command_mode(psmouse)) - return -1; - - reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x0008); -@@ -1218,7 +1214,7 @@ static int alps_probe_trackstick_v3(struct psmouse *psmouse, int reg_base) - { - int ret = -EIO, reg_val; - -- if (alps_enter_command_mode(psmouse, NULL)) -+ if (alps_enter_command_mode(psmouse)) - goto error; - - reg_val = alps_command_mode_read_reg(psmouse, reg_base + 0x08); -@@ -1281,7 +1277,7 @@ static int alps_setup_trackstick_v3(struct psmouse *psmouse, int reg_base) - * supported by this driver. If bit 1 isn't set the packet - * format is different. - */ -- if (alps_enter_command_mode(psmouse, NULL) || -+ if (alps_enter_command_mode(psmouse) || - alps_command_mode_write_reg(psmouse, - reg_base + 0x08, 0x82) || - alps_exit_command_mode(psmouse)) -@@ -1308,7 +1304,7 @@ static int alps_hw_init_v3(struct psmouse *psmouse) - alps_setup_trackstick_v3(psmouse, ALPS_REG_BASE_PINNACLE) == -EIO) - goto error; - -- if (alps_enter_command_mode(psmouse, NULL) || -+ if (alps_enter_command_mode(psmouse) || - alps_absolute_mode_v3(psmouse)) { - psmouse_err(psmouse, "Failed to enter absolute mode\n"); - goto error; -@@ -1383,7 +1379,7 @@ static int alps_hw_init_rushmore_v3(struct psmouse *psmouse) - priv->flags &= ~ALPS_DUALPOINT; - } - -- if (alps_enter_command_mode(psmouse, NULL) || -+ if (alps_enter_command_mode(psmouse) || - alps_command_mode_read_reg(psmouse, 0xc2d9) == -1 || - alps_command_mode_write_reg(psmouse, 0xc2cb, 0x00)) - goto error; -@@ -1433,7 +1429,7 @@ static int alps_hw_init_v4(struct psmouse *psmouse) - struct ps2dev *ps2dev = &psmouse->ps2dev; - unsigned char param[4]; - -- if (alps_enter_command_mode(psmouse, NULL)) -+ if (alps_enter_command_mode(psmouse)) - goto error; - - if (alps_absolute_mode_v4(psmouse)) { --- -1.8.1.2 - - -From 35458ea14080b1d529ecee4c01dabc91e8ff9f25 Mon Sep 17 00:00:00 2001 -From: Dave Turvene -Date: Sat, 16 Feb 2013 22:40:04 -0800 -Subject: [PATCH 15/15] Input: ALPS - Add "Dolphin V1" touchpad support - -These touchpads use a different protocol; they have been seen on Dell -N5110, Dell 17R SE, and others. - -The official ALPS driver identifies them by looking for an exact match -on the E7 report: 73 03 50. Dolphin V1 returns an EC report of -73 01 xx (02 and 0d have been seen); Dolphin V2 returns an EC report of -73 02 xx (02 has been seen). - -Dolphin V2 probably needs a different initialization sequence and/or -report parser, so it is left for a future commit. - -Signed-off-by: Dave Turvene -Signed-off-by: Kevin Cernekee ---- - drivers/input/mouse/alps.c | 67 ++++++++++++++++++++++++++++++++++++++++++++-- - drivers/input/mouse/alps.h | 1 + - 2 files changed, 66 insertions(+), 2 deletions(-) - -diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c -index 8e01c31..b7abd40 100644 ---- a/drivers/input/mouse/alps.c -+++ b/drivers/input/mouse/alps.c -@@ -490,6 +490,29 @@ static void alps_decode_rushmore(struct alps_fields *f, unsigned char *p) - f->y_map |= (p[5] & 0x20) << 6; - } - -+static void alps_decode_dolphin(struct alps_fields *f, unsigned char *p) -+{ -+ f->first_mp = !!(p[0] & 0x02); -+ f->is_mp = !!(p[0] & 0x20); -+ -+ f->fingers = ((p[0] & 0x6) >> 1 | -+ (p[0] & 0x10) >> 2); -+ f->x_map = ((p[2] & 0x60) >> 5) | -+ ((p[4] & 0x7f) << 2) | -+ ((p[5] & 0x7f) << 9) | -+ ((p[3] & 0x07) << 16) | -+ ((p[3] & 0x70) << 15) | -+ ((p[0] & 0x01) << 22); -+ f->y_map = (p[1] & 0x7f) | -+ ((p[2] & 0x1f) << 7); -+ -+ f->x = ((p[1] & 0x7f) | ((p[4] & 0x0f) << 7)); -+ f->y = ((p[2] & 0x7f) | ((p[4] & 0xf0) << 3)); -+ f->z = (p[0] & 4) ? 0 : p[5] & 0x7f; -+ -+ alps_decode_buttons_v3(f, p); -+} -+ - static void alps_process_touchpad_packet_v3(struct psmouse *psmouse) - { - struct alps_data *priv = psmouse->private; -@@ -876,7 +899,8 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) - } - - /* Bytes 2 - pktsize should have 0 in the highest bit */ -- if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize && -+ if (priv->proto_version != ALPS_PROTO_V5 && -+ psmouse->pktcnt >= 2 && psmouse->pktcnt <= psmouse->pktsize && - (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) { - psmouse_dbg(psmouse, "refusing packet[%i] = %x\n", - psmouse->pktcnt - 1, -@@ -1005,7 +1029,8 @@ static int alps_enter_command_mode(struct psmouse *psmouse) - return -1; - } - -- if (param[0] != 0x88 || (param[1] != 0x07 && param[1] != 0x08)) { -+ if ((param[0] != 0x88 || (param[1] != 0x07 && param[1] != 0x08)) && -+ param[0] != 0x73) { - psmouse_dbg(psmouse, - "unknown response while entering command mode\n"); - return -1; -@@ -1497,6 +1522,23 @@ error: - return -1; - } - -+static int alps_hw_init_dolphin_v1(struct psmouse *psmouse) -+{ -+ struct ps2dev *ps2dev = &psmouse->ps2dev; -+ unsigned char param[2]; -+ -+ /* This is dolphin "v1" as empirically defined by florin9doi */ -+ param[0] = 0x64; -+ param[1] = 0x28; -+ -+ if (ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSTREAM) || -+ ps2_command(ps2dev, ¶m[0], PSMOUSE_CMD_SETRATE) || -+ ps2_command(ps2dev, ¶m[1], PSMOUSE_CMD_SETRATE)) -+ return -1; -+ -+ return 0; -+} -+ - static void alps_set_defaults(struct alps_data *priv) - { - priv->byte0 = 0x8f; -@@ -1530,6 +1572,21 @@ static void alps_set_defaults(struct alps_data *priv) - priv->nibble_commands = alps_v4_nibble_commands; - priv->addr_command = PSMOUSE_CMD_DISABLE; - break; -+ case ALPS_PROTO_V5: -+ priv->hw_init = alps_hw_init_dolphin_v1; -+ priv->process_packet = alps_process_packet_v3; -+ priv->decode_fields = alps_decode_dolphin; -+ priv->set_abs_params = alps_set_abs_params_mt; -+ priv->nibble_commands = alps_v3_nibble_commands; -+ priv->addr_command = PSMOUSE_CMD_RESET_WRAP; -+ priv->byte0 = 0xc8; -+ priv->mask0 = 0xc8; -+ priv->flags = 0; -+ priv->x_max = 1360; -+ priv->y_max = 660; -+ priv->x_bits = 23; -+ priv->y_bits = 12; -+ break; - } - } - -@@ -1590,6 +1647,12 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) - - if (alps_match_table(psmouse, priv, e7, ec) == 0) { - return 0; -+ } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 && -+ ec[0] == 0x73 && ec[1] == 0x01) { -+ priv->proto_version = ALPS_PROTO_V5; ++ return 0; ++ } else if (ec[0] == 0x88 && ec[1] == 0x07 && ++ ec[2] >= 0x90 && ec[2] <= 0x9d) { ++ priv->proto_version = ALPS_PROTO_V3; + alps_set_defaults(priv); + + return 0; - } else if (ec[0] == 0x88 && ec[1] == 0x08) { - priv->proto_version = ALPS_PROTO_V3; - alps_set_defaults(priv); ++ } ++ ++ psmouse_info(psmouse, ++ "Unknown ALPS touchpad: E7=%2.2x %2.2x %2.2x, EC=%2.2x %2.2x %2.2x\n", ++ e7[0], e7[1], e7[2], ec[0], ec[1], ec[2]); ++ ++ return -EINVAL; + } + + static int alps_reconnect(struct psmouse *psmouse) + { +- const struct alps_model_info *model; ++ struct alps_data *priv = psmouse->private; + + psmouse_reset(psmouse); + +- model = alps_get_model(psmouse, NULL); +- if (!model) ++ if (alps_identify(psmouse, priv) < 0) + return -1; + +- return alps_hw_init(psmouse); ++ return priv->hw_init(psmouse); + } + + static void alps_disconnect(struct psmouse *psmouse) +@@ -1562,12 +1645,33 @@ static void alps_disconnect(struct psmouse *psmouse) + kfree(priv); + } + ++static void alps_set_abs_params_st(struct alps_data *priv, ++ struct input_dev *dev1) ++{ ++ input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0); ++ input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0); ++} ++ ++static void alps_set_abs_params_mt(struct alps_data *priv, ++ struct input_dev *dev1) ++{ ++ set_bit(INPUT_PROP_SEMI_MT, dev1->propbit); ++ input_mt_init_slots(dev1, 2, 0); ++ input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, priv->x_max, 0, 0); ++ input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, priv->y_max, 0, 0); ++ ++ set_bit(BTN_TOOL_DOUBLETAP, dev1->keybit); ++ set_bit(BTN_TOOL_TRIPLETAP, dev1->keybit); ++ set_bit(BTN_TOOL_QUADTAP, dev1->keybit); ++ ++ input_set_abs_params(dev1, ABS_X, 0, priv->x_max, 0, 0); ++ input_set_abs_params(dev1, ABS_Y, 0, priv->y_max, 0, 0); ++} ++ + int alps_init(struct psmouse *psmouse) + { + struct alps_data *priv; +- const struct alps_model_info *model; + struct input_dev *dev1 = psmouse->dev, *dev2; +- int version; + + priv = kzalloc(sizeof(struct alps_data), GFP_KERNEL); + dev2 = input_allocate_device(); +@@ -1581,13 +1685,10 @@ int alps_init(struct psmouse *psmouse) + + psmouse_reset(psmouse); + +- model = alps_get_model(psmouse, &version); +- if (!model) ++ if (alps_identify(psmouse, priv) < 0) + goto init_fail; + +- priv->i = model; +- +- if (alps_hw_init(psmouse)) ++ if (priv->hw_init(psmouse)) + goto init_fail; + + /* +@@ -1609,41 +1710,20 @@ int alps_init(struct psmouse *psmouse) + + dev1->evbit[BIT_WORD(EV_ABS)] |= BIT_MASK(EV_ABS); + +- switch (model->proto_version) { +- case ALPS_PROTO_V1: +- case ALPS_PROTO_V2: +- input_set_abs_params(dev1, ABS_X, 0, 1023, 0, 0); +- input_set_abs_params(dev1, ABS_Y, 0, 767, 0, 0); +- break; +- case ALPS_PROTO_V3: +- case ALPS_PROTO_V4: +- set_bit(INPUT_PROP_SEMI_MT, dev1->propbit); +- input_mt_init_slots(dev1, 2, 0); +- input_set_abs_params(dev1, ABS_MT_POSITION_X, 0, ALPS_V3_X_MAX, 0, 0); +- input_set_abs_params(dev1, ABS_MT_POSITION_Y, 0, ALPS_V3_Y_MAX, 0, 0); +- +- set_bit(BTN_TOOL_DOUBLETAP, dev1->keybit); +- set_bit(BTN_TOOL_TRIPLETAP, dev1->keybit); +- set_bit(BTN_TOOL_QUADTAP, dev1->keybit); +- +- input_set_abs_params(dev1, ABS_X, 0, ALPS_V3_X_MAX, 0, 0); +- input_set_abs_params(dev1, ABS_Y, 0, ALPS_V3_Y_MAX, 0, 0); +- break; +- } +- ++ priv->set_abs_params(priv, dev1); + input_set_abs_params(dev1, ABS_PRESSURE, 0, 127, 0, 0); + +- if (model->flags & ALPS_WHEEL) { ++ if (priv->flags & ALPS_WHEEL) { + dev1->evbit[BIT_WORD(EV_REL)] |= BIT_MASK(EV_REL); + dev1->relbit[BIT_WORD(REL_WHEEL)] |= BIT_MASK(REL_WHEEL); + } + +- if (model->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) { ++ if (priv->flags & (ALPS_FW_BK_1 | ALPS_FW_BK_2)) { + dev1->keybit[BIT_WORD(BTN_FORWARD)] |= BIT_MASK(BTN_FORWARD); + dev1->keybit[BIT_WORD(BTN_BACK)] |= BIT_MASK(BTN_BACK); + } + +- if (model->flags & ALPS_FOUR_BUTTONS) { ++ if (priv->flags & ALPS_FOUR_BUTTONS) { + dev1->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_0); + dev1->keybit[BIT_WORD(BTN_1)] |= BIT_MASK(BTN_1); + dev1->keybit[BIT_WORD(BTN_2)] |= BIT_MASK(BTN_2); +@@ -1654,7 +1734,8 @@ int alps_init(struct psmouse *psmouse) + + snprintf(priv->phys, sizeof(priv->phys), "%s/input1", psmouse->ps2dev.serio->phys); + dev2->phys = priv->phys; +- dev2->name = (model->flags & ALPS_DUALPOINT) ? "DualPoint Stick" : "PS/2 Mouse"; ++ dev2->name = (priv->flags & ALPS_DUALPOINT) ? ++ "DualPoint Stick" : "PS/2 Mouse"; + dev2->id.bustype = BUS_I8042; + dev2->id.vendor = 0x0002; + dev2->id.product = PSMOUSE_ALPS; +@@ -1673,7 +1754,7 @@ int alps_init(struct psmouse *psmouse) + psmouse->poll = alps_poll; + psmouse->disconnect = alps_disconnect; + psmouse->reconnect = alps_reconnect; +- psmouse->pktsize = model->proto_version == ALPS_PROTO_V4 ? 8 : 6; ++ psmouse->pktsize = priv->proto_version == ALPS_PROTO_V4 ? 8 : 6; + + /* We are having trouble resyncing ALPS touchpads so disable it for now */ + psmouse->resync_time = 0; +@@ -1690,18 +1771,16 @@ init_fail: + + int alps_detect(struct psmouse *psmouse, bool set_properties) + { +- int version; +- const struct alps_model_info *model; ++ struct alps_data dummy; + +- model = alps_get_model(psmouse, &version); +- if (!model) ++ if (alps_identify(psmouse, &dummy) < 0) + return -1; + + if (set_properties) { + psmouse->vendor = "ALPS"; +- psmouse->name = model->flags & ALPS_DUALPOINT ? ++ psmouse->name = dummy.flags & ALPS_DUALPOINT ? + "DualPoint TouchPad" : "GlidePoint"; +- psmouse->model = version; ++ psmouse->model = dummy.proto_version << 8; + } + return 0; + } diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h -index 9704805..eee5985 100644 +index ae1ac35..9704805 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h -@@ -16,6 +16,7 @@ - #define ALPS_PROTO_V2 2 - #define ALPS_PROTO_V3 3 - #define ALPS_PROTO_V4 4 -+#define ALPS_PROTO_V5 5 +@@ -12,35 +12,146 @@ + #ifndef _ALPS_H + #define _ALPS_H - /** - * struct alps_model_info - touchpad ID table --- -1.8.1.2 - +-#define ALPS_PROTO_V1 0 +-#define ALPS_PROTO_V2 1 +-#define ALPS_PROTO_V3 2 +-#define ALPS_PROTO_V4 3 ++#define ALPS_PROTO_V1 1 ++#define ALPS_PROTO_V2 2 ++#define ALPS_PROTO_V3 3 ++#define ALPS_PROTO_V4 4 + ++/** ++ * struct alps_model_info - touchpad ID table ++ * @signature: E7 response string to match. ++ * @command_mode_resp: For V3/V4 touchpads, the final byte of the EC response ++ * (aka command mode response) identifies the firmware minor version. This ++ * can be used to distinguish different hardware models which are not ++ * uniquely identifiable through their E7 responses. ++ * @proto_version: Indicates V1/V2/V3/... ++ * @byte0: Helps figure out whether a position report packet matches the ++ * known format for this model. The first byte of the report, ANDed with ++ * mask0, should match byte0. ++ * @mask0: The mask used to check the first byte of the report. ++ * @flags: Additional device capabilities (passthrough port, trackstick, etc.). ++ * ++ * Many (but not all) ALPS touchpads can be identified by looking at the ++ * values returned in the "E7 report" and/or the "EC report." This table ++ * lists a number of such touchpads. ++ */ + struct alps_model_info { +- unsigned char signature[3]; +- unsigned char command_mode_resp; /* v3/v4 only */ ++ unsigned char signature[3]; ++ unsigned char command_mode_resp; + unsigned char proto_version; +- unsigned char byte0, mask0; +- unsigned char flags; ++ unsigned char byte0, mask0; ++ unsigned char flags; + }; + ++/** ++ * struct alps_nibble_commands - encodings for register accesses ++ * @command: PS/2 command used for the nibble ++ * @data: Data supplied as an argument to the PS/2 command, if applicable ++ * ++ * The ALPS protocol uses magic sequences to transmit binary data to the ++ * touchpad, as it is generally not OK to send arbitrary bytes out the ++ * PS/2 port. Each of the sequences in this table sends one nibble of the ++ * register address or (write) data. Different versions of the ALPS protocol ++ * use slightly different encodings. ++ */ + struct alps_nibble_commands { + int command; + unsigned char data; + }; + ++/** ++ * struct alps_fields - decoded version of the report packet ++ * @x_map: Bitmap of active X positions for MT. ++ * @y_map: Bitmap of active Y positions for MT. ++ * @fingers: Number of fingers for MT. ++ * @x: X position for ST. ++ * @y: Y position for ST. ++ * @z: Z position for ST. ++ * @first_mp: Packet is the first of a multi-packet report. ++ * @is_mp: Packet is part of a multi-packet report. ++ * @left: Left touchpad button is active. ++ * @right: Right touchpad button is active. ++ * @middle: Middle touchpad button is active. ++ * @ts_left: Left trackstick button is active. ++ * @ts_right: Right trackstick button is active. ++ * @ts_middle: Middle trackstick button is active. ++ */ ++struct alps_fields { ++ unsigned int x_map; ++ unsigned int y_map; ++ unsigned int fingers; ++ unsigned int x; ++ unsigned int y; ++ unsigned int z; ++ unsigned int first_mp:1; ++ unsigned int is_mp:1; ++ ++ unsigned int left:1; ++ unsigned int right:1; ++ unsigned int middle:1; ++ ++ unsigned int ts_left:1; ++ unsigned int ts_right:1; ++ unsigned int ts_middle:1; ++}; ++ ++/** ++ * struct alps_data - private data structure for the ALPS driver ++ * @dev2: "Relative" device used to report trackstick or mouse activity. ++ * @phys: Physical path for the relative device. ++ * @nibble_commands: Command mapping used for touchpad register accesses. ++ * @addr_command: Command used to tell the touchpad that a register address ++ * follows. ++ * @proto_version: Indicates V1/V2/V3/... ++ * @byte0: Helps figure out whether a position report packet matches the ++ * known format for this model. The first byte of the report, ANDed with ++ * mask0, should match byte0. ++ * @mask0: The mask used to check the first byte of the report. ++ * @flags: Additional device capabilities (passthrough port, trackstick, etc.). ++ * @x_max: Largest possible X position value. ++ * @y_max: Largest possible Y position value. ++ * @x_bits: Number of X bits in the MT bitmap. ++ * @y_bits: Number of Y bits in the MT bitmap. ++ * @hw_init: Protocol-specific hardware init function. ++ * @process_packet: Protocol-specific function to process a report packet. ++ * @decode_fields: Protocol-specific function to read packet bitfields. ++ * @set_abs_params: Protocol-specific function to configure the input_dev. ++ * @prev_fin: Finger bit from previous packet. ++ * @multi_packet: Multi-packet data in progress. ++ * @multi_data: Saved multi-packet data. ++ * @x1: First X coordinate from last MT report. ++ * @x2: Second X coordinate from last MT report. ++ * @y1: First Y coordinate from last MT report. ++ * @y2: Second Y coordinate from last MT report. ++ * @fingers: Number of fingers from last MT report. ++ * @quirks: Bitmap of ALPS_QUIRK_*. ++ * @timer: Timer for flushing out the final report packet in the stream. ++ */ + struct alps_data { +- struct input_dev *dev2; /* Relative device */ +- char phys[32]; /* Phys */ +- const struct alps_model_info *i;/* Info */ ++ struct input_dev *dev2; ++ char phys[32]; ++ ++ /* these are autodetected when the device is identified */ + const struct alps_nibble_commands *nibble_commands; +- int addr_command; /* Command to set register address */ +- int prev_fin; /* Finger bit from previous packet */ +- int multi_packet; /* Multi-packet data in progress */ +- unsigned char multi_data[6]; /* Saved multi-packet data */ +- int x1, x2, y1, y2; /* Coordinates from last MT report */ +- int fingers; /* Number of fingers from MT report */ ++ int addr_command; ++ unsigned char proto_version; ++ unsigned char byte0, mask0; ++ unsigned char flags; ++ int x_max; ++ int y_max; ++ int x_bits; ++ int y_bits; ++ ++ int (*hw_init)(struct psmouse *psmouse); ++ void (*process_packet)(struct psmouse *psmouse); ++ void (*decode_fields)(struct alps_fields *f, unsigned char *p); ++ void (*set_abs_params)(struct alps_data *priv, struct input_dev *dev1); ++ ++ int prev_fin; ++ int multi_packet; ++ unsigned char multi_data[6]; ++ int x1, x2, y1, y2; ++ int fingers; + u8 quirks; + struct timer_list timer; + }; diff --git a/arm-tegra-sdhci-module-fix.patch b/arm-tegra-sdhci-module-fix.patch index 24ba278ed..0c5d2448f 100644 --- a/arm-tegra-sdhci-module-fix.patch +++ b/arm-tegra-sdhci-module-fix.patch @@ -7,5 +7,5 @@ -MODULE_DEVICE_TABLE(of, sdhci_dt_ids); +MODULE_DEVICE_TABLE(of, sdhci_tegra_dt_match); - static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata( + static struct tegra_sdhci_platform_data * sdhci_tegra_dt_parse_pdata( struct platform_device *pdev) diff --git a/brcmsmac-updates-rhbz892428.patch b/brcmsmac-updates-rhbz892428.patch deleted file mode 100644 index 8b5e08f04..000000000 --- a/brcmsmac-updates-rhbz892428.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.c b/drivers/net/wireless/brcm80211/brcmsmac/dma.c -index 426b9a9..d7ce1ac 100644 ---- a/drivers/net/wireless/brcm80211/brcmsmac/dma.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.c -@@ -361,7 +361,7 @@ static uint prevtxd(struct dma_info *di, uint i) - - static uint nextrxd(struct dma_info *di, uint i) - { -- return txd(di, i + 1); -+ return rxd(di, i + 1); - } - - static uint ntxdactive(struct dma_info *di, uint h, uint t) -diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c -index 5710dc0..25c5410 100644 ---- a/drivers/net/wireless/brcm80211/brcmsmac/main.c -+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c -@@ -232,8 +232,8 @@ - - #define MAX_DMA_SEGS 4 - --/* Max # of entries in Tx FIFO based on 4kb page size */ --#define NTXD 256 -+/* # of entries in Tx FIFO */ -+#define NTXD 64 - /* Max # of entries in Rx FIFO based on 4kb page size */ - #define NRXD 256 - diff --git a/linux-2.6-compile-fixes.patch b/compile-fixes.patch similarity index 100% rename from linux-2.6-compile-fixes.patch rename to compile-fixes.patch diff --git a/config-arm-generic b/config-arm-generic index 92e3e5c8e..5cd466e86 100644 --- a/config-arm-generic +++ b/config-arm-generic @@ -64,6 +64,7 @@ CONFIG_SCHED_SMT=y CONFIG_RCU_FANOUT=32 CONFIG_CPU_IDLE=y +# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y @@ -110,6 +111,7 @@ CONFIG_RFKILL_GPIO=m CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_GPIO_GENERIC_PLATFORM=m CONFIG_PINCTRL_SINGLE=m +CONFIG_POWER_RESET_GPIO=y CONFIG_USB_ULPI=y @@ -135,7 +137,9 @@ CONFIG_SERIO_AMBAKMI=m CONFIG_I2C_NOMADIK=m CONFIG_ARM_SP805_WATCHDOG=m CONFIG_FB_ARMCLCD=m +CONFIG_FB_SSD1307=m CONFIG_MPCORE_WATCHDOG=m +CONFIG_BACKLIGHT_PWM=m CONFIG_MMC_ARMMMCI=m CONFIG_MMC_SDHCI_PLTFM=m @@ -256,6 +260,7 @@ CONFIG_HW_RANDOM_ATMEL=m CONFIG_HW_RANDOM_EXYNOS=m # Device tree +CONFIG_DTC=y CONFIG_OF=y CONFIG_USE_OF=y CONFIG_OF_DEVICE=y @@ -351,6 +356,8 @@ CONFIG_MFD_88PM805=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_MFD_MC13XXX_SPI=m CONFIG_MFD_SYSCON=y +# CONFIG_MFD_TPS80031 is not set +# CONFIG_MFD_AS3711 is not set # CONFIG_MFD_WM5102 is not set # CONFIG_MFD_WM5110 is not set # CONFIG_MFD_TPS65912_SPI is not set @@ -362,19 +369,23 @@ CONFIG_MFD_SYSCON=y CONFIG_REGULATOR_VIRTUAL_CONSUMER=m CONFIG_REGULATOR_USERSPACE_CONSUMER=m +# CONFIG_REGULATOR_DUMMY is not set CONFIG_REGULATOR_GPIO=m CONFIG_REGULATOR_AD5398=m CONFIG_REGULATOR_ANATOP=m CONFIG_REGULATOR_ARIZONA=m CONFIG_REGULATOR_FAN53555=m CONFIG_REGULATOR_ISL6271A=m +CONFIG_REGULATOR_LP3972=m CONFIG_REGULATOR_MAX1586=m CONFIG_REGULATOR_MAX8649=m CONFIG_REGULATOR_MAX8660=m CONFIG_REGULATOR_MAX8952=m +CONFIG_REGULATOR_MAX8973=m CONFIG_REGULATOR_MC13783=m CONFIG_REGULATOR_MC13892=m CONFIG_REGULATOR_LP3971=m +CONFIG_REGULATOR_TPS51632=m CONFIG_REGULATOR_TPS62360=m CONFIG_REGULATOR_TPS65023=m CONFIG_REGULATOR_TPS6524X=m @@ -395,6 +406,7 @@ CONFIG_IEEE802154_MRF24J40=m # CONFIG_ARM_VIRT_EXT is not set # CONFIG_PINCTRL_EXYNOS4 is not set +# CONFIG_PINCTRL_EXYNOS5440 is not set # CONFIG_AUTO_ZRELADDR is not set # CONFIG_ASYMMETRIC_KEY_TYPE is not set @@ -488,6 +500,7 @@ CONFIG_TOUCHSCREEN_MC13783=m # CONFIG_NET_VENDOR_MICROCHIP is not set # CONFIG_CS89x0 is not set # CONFIG_DVB_USB_PCTV452E is not set +# CONFIG_PINCTRL_EXYNOS is not set # CONFIG_EZX_PCAP is not set diff --git a/config-arm-kirkwood b/config-arm-kirkwood index d729e7520..9f80aaf4a 100644 --- a/config-arm-kirkwood +++ b/config-arm-kirkwood @@ -15,20 +15,29 @@ CONFIG_MACH_GURUPLUG=y CONFIG_MACH_ICONNECT_DT=y CONFIG_MACH_IB62X0_DT=y CONFIG_MACH_INETSPACE_V2=y +CONFIG_MACH_INETSPACE_V2_DT=y CONFIG_MACH_IOMEGA_IX2_200_DT=y CONFIG_MACH_KM_KIRKWOOD_DT=y CONFIG_MACH_LSXL_DT=y +CONFIG_MACH_MPLCEC4_DT=y CONFIG_MACH_MV88F6281GTW_GE=y -CONFIG_MACH_NETSPACE_V2=y +CONFIG_MACH_NETSPACE_LITE_V2_DT=y CONFIG_MACH_NETSPACE_MAX_V2=y +CONFIG_MACH_NETSPACE_MAX_V2_DT=y +CONFIG_MACH_NETSPACE_MINI_V2_DT=y +CONFIG_MACH_NETSPACE_V2=y +CONFIG_MACH_NETSPACE_V2_DT=y CONFIG_MACH_NET2BIG_V2=y CONFIG_MACH_NET5BIG_V2=y +CONFIG_MACH_NSA310_DT=y +CONFIG_MACH_OPENBLOCKS_A6_DT=y CONFIG_MACH_OPENRD_BASE=y CONFIG_MACH_OPENRD_CLIENT=y CONFIG_MACH_OPENRD_ULTIMATE=y CONFIG_MACH_RD88F6192_NAS=y CONFIG_MACH_RD88F6281=y CONFIG_MACH_SHEEVAPLUG=y +CONFIG_MACH_TOPKICK_DT=y CONFIG_MACH_TS219=y CONFIG_MACH_TS219_DT=y CONFIG_MACH_TS41X=y @@ -52,6 +61,7 @@ CONFIG_LEDS_NETXBIG=m CONFIG_RTC_DRV_MV=y CONFIG_MV_XOR=y CONFIG_CRYPTO_DEV_MV_CESA=m +# CONFIG_PINCTRL_EXYNOS is not set CONFIG_PINCTRL_MVEBU=y CONFIG_PINCTRL_KIRKWOOD=y diff --git a/config-arm-omap b/config-arm-omap index 7e27075df..554ce056c 100644 --- a/config-arm-omap +++ b/config-arm-omap @@ -41,7 +41,7 @@ CONFIG_SOC_OMAP3430=y CONFIG_SOC_TI81XX=y CONFIG_SOC_AM33XX=y CONFIG_SOC_OMAPTI816X=y -CONFIG_SOC_OMAP5=y +# CONFIG_SOC_OMAP5 is not set CONFIG_OMAP_PACKAGE_CBB=y CONFIG_OMAP_PACKAGE_CBL=y CONFIG_OMAP_PACKAGE_CBS=y @@ -174,6 +174,7 @@ CONFIG_TOUCHSCREEN_TI_TSCADC=m CONFIG_SERIAL_OMAP=y CONFIG_SERIAL_OMAP_CONSOLE=y CONFIG_OMAP_WATCHDOG=y +CONFIG_CLK_TWL6040=m CONFIG_TWL4030_CORE=y CONFIG_TWL4030_MADC=m CONFIG_TWL4030_POWER=y @@ -185,6 +186,7 @@ CONFIG_CHARGER_TWL4030=m CONFIG_TWL6030_PWM=m CONFIG_TWL6040_CORE=y CONFIG_SENSORS_TWL4030_MADC=m +CONFIG_SENSORS_LIS3_I2C=m CONFIG_TI_DAVINCI_EMAC=m CONFIG_TI_DAVINCI_MDIO=m CONFIG_TI_DAVINCI_CPDMA=m @@ -194,12 +196,16 @@ CONFIG_LEDS_LP8788=m CONFIG_MTD_ONENAND_OMAP2=y CONFIG_HDQ_MASTER_OMAP=m CONFIG_I2C_OMAP=m -CONFIG_SPI_OMAP24XX=y +CONFIG_SPI_OMAP24XX=m CONFIG_MFD_OMAP_USB_HOST=y CONFIG_MFD_WL1273_CORE=m CONFIG_MFD_LP8788=y +CONFIG_MFD_TPS65910=y +CONFIG_GPIO_TPS65910=y CONFIG_REGULATOR_TWL4030=y CONFIG_REGULATOR_LP8788=y +CONFIG_REGULATOR_TPS65217=y +CONFIG_REGULATOR_TPS65910=y # Enable V4L2 drivers for OMAP2+ CONFIG_MEDIA_CONTROLLER=y CONFIG_VIDEO_V4L2_SUBDEV_API=y @@ -236,20 +242,24 @@ CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 CONFIG_OMAP2_DSS_SLEEP_BEFORE_RESET=y CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y +CONFIG_FB_DA8XX=m +CONFIG_FB_DA8XX_CONSISTENT_DMA_SIZE=5 + +CONFIG_LCD_CLASS_DEVICE=m +CONFIG_PANEL_GENERIC_DPI=m CONFIG_PANEL_TFP410=m CONFIG_PANEL_TAAL=m CONFIG_PANEL_PICODLP=m +CONFIG_PANEL_SHARP_LS037V7DW01=m +CONFIG_PANEL_NEC_NL8048HL11_01B=m +CONFIG_PANEL_TPO_TD043MTEA1=m +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m +CONFIG_BACKLIGHT_PWM=m CONFIG_BACKLIGHT_PANDORA=m -# -# OMAP2/3 Display Device Drivers -# -CONFIG_PANEL_GENERIC_DPI=y -CONFIG_PANEL_SHARP_LS037V7DW01=y -CONFIG_PANEL_NEC_NL8048HL11_01B=y -CONFIG_PANEL_TPO_TD043MTEA1=y - CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_DMIC=m CONFIG_SND_OMAP_SOC_MCBSP=m CONFIG_SND_OMAP_SOC_MCPDM=m CONFIG_SND_OMAP_SOC_OVERO=m @@ -260,20 +270,18 @@ CONFIG_SND_OMAP_SOC_SDP4430=m CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=m CONFIG_SND_OMAP_SOC_ZOOM2=m -CONFIG_SND_OMAP_SOC_IGEP0020=y -CONFIG_SND_OMAP_SOC_OMAP_HDMI=y -# Because alsa is modular http://www.spinics.net/lists/linux-omap/msg67307.html -# CONFIG_SND_OMAP_SOC_OMAP4_HDMI is not set +CONFIG_SND_OMAP_SOC_IGEP0020=m +CONFIG_SND_OMAP_SOC_OMAP_HDMI=m CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m CONFIG_SND_SOC_I2C_AND_SPI=y # CONFIG_SND_OMAP_SOC_RX51 is not set # CONFIG_SND_SOC_ALL_CODECS is not set -CONFIG_SND_SOC_TLV320AIC23=y -CONFIG_SND_SOC_TLV320AIC3X=y -CONFIG_SND_SOC_TWL4030=y -CONFIG_SND_SOC_TWL6040=y -CONFIG_RADIO_WL128X +CONFIG_SND_SOC_TLV320AIC23=m +CONFIG_SND_SOC_TLV320AIC3X=m +CONFIG_SND_SOC_TWL4030=m +CONFIG_SND_SOC_TWL6040=m +CONFIG_RADIO_WL128X=m CONFIG_USB_OTG=y CONFIG_USB_EHCI_HCD_OMAP=y @@ -301,9 +309,17 @@ CONFIG_MMC_OMAP=y CONFIG_MMC_OMAP_HS=y CONFIG_TWL4030_USB=y CONFIG_TWL6030_USB=y +CONFIG_RTC_DRV_OMAP=m CONFIG_RTC_DRV_TWL4030=y +CONFIG_RTC_DRV_TPS65910=m -CONFIG_IR_RX51=m +CONFIG_PWM_TIECAP=m +CONFIG_PWM_TIEHRPWM=m +CONFIG_PWM_TWL=m +CONFIG_PWM_TWL_LED=m + +# CONFIG_IR_RX51 is not set +# CONFIG_BATTERY_RX51 is not set # CONFIG_TIDSPBRIDGE is not set # CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE=0x600000 @@ -317,6 +333,7 @@ CONFIG_IR_RX51=m # CONFIG_OMAP_REMOTEPROC is not set # CONFIG_OMAP_BANDGAP is not set +# CONFIG_OMAP_BANDGAP is not set # CONFIG_OMAP_IOVMM is not set CONFIG_CRYPTO_DEV_OMAP_SHAM=m @@ -324,7 +341,6 @@ CONFIG_CRYPTO_DEV_OMAP_AES=m # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_MTD_NAND_OMAP_BCH is not set -# CONFIG_MFD_TPS65910 is not set # CONFIG_MFD_TPS65912_I2C is not set # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_I2C is not set @@ -337,7 +353,8 @@ CONFIG_CRYPTO_DEV_OMAP_AES=m # CONFIG_MFD_AAT2870_CORE is not set # CONFIG_MFD_RC5T583 is not set # CONFIG_MFD_PALMAS is not set -# CONFIG_REGULATOR_DUMMY is not set # CONFIG_REGULATOR_LP3972 is not set # CONFIG_REGULATOR_LP872X is not set +# CONFIG_OMAP2_DSS_DEBUG is not set +# CONFIG_OMAP2_DSS_DEBUGFS is not set diff --git a/config-arm-tegra b/config-arm-tegra index f74f57936..30f2493d5 100644 --- a/config-arm-tegra +++ b/config-arm-tegra @@ -3,7 +3,6 @@ CONFIG_ARCH_TEGRA=y CONFIG_ARCH_TEGRA_2x_SOC=y # CONFIG_ARCH_TEGRA_3x_SOC is not set # CONFIG_ARM_LPAE is not set -CONFIG_TEGRA_PCI=y CONFIG_VFP=y CONFIG_VFPv3=y @@ -20,6 +19,7 @@ CONFIG_MACH_VENTANA=y CONFIG_TEGRA_DEBUG_UARTD=y CONFIG_ARM_CPU_TOPOLOGY=y +CONFIG_TEGRA_PCI=y CONFIG_TEGRA_IOMMU_GART=y CONFIG_TEGRA_IOMMU_SMMU=y @@ -76,10 +76,12 @@ CONFIG_SND_SOC_TEGRA_ALC5632=m CONFIG_SND_SOC_TEGRA_WM8753=m CONFIG_SND_SOC_TEGRA_WM8903=m CONFIG_SND_SOC_TEGRA_TRIMSLICE=m -# CONFIG_SND_SOC_TEGRA30_AHUB is not set -# CONFIG_SND_SOC_TEGRA30_I2S is not set +CONFIG_SND_SOC_TEGRA30_AHUB=m +CONFIG_SND_SOC_TEGRA30_I2S=m -CONFIG_MFD_NVEC=y +# AC100 (PAZ00) +# CONFIG_MFD_NVEC is not set +CONFIG_MFD_TPS80031=y CONFIG_KEYBOARD_NVEC=y CONFIG_SERIO_NVEC_PS2=y CONFIG_NVEC_POWER=y @@ -87,6 +89,13 @@ CONFIG_POWER_SUPPLY=y CONFIG_NVEC_LEDS=y CONFIG_NVEC_PAZ00=y +# CONFIG_MFD_TPS6586X is not set +# CONFIG_RTC_DRV_TPS6586X is not set + +CONFIG_PWM_TEGRA=m + +CONFIG_DRM_TEGRA=m + CONFIG_CPU_PM=y CONFIG_ARM_CPU_SUSPEND=y @@ -101,6 +110,8 @@ CONFIG_OF_GPIO=y CONFIG_OF_PCI=y CONFIG_OF_PCI_IRQ=y +# CONFIG_DRM_TEGRA_DEBUG is not set + # CONFIG_TI_DAC7512 is not set # CONFIG_SPI_TOPCLIFF_PCH is not set # CONFIG_SPI_DW_PCI is not set diff --git a/config-armv7 b/config-armv7 index 3a8c5b6f4..bbb64ecd1 100644 --- a/config-armv7 +++ b/config-armv7 @@ -5,12 +5,18 @@ CONFIG_CPU_V7=y # CONFIG_ARCH_MULTI_V6 is not set CONFIG_ARCH_MULTI_V6_V7=y CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_MVEBU=y +# This is V6 so we'll eventually support it in v5 unified kernels +# CONFIG_ARCH_BCM is not set CONFIG_ARCH_HIGHBANK=y +CONFIG_ARCH_MVEBU=y +# CONFIG_ARCH_MXC is not set CONFIG_ARCH_PICOXCELL=y CONFIG_ARCH_SOCFPGA=y +CONFIG_ARCH_SUNXI=y CONFIG_ARCH_VEXPRESS_CA9X4=y CONFIG_ARCH_VEXPRESS_DT=y +# not enabling first round +# CONFIG_ARCH_ZYNQ is not set CONFIG_MACH_ARMADA_370_XP=y CONFIG_MACH_ARMADA_370=y @@ -49,6 +55,7 @@ CONFIG_HIGHPTE=y # CONFIG_THUMB2_KERNEL is not set # CONFIG_XEN is not set CONFIG_HVC_DCC=y +# CONFIG_VIRTIO_CONSOLE is not set # CONFIG_ARM_VIRT_EXT is not set @@ -89,6 +96,7 @@ CONFIG_RCU_FANOUT_LEAF=16 CONFIG_CPU_IDLE=y # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 CONFIG_LSM_MMAP_MIN_ADDR=32768 @@ -148,6 +156,8 @@ CONFIG_AMBA_PL08X=y CONFIG_ARM_SP805_WATCHDOG=m # highbank +CONFIG_CPU_IDLE_CALXEDA=y + CONFIG_EDAC_HIGHBANK_MC=m CONFIG_EDAC_HIGHBANK_L2=m @@ -166,6 +176,7 @@ CONFIG_TOUCHSCREEN_ADS7846=m CONFIG_I2C_VERSATILE=m CONFIG_OC_ETM=y CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y +CONFIG_SENSORS_VEXPRESS=m # unknown and needs review CONFIG_ARM_AMBA=y @@ -177,9 +188,67 @@ CONFIG_CRYPTO_DEV_MV_CESA=m CONFIG_MV643XX_ETH=m CONFIG_I2C_MV64XXX=m CONFIG_PINCTRL_MVEBU=y +CONFIG_PINCTRL_ARMADA_370=y +CONFIG_PINCTRL_ARMADA_XP=y +CONFIG_PINCTRL_DOVE=y +CONFIG_EDAC_MV64X60=m +CONFIG_MVNETA=m +CONFIG_SATA_MV=m +CONFIG_MARVELL_PHY=m +CONFIG_RTC_DRV_S35390A=y +CONFIG_USB_EHCI_MV=m + +# Allwinner a1x +# CONFIG_SUNXI_RFKILL=y +# CONFIG_SUNXI_NAND=y +# CONFIG_SUNXI_DBGREG=m +# CONFIG_WEMAC_SUN4I=y +# CONFIG_KEYBOARD_SUN4IKEYPAD=m +# CONFIG_KEYBOARD_SUN4I_KEYBOARD=m +# CONFIG_IR_SUN4I=m +# CONFIG_TOUCHSCREEN_SUN4I_TS=m +# CONFIG_SUN4I_G2D=y +# CONFIG_I2C_SUN4I=y +# CONFIG_DRM_MALI=m +# CONFIG_MALI=m +# CONFIG_FB_SUNXI=m +# CONFIG_FB_SUNXI_UMP=y +# CONFIG_FB_SUNXI_LCD=m +# CONFIG_FB_SUNXI_HDMI=m +# CONFIG_SOUND_SUN4I=y +# CONFIG_SND_SUN4I_SOC_CODEC=y +# CONFIG_SND_SUN4I_SOC_HDMIAUDIO=y +# CONFIG_SND_SUN4I_SOC_SPDIF=m +# CONFIG_SND_SUN4I_SOC_I2S_INTERFACE=m +# CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_USB_SW_SUN4I_HCD=y +# CONFIG_USB_SW_SUN4I_HCD0=y +# CONFIG_USB_SW_SUN4I_HCI=y +# CONFIG_USB_SW_SUN4I_EHCI0=y +# CONFIG_USB_SW_SUN4I_EHCI1=y +# CONFIG_USB_SW_SUN4I_OHCI0=y +# CONFIG_USB_SW_SUN4I_OHCI1=y +# CONFIG_USB_SW_SUN4I_USB=y +# CONFIG_USB_SW_SUN4I_USB_MANAGER=y +# CONFIG_MMC_SUNXI_POWER_CONTROL=y +# CONFIG_MMC_SUNXI=y +# CONFIG_RTC_DRV_SUN4I=y + +# imx +CONFIG_BACKLIGHT_PWM=m +# CONFIG_DRM_IMX is not set +# CONFIG_DRM_IMX_FB_HELPER=m +# CONFIG_DRM_IMX_PARALLEL_DISPLAY=m +# CONFIG_DRM_IMX_IPUV3_CORE=m +# CONFIG_DRM_IMX_IPUV3=m +# CONFIG_VIDEO_CODA is not set + +CONFIG_INPUT_PWM_BEEPER=m # exynos # CONFIG_DRM_EXYNOS is not set +# CONFIG_PINCTRL_EXYNOS5440 is not set +# CONFIG_PINCTRL_EXYNOS is not set # picoxcell CONFIG_CRYPTO_DEV_PICOXCELL=m @@ -187,8 +256,12 @@ CONFIG_CRYPTO_DEV_PICOXCELL=m # ST Ericsson # CONFIG_I2C_NOMADIK is not set +# OMAP +# CONFIG_SENSORS_LIS3_I2C is not set + # General ARM drivers # Device tree +CONFIG_DTC=y CONFIG_OF=y CONFIG_USE_OF=y CONFIG_OF_DEVICE=y @@ -256,6 +329,7 @@ CONFIG_EDAC_LEGACY_SYSFS=y CONFIG_MPCORE_WATCHDOG=m # Multi function devices +CONFIG_MFD_CORE=m CONFIG_MFD_T7L66XB=y CONFIG_MFD_TC6387XB=y CONFIG_MFD_SYSCON=y @@ -278,6 +352,7 @@ CONFIG_GPIO_GENERIC_PLATFORM=m CONFIG_GPIO_EM=m CONFIG_GPIO_ADNP=m CONFIG_GPIO_MCP23S08=m +CONFIG_POWER_RESET_GPIO=y CONFIG_RFKILL_GPIO=m CONFIG_SERIAL_8250_EM=m CONFIG_INPUT_GP2A=m @@ -288,6 +363,9 @@ CONFIG_MDIO_BUS_MUX_MMIOREG=m CONFIG_MTD_OF_PARTS=y # CONFIG_MG_DISK is not set +# Framebuffers +CONFIG_FB_SSD1307=m + # Regulator drivers CONFIG_REGULATOR_FAN53555=m # Needs work/investigation @@ -333,6 +411,7 @@ CONFIG_PERF_EVENTS=y # CONFIG_VIDEO_DM6446_CCDC is not set # CONFIG_PANEL_TAAL is not set # CONFIG_IR_RX51 is not set +# CONFIG_DRM_OMAP is not set # CONFIG_GENERIC_CPUFREQ_CPU0 is not set # CONFIG_GPIO_TWL6040 is not set @@ -342,7 +421,6 @@ CONFIG_PERF_EVENTS=y # CONFIG_MFD_MAX8907 is not set # CONFIG_REGULATOR_FAN53555 is not set # CONFIG_REGULATOR_ANATOP is not set -# CONFIG_IR_RX51 is not set # CONFIG_VIDEO_DM6446_CCDC is not set # CONFIG_PANEL_TAAL is not set # CONFIG_SND_OMAP_SOC_OMAP_TWL4030 is not set diff --git a/config-generic b/config-generic index 88f6ff158..0c7e209e8 100644 --- a/config-generic +++ b/config-generic @@ -4,6 +4,8 @@ CONFIG_MMU=y CONFIG_SMP=y CONFIG_HOTPLUG_CPU=y +# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set +# CONFIG_DEBUG_HOTPLUG_CPU0 is not set CONFIG_LOCALVERSION="" CONFIG_CROSS_COMPILE="" CONFIG_DEFAULT_HOSTNAME="(none)" @@ -52,6 +54,8 @@ CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y CONFIG_CFQ_GROUP_IOSCHED=y CONFIG_DEFAULT_CFQ=y +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y CONFIG_PID_NS=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y @@ -124,6 +128,7 @@ CONFIG_MMC_BLOCK_MINORS=8 CONFIG_MMC_BLOCK_BOUNCE=y CONFIG_MMC_SDHCI=m CONFIG_MMC_SDHCI_PCI=m +CONFIG_MMC_SDHCI_ACPI=m CONFIG_MMC_SDRICOH_CS=m CONFIG_MMC_TIFM_SD=m CONFIG_MMC_WBSD=m @@ -132,6 +137,7 @@ CONFIG_MMC_SDHCI_PLTFM=m CONFIG_MMC_CB710=m CONFIG_MMC_RICOH_MMC=y CONFIG_MMC_USHC=m +CONFIG_MMC_REALTEK_PCI=m CONFIG_MMC_VUB300=m CONFIG_CB710_CORE=m @@ -340,6 +346,7 @@ CONFIG_SCSI_SRP=m CONFIG_SCSI_SRP_ATTRS=m CONFIG_SCSI_TGT=m CONFIG_SCSI_ISCI=m +CONFIG_SCSI_CHELSIO_FCOE=m CONFIG_SCSI_DH=y CONFIG_SCSI_DH_RDAC=m @@ -416,6 +423,9 @@ CONFIG_SCSI_MVSAS_TASKLET=y CONFIG_SCSI_MPT2SAS=m CONFIG_SCSI_MPT2SAS_MAX_SGE=128 CONFIG_SCSI_MPT2SAS_LOGGING=y +CONFIG_SCSI_MPT3SAS=m +CONFIG_SCSI_MPT3SAS_MAX_SGE=128 +CONFIG_SCSI_MPT3SAS_LOGGING=y CONFIG_SCSI_UFSHCD=m @@ -607,6 +617,7 @@ CONFIG_FIREWIRE_SBP2=m CONFIG_FIREWIRE_NET=m CONFIG_FIREWIRE_OHCI_DEBUG=y CONFIG_FIREWIRE_NOSY=m +CONFIG_FIREWIRE_SERIAL=m # CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set # @@ -977,9 +988,11 @@ CONFIG_IP_SCTP=m CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_MSG is not set # CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -CONFIG_SCTP_HMAC_SHA1=y -# CONFIG_SCTP_HMAC_MD5 is not set +CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set +# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set +CONFIG_SCTP_COOKIE_HMAC_MD5=y +CONFIG_SCTP_COOKIE_HMAC_SHA1=y CONFIG_ATM=m CONFIG_VLAN_8021Q=m CONFIG_VLAN_8021Q_GVRP=y @@ -1077,6 +1090,7 @@ CONFIG_DCB=y CONFIG_DNS_RESOLVER=m CONFIG_BATMAN_ADV=m CONFIG_BATMAN_ADV_BLA=y +CONFIG_BATMAN_ADV_DAT=y # CONFIG_BATMAN_ADV_DEBUG is not set CONFIG_OPENVSWITCH=m CONFIG_NETPRIO_CGROUP=m @@ -1187,6 +1201,9 @@ CONFIG_ATL2=m CONFIG_ATL1=m CONFIG_ATL1C=m CONFIG_ATL1E=m +CONFIG_NET_CADENCE=y +CONFIG_ARM_AT91_ETHER=m +CONFIG_MACB=m CONFIG_NET_VENDOR_BROCADE=y CONFIG_BNA=m @@ -1257,6 +1274,7 @@ CONFIG_IXGBE_PTP=y # CONFIG_NET_VENDOR_I825XX is not set CONFIG_NET_VENDOR_MARVELL=y +CONFIG_MVMDIO=m CONFIG_SKGE=m # CONFIG_SKGE_DEBUG is not set CONFIG_SKGE_GENESIS=y @@ -1483,6 +1501,7 @@ CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 # CONFIG_ADM8211 is not set CONFIG_ATH_COMMON=m +CONFIG_ATH_CARDS=m CONFIG_ATH5K=m CONFIG_ATH5K_DEBUG=y # CONFIG_ATH5K_TRACER is not set @@ -1490,6 +1509,7 @@ CONFIG_ATH6KL=m CONFIG_ATH6KL_DEBUG=y CONFIG_ATH6KL_SDIO=m CONFIG_ATH6KL_USB=m +CONFIG_AR5523=m CONFIG_ATH9K=m CONFIG_ATH9K_PCI=y CONFIG_ATH9K_AHB=y @@ -1500,6 +1520,8 @@ CONFIG_ATH9K_HTC=m CONFIG_ATH9K_BTCOEX_SUPPORT=y # CONFIG_ATH9K_HTC_DEBUGFS is not set CONFIG_ATH9K_RATE_CONTROL=y +CONFIG_WIL6210=m +CONFIG_WIL6210_ISR_COR=y CONFIG_CARL9170=m CONFIG_CARL9170_LEDS=y # CONFIG_CARL9170_HWRNG is not set @@ -1530,6 +1552,7 @@ CONFIG_BRCMFMAC=m CONFIG_BRCMFMAC_SDIO=y CONFIG_BRCMFMAC_SDIO_OOB=y CONFIG_BRCMFMAC_USB=y +# CONFIG_BRCM_TRACING is not set # CONFIG_BRCMISCAN is not set # CONFIG_BRCMDBG is not set CONFIG_HERMES=m @@ -1622,6 +1645,7 @@ CONFIG_RTL8192CE=m CONFIG_RTL8192SE=m CONFIG_RTL8192CU=m CONFIG_RTL8192DE=m +CONFIG_RTL8723AE=m CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m @@ -1932,6 +1956,7 @@ CONFIG_SERIO_SERPORT=y CONFIG_SERIO_RAW=m CONFIG_SERIO_ALTERA_PS2=m # CONFIG_SERIO_PS2MULT is not set +CONFIG_SERIO_ARC_PS2=m # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set @@ -2043,9 +2068,12 @@ CONFIG_TOUCHSCREEN_W90X900=m CONFIG_TOUCHSCREEN_ST1232=m CONFIG_TOUCHSCREEN_ATMEL_MXT=m # CONFIG_TOUCHSCREEN_MAX11801 is not set +CONFIG_TOUCHSCREEN_AUO_PIXCIR=m +CONFIG_TOUCHSCREEN_TI_AM335X_TSC=m CONFIG_INPUT_MISC=y CONFIG_INPUT_PCSPKR=m +CONFIG_INPUT_RETU_PWRBUTTON=m CONFIG_INPUT_UINPUT=m CONFIG_INPUT_WISTRON_BTNS=m CONFIG_INPUT_ATLAS_BTNS=m @@ -2169,6 +2197,8 @@ CONFIG_I2C_ALGOPCA=m # CONFIG_I2C_NFORCE2_S4985 is not set # CONFIG_I2C_INTEL_MID is not set # CONFIG_I2C_EG20T is not set +# CONFIG_I2C_CBUS_GPIO is not set +CONFIG_I2C_VIPERBOARD=m CONFIG_EEPROM_AT24=m CONFIG_EEPROM_LEGACY=m @@ -2339,6 +2369,8 @@ CONFIG_SENSORS_MAX197=m # CONFIG_PCH_PHUB is not set # CONFIG_SERIAL_PCH_UART is not set # CONFIG_USB_SWITCH_FSA9480 is not set +CONFIG_SERIAL_ARC=m +CONFIG_SERIAL_ARC_NR_PORTS=1 CONFIG_W1=m CONFIG_W1_CON=y @@ -2451,6 +2483,7 @@ CONFIG_RTC_DRV_RS5C372=m # CONFIG_RTC_DRV_SA1100 is not set # CONFIG_RTC_DRV_TEST is not set CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8523=m CONFIG_RTC_DRV_V3020=m CONFIG_RTC_DRV_DS2404=m CONFIG_RTC_DRV_STK17TA8=m @@ -2671,6 +2704,7 @@ CONFIG_DVB_BT8XX=m CONFIG_DVB_BUDGET_CORE=m CONFIG_DVB_PLUTO2=m CONFIG_SMS_SIANO_MDTV=m +CONFIG_SMS_SIANO_RC=y CONFIG_MEDIA_SUBDRV_AUTOSELECT=y CONFIG_SMS_USB_DRV=m CONFIG_SMS_SDIO_DRV=m @@ -3044,6 +3078,7 @@ CONFIG_SND_USB_6FIRE=m CONFIG_SND_FIREWIRE=y CONFIG_SND_FIREWIRE_SPEAKERS=m CONFIG_SND_ISIGHT=m +CONFIG_SND_SCS1X=m # # Open Sound System @@ -3131,6 +3166,7 @@ CONFIG_USB_HID=y CONFIG_HID_SUPPORT=y CONFIG_HID=y +CONFIG_I2C_HID=m CONFIG_HID_BATTERY_STRENGTH=y # debugging default is y upstream now CONFIG_HIDRAW=y @@ -3161,6 +3197,7 @@ CONFIG_HID_PS3REMOTE=m CONFIG_HID_PRODIKEYS=m CONFIG_HID_DRAGONRISE=m CONFIG_HID_GYRATION=m +CONFIG_HID_ICADE=m CONFIG_HID_TWINHAN=m CONFIG_HID_ORTEK=m CONFIG_HID_PANTHERLORD=m @@ -3292,6 +3329,7 @@ CONFIG_USB_NET_RNDIS_HOST=m CONFIG_USB_NET_CDC_SUBSET=m CONFIG_USB_NET_CDC_EEM=m CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m CONFIG_USB_NET_ZAURUS=m CONFIG_USB_NET_CX82310_ETH=m CONFIG_USB_NET_INT51X1=m @@ -3411,6 +3449,7 @@ CONFIG_USB_SEVSEG=m CONFIG_USB_ALI_M5632=y CONFIG_USB_APPLEDISPLAY=m # CONFIG_OMAP_USB2 is not set +CONFIG_USB_RCAR_PHY=m CONFIG_USB_ATM=m CONFIG_USB_CXACRU=m # CONFIG_USB_C67X00_HCD is not set @@ -3471,6 +3510,7 @@ CONFIG_SSB_PCMCIAHOST=y # CONFIG_SSB_SILENT is not set # CONFIG_SSB_DEBUG is not set CONFIG_SSB_DRIVER_PCICORE=y +CONFIG_SSB_DRIVER_GPIO=y # Multifunction USB devices # CONFIG_MFD_PCF50633 is not set @@ -3487,6 +3527,10 @@ CONFIG_MFD_SUPPORT=y CONFIG_MFD_VX855=m CONFIG_MFD_SM501=m CONFIG_MFD_SM501_GPIO=y +CONFIG_MFD_RTSX_PCI=m +# CONFIG_MFD_TI_AM335X_TSCADC is not set +CONFIG_MFD_VIPERBOARD=m +# CONFIG_MFD_RETU is not set # CONFIG_MFD_TC6393XB is not set # CONFIG_MFD_WM8400 is not set # CONFIG_MFD_WM8350_I2C is not set @@ -3648,6 +3692,7 @@ CONFIG_9P_FS_POSIX_ACL=y CONFIG_FUSE_FS=m # CONFIG_OMFS_FS is not set CONFIG_CUSE=m +# CONFIG_F2FS_FS is not set # # Network File Systems @@ -3687,6 +3732,7 @@ CONFIG_CIFS_POSIX=y CONFIG_CIFS_FSCACHE=y CONFIG_CIFS_ACL=y CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_DEBUG=y # CONFIG_CIFS_DEBUG2 is not set CONFIG_CIFS_DFS_UPCALL=y CONFIG_CIFS_NFSD_EXPORT=y @@ -4069,6 +4115,11 @@ CONFIG_KEXEC=y CONFIG_HWMON=y # CONFIG_HWMON_DEBUG_CHIP is not set CONFIG_THERMAL_HWMON=y +# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set +# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set +CONFIG_FAIR_SHARE=y +CONFIG_STEP_WISE=y +# CONFIG_USER_SPACE is not set # CONFIG_CPU_THERMAL is not set CONFIG_INOTIFY=y @@ -4145,6 +4196,7 @@ CONFIG_SND_INDIGOIOX=m CONFIG_SND_INDIGODJX=m # CONFIG_SND_SOC is not set +CONFIG_BALLOON_COMPACTION=y CONFIG_COMPACTION=y CONFIG_MIGRATION=y CONFIG_NEW_LEDS=y @@ -4256,6 +4308,8 @@ CONFIG_APM_POWER=m # CONFIG_CHARGER_LP8727 is not set # CONFIG_CHARGER_GPIO is not set # CONFIG_CHARGER_PCF50633 is not set +# CONFIG_CHARGER_BQ2415X is not set +CONFIG_POWER_RESET=y # CONFIG_PDA_POWER is not set @@ -4265,6 +4319,7 @@ CONFIG_UIO=m CONFIG_UIO_CIF=m # CONFIG_UIO_PDRV is not set # CONFIG_UIO_PDRV_GENIRQ is not set +# CONFIG_UIO_DMEM_GENIRQ is not set CONFIG_UIO_AEC=m CONFIG_UIO_SERCOS3=m CONFIG_UIO_PCI_GENERIC=m @@ -4299,6 +4354,8 @@ CONFIG_NOZOMI=m # CONFIG_TPS65010 is not set CONFIG_INPUT_APANEL=m +CONFIG_INPUT_GP2A=m +# CONFIG_INPUT_GPIO_TILT_POLLED is not set # CONFIG_INTEL_MENLOW is not set CONFIG_ENCLOSURE_SERVICES=m @@ -4312,6 +4369,7 @@ CONFIG_MSPRO_BLOCK=m CONFIG_MEMSTICK_TIFM_MS=m CONFIG_MEMSTICK_JMICRON_38X=m CONFIG_MEMSTICK_R592=m +CONFIG_MEMSTICK_REALTEK_PCI=m CONFIG_ACCESSIBILITY=y CONFIG_A11Y_BRAILLE_CONSOLE=y @@ -4432,6 +4490,7 @@ CONFIG_ALTERA_STAPL=m # CONFIG_BPCTL is not set # CONFIG_CED1401 is not set # CONFIG_DGRP is not set +# CONFIG_SB105X is not set # END OF STAGING # @@ -4459,8 +4518,9 @@ CONFIG_LSM_MMAP_MIN_ADDR=65536 CONFIG_STRIP_ASM_SYMS=y # CONFIG_RCU_FANOUT_EXACT is not set -# FIXME: Revisit FAST_NO_HZ after 3.5 +# FIXME: Revisit FAST_NO_HZ after it's fixed # CONFIG_RCU_FAST_NO_HZ is not set +# CONFIG_RCU_NOCB_CPU is not set CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_TRACE is not set @@ -4517,6 +4577,9 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_CS5535 is not set # CONFIG_GPIO_ADP5588 is not set # CONFIG_GPIO_IT8761E is not set +# CONFIG SB105x is not set +# CONFIG_GPIO_TS5500 is not set +CONFIG_GPIO_VIPERBOARD=m # CONFIG_GPIO_MAX7300 is not set # CONFIG_UCB1400_CORE is not set # CONFIG_TPS6105X is not set @@ -4568,6 +4631,7 @@ CONFIG_BCMA_BLOCKIO=y CONFIG_BCMA_HOST_PCI_POSSIBLE=y CONFIG_BCMA_HOST_PCI=y CONFIG_BCMA_DRIVER_GMAC_CMN=y +CONFIG_BCMA_DRIVER_GPIO=y # CONFIG_BCMA_DEBUG is not set # CONFIG_GOOGLE_FIRMWARE is not set diff --git a/config-powerpc-generic b/config-powerpc-generic index a6ef1c4df..902dccdee 100644 --- a/config-powerpc-generic +++ b/config-powerpc-generic @@ -313,7 +313,7 @@ CONFIG_SPARSE_IRQ=y # CONFIG_PPC_MPC5200_LPBFIFO is not set # CONFIG_CAN_MSCAN is not set # CONFIG_CAN_MPC5XXX is not set -CONFIG_PATA_MACIO=m +CONFIG_PATA_MACIO=y CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m # CONFIG_PMIC_ADP5520 is not set # CONFIG_MFD_88PM8607 is not set @@ -380,3 +380,8 @@ CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RTC_DRV_SNVS is not set # CONFIG_ASYMMETRIC_KEY_TYPE is not set +CONFIG_POWER_RESET_GPIO=y +CONFIG_FB_SSD1307=m +CONFIG_INPUT_PWM_BEEPER=m +CONFIG_BACKLIGHT_PWM=m +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=n diff --git a/config-s390x b/config-s390x index 41e41c53c..c0ae0aa0a 100644 --- a/config-s390x +++ b/config-s390x @@ -244,9 +244,22 @@ CONFIG_ETHERNET=y CONFIG_BPF_JIT=y # CONFIG_TRANSPARENT_HUGEPAGE is not set -# CONFIG_SCM_BUS is not set -# CONFIG_EADM_SCH is not set -# CONFIG_SCM_BLOCK is not set -# CONFIG_SCM_BLOCK_CLUSTER_WRITE is not set +CONFIG_SCM_BUS=y +CONFIG_EADM_SCH=m +CONFIG_SCM_BLOCK=m +CONFIG_SCM_BLOCK_CLUSTER_WRITE=y # CONFIG_S390_PTDUMP is not set # CONFIG_ASYMMETRIC_KEY_TYPE is not set +CONFIG_PCI_NR_FUNCTIONS=64 +CONFIG_HOTPLUG_PCI=m +# CONFIG_HOTPLUG_PCI_CPCI is not set +# CONFIG_HOTPLUG_PCI_SHPC is not set +CONFIG_HOTPLUG_PCI_S390=m +# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_MCP23S08 is not set + +# CONFIG_PCI is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_PTP_1588_CLOCK_PCH is not set diff --git a/config-sparc64-generic b/config-sparc64-generic deleted file mode 100644 index c53b64450..000000000 --- a/config-sparc64-generic +++ /dev/null @@ -1,217 +0,0 @@ -CONFIG_SMP=y -CONFIG_SPARC=y -CONFIG_SPARC64=y -CONFIG_SECCOMP=y -CONFIG_HZ_100=y -# CONFIG_HZ_1000 is not set -CONFIG_HZ=100 - -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y - -CONFIG_US3_FREQ=m -CONFIG_US2E_FREQ=m - -CONFIG_SUN_LDOMS=y -CONFIG_SCHED_SMT=y -CONFIG_SCHED_MC=y -CONFIG_64BIT=y -# CONFIG_BBC_I2C is not set -CONFIG_HUGETLB_PAGE_SIZE_4MB=y -# CONFIG_HUGETLB_PAGE_SIZE_512K is not set -# CONFIG_HUGETLB_PAGE_SIZE_64K is not set -CONFIG_NR_CPUS=256 -CONFIG_US3_FREQ=m -CONFIG_US2E_FREQ=m -CONFIG_SUN_OPENPROMFS=m -CONFIG_COMPAT=y -CONFIG_UID16=y -CONFIG_BINFMT_ELF32=y -CONFIG_ENVCTRL=m -CONFIG_DISPLAY7SEG=m -CONFIG_WATCHDOG_CP1XXX=m -CONFIG_WATCHDOG_RIO=m -# CONFIG_CMDLINE_BOOL is not set -# CONFIG_PREVENT_FIRMWARE_BUILD is not set -# CONFIG_PARPORT is not set -# CONFIG_BLK_DEV_FD is not set -# CONFIG_LIRC_PARALLEL is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_SIMTEC is not set -CONFIG_I2C_ALI1535=m -# CONFIG_VGASTATE is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_BW2 is not set -# CONFIG_FB_GRVGA is not set -CONFIG_FB_CG3=y -CONFIG_FB_CG6=y -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON is not set -CONFIG_FB_ATY=y -# CONFIG_FB_S3 is not set -# CONFIG_FB_SAVAGE is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set -CONFIG_FB_SBUS=y -CONFIG_FB_FFB=y -# CONFIG_FB_TCX is not set -# CONFIG_FB_CG14 is not set -CONFIG_FB_PM2=y -CONFIG_FB_P9100=y -# CONFIG_FB_LEO is not set -CONFIG_FB_XVR500=y -CONFIG_FB_XVR2500=y -# CONFIG_VGASTATE is not set -# CONFIG_FB_DDC is not set -# CONFIG_FB_CIRRUS is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_KYRO is not set -# CONFIG_AGP is not set -# CONFIG_DRM_NOUVEAU is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_FONTS=y -# CONFIG_FONT_8x8 is not set -# CONFIG_FONT_8x16 is not set -# CONFIG_FONT_7x14 is not set -# CONFIG_FONT_10x18 is not set -# CONFIG_FONT_6x11 is not set -# CONFIG_FONT_SUN12x22 is not set -# CONFIG_FONT_PEARL_8x8 is not set -# CONFIG_FONT_ACORN_8x8 is not set -CONFIG_FONT_SUN8x16=y -CONFIG_FONT_SUN12x22=y -# CONFIG_LOGO_LINUX_CLUT224 is not set -# CONFIG_SERIAL_8250 is not set -CONFIG_SERIAL_SUNZILOG=y -CONFIG_SERIAL_SUNZILOG_CONSOLE=y -CONFIG_SERIAL_SUNSU=y -CONFIG_SERIAL_SUNSU_CONSOLE=y -CONFIG_SERIAL_SUNSAB=y -CONFIG_SERIAL_SUNSAB_CONSOLE=y -CONFIG_SERIAL_SUNHV=y -CONFIG_SUN_OPENPROMIO=y -CONFIG_OBP_FLASH=m -# CONFIG_SERIO_SERPORT is not set -CONFIG_BLK_DEV_FD=y -CONFIG_SUNVDC=m -CONFIG_SUNVNET=m -# CONFIG_BLK_DEV_AEC62XX is not set -# CONFIG_BLK_DEV_HPT366 is not set -# CONFIG_BLK_DEV_PDC202XX_OLD is not set -# CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_BLK_DEV_SIIMAGE is not set -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_VIA82CXXX is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_BUSLOGIC is not set -# CONFIG_SCSI_EATA is not set -# CONFIG_SCSI_GDTH is not set -# CONFIG_SCSI_AIC7XXX is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_FUTURE_DOMAIN is not set -CONFIG_SCSI_QLOGICPTI=m -CONFIG_SCSI_SUNESP=m -CONFIG_SUNLANCE=m -CONFIG_SUNBMAC=m -CONFIG_SUNQE=m -# CONFIG_DM9102 is not set -# CONFIG_HAMACHI is not set -# CONFIG_R8169 is not set -CONFIG_ATM_FORE200E_USE_TASKLET=y -CONFIG_ATM_FORE200E_DEBUG=0 -CONFIG_ATM_FORE200E_TX_RETRY=16 -# CONFIG_DRM_TDFX is not set -CONFIG_KEYBOARD_ATKBD=y -CONFIG_KEYBOARD_SUNKBD=y -# CONFIG_INPUT_PCSPKR is not set -CONFIG_INPUT_SPARCSPKR=m -# CONFIG_SOUND_PRIME is not set -# CONFIG_SND_SUN_AMD7930 is not set -CONFIG_SND_SUN_CS4231=m -# CONFIG_SND_SUN_DBRI is not set -CONFIG_PARPORT_SUNBPP=m -CONFIG_LOGO_SUN_CLUT224=y -CONFIG_MTD_SUN_UFLASH=m -CONFIG_MYRI_SBUS=m -# CONFIG_SGI_IOC4 is not set -# CONFIG_VIDEO_ZORAN is not set -# CONFIG_VIDEO_STRADIS is not set -# CONFIG_IEEE1394_SBP2 is not set -# CONFIG_USB_NET2280 is not set -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_DCFLUSH is not set -# CONFIG_DEBUG_BOOTMEM is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_LOCKDEP is not set -# CONFIG_STACK_DEBUG is not set - -CONFIG_SPARSEMEM_VMEMMAP=y - -# CONFIG_THERMAL is not set - -CONFIG_FRAME_WARN=2048 - -CONFIG_NUMA=y - -CONFIG_SND_SPARC=y - -CONFIG_HW_RANDOM_N2RNG=m - -# drivers/isdn/hardware/mISDN/hfcmulti.c:5255:2: error: #error "not running on big endian machines now" -# CONFIG_MISDN_HFCMULTI is not set - -CONFIG_US3_MC=y -CONFIG_SENSORS_ULTRA45=m -CONFIG_LEDS_SUNFIRE=m -CONFIG_TADPOLE_TS102_UCTRL=m - -CONFIG_RCU_FANOUT=64 -CONFIG_RCU_FANOUT_LEAF=16 - -CONFIG_LIRC_ENE0100=m -# CONFIG_BATTERY_DS2782 is not set -CONFIG_USB_GSPCA_SN9C20X=m -CONFIG_USB_GSPCA_SN9C20X_EVDEV=y -CONFIG_LSM_MMAP_MIN_ADDR=65536 - -CONFIG_PERF_COUNTERS=y -CONFIG_PERF_EVENTS=y -CONFIG_EVENT_PROFILE=y - -CONFIG_EARLYFB=y -CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m - -CONFIG_GRETH=m -CONFIG_FB_XVR1000=y - -CONFIG_CRYPTO_DEV_NIAGARA2=y - -# CONFIG_MTD_OF_PARTS is not set -# CONFIG_MTD_PHYSMAP_OF is not set -# CONFIG_MMC_SDHCI_OF is not set -# CONFIG_OF_SELFTEST is not set - -CONFIG_BPF_JIT=y -# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set -# CONFIG_IRQ_DOMAIN_DEBUG is not set - -# CONFIG_MDIO_BUS_MUX_MMIOREG is not set -# CONFIG_MFD_SYSCON is not set -# CONFIG_RTC_DRV_SNVS is not set -# CONFIG_CRYPTO_CRC32C_SPARC64 is not set -# CONFIG_CRYPTO_MD5_SPARC64 is not set -# CONFIG_CRYPTO_SHA1_SPARC64 is not set -# CONFIG_CRYPTO_SHA256_SPARC64 is not set -# CONFIG_CRYPTO_SHA512_SPARC64 is not set -# CONFIG_CRYPTO_AES_SPARC64 is not set -# CONFIG_CRYPTO_CAMELLIA_SPARC64 is not set -# CONFIG_CRYPTO_DES_SPARC64 is not set -# CONFIG_ASYMMETRIC_KEY_TYPE is not set -# CONFIG_TRANSPARENT_HUGEPAGE is not set diff --git a/config-x86-32-generic b/config-x86-32-generic index 3273fd151..f1a9b5165 100644 --- a/config-x86-32-generic +++ b/config-x86-32-generic @@ -53,6 +53,8 @@ CONFIG_FB_GEODE_LX=y CONFIG_FB_GEODE_GX=y # CONFIG_FB_GEODE_GX1 is not set +CONFIG_FB_SSD1307=m + # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GODIRECT is not set # CONFIG_PCI_GOMMCONFIG is not set @@ -181,6 +183,7 @@ CONFIG_XO1_RFKILL=m CONFIG_X86_32_IRIS=m +CONFIG_POWER_RESET_GPIO=y CONFIG_MTD_OF_PARTS=y CONFIG_MTD_PHYSMAP_OF=m @@ -203,6 +206,8 @@ CONFIG_I2O_CONFIG=y CONFIG_I2O_EXT_ADAPTEC=y CONFIG_I2O_CONFIG_OLD_IOCTL=y CONFIG_I2O_BUS=m +CONFIG_INPUT_PWM_BEEPER=m +CONFIG_BACKLIGHT_PWM=m # CONFIG_EDAC_SBRIDGE is not set diff --git a/config-x86-generic b/config-x86-generic index 6e1330376..cdf46b387 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -78,6 +78,7 @@ CONFIG_ACPI_SLEEP=y CONFIG_ACPI_THERMAL=y CONFIG_ACPI_TOSHIBA=m CONFIG_ACPI_VIDEO=m +CONFIG_ACPI_INITRD_TABLE_OVERRIDE=y # FIXME: Next two are deprecated. Remove them when they disappear upstream # CONFIG_ACPI_PROCFS_POWER is not set # CONFIG_ACPI_PROC_EVENT is not set @@ -282,6 +283,7 @@ CONFIG_MTD_CK804XROM=m CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_CPU_IDLE=y +# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set # CONFIG_CPU_IDLE_GOV_LADDER is not set CONFIG_CPU_IDLE_GOV_MENU=y @@ -409,6 +411,7 @@ CONFIG_HYPERV_UTILS=m CONFIG_HID_HYPERV_MOUSE=m CONFIG_HYPERV_NET=m CONFIG_HYPERV_STORAGE=m +CONFIG_HYPERV_BALLOON=m # Depends on HOTPLUG_PCI_PCIE CONFIG_BLK_DEV_PCIESSD_MTIP32XX=m diff --git a/config-x86_64-generic b/config-x86_64-generic index 2e4195d5b..bcea67e2a 100644 --- a/config-x86_64-generic +++ b/config-x86_64-generic @@ -13,6 +13,8 @@ CONFIG_AMD_NUMA=y CONFIG_X86_64_ACPI_NUMA=y # CONFIG_NUMA_EMU is not set # CONFIG_X86_NUMACHIP is not set +CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y +CONFIG_NUMA_BALANCING=y CONFIG_NR_CPUS=128 CONFIG_PHYSICAL_START=0x1000000 @@ -52,6 +54,7 @@ CONFIG_CRYPTO_CAST5_AVX_X86_64=m CONFIG_CRYPTO_CAST6_AVX_X86_64=m CONFIG_CRYPTO_SERPENT_AVX_X86_64=m CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m +CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=m # CONFIG_I2C_ALI1535 is not set # CONFIG_I2C_ALI1563 is not set @@ -71,6 +74,7 @@ CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP=y +# CONFIG_MOVABLE_NODE is not set # CONFIG_MEMORY_HOTPLUG is not set # CONFIG_MEMORY_HOTREMOVE is not set diff --git a/linux-2.6-crash-driver.patch b/crash-driver.patch similarity index 100% rename from linux-2.6-crash-driver.patch rename to crash-driver.patch diff --git a/linux-2.6-defaults-acpi-video.patch b/defaults-acpi-video.patch similarity index 100% rename from linux-2.6-defaults-acpi-video.patch rename to defaults-acpi-video.patch diff --git a/dmar-disable-when-ricoh-multifunction.patch b/dmar-disable-when-ricoh-multifunction.patch index a4528617e..839db5940 100644 --- a/dmar-disable-when-ricoh-multifunction.patch +++ b/dmar-disable-when-ricoh-multifunction.patch @@ -16,7 +16,7 @@ index 4789f8e..5923914 100644 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x006a, quirk_calpella_no_shadow_gtt); +/* https://bugzilla.redhat.com/show_bug.cgi?id=605888 */ -+static void __devinit quirk_ricoh_multifunction(struct pci_dev *dev) ++static void quirk_ricoh_multifunction(struct pci_dev *dev) +{ + dmar_disabled = 1; +} diff --git a/drm-i915-lvds-reclock-fix.patch b/drm-i915-lvds-reclock-fix.patch deleted file mode 100644 index 28b7d6731..000000000 --- a/drm-i915-lvds-reclock-fix.patch +++ /dev/null @@ -1,72 +0,0 @@ -Origin: - -http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-next&id=725a5b54028916cd2511a251c5b5b13d1715addc - -Rediffed for 3.7.x, and any bugs introduced, by ajax - -diff -up linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/i915_gem.c.jx linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/i915_gem.c ---- linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/i915_gem.c.jx 2013-02-14 12:40:21.068832043 -0500 -+++ linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/i915_gem.c 2013-02-14 12:41:16.645147300 -0500 -@@ -1919,9 +1919,6 @@ i915_gem_object_move_to_inactive(struct - BUG_ON(obj->base.write_domain & ~I915_GEM_GPU_DOMAINS); - BUG_ON(!obj->active); - -- if (obj->pin_count) /* are we a framebuffer? */ -- intel_mark_fb_idle(obj); -- - list_move_tail(&obj->mm_list, &dev_priv->mm.inactive_list); - - list_del_init(&obj->ring_list); -diff -up linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_display.c.jx linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_display.c ---- linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_display.c.jx 2013-02-14 12:40:22.022854621 -0500 -+++ linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_display.c 2013-02-14 12:41:16.648147371 -0500 -@@ -6094,11 +6094,6 @@ void intel_mark_busy(struct drm_device * - - void intel_mark_idle(struct drm_device *dev) - { --} -- --void intel_mark_fb_busy(struct drm_i915_gem_object *obj) --{ -- struct drm_device *dev = obj->base.dev; - struct drm_crtc *crtc; - - if (!i915_powersave) -@@ -6108,12 +6103,11 @@ void intel_mark_fb_busy(struct drm_i915_ - if (!crtc->fb) - continue; - -- if (to_intel_framebuffer(crtc->fb)->obj == obj) -- intel_increase_pllclock(crtc); -+ intel_decrease_pllclock(crtc); - } - } - --void intel_mark_fb_idle(struct drm_i915_gem_object *obj) -+void intel_mark_fb_busy(struct drm_i915_gem_object *obj) - { - struct drm_device *dev = obj->base.dev; - struct drm_crtc *crtc; -@@ -6126,7 +6120,7 @@ void intel_mark_fb_idle(struct drm_i915_ - continue; - - if (to_intel_framebuffer(crtc->fb)->obj == obj) -- intel_decrease_pllclock(crtc); -+ intel_increase_pllclock(crtc); - } - } - -diff -up linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_drv.h.jx linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_drv.h ---- linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_drv.h.jx 2013-02-14 12:40:21.071832114 -0500 -+++ linux-3.7.7-202.fc18.x86_64/drivers/gpu/drm/i915/intel_drv.h 2013-02-14 12:41:16.648147371 -0500 -@@ -417,9 +417,8 @@ extern bool intel_sdvo_init(struct drm_d - extern void intel_dvo_init(struct drm_device *dev); - extern void intel_tv_init(struct drm_device *dev); - extern void intel_mark_busy(struct drm_device *dev); --extern void intel_mark_idle(struct drm_device *dev); - extern void intel_mark_fb_busy(struct drm_i915_gem_object *obj); --extern void intel_mark_fb_idle(struct drm_i915_gem_object *obj); -+extern void intel_mark_idle(struct drm_device *dev); - extern bool intel_lvds_init(struct drm_device *dev); - extern void intel_dp_init(struct drm_device *dev, int output_reg, - enum port port); diff --git a/exec-use-eloop-for-max-recursion-depth.patch b/exec-use-eloop-for-max-recursion-depth.patch deleted file mode 100644 index cbaff2f7a..000000000 --- a/exec-use-eloop-for-max-recursion-depth.patch +++ /dev/null @@ -1,144 +0,0 @@ -From 4ae8186cd77835b45f1b35edb4ce70309287bfc3 Mon Sep 17 00:00:00 2001 -From: Kees Cook -Date: Mon, 26 Nov 2012 09:02:11 -0500 -Subject: [PATCH 2/2] exec: use -ELOOP for max recursion depth - -To avoid an explosion of request_module calls on a chain of abusive -scripts, fail maximum recursion with -ELOOP instead of -ENOEXEC. As soon -as maximum recursion depth is hit, the error will fail all the way back -up the chain, aborting immediately. - -This also has the side-effect of stopping the user's shell from attempting -to reexecute the top-level file as a shell script. As seen in the -dash source: - - if (cmd != path_bshell && errno == ENOEXEC) { - *argv-- = cmd; - *argv = cmd = path_bshell; - goto repeat; - } - -The above logic was designed for running scripts automatically that lacked -the "#!" header, not to re-try failed recursion. On a legitimate -ENOEXEC, -things continue to behave as the shell expects. - -Additionally, when tracking recursion, the binfmt handlers should not be -involved. The recursion being tracked is the depth of calls through -search_binary_handler(), so that function should be exclusively responsible -for tracking the depth. - -Signed-off-by: Kees Cook -Cc: halfdog -Cc: P J P -Cc: Alexander Viro -Signed-off-by: Andrew Morton ---- - fs/binfmt_em86.c | 1 - - fs/binfmt_misc.c | 6 ------ - fs/binfmt_script.c | 4 +--- - fs/exec.c | 10 +++++----- - include/linux/binfmts.h | 2 -- - 5 files changed, 6 insertions(+), 17 deletions(-) - -diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c -index 2790c7e..575796a 100644 ---- a/fs/binfmt_em86.c -+++ b/fs/binfmt_em86.c -@@ -42,7 +42,6 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) - return -ENOEXEC; - } - -- bprm->recursion_depth++; /* Well, the bang-shell is implicit... */ - allow_write_access(bprm->file); - fput(bprm->file); - bprm->file = NULL; -diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c -index 772428d..f0f1a06 100644 ---- a/fs/binfmt_misc.c -+++ b/fs/binfmt_misc.c -@@ -117,10 +117,6 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) - if (!enabled) - goto _ret; - -- retval = -ENOEXEC; -- if (bprm->recursion_depth > BINPRM_MAX_RECURSION) -- goto _ret; -- - /* to keep locking time low, we copy the interpreter string */ - read_lock(&entries_lock); - fmt = check_file(bprm); -@@ -200,8 +196,6 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) - if (retval < 0) - goto _error; - -- bprm->recursion_depth++; -- - retval = search_binary_handler (bprm, regs); - if (retval < 0) - goto _error; -diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c -index df49d48..8ae4be1 100644 ---- a/fs/binfmt_script.c -+++ b/fs/binfmt_script.c -@@ -22,15 +22,13 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) - char interp[BINPRM_BUF_SIZE]; - int retval; - -- if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') || -- (bprm->recursion_depth > BINPRM_MAX_RECURSION)) -+ if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!')) - return -ENOEXEC; - /* - * This section does the #! interpretation. - * Sorta complicated, but hopefully it will work. -TYT - */ - -- bprm->recursion_depth++; - allow_write_access(bprm->file); - fput(bprm->file); - bprm->file = NULL; -diff --git a/fs/exec.c b/fs/exec.c -index 59896ae..541cc51 100644 ---- a/fs/exec.c -+++ b/fs/exec.c -@@ -1398,6 +1398,10 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) - struct linux_binfmt *fmt; - pid_t old_pid, old_vpid; - -+ /* This allows 4 levels of binfmt rewrites before failing hard. */ -+ if (depth > 5) -+ return -ELOOP; -+ - retval = security_bprm_check(bprm); - if (retval) - return retval; -@@ -1422,12 +1426,8 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) - if (!try_module_get(fmt->module)) - continue; - read_unlock(&binfmt_lock); -+ bprm->recursion_depth = depth + 1; - retval = fn(bprm, regs); -- /* -- * Restore the depth counter to its starting value -- * in this call, so we don't have to rely on every -- * load_binary function to restore it on return. -- */ - bprm->recursion_depth = depth; - if (retval >= 0) { - if (depth == 0) { -diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h -index eb53e15..5bab59b 100644 ---- a/include/linux/binfmts.h -+++ b/include/linux/binfmts.h -@@ -68,8 +68,6 @@ struct linux_binprm { - #define BINPRM_FLAGS_EXECFD_BIT 1 - #define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT) - --#define BINPRM_MAX_RECURSION 4 -- - /* Function parameter for binfmt->coredump */ - struct coredump_params { - long signr; --- -1.8.0 - diff --git a/linux-2.6-input-kill-stupid-messages.patch b/input-kill-stupid-messages.patch similarity index 100% rename from linux-2.6-input-kill-stupid-messages.patch rename to input-kill-stupid-messages.patch diff --git a/kernel.spec b/kernel.spec index ba729b009..6a7241b1a 100644 --- a/kernel.spec +++ b/kernel.spec @@ -54,19 +54,19 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 102 +%global baserelease 101 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching # on top of -- for example, 2.6.22-rc7-git1 starts with a 2.6.21 base, # which yields a base_sublevel of 21. -%define base_sublevel 7 +%define base_sublevel 8 ## If this is a released kernel ## %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 10 +%define stable_update 1 # Is it a -stable RC? %define stable_rc 0 # Set rpm version accordingly @@ -325,8 +325,8 @@ Summary: The Linux kernel %define with_bootwrapper 0 %endif -# sparse blows up on ppc64 and sparc64 -%ifarch ppc64 ppc sparc64 +# sparse blows up on ppc64 +%ifarch ppc64 ppc %define with_sparse 0 %endif @@ -367,19 +367,6 @@ Summary: The Linux kernel %define with_tools 0 %endif -%ifarch sparc64 -%define asmarch sparc -%define all_arch_configs kernel-%{version}-sparc64*.config -%define make_target vmlinux -%define kernel_image vmlinux -%define image_install_path boot -%define with_tools 0 -%endif - -%ifarch sparcv9 -%define hdrarch sparc -%endif - %ifarch ppc %define asmarch powerpc %define hdrarch powerpc @@ -424,7 +411,7 @@ Summary: The Linux kernel # Which is a BadThing(tm). # We only build kernel-headers on the following... -%define nobuildarches i386 s390 sparc sparcv9 +%define nobuildarches i386 s390 %ifarch %nobuildarches %define with_up 0 @@ -512,7 +499,7 @@ Version: %{rpmversion} Release: %{pkg_release} # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD -ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 %{sparc} s390 s390x %{arm} +ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64 s390 s390x %{arm} ExclusiveOS: Linux %kernel_reqprovconf @@ -568,8 +555,6 @@ Source53: config-powerpc64 Source70: config-s390x -Source90: config-sparc64-generic - # Unified ARM kernels Source100: config-armv7 @@ -622,18 +607,16 @@ Patch00: patch-3.%{base_sublevel}-git%{gitrev}.bz2 %endif # we also need compile fixes for -vanilla -Patch04: linux-2.6-compile-fixes.patch +Patch04: compile-fixes.patch # build tweak for build ID magic, even for -vanilla -Patch05: linux-2.6-makefile-after_link.patch - -Patch06: power-x86-destdir.patch +Patch05: makefile-after_link.patch %if !%{nopatches} # revert upstream patches we get via other methods -Patch09: linux-2.6-upstream-reverts.patch +Patch09: upstream-reverts.patch # Git trees. # Standalone patches @@ -643,27 +626,26 @@ Patch101: taint-rss.patch Patch110: vmbugon-warnon.patch -Patch390: linux-2.6-defaults-acpi-video.patch -Patch391: linux-2.6-acpi-video-dos.patch -Patch394: linux-2.6-acpi-debug-infinite-loop.patch +Patch390: defaults-acpi-video.patch +Patch391: acpi-video-dos.patch +Patch394: acpi-debug-infinite-loop.patch Patch396: acpi-sony-nonvs-blacklist.patch -Patch450: linux-2.6-input-kill-stupid-messages.patch -Patch452: linux-2.6.30-no-pcspkr-modalias.patch +Patch450: input-kill-stupid-messages.patch +Patch452: no-pcspkr-modalias.patch -Patch460: linux-2.6-serial-460800.patch +Patch460: serial-460800.patch Patch470: die-floppy-die.patch -Patch510: linux-2.6-silence-noise.patch +Patch510: silence-noise.patch Patch520: quite-apm.patch -Patch530: linux-2.6-silence-fbcon-logo.patch +Patch530: silence-fbcon-logo.patch Patch540: silence-empty-ipi-mask-warning.patch +Patch541: silence-tty-null.patch -Patch700: linux-2.6-e1000-ich9-montevina.patch - -Patch800: linux-2.6-crash-driver.patch +Patch800: crash-driver.patch # crypto/ @@ -681,14 +663,12 @@ Patch1825: drm-i915-dp-stfu.patch # mustard patch to shut abrt up. please drop (and notify ajax) whenever it # fails to apply Patch1826: drm-i915-tv-detect-hush.patch -# d-i-n backport for https://bugzilla.redhat.com/show_bug.cgi?id=901951 -Patch1827: drm-i915-lvds-reclock-fix.patch Patch1900: linux-2.6-intel-iommu-igfx.patch # Quiet boot fixes # silence the ACPI blacklist code -Patch2802: linux-2.6-silence-acpi-blacklist.patch +Patch2802: silence-acpi-blacklist.patch # media patches Patch2901: drivers-media-update.patch @@ -738,20 +718,6 @@ Patch22014: efifb-skip-DMI-checks-if-bootloader-knows.patch #rhbz 857324 Patch22070: net-tcp-bz857324.patch -#rhbz 871078 -Patch22112: USB-report-submission-of-active-URBs.patch - -#rhbz CVE-2012-4530 868285 880147 -Patch22229: exec-use-eloop-for-max-recursion-depth.patch - -#rhbz 851278 -Patch22231: 8139cp-revert-set-ring-address-before-enabling-receiver.patch -Patch22232: 8139cp-set-ring-address-after-enabling-C-mode.patch -Patch22233: 8139cp-re-enable-interrupts-after-tx-timeout.patch - -#rhbz 892428 -Patch22238: brcmsmac-updates-rhbz892428.patch - #rhbz 799564 Patch22240: Input-increase-struct-ps2dev-cmdbuf-to-8-bytes.patch Patch22242: Input-add-support-for-Cypress-PS2-Trackpads.patch @@ -759,15 +725,6 @@ Patch22242: Input-add-support-for-Cypress-PS2-Trackpads.patch #rhbz 892811 Patch22247: ath9k_rx_dma_stop_check.patch -#rhbz 909591 -Patch22255: usb-cypress-supertop.patch - -#rhbz 911479 911473 CVE-2013-0290 -Patch22256: net-fix-infinite-loop-in-__skb_recv_datagram.patch - -#rhbz 844750 -Patch22257: 0001-bluetooth-Add-support-for-atheros-04ca-3004-device-t.patch - #rhbz 903192 Patch22261: 0001-kmsg-Honor-dmesg_restrict-sysctl-on-dev-kmsg.patch @@ -778,10 +735,8 @@ Patch22262: x86-mm-Fix-vmalloc_fault-oops-during-lazy-MMU-updates.patch Patch22263: 0001-svcrpc-make-svc_age_temp_xprts-enqueue-under-sv_lock.patch Patch22264: 0002-svcrpc-fix-rpc-server-shutdown-races.patch -Patch23000: silence-brcmsmac-warning.patch - #rhbz 812111 -Patch24000: alps-v2-3.7.patch +Patch24000: alps.patch Patch24100: userns-avoid-recursion-in-put_user_ns.patch @@ -1312,19 +1267,17 @@ do done %endif -ApplyPatch linux-2.6-makefile-after_link.patch +ApplyPatch makefile-after_link.patch # # misc small stuff to make things compile # -ApplyOptionalPatch linux-2.6-compile-fixes.patch - -ApplyPatch power-x86-destdir.patch +ApplyOptionalPatch compile-fixes.patch %if !%{nopatches} # revert patches from upstream that conflict or that we get via other means -ApplyOptionalPatch linux-2.6-upstream-reverts.patch -R +ApplyOptionalPatch upstream-reverts.patch -R ApplyPatch taint-vbox.patch ApplyPatch taint-rss.patch @@ -1339,9 +1292,9 @@ ApplyPatch vmbugon-warnon.patch # #ApplyPatch arm-read_current_timer.patch #ApplyPatch arm-fix-omapdrm.patch -ApplyPatch arm-tegra-nvec-kconfig.patch +#ApplyPatch arm-tegra-nvec-kconfig.patch ApplyPatch arm-tegra-usb-no-reset-linux33.patch -ApplyPatch arm-tegra-sdhci-module-fix.patch +#ApplyPatch arm-tegra-sdhci-module-fix.patch ApplyPatch arm-alignment-faults.patch # @@ -1364,9 +1317,9 @@ ApplyPatch arm-alignment-faults.patch # WMI # ACPI -ApplyPatch linux-2.6-defaults-acpi-video.patch -ApplyPatch linux-2.6-acpi-video-dos.patch -ApplyPatch linux-2.6-acpi-debug-infinite-loop.patch +ApplyPatch defaults-acpi-video.patch +ApplyPatch acpi-video-dos.patch +ApplyPatch acpi-debug-infinite-loop.patch ApplyPatch acpi-sony-nonvs-blacklist.patch # @@ -1385,33 +1338,31 @@ ApplyPatch acpi-sony-nonvs-blacklist.patch # Misc fixes # The input layer spews crap no-one cares about. -ApplyPatch linux-2.6-input-kill-stupid-messages.patch +ApplyPatch input-kill-stupid-messages.patch # stop floppy.ko from autoloading during udev... ApplyPatch die-floppy-die.patch -ApplyPatch linux-2.6.30-no-pcspkr-modalias.patch +ApplyPatch no-pcspkr-modalias.patch # Allow to use 480600 baud on 16C950 UARTs -ApplyPatch linux-2.6-serial-460800.patch +ApplyPatch serial-460800.patch # Silence some useless messages that still get printed with 'quiet' -ApplyPatch linux-2.6-silence-noise.patch +ApplyPatch silence-noise.patch # Make fbcon not show the penguins with 'quiet' -ApplyPatch linux-2.6-silence-fbcon-logo.patch +ApplyPatch silence-fbcon-logo.patch # No-one cares about these warnings ApplyPatch silence-empty-ipi-mask-warning.patch +ApplyPatch silence-tty-null.patch # Changes to upstream defaults. # /dev/crash driver. -ApplyPatch linux-2.6-crash-driver.patch - -# Hack e1000e to work on Montevina SDV -ApplyPatch linux-2.6-e1000-ich9-montevina.patch +ApplyPatch crash-driver.patch # crypto/ @@ -1427,12 +1378,11 @@ ApplyPatch linux-2.6-e1000-ich9-montevina.patch ApplyOptionalPatch drm-intel-next.patch ApplyPatch drm-i915-dp-stfu.patch ApplyPatch drm-i915-tv-detect-hush.patch -ApplyPatch drm-i915-lvds-reclock-fix.patch ApplyPatch linux-2.6-intel-iommu-igfx.patch # silence the ACPI blacklist code -ApplyPatch linux-2.6-silence-acpi-blacklist.patch +ApplyPatch silence-acpi-blacklist.patch ApplyPatch quite-apm.patch # Media (V4L/DVB/IR) updates/fixes/experimental drivers @@ -1469,20 +1419,6 @@ ApplyPatch selinux-apply-different-permission-to-ptrace-child.patch #rhbz 857324 ApplyPatch net-tcp-bz857324.patch -#rhbz 871078 -ApplyPatch USB-report-submission-of-active-URBs.patch - -#rhbz CVE-2012-4530 868285 880147 -ApplyPatch exec-use-eloop-for-max-recursion-depth.patch - -#rhbz 851278 -ApplyPatch 8139cp-revert-set-ring-address-before-enabling-receiver.patch -R -ApplyPatch 8139cp-set-ring-address-after-enabling-C-mode.patch -ApplyPatch 8139cp-re-enable-interrupts-after-tx-timeout.patch - -#rhbz 892428 -ApplyPatch brcmsmac-updates-rhbz892428.patch - #rhbz 799564 ApplyPatch Input-increase-struct-ps2dev-cmdbuf-to-8-bytes.patch ApplyPatch Input-add-support-for-Cypress-PS2-Trackpads.patch @@ -1490,19 +1426,8 @@ ApplyPatch Input-add-support-for-Cypress-PS2-Trackpads.patch #rhbz 892811 ApplyPatch ath9k_rx_dma_stop_check.patch -ApplyPatch silence-brcmsmac-warning.patch - -#rhbz 909591 -ApplyPatch usb-cypress-supertop.patch - -#rhbz 911479 911473 CVE-2013-0290 -ApplyPatch net-fix-infinite-loop-in-__skb_recv_datagram.patch - -#rhbz 844750 -ApplyPatch 0001-bluetooth-Add-support-for-atheros-04ca-3004-device-t.patch - #rhbz 812111 -ApplyPatch alps-v2-3.7.patch +ApplyPatch alps.patch #rhbz 903192 ApplyPatch 0001-kmsg-Honor-dmesg_restrict-sysctl-on-dev-kmsg.patch @@ -2371,6 +2296,11 @@ fi # '-' | | # '-' %changelog +* Fri Mar 01 2013 Justin M. Forbes - 3.8.1-101 +- Linux v3.8.1 +- Drop SPARC64 support +- Silence "tty is NULL" trace. + * Fri Mar 01 2013 Josh Boyer - Add patches to fix sunrpc panic (rhbz 904870) diff --git a/linux-2.6-e1000-ich9-montevina.patch b/linux-2.6-e1000-ich9-montevina.patch deleted file mode 100644 index ec38a3902..000000000 --- a/linux-2.6-e1000-ich9-montevina.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 802e6d8c8477a553a677b23a247d6d2638e01958 Mon Sep 17 00:00:00 2001 -From: Dave Jones -Date: Wed, 26 Oct 2011 13:31:47 -0400 -Subject: [PATCH] e1000e: ich9 montevina - -This only showed up in one SDV (Montevina). -The PCIE slots don't seem to like network cards, so this is the only hope -to get networking working. It's never going upstream, but it's low impact -enough to carry just to keep those SDVs working. ---- - drivers/net/ethernet/intel/e1000e/ich8lan.c | 6 ++++++ - drivers/net/ethernet/intel/e1000e/netdev.c | 1 + - 2 files changed, 7 insertions(+), 0 deletions(-) - -diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c -index 6a17c62..0e40975 100644 ---- a/drivers/net/ethernet/intel/e1000e/ich8lan.c -+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c -@@ -452,6 +452,12 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw) - - /* Verify phy id */ - switch (phy->id) { -+ case 0: -+ if (hw->adapter->pdev->device == 0x10be) -+ e_dbg("got 0 phy id, trying anyway"); -+ /* Fall through to IGP03E1000 case below */ -+ else -+ return -E1000_ERR_PHY; - case IGP03E1000_E_PHY_ID: - phy->type = e1000_phy_igp_3; - phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; -diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c -index a855db1..edac30b 100644 ---- a/drivers/net/ethernet/intel/e1000e/netdev.c -+++ b/drivers/net/ethernet/intel/e1000e/netdev.c -@@ -6359,6 +6359,7 @@ static DEFINE_PCI_DEVICE_TABLE(e1000_pci_tbl) = { - { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M), board_ich9lan }, - { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_AMT), board_ich9lan }, - { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IGP_M_V), board_ich9lan }, -+ { PCI_VDEVICE(INTEL, 0x10be), board_ich9lan }, - - { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LM), board_ich9lan }, - { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH10_R_BM_LF), board_ich9lan }, --- -1.7.6.4 - diff --git a/linux-2.6-makefile-after_link.patch b/makefile-after_link.patch similarity index 100% rename from linux-2.6-makefile-after_link.patch rename to makefile-after_link.patch diff --git a/net-fix-infinite-loop-in-__skb_recv_datagram.patch b/net-fix-infinite-loop-in-__skb_recv_datagram.patch deleted file mode 100644 index a049bb46a..000000000 --- a/net-fix-infinite-loop-in-__skb_recv_datagram.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 77c1090f94d1b0b5186fb13a1b71b47b1343f87f Mon Sep 17 00:00:00 2001 -From: Eric Dumazet -Date: Tue, 12 Feb 2013 06:16:53 +0000 -Subject: [PATCH] net: fix infinite loop in __skb_recv_datagram() - -Tommi was fuzzing with trinity and reported the following problem : - -commit 3f518bf745 (datagram: Add offset argument to __skb_recv_datagram) -missed that a raw socket receive queue can contain skbs with no payload. - -We can loop in __skb_recv_datagram() with MSG_PEEK mode, because -wait_for_packet() is not prepared to skip these skbs. - -[ 83.541011] INFO: rcu_sched detected stalls on CPUs/tasks: {} -(detected by 0, t=26002 jiffies, g=27673, c=27672, q=75) -[ 83.541011] INFO: Stall ended before state dump start -[ 108.067010] BUG: soft lockup - CPU#0 stuck for 22s! [trinity-child31:2847] -... -[ 108.067010] Call Trace: -[ 108.067010] [] __skb_recv_datagram+0x1a3/0x3b0 -[ 108.067010] [] skb_recv_datagram+0x2d/0x30 -[ 108.067010] [] rawv6_recvmsg+0xad/0x240 -[ 108.067010] [] sock_common_recvmsg+0x34/0x50 -[ 108.067010] [] sock_recvmsg+0xbc/0xf0 -[ 108.067010] [] sys_recvfrom+0xde/0x150 -[ 108.067010] [] system_call_fastpath+0x16/0x1b - -Reported-by: Tommi Rantala -Tested-by: Tommi Rantala -Signed-off-by: Eric Dumazet -Cc: Pavel Emelyanov -Acked-by: Pavel Emelyanov -Signed-off-by: David S. Miller ---- - net/core/datagram.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/net/core/datagram.c b/net/core/datagram.c -index 0337e2b..368f9c3 100644 ---- a/net/core/datagram.c -+++ b/net/core/datagram.c -@@ -187,7 +187,7 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned int flags, - skb_queue_walk(queue, skb) { - *peeked = skb->peeked; - if (flags & MSG_PEEK) { -- if (*off >= skb->len) { -+ if (*off >= skb->len && skb->len) { - *off -= skb->len; - continue; - } --- -1.8.1.2 - diff --git a/linux-2.6.30-no-pcspkr-modalias.patch b/no-pcspkr-modalias.patch similarity index 100% rename from linux-2.6.30-no-pcspkr-modalias.patch rename to no-pcspkr-modalias.patch diff --git a/power-x86-destdir.patch b/power-x86-destdir.patch deleted file mode 100644 index 97665314f..000000000 --- a/power-x86-destdir.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile -index f856495..984cc00 100644 ---- a/tools/power/x86/turbostat/Makefile -+++ b/tools/power/x86/turbostat/Makefile -@@ -1,3 +1,5 @@ -+DESTDIR ?= -+ - turbostat : turbostat.c - CFLAGS += -Wall - -@@ -5,5 +7,5 @@ clean : - rm -f turbostat - - install : -- install turbostat /usr/bin/turbostat -- install turbostat.8 /usr/share/man/man8 -+ install turbostat ${DESTDIR}/usr/bin/turbostat -+ install turbostat.8 ${DESTDIR}/usr/share/man/man8 -diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile -index f458237..f9824f0 100644 ---- a/tools/power/x86/x86_energy_perf_policy/Makefile -+++ b/tools/power/x86/x86_energy_perf_policy/Makefile -@@ -1,8 +1,10 @@ -+DESTDIR ?= -+ - x86_energy_perf_policy : x86_energy_perf_policy.c - - clean : - rm -f x86_energy_perf_policy - - install : -- install x86_energy_perf_policy /usr/bin/ -- install x86_energy_perf_policy.8 /usr/share/man/man8/ -+ install x86_energy_perf_policy ${DESTDIR}/usr/bin/ -+ install x86_energy_perf_policy.8 ${DESTDIR}/usr/share/man/man8/ diff --git a/linux-2.6-serial-460800.patch b/serial-460800.patch similarity index 100% rename from linux-2.6-serial-460800.patch rename to serial-460800.patch diff --git a/linux-2.6-silence-acpi-blacklist.patch b/silence-acpi-blacklist.patch similarity index 100% rename from linux-2.6-silence-acpi-blacklist.patch rename to silence-acpi-blacklist.patch diff --git a/silence-brcmsmac-warning.patch b/silence-brcmsmac-warning.patch deleted file mode 100644 index b1915e9f1..000000000 --- a/silence-brcmsmac-warning.patch +++ /dev/null @@ -1,14 +0,0 @@ -This is fixed in 3.8, but is too much to backport for now. -As there's no point in abrt telling us this is broken, we'll just silence it. - ---- linux-3.7.7-201.fc18.x86_64/drivers/net/wireless/brcm80211/brcmsmac/main.c~ 2013-02-12 11:36:18.787973130 -0500 -+++ linux-3.7.7-201.fc18.x86_64/drivers/net/wireless/brcm80211/brcmsmac/main.c 2013-02-12 11:37:02.950969879 -0500 -@@ -7993,8 +7993,6 @@ void brcms_c_wait_for_tx_completion(stru - if (--timeout == 0) - break; - } -- -- WARN_ON_ONCE(timeout == 0); - } - - void brcms_c_set_beacon_listen_interval(struct brcms_c_info *wlc, u8 interval) diff --git a/linux-2.6-silence-fbcon-logo.patch b/silence-fbcon-logo.patch similarity index 100% rename from linux-2.6-silence-fbcon-logo.patch rename to silence-fbcon-logo.patch diff --git a/linux-2.6-silence-noise.patch b/silence-noise.patch similarity index 97% rename from linux-2.6-silence-noise.patch rename to silence-noise.patch index 1e4d7c57f..bcd5baa0b 100644 --- a/linux-2.6-silence-noise.patch +++ b/silence-noise.patch @@ -14,7 +14,7 @@ diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 170f71e..4f3e632 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c -@@ -701,10 +701,8 @@ static int __devinit i8042_check_aux(void) +@@ -701,10 +701,8 @@ static int i8042_check_aux(void) static int i8042_controller_check(void) { diff --git a/silence-tty-null.patch b/silence-tty-null.patch new file mode 100644 index 000000000..00f64239b --- /dev/null +++ b/silence-tty-null.patch @@ -0,0 +1,13 @@ +This should be fixed in 3.9, but is unlikely to be backported. + +--- linux-3.8.1-201.fc18.x86_64/drivers/tty/tty_buffer.c~ 2013-03-01 11:07:37.498291384 -0500 ++++ linux-3.8.1-201.fc18.x86_64/drivers/tty/tty_buffer.c 2013-03-01 11:08:11.088250537 -0500 +@@ -473,7 +473,7 @@ static void flush_to_ldisc(struct work_s + struct tty_ldisc *disc; + + tty = port->itty; +- if (WARN_RATELIMIT(tty == NULL, "tty is NULL\n")) ++ if (tty == NULL) + return; + + disc = tty_ldisc_ref(tty); diff --git a/sources b/sources index 7b85431c5..52a909507 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -21223369d682bcf44bcdfe1521095983 linux-3.7.tar.xz -ffc885cf2fdedf1792b999d4ab5b8ba8 patch-3.7.10.xz +1c738edfc54e7c65faeb90c436104e2f linux-3.8.tar.xz +50a68679086c346dddb34dedccfae7ee patch-3.8.1.xz diff --git a/linux-2.6-upstream-reverts.patch b/upstream-reverts.patch similarity index 100% rename from linux-2.6-upstream-reverts.patch rename to upstream-reverts.patch diff --git a/usb-cypress-supertop.patch b/usb-cypress-supertop.patch deleted file mode 100644 index 3887dc59c..000000000 --- a/usb-cypress-supertop.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 1cd59b0d0b82c66135bf10ed3a87213a87e318ab Mon Sep 17 00:00:00 2001 -From: Josh Boyer -Date: Thu, 14 Feb 2013 09:29:55 -0500 -Subject: [PATCH] USB: usb-storage: unusual_devs update for Super TOP SATA - bridge - -The current entry in unusual_cypress.h for the Super TOP SATA bridge devices -seems to be causing corruption on newer revisions of this device. This has -been reported in Arch Linux and Fedora. The original patch was tested on -devices with bcdDevice of 1.60, whereas the newer devices report bcdDevice -as 2.20. Limit the UNUSUAL_DEV entry to devices less than 2.20. - -This fixes https://bugzilla.redhat.com/show_bug.cgi?id=909591 - -Reported-by: Carsten S. -Tested-by: Carsten S. -CC: -Signed-off-by: Josh Boyer ---- - drivers/usb/storage/unusual_cypress.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/usb/storage/unusual_cypress.h b/drivers/usb/storage/unusual_cypress.h -index 2c85530..65a6a75 100644 ---- a/drivers/usb/storage/unusual_cypress.h -+++ b/drivers/usb/storage/unusual_cypress.h -@@ -31,7 +31,7 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999, - "Cypress ISD-300LP", - USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0), - --UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x9999, -+UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x0219, - "Super Top", - "USB 2.0 SATA BRIDGE", - USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0), --- -1.8.1.2 - diff --git a/userns-avoid-recursion-in-put_user_ns.patch b/userns-avoid-recursion-in-put_user_ns.patch index d364e79f5..c3bb60444 100644 --- a/userns-avoid-recursion-in-put_user_ns.patch +++ b/userns-avoid-recursion-in-put_user_ns.patch @@ -27,8 +27,10 @@ Date: Fri Dec 28 18:58:39 2012 -0800 Pointed-out-by: Vasily Kulikov Signed-off-by: "Eric W. Biederman" ---- linux-3.7.9-105.fc17.noarch/include/linux/user_namespace.h 2013-02-14 11:29:49.757652513 -0600 -+++ linux-3.7.9-105.fc17.user_ns/include/linux/user_namespace.h 2013-02-26 15:19:40.696782035 -0600 +diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h +index b9bd2e6..4ce0093 100644 +--- a/include/linux/user_namespace.h ++++ b/include/linux/user_namespace.h @@ -21,7 +21,7 @@ struct user_namespace { struct uid_gid_map uid_map; struct uid_gid_map gid_map; @@ -38,7 +40,7 @@ Date: Fri Dec 28 18:58:39 2012 -0800 struct user_namespace *parent; kuid_t owner; kgid_t group; -@@ -34,17 +34,17 @@ extern struct user_namespace init_user_n +@@ -35,18 +35,18 @@ extern struct user_namespace init_user_ns; static inline struct user_namespace *get_user_ns(struct user_namespace *ns) { if (ns) @@ -46,11 +48,12 @@ Date: Fri Dec 28 18:58:39 2012 -0800 + atomic_inc(&ns->count); return ns; } - + extern int create_user_ns(struct cred *new); + extern int unshare_userns(unsigned long unshare_flags, struct cred **new_cred); -extern void free_user_ns(struct kref *kref); +extern void free_user_ns(struct user_namespace *ns); - + static inline void put_user_ns(struct user_namespace *ns) { - if (ns) @@ -58,11 +61,13 @@ Date: Fri Dec 28 18:58:39 2012 -0800 + if (ns && atomic_dec_and_test(&ns->count)) + free_user_ns(ns); } - + struct seq_operations; ---- linux-3.7.9-105.fc17.noarch/kernel/user.c 2013-02-14 11:29:46.675652732 -0600 -+++ linux-3.7.9-105.fc17.user_ns/kernel/user.c 2013-02-26 15:16:12.347796824 -0600 -@@ -46,9 +46,7 @@ struct user_namespace init_user_ns = { +diff --git a/kernel/user.c b/kernel/user.c +index 33acb5e..57ebfd4 100644 +--- a/kernel/user.c ++++ b/kernel/user.c +@@ -47,9 +47,7 @@ struct user_namespace init_user_ns = { .count = 4294967295U, }, }, @@ -72,37 +77,41 @@ Date: Fri Dec 28 18:58:39 2012 -0800 + .count = ATOMIC_INIT(3), .owner = GLOBAL_ROOT_UID, .group = GLOBAL_ROOT_GID, - }; ---- linux-3.7.9-105.fc17.noarch/kernel/user_namespace.c 2013-02-14 11:29:46.690652731 -0600 -+++ linux-3.7.9-105.fc17.user_ns/kernel/user_namespace.c 2013-02-26 15:24:47.984760224 -0600 -@@ -52,7 +52,7 @@ int create_user_ns(struct cred *new) - if (!ns) - return -ENOMEM; - + .proc_inum = PROC_USER_INIT_INO, +diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c +index 2b042c4..24f8ec3 100644 +--- a/kernel/user_namespace.c ++++ b/kernel/user_namespace.c +@@ -78,7 +78,7 @@ int create_user_ns(struct cred *new) + return ret; + } + - kref_init(&ns->kref); + atomic_set(&ns->count, 1); + /* Leave the new->user_ns reference with the new user namespace. */ ns->parent = parent_ns; ns->owner = owner; - ns->group = group; -@@ -78,14 +78,15 @@ int create_user_ns(struct cred *new) - return 0; +@@ -104,15 +104,16 @@ int unshare_userns(unsigned long unshare_flags, struct cred **new_cred) + return create_user_ns(cred); } - + -void free_user_ns(struct kref *kref) +void free_user_ns(struct user_namespace *ns) { - struct user_namespace *parent, *ns = - container_of(kref, struct user_namespace, kref); + struct user_namespace *parent; - + - parent = ns->parent; +- proc_free_inum(ns->proc_inum); - kmem_cache_free(user_ns_cachep, ns); - put_user_ns(parent); + do { + parent = ns->parent; ++ proc_free_inum(ns->proc_inum); + kmem_cache_free(user_ns_cachep, ns); + ns = parent; + } while (atomic_dec_and_test(&parent->count)); } EXPORT_SYMBOL(free_user_ns); - +