summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2008-03-048-26/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits) [IPCONFIG]: The kernel gets no IP from some DHCP servers b43legacy: Fix module init message rndis_wlan: fix broken data copy libertas: compare the current command with response libertas: fix sanity check on sequence number in command response p54: fix eeprom parser length sanity checks p54: fix EEPROM structure endianness ssb: Add pcibios_enable_device() return value check rc80211-pid: fix rate adjustment [ESP]: Add select on AUTHENC [TCP]: Improve ipv4 established hash function. [NETPOLL]: Revert two bogus cleanups that broke netconsole. [PPPOL2TP]: Add missing sock_put() in pppol2tp_tunnel_closeall() Subject: [PPPOL2TP] add missing sock_put() in pppol2tp_recv_dequeue() [BLUETOOTH]: l2cap info_timer delete fix in hci_conn_del [NET]: Fix race in generic address resolution. iucv: fix build error on !SMP [TCP]: Must count fack_count also when skipping [TUN]: Fix RTNL-locking in tun/tap driver [SCTP]: Use proc_create to setup de->proc_fops. ...
| * b43legacy: Fix module init messageMichael Buesch2008-03-041-1/+1
| | | | | | | | | | | | | | | | This fixes the module init message to tell that the legacy driver loaded. This makes it less confusing, in case both drivers are loaded. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rndis_wlan: fix broken data copyJussi Kivilinna2008-03-041-5/+3
| | | | | | | | | | | | | | | | | | | | Replace broken code that attempted to copy 6 byte array to 64-bit integer. Due to missing cast to 64-bit integer, left shift operation were 32-bit and lead to bytes been copied over each other. New code uses simple memcpy, for greater readability and efficiency. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * libertas: compare the current command with responseSebastian Siewior2008-03-041-3/+1
| | | | | | | | | | | | | | instead of with itself. Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * libertas: fix sanity check on sequence number in command responseDavid Woodhouse2008-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | Slightly more useful if we compare it against the sequence number of the command we have outstanding, rather than comparing the reply with itself. Doh. Pointed out by Sebastian Siewior Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * p54: fix eeprom parser length sanity checksJohannes Berg2008-03-041-7/+11
| | | | | | | | | | | | | | | | | | | | | | When I called p54_parse_eeprom() on a hand-coded structure I managed to make a small mistake with wrap->len which caused a segfault a few lines down when trying to read entry->len. This patch changes the validation code to avoid such problems. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * p54: fix EEPROM structure endiannessJohannes Berg2008-03-042-5/+5
| | | | | | | | | | | | | | | | | | | | | | Since the EEPROM structure is read from hardware, it is always little endian, annotate that in the struct and make sure to convert where applicable. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Michael Wu <flamingice@sourmilk.net> Tested-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ssb: Add pcibios_enable_device() return value checkYoichi Yuasa2008-03-041-1/+4
| | | | | | | | | | | | | | | | This patch has added pcibios_enable_device() return value check. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * [PPPOL2TP]: Add missing sock_put() in pppol2tp_tunnel_closeall()Jarek Poplawski2008-03-031-1/+6
| | | | | | | | | | | | | | | | Every skb removed from session->reorder_q needs sock_put(). Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Acked-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Subject: [PPPOL2TP] add missing sock_put() in pppol2tp_recv_dequeue()Jarek Poplawski2008-03-031-0/+1
| | | | | | | | | | | | | | | | Every skb removed from session->reorder_q needs sock_put(). Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Acked-by: James Chapman <jchapman@katalix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [TUN]: Fix RTNL-locking in tun/tap driverKim B. Heino2008-02-291-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Current tun/tap driver sets also net device's hw address when asked to change character device's hw address. This is a good idea, but it misses RTLN-locking, resulting following error message in 2.6.25-rc3's inetdev_event() function: RTNL: assertion failed at net/ipv4/devinet.c (1050) Attached patch fixes this problem. Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds2008-03-043-103/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: debugfs: fix sparse warnings Driver core: Fix cleanup when failing device_add(). driver core: Remove dpm_sysfs_remove() from error path of device_add() PM: fix new mutex-locking bug in the PM core PM: Do not acquire device semaphores upfront during suspend kobject: properly initialize ksets sysfs: CONFIG_SYSFS_DEPRECATED fix driver core: fix up Kconfig text for CONFIG_SYSFS_DEPRECATED
| * | Driver core: Fix cleanup when failing device_add().Cornelia Huck2008-03-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Driver core: Fix cleanup when failing device_add(). - Don't call cleanup_device_parent() if we didn't call setup_parent(). - dev->kobj.parent may be NULL when cleanup_device_parent() is called, so we need to handle glue_dir == NULL in cleanup_glue_dir(). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | driver core: Remove dpm_sysfs_remove() from error path of device_add()Rafael J. Wysocki2008-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since device_pm_remove(dev) calls dpm_sysfs_remove(dev), it's incorrect to call the latter after the former in the device_add() error path. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PM: fix new mutex-locking bug in the PM coreAlan Stern2008-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1041) fixes a bug introduced by the acquire-all-device-semaphores reversion. The error pathway of dpm_suspend() fails to reacquire a mutex it should be holding. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | PM: Do not acquire device semaphores upfront during suspendRafael J. Wysocki2008-03-043-99/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the code that acquires all device semaphores from the suspend code path as it causes multiple problems to appear (most notably, http://bugzilla.kernel.org/show_bug.cgi?id=10030) and revert the change introduced by commit 4145ed6dc597a9bea5f6ae8c574653b2de10620f depending on the code being removed. Remove pm_sleep_lock()/pm_sleep_unlock() from device_add() to avoid the issue reported at http://bugzilla.kernel.org/show_bug.cgi?id=9874. It should fix the regreesions reported at: http://bugzilla.kernel.org/show_bug.cgi?id=9874 http://bugzilla.kernel.org/show_bug.cgi?id=10030 Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds2008-03-049-48/+26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: pci: hotplug: pciehp: fix error code path in hpc_power_off_slot PCI: Add DECLARE_PCI_DEVICE_TABLE macro PCI: fix up error messages for pci_bus registering PCI: fix section mismatch warning in pci_scan_child_bus PCI: consolidate duplicated MSI enable functions PCI: use dev_printk in quirk messages
| * | | pci: hotplug: pciehp: fix error code path in hpc_power_off_slotKenji Kaneshige2008-03-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the error code path in hpc_power_off_slot(). The Bad DLLP Mask bit must be restored before return. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | PCI: fix up error messages for pci_bus registeringGreg Kroah-Hartman2008-03-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the class_device cleanup of pci_bus, the error messages when things go wrong are incorrect. So fix this up to properly report what is really happening, if things go wrong. Thanks to Kay for pointing out the issue. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | PCI: fix section mismatch warning in pci_scan_child_busSam Ravnborg2008-03-046-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix following warning: WARNING: vmlinux.o(.text+0x47bdb1): Section mismatch in reference from the function pci_scan_child_bus() to the function .devinit.text:pcibios_fixup_bus() We had plenty of functions that could be annotated __devinit but due to the former restriction that exported symbols could not be annotated they were not so. So annotate these function and fix the references from the pci/hotplug/* code to silence the resuting warnings. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | PCI: consolidate duplicated MSI enable functionsBjorn Helgaas2008-03-041-30/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two recent patches added basically the same code to turn on HT MSI mapping: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6bae1d96c6d7dde078994f6cb98235fd46f8736b http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=9dc625e72309e1c919ea3e7f51d0ffca96123787 There's no need to have both, so this patch removes one copy. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | PCI: use dev_printk in quirk messagesBjorn Helgaas2008-03-041-3/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | Convert quirk printks to dev_printk(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds2008-03-0413-66/+128
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: ftdi_sio - really enable EM1010PC USB: remove incorrect struct class_device from the printer gadget USB: pxa2xx_udc: fix misuse of clock enable/disable calls USB: ftdi_sio: Workaround for broken Matrix Orbital serial port USB: Add support for AXESSTEL MV110H CDMA modem usb-storage: update earlier scatter-gather bug fix USB: isp116x: fix enumeration on boot USB: ehci: handle large bulk URBs correctly (again) USB: spruce up the device blacklist USB: fix comment of struct usb_interface USB: update Kconfig entry for USB_SUSPEND usb: Add support for the mos7820/7840-based B&B USB/RS485 converter to mos7840.c
| * | | USB: ftdi_sio - really enable EM1010PCSven Andersen2008-03-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add EM1010PC to ftdi_sio.c Signed-off-by: Sven Andersen <s.andersen@cryonet.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: remove incorrect struct class_device from the printer gadgetTony Jones2008-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This field does nothing, and should not be allowed to stick around incase someone gets any other ideas... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: pxa2xx_udc: fix misuse of clock enable/disable callsDmitry Baryshkov2008-03-042-39/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix pxa2xx_udc to balance calls to clk_enable/clk_disable. [db: remove inline #ifdefs for IXP non-support of <linux/clk.h> calls] Signed-off-by: Dmitry Baryshkov dbaryshkov@gmail.com Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: ftdi_sio: Workaround for broken Matrix Orbital serial portKevin Vance2008-03-042-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workaround for the FT232RL-based, Matrix Orbital VK204-25-USB serial port added to the ftdi_sio driver. The device has an invalid endpoint descriptor, which must be modified before it can be used. Signed-off-by: Kevin Vance <kvance@kvance.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: Add support for AXESSTEL MV110H CDMA modemDaniel Kozák2008-03-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add entry for Axesstel MV110H CDMA modem (ID: 1726:1000) to option driver Signed-off-by: Daniel Kozák <kozzi11@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | usb-storage: update earlier scatter-gather bug fixAlan Stern2008-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1037) makes a small update to the earlier as1035 patch. The minimum-length computation shouldn't be done in usb_stor_access_xfer_buf(), since that routine can be called multiple times for a single transfer. It should be done in usb_stor_set_xfer_buf() instead, which gets called only once. The way it is now isn't really _wrong_, but it isn't really _right_ either. Moving the statement will be an improvement. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: isp116x: fix enumeration on bootAnti Sullin2008-03-042-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the buffering of the status register. USB core behavior has changed a bit and this buffering was not refreshed at the right time. The core got buffered old value of HCRHPORT and it did not detect any devices on boot. Signed-off-by: Anti Sullin <anti.sullin@artecdesign.ee> Acked by: Olav Kongas <ok@artecdesign.ee> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: ehci: handle large bulk URBs correctly (again)Misha Zhilin2008-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB: ehci: Fixes completion for multi-qtd URB the short read case When use of urb->status in the EHCI driver was reworked last August (commit 14c04c0f88f228fee1f412be91d6edcb935c78aa), a bug was inserted in the handling of early completion for bulk transactions that need more than one qTD (e.g. more than 20KB in one URB). This patch resolves that problem by ensuring that the early completion status is preserved until the URB is handed back to its submitter, instead of resetting it after each qTD. Signed-off-by: Misha Zhilin <misha@epiphan.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: spruce up the device blacklistAlan Stern2008-03-041-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1040) fixes up the blacklist of USB device quirks. A couple of lines are broken to comply with the 80-column rule, and entries are sorted into the proper numerical order. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: update Kconfig entry for USB_SUSPENDAlan Stern2008-03-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1039) updates the Kconfig entry for USB_SUSPEND. The out-of-date reference to "power/state" is fixed, autosuspend is mentioned, and the dependency on EXPERIMENTAL is removed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | usb: Add support for the mos7820/7840-based B&B USB/RS485 converter to mos7840.cDavid Ludlow2008-03-041-1/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Add support for the mos7820/7840-based B&B USOPTL4_2/USOPTL4_4 USB/RS485 converter to mos7840.c Signed-off-by: Dave Ludlow <dave.ludlow@bay.ws> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | input: add I2C to config since the driver makes several i2c*() callsRandy Dunlap2008-03-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add to help text that the Intel I2C ICH (i801) driver is also needed for this kernel. Add LEDS_CLASS to config since the driver makes les_classdev_*() calls: ERROR: "led_classdev_register" [drivers/input/misc/apanel.ko] undefined! ERROR: "__led_classdev_unregister" [drivers/input/misc/apanel.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: the md RAID10 resync thread could cause a md RAID10 array deadlockK.Tanaka2008-03-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This message describes another issue about md RAID10 found by testing the 2.6.24 md RAID10 using new scsi fault injection framework. Abstract: When a scsi error results in disabling a disk during RAID10 recovery, the resync threads of md RAID10 could stall. This case, the raid array has already been broken and it may not matter. But I think stall is not preferable. If it occurs, even shutdown or reboot will fail because of resource busy. The deadlock mechanism: The r10bio_s structure has a "remaining" member to keep track of BIOs yet to be handled when recovering. The "remaining" counter is incremented when building a BIO in sync_request() and is decremented when finish a BIO in end_sync_write(). If building a BIO fails for some reasons in sync_request(), the "remaining" should be decremented if it has already been incremented. I found a case where this decrement is forgotten. This causes a md_do_sync() deadlock because md_do_sync() waits for md_done_sync() called by end_sync_write(), but end_sync_write() never calls md_done_sync() because of the "remaining" counter mismatch. For example, this problem would be reproduced in the following case: Personalities : [raid10] md0 : active raid10 sdf1[4] sde1[5](F) sdd1[2] sdc1[1] sdb1[6](F) 3919616 blocks 64K chunks 2 near-copies [4/2] [_UU_] [>....................] recovery = 2.2% (45376/1959808) finish=0.7min speed=45376K/sec This case, sdf1 is recovering, sdb1 and sde1 are disabled. An additional error with detaching sdd will cause a deadlock. md0 : active raid10 sdf1[4] sde1[5](F) sdd1[6](F) sdc1[1] sdb1[7](F) 3919616 blocks 64K chunks 2 near-copies [4/1] [_U__] [=>...................] recovery = 5.0% (99520/1959808) finish=5.9min speed=5237K/sec 2739 ? S< 0:17 [md0_raid10] 28608 ? D< 0:00 [md0_resync] 28629 pts/1 Ss 0:00 bash 28830 pts/1 R+ 0:00 ps ax 31819 ? D< 0:00 [kjournald] The resync thread keeps working, but actually it is deadlocked. Patch: By this patch, the remaining counter will be decremented if needed. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: fix possible raid1/raid10 deadlock on read error during resyncNeilBrown2008-03-042-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to K.Tanaka and the scsi fault injection framework, here is a fix for another possible deadlock in raid1/raid10 error handing. If a read request returns an error while a resync is happening and a resync request is pending, the attempt to fix the error will block until the resync progresses, and the resync will block until the read request completes. Thus a deadlock. This patch fixes the problem. Cc: "K.Tanaka" <k-tanaka@ce.jp.nec.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: don't attempt read-balancing for raid10 'far' layoutsKeld Simonsen2008-03-041-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the disk to be read for layout "far > 1" to always be the disk with the lowest block address. Thus the chunks to be read will always be (for a fully functioning array) from the first band of stripes, and the raid will then work as a raid0 consisting of the first band of stripes. Some advantages: The fastest part which is the outer sectors of the disks involved will be used. The outer blocks of a disk may be as much as 100 % faster than the inner blocks. Average seek time will be smaller, as seeks will always be confined to the first part of the disks. Mixed disks with different performance characteristics will work better, as they will work as raid0, the sequential read rate will be number of disks involved times the IO rate of the slowest disk. If a disk is malfunctioning, the first disk which is working, and has the lowest block address for the logical block will be used. Signed-off-by: Keld Simonsen <keld@dkuug.dk> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: lock access to rdev attributes properlyNeilBrown2008-03-041-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we access attributes of an rdev (component device on an md array) through sysfs, we really need to lock the array against concurrent changes. We currently do that when we change an attribute, but not when we read an attribute. We need to lock when reading as well else rdev->mddev could become NULL while we are accessing it. So add appropriate locking (mddev_lock) to rdev_attr_show. rdev_size_store requires some extra care as well as it needs to unlock the mddev while scanning other mddevs for overlapping regions. We currently assume that rdev->mddev will still be unchanged after the scan, but that cannot be certain. So take a copy of rdev->mddev for use at the end of the function. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: make sure a reshape is started when device switches to read-writeNeilBrown2008-03-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A resync/reshape/recovery thread will refuse to progress when the array is marked read-only. So whenever it mark it not read-only, it is important to wake up thread resync thread. There is one place we didn't do this. The problem manifests if the start_ro module parameters is set, and a raid5 array that is in the middle of a reshape (restripe) is started. The array will initially be semi-read-only (meaning it acts like it is readonly until the first write). So the reshape will not proceed. On the first write, the array will become read-write, but the reshape will not be started, and there is no event which will ever restart that thread. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: clean up irregularity with raid autodetectNeilBrown2008-03-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a raid1 array is stopped, all components currently get added to the list for auto-detection. However we should really only add components that were found by autodetection in the first place. So add a flag to record that information, and use it. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: guard against possible bad array geometry in v1 metadataNeilBrown2008-03-041-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the data doesn't start before the end of the superblock when the superblock is at the start of the device. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: reduce CPU wastage on idle md array with a write-intent bitmapNeilBrown2008-03-041-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On an md array with a write-intent bitmap, a thread wakes up every few seconds and scans the bitmap looking for work to do. If the array is idle, there will be no work to do, but a lot of scanning is done to discover this. So cache the fact that the bitmap is completely clean, and avoid scanning the whole bitmap when the cache is known to be clean. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | md: fix deadlock in md/raid1 and md/raid10 when handling a read errorNeilBrown2008-03-042-43/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When handling a read error, we freeze the array to stop any other IO while attempting to over-write with correct data. This is done in the raid1d(raid10d) thread and must wait for all submitted IO to complete (except for requests that failed and are sitting in the retry queue - these are counted in ->nr_queue and will stay there during a freeze). However write requests need attention from raid1d as bitmap updates might be required. This can cause a deadlock as raid1 is waiting for requests to finish that themselves need attention from raid1d. So we create a new function 'flush_pending_writes' to give that attention, and call it in freeze_array to be sure that we aren't waiting on raid1d. Thanks to "K.Tanaka" <k-tanaka@ce.jp.nec.com> for finding and reporting this problem. Cc: "K.Tanaka" <k-tanaka@ce.jp.nec.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | iommu: parisc: make the IOMMUs respect the segment boundary limitsFUJITA Tomonori2008-03-043-18/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make PARISC's two IOMMU implementations not allocate a memory area spanning LLD's segment boundary. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | iommu: parisc: pass struct device to iommu_alloc_rangeFUJITA Tomonori2008-03-043-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds struct device argument to sba_alloc_range and ccio_alloc_range, a preparation for modifications to fix the IOMMU segment boundary problem. This change enables ccio_alloc_range to access to LLD's segment boundary limits. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | hisax_fcpcipnp: move request_irq later in probeKyle McMartin2008-03-041-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a quick glance at the code, we're getting the DEBUG_SHIRQ spurious interrupt before we have the adapter template filled in. Real interrupts appear to be turned on by fcpci*_init(), so move request_irq until just before that. Signed-off-by: Kyle McMartin <kmcmartin@redhat.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | ACPI: thinkpad-acpi: fix hotkey_get_tablet_modeHenrique de Moraes Holschuh2008-03-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I used the wrong return convention on hotkey_get_tablet_mode(), breaking a lot of stuff. Bad Henrique! Fix it to return the status in the parameter-by-reference, and IO status on the function return value. Duh. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | drivers/serial/m32r_sio.c: correct use of ! and &Julia Lawall2008-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337 ("wmi: (!x & y) strikes again"), a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | drivers/isdn: correct use of ! and &Julia Lawall2008-03-042-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337 ("wmi: (!x & y) strikes again"), a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud