- 28 2月, 2012 1 次提交
-
-
由 Yinghai Lu 提交于
The old pci_remove_behind_bridge actually do stop and remove. Make the name reflect that to reduce confusion. Suggested-by: NJesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: NYinghai Lu <yinghai@kernel.org> Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
-
- 21 2月, 2012 10 次提交
-
-
由 Russell King 提交于
Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Lubbock is just another SA1111 socket driver, so now that Kconfig has better control of which files get built, we can sanitize the build for this. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
sa11xx_base.c is currently built when either PCMCIA_SA1100 or PCMCIA_SA1111 are selected. Let's move the logic into Kconfig. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
sa1111_set_io() already contains the necessary locking within itself to safely change the state of a set of GPIOs. There's no need for callers to protect this by disabling IRQs themselves. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Pass along the sa1111_pcmcia_configure_socket() failure code to higher levels, rather than just returning zero. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
soc_common already initializes state.wrprot to zero, so explicitly setting wrprot to zero in the socket drivers has no additional effect. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Now that we use gpios and gpio_to_irq() etc to manage the various card status signals within soc_common, and all socket drivers are converted, these functions are no longer used. We can now get rid of these helper functions. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert iPAQ socket driver to use the new irq/gpio management. As this already uses the GPIO subsystem, these changes are localized to just the PCMCIA directory. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert Simpad socket driver to use the new irq/gpio management. This is slightly more involved because we have to touch the private platform header file to modify the GPIO bitmasks to be GPIO numbers. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert Shannon socket driver to use the new irq/gpio management. This is slightly more involved because we have to touch the private platform header file to modify the GPIO bitmasks to be GPIO numbers. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 16 2月, 2012 1 次提交
-
-
由 Axel Lin 提交于
If pxa2xx_drv_pcmcia_add_one fails, it will go to err1 error path. Add a missing clk_put in the error path. Checking the ret value after the for loop is redundant, it is always false. Thus remove the redundant checking. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-by: NEric Miao <eric.y.miao@gmail.com> Acked-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
-
- 09 2月, 2012 1 次提交
-
-
由 Russell King 提交于
This fixes a memory-corrupting bug: not only does it cause the warning, but as a result of dropping the refcount to zero, it causes the pcmcia_socket0 device structure to be freed while it still has references, causing slab caches corruption. A fatal oops quickly follows this warning - often even just a 'dmesg' following the warning causes the kernel to oops. While testing suspend/resume on an ARM device with PCMCIA support, and a CF card inserted, I found that after five suspend and resumes, the kernel would complain, and shortly die after with slab corruption. WARNING: at include/linux/kref.h:41 kobject_get+0x28/0x50() As the message doesn't give a clue about which kobject, and the built-in debugging in drivers/base/power/main.c happens too late, this was added right before each get_device(): printk("%s: %p [%s] %u\n", __func__, dev, kobject_name(&dev->kobj), atomic_read(&dev->kobj.kref.refcount)); and on the 3rd s2ram cycle, the following behaviour observed: On the 3rd suspend/resume cycle: dpm_prepare: c1a0d998 [pcmcia_socket0] 3 dpm_suspend: c1a0d998 [pcmcia_socket0] 3 dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 3 dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 3 dpm_resume: c1a0d998 [pcmcia_socket0] 3 dpm_complete: c1a0d998 [pcmcia_socket0] 2 4th: dpm_prepare: c1a0d998 [pcmcia_socket0] 2 dpm_suspend: c1a0d998 [pcmcia_socket0] 2 dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 2 dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 2 dpm_resume: c1a0d998 [pcmcia_socket0] 2 dpm_complete: c1a0d998 [pcmcia_socket0] 1 5th: dpm_prepare: c1a0d998 [pcmcia_socket0] 1 dpm_suspend: c1a0d998 [pcmcia_socket0] 1 dpm_suspend_noirq: c1a0d998 [pcmcia_socket0] 1 dpm_resume_noirq: c1a0d998 [pcmcia_socket0] 1 dpm_resume: c1a0d998 [pcmcia_socket0] 1 dpm_complete: c1a0d998 [pcmcia_socket0] 0 ------------[ cut here ]------------ WARNING: at include/linux/kref.h:41 kobject_get+0x28/0x50() Modules linked in: ucb1x00_core Backtrace: [<c0212090>] (dump_backtrace+0x0/0x110) from [<c04799dc>] (dump_stack+0x18/0x1c) [<c04799c4>] (dump_stack+0x0/0x1c) from [<c021cba0>] (warn_slowpath_common+0x50/0x68) [<c021cb50>] (warn_slowpath_common+0x0/0x68) from [<c021cbdc>] (warn_slowpath_null+0x24/0x28) [<c021cbb8>] (warn_slowpath_null+0x0/0x28) from [<c0335374>] (kobject_get+0x28/0x50) [<c033534c>] (kobject_get+0x0/0x50) from [<c03804f4>] (get_device+0x1c/0x24) [<c0388c90>] (dpm_complete+0x0/0x1a0) from [<c0389cc0>] (dpm_resume_end+0x1c/0x20) ... Looking at commit 7b24e798 ("pcmcia: split up central event handler"), the following change was made to cs.c: return 0; } #endif - - send_event(skt, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW); + if (!(skt->state & SOCKET_CARDBUS) && (skt->callback)) + skt->callback->early_resume(skt); return 0; } And the corresponding change in ds.c is from: -static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) -{ - struct pcmcia_socket *s = pcmcia_get_socket(skt); ... - switch (event) { ... - case CS_EVENT_PM_RESUME: - if (verify_cis_cache(skt) != 0) { - dev_dbg(&skt->dev, "cis mismatch - different card\n"); - /* first, remove the card */ - ds_event(skt, CS_EVENT_CARD_REMOVAL, CS_EVENT_PRI_HIGH); - mutex_lock(&s->ops_mutex); - destroy_cis_cache(skt); - kfree(skt->fake_cis); - skt->fake_cis = NULL; - s->functions = 0; - mutex_unlock(&s->ops_mutex); - /* now, add the new card */ - ds_event(skt, CS_EVENT_CARD_INSERTION, - CS_EVENT_PRI_LOW); - } - break; ... - } - pcmcia_put_socket(s); - return 0; -} /* ds_event */ to: +static int pcmcia_bus_early_resume(struct pcmcia_socket *skt) +{ + if (!verify_cis_cache(skt)) { + pcmcia_put_socket(skt); + return 0; + } + dev_dbg(&skt->dev, "cis mismatch - different card\n"); + /* first, remove the card */ + pcmcia_bus_remove(skt); + mutex_lock(&skt->ops_mutex); + destroy_cis_cache(skt); + kfree(skt->fake_cis); + skt->fake_cis = NULL; + skt->functions = 0; + mutex_unlock(&skt->ops_mutex); + /* now, add the new card */ + pcmcia_bus_add(skt); + return 0; +} As can be seen, the original function called pcmcia_get_socket() and pcmcia_put_socket() around the guts, whereas the replacement code calls pcmcia_put_socket() only in one path. This creates an imbalance in the refcounting. Testing with pcmcia_put_socket() put removed shows that the bug is gone: dpm_suspend: c1a10998 [pcmcia_socket0] 5 dpm_suspend_noirq: c1a10998 [pcmcia_socket0] 5 dpm_resume_noirq: c1a10998 [pcmcia_socket0] 5 dpm_resume: c1a10998 [pcmcia_socket0] 5 dpm_complete: c1a10998 [pcmcia_socket0] 5 Tested-by: NRussell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: <stable@vger.kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 04 2月, 2012 7 次提交
-
-
由 Russell King 提交于
Rather than accessing GPSR and GPCR directly, use the GPIO subsystem instead. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert Nanoengine socket driver to use the new irq/gpio management. This is slightly more involved because we have to touch the private platform header file to modify the GPIO bitmasks to be GPIO numbers. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Rather than accessing GPSR and GPCR directly, use the GPIO subsystem instead. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert Cerf socket driver to use the new irq/gpio management. This is slightly more involved because we have to touch the private platform header file to modify the GPIO bitmasks to be GPIO numbers. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert Assabet socket driver to use the new irq/gpio management. This is slightly more involved because we have to touch the private platform header file to modify the GPIO bitmasks to be GPIO numbers. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert sa1111 PCMCIA drivers to use the new per-socket irq/gpio infrastructure. As the core takes care of handling the IRQs, we can get rid of sa1111_pcmcia_socket_init(), sa1111_pcmcia_socket_suspend(), sa1111_pcmcia_hw_init() and sa1111_pcmcia_hw_shutdown(), as well as the private IRQ table. We remove the NCR_0 setting in Neponset, as this is duplicating what's already done via configure_socket in suspend. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Convert all the PXA platform socket drivers to use the new irq/gpio management provided by soc_common. This relieves these drivers from having to do anything with these GPIOs other than provide the numbers to soc_common. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 27 1月, 2012 3 次提交
-
-
由 Alan Stern 提交于
This patch (as1514) cleans up some places where new_id and remove_id sysfs attributes are created and deleted. Handling both attributes in a single routine rather than a pair of routines makes the code smaller. It also prevents certain kinds of errors, like one we currently have in the USB subsystem: The removeid attribute is often created even when newid isn't (because the driver's no_dynamid_id flag is set). In the case of the PCMCIA subsystem, the newid attribute is created but never explicitly deleted. The patch adds a deletion routine. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org> Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Russell King 提交于
Add GPIO support for reading the card status (card detect, ready, battery voltage detect) signals into soc_common code. As we want interrupts from these GPIOs, this takes over the old irq handling infrastructure for card status signals, which will now be managed entirely by the soc_common code. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Move common socket initialization into soc_common.c. Acked-by: NDominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 25 1月, 2012 2 次提交
-
-
由 Alan Stern 提交于
As part of the removal of get_driver()/put_driver(), this patch (as1511) changes all the places that add dynamic IDs for drivers. Since these additions are done by writing to the drivers' sysfs attribute files, and the attributes are removed when the drivers are unregistered, there is no reason to take an extra reference to the drivers. The one exception is the pci-stub driver, which calls pci_add_dynid() as part of its registration. But again, there's no reason to take an extra reference here, because the driver can't be unloaded while it is being registered. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Jiri Kosina <jkosina@suse.cz> CC: Jesse Barnes <jbarnes@virtuousgeek.org> CC: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Russell King 提交于
The sa1111 socket driver oopses when removed: Unable to handle kernel NULL pointer dereference at virtual address 000003b0 pgd = c1b40000 [000003b0] *pgd=00000000 Internal error: Oops: 41b43005 [#1] Modules linked in: CPU: 0 Not tainted (3.3.0-rc1+ #744) PC is at pcmcia_remove+0x3c/0x60 LR is at pcmcia_remove+0x34/0x60 This is because we try to dereference a NULL 's' to obtain the next pointer. Fix this. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 13 1月, 2012 1 次提交
-
-
由 Rusty Russell 提交于
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
-
- 28 12月, 2011 1 次提交
-
-
由 Axel Lin 提交于
Since commit 6384fd "ARM: pxa: rename IRQ_GPIO to PXA_GPIO_TO_IRQ", I got buid errors due to implicit declaration of function 'IRQ_GPIO'. Use common gpio_to_irq() to replace machine dependant macro IRQ_GPIO(). Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Ian Molton <spyro@f2s.com> Cc: Jonathan Cameron <jic23@cam.ac.uk> Cc: Zhuang <haojian.zhuang@marvell.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-by: NHaojian Zhuang <haojian.zhuang@gmail.com> Acked-by: NEric Miao <eric.y.miao@gmail.com> Acked-by: NMarek Vasut <marek.vasut@gmail.com> Signed-off-by: NArnd Bergmann <arnd@arndb.de>
-
- 08 12月, 2011 2 次提交
-
-
由 Manuel Lauss 提交于
Signed-off-by: NManuel Lauss <manuel.lauss@googlemail.com> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2867/ Patchwork: https://patchwork.linux-mips.org/patch/2919/ Patchwork: https://patchwork.linux-mips.org/patch/2928/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
由 Manuel Lauss 提交于
Noone seems to have test hardware or care anymore. Drop PB1000 support and along with it the old Alchemy PCMCIA socket driver. Signed-off-by: NManuel Lauss <manuel.lauss@googlemail.com> To: linux-mips@linux-mips.org Cc: netdev@vger.kernel.org Cc: linux-pcmcia@lists.infradead.org Patchwork: https://patchwork.linux-mips.org/patch/2881/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
-
- 15 11月, 2011 1 次提交
-
-
由 Haojian Zhuang 提交于
Use common gpio_to_irq() to replace machine dependant macro IRQ_GPIO(). Signed-off-by: NHaojian Zhuang <haojian.zhuang@marvell.com>
-
- 06 11月, 2011 2 次提交
-
-
由 Russell King 提交于
The includes in the pxa2xx_cm_x2xx PCMCIA driver are rather random; the driver doesn't require anything from these headers except the cpu_is_xxx() macros which come from another include. The concern is that it's getting these definitions via mach/system.h, which is supposed to only be included by arch/arm/kernel/process.c. As this header is scheduled for cleanup (and elimination) keeping the status quo will cause build errors. So lets fix properly and independent of the future work. Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
由 Russell King 提交于
Fix: ERROR: "pxa2xx_configure_sockets" [drivers/pcmcia/pxa2xx_lubbock_cs.ko] undefined! by exporting the required function. Acked-by: NEric Miao <eric.y.miao@gmail.com> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 01 11月, 2011 2 次提交
-
-
由 Paul Gortmaker 提交于
Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
由 Paul Gortmaker 提交于
As we will get this after the module.h usage cleanup. drivers/pcmcia/db1xxx_ss.c:577: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 17 10月, 2011 1 次提交
-
-
由 Jochen Friedrich 提交于
- prepend CS3 accessors by simpad_ to indicate they are specific to simpad devices. - use spinlock to protect shadow register. - implement 8 read-only pins. - use readl/writel macros so barriers are used where necessary. - register CS3 as GPIO controller with 24 pins (16 output only and 8 input only). - fix PCMCIA driver to access the read-only pins rather than the shadow register for status bits. Signed-off-by: NJochen Friedrich <jochen@scram.de> Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 08 10月, 2011 1 次提交
-
-
由 Arnd Bergmann 提交于
This tries to clear up the confusion between integers and iomem pointers in the marvell pxa platform. MMIO addresses are supposed to be __iomem* values, in order to let the Linux type checking work correctly. This patch moves the cast to __iomem as far back as possible, to the place where the MMIO virtual address windows are defined. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
-
- 08 8月, 2011 1 次提交
-
-
由 Russell King 提交于
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
-
- 29 7月, 2011 3 次提交
-
-
由 Jonathan Cameron 提交于
Kill off the buff gpio as not used anywhere. Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk> Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
-
由 Jonathan Cameron 提交于
Now the are optional, let us get rid of the ones that don't have any content. Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk> Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
-
由 Jonathan Cameron 提交于
10 boards define these empty, probably indicating not everyone has a use for them. Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk> Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
-