summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2009-02-02PCI hotplug: fix lock imbalance in pciehpJiri Slaby
commit c2fdd36b550659f5ac2240d1f5a83ffa1a092289 upstream. set_lock_status omits mutex_unlock in fail path. Add the omitted unlock. As a result a lockup caused by this can be triggered from userspace by writing 1 to /sys/bus/pci/slots/.../lock often enough. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02sgi-xpc: ensure flags are updated before bte_copyRobin Holt
commit 69b3bb65fa97a1e8563518dbbc35cd57beefb2d4 upstream. The clearing of the msg->flags needs a barrier between it and the notify of the channel threads that the messages are cleaned and ready for use. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02sgi-xpc: Remove NULL pointer dereference.Robin Holt
commit 17e2161654da4e6bdfd8d53d4f52e820ee93f423 upstream. If the bte copy fails, the attempt to retrieve payloads merely returns a null pointer deref and not NULL as was expected. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02gpiolib: fix request related issueMagnus Damm
commit 7460db567bbca76bf087d1694d792a1a96bdaa26 upstream. Fix request-already-requested handling in gpio_request(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02rtl8187: Fix error in setting OFDM power settings for RTL8187LLarry Finger
commit eb83bbf57429ab80f49b413e3e44d3b19c3fdc5a upstream. After reports of poor performance, a review of the latest vendor driver (rtl8187_linux_26.1025.0328.2007) for RTL8187L devices was undertaken. A difference was found in the code used to index the OFDM power tables. When the Linux driver was changed, my unit works at a much greater range than before. I think this fixes Bugzilla #12380 and has been tested by at least two other users. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Martín Ernesto Barreyro <barreyromartin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02bnx2x: Block nvram access when the device is inactiveEilon Greenstein
commit 2add3acb11a26cc14b54669433ae6ace6406cbf2 upstream. Don't dump eeprom when bnx2x adapter is down. Running ethtool -e causes an eeh without it when the device is down Signed-off-by: Paul Larson <pl@linux.vnet.ibm.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02drm: stash AGP include under the do-we-have-AGP ifdefEric Anholt
commit 1bb88edb7a3769992026f34fd648bb459b0469aa upstream. This fixes the MIPS with DRM build. Signed-off-by: Eric Anholt <eric@anholt.net> Tested-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02serial_8250: support for Sealevel Systems Model 7803 COMM+8Flavio Leitner
commit e65f0f8271b1b0452334e5da37fd35413a000de4 upstream. Add support for Sealevel Systems Model 7803 COMM+8 Signed-off-by: Flavio Leitner <fleitner@redhat.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02libata: pata_via: support VX855, future chips whose IDE controller use 0x0571JosephChan@via.com.tw
commit e4d866cdea24543ee16ce6d07d80c513e86ba983 upstream. It supports VX855 and future chips whose IDE controller uses PCI ID 0x0571. Signed-off-by: Joseph Chan <josephchan@via.com.tw> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02it821x: Add ultra_mask quirk for Vortex86SXBrandon Philips
commit b94b898f3107046b5c97c556e23529283ea5eadd upstream. On Vortex86SX with IDE controller revision 0x11 ultra DMA must be disabled. This patch was tested by DMP and seems to work. It is a cleaned up version of their older Kernel patch: http://www.dmp.com.tw/tech/vortex86sx/patch-2.6.24-DMP.gz Tested-by: Shawn Lin <shawn@dmp.com.tw> Signed-off-by: Brandon Philips <bphilips@suse.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02rtl8187: Add termination packet to prevent stallLarry Finger
commit 2fcbab044a3faf4d4a6e269148dd1f188303b206 upstream. The RTL8187 and RTL8187B devices can stall unless an explicit termination packet is sent. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02USB: storage: add unusual devs entryOliver Neukum
commit b90de8aea36ae6fe8050a6e91b031369c4f251b2 upstream. This adds an unusual devs entry for 2116:0320 Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02USB: fix char-device disconnect handlingAlan Stern
commit 501950d846218ed80a776d2aae5aed9c8b92e778 upstream. This patch (as1198) fixes a conceptual bug: Somewhere along the line we managed to confuse USB class devices with USB char devices. As a result, the code to send a disconnect signal to userspace would not be built if both CONFIG_USB_DEVICE_CLASS and CONFIG_USB_DEVICEFS were disabled. The usb_fs_classdev_common_remove() routine has been renamed to usbdev_remove() and it is now called whenever any USB device is removed, not just when a class device is unregistered. The notifier registration and unregistration calls are no longer conditionally compiled. And since the common removal code will always be called as part of the char device interface, there's no need to call it again as part of the usbfs interface; thus the invocation of usb_fs_classdev_common_remove() has been taken out of usbfs_remove_device(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Alon Bar-Lev <alon.barlev@gmail.com> Tested-by: Alon Bar-Lev <alon.barlev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02USB: usbmon: Implement compat_ioctlPete Zaitcev
commit 7abce6bedc118eb39fe177c2c26be5d008505c14 upstream. Running a 32-bit usbmon(8) on 2.6.28-rc9 produces the following: ioctl32(usbmon:28563): Unknown cmd fd(3) cmd(400c9206){t:ffffff92;sz:12} arg(ffd3f458) on /dev/usbmon0 It happens because the compatibility mode was implemented for 2.6.18 and not updated for the fsops.compat_ioctl API. This patch relocates the pieces from under #ifdef CONFIG_COMPAT into compat_ioctl with no other changes except one new whitespace. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02USB: fix toggle mismatch in disable_endpoint pathsAlan Stern
commit ddeac4e75f2527a340f9dc655bde49bb2429b39b upstream. This patch (as1200) finishes some fixes that were left incomplete by an earlier patch. Although nobody has addressed this issue in the past, it turns out that we need to distinguish between two different modes of disabling and enabling endpoints. In one mode only the data structures in usbcore are affected, and in the other mode the host controller and device hardware states are affected as well. The earlier patch added an extra argument to the routines in the enable_endpoint pathways to reflect this difference. This patch adds corresponding arguments to the disable_endpoint pathways. Without this change, the endpoint toggle state can get out of sync between the host and the device. The exact mechanism depends on the details of the host controller (whether or not it stores its own copy of the toggle values). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Dan Streetman <ddstreet@ieee.org> Tested-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-02ath5k: fix mesh point operationAndrey Yurovsky
commit b706e65b40417e03c2451bb3f92488f3736843fa upstream. This patch fixes mesh point operation (thanks to YanBo for pointing out the problem): make mesh point interfaces start beaconing when they come up and configure the RX filter in mesh mode so that mesh beacons and action frames are received. Add mesh point to the check in ath5k_add_interface. Tested with multiple AR5211 cards. Signed-off-by: Andrey Yurovsky <andrey@cozybit.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Bob Copeland <me@bobcopeland.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24hwmon: (abituguru3) Fix CONFIG_DMI=n fallback to probeAlistair John Strachan
commit 46a5f173fc88ffc22651162033696d8a9fbcdc5c upstream. When CONFIG_DMI is not enabled, dmi detection should flag that no board could be detected (err=1) rather than another error condition (err<0). This fixes the fallback to manual probing for all motherboards, even those without DMI strings, when CONFIG_DMI=n. Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24dell_rbu: use scnprintf() instead of less secure sprintf()Pavel Roskin
commit 81156928f8fe31621e467490b9d441c0285998c3 upstream. Reading 0 bytes from /sys/devices/platform/dell_rbu/image_type or /sys/devices/platform/dell_rbu/packet_size by an ordinary user causes an oops. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24p54usb: fix traffic stalls / packet dropChristian Lamparter
commit 00627f229c9807e4cb825a7ce36b886e2adf2229 upstream. All p54usb devices need a explicit termination packet, in oder to finish the pending transfer properly. Else, the firmware could freeze, or simply drop the frame. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24USB: re-enable interface after driver unbindsAlan Stern
commit 2caf7fcdb8532045680f06b67b9e63f0c9613aaa upstream. This patch (as1197) fixes an error introduced recently. Since a significant number of devices can't handle Set-Interface requests, we no longer call usb_set_interface() when a driver unbinds from an interface, provided the interface is already in altsetting 0. However the interface still does get disabled, and the call to usb_set_interface() was the only thing re-enabling it. Since the interface doesn't get re-enabled, further attempts to use it fail. So the patch adds a call to usb_enable_interface() when a driver unbinds and the interface is in altsetting 0. For this to work right, the interface's endpoints have to be re-enabled but their toggles have to be left alone. Therefore an additional argument is added to usb_enable_endpoint() and usb_enable_interface(), a flag indicating whether or not the endpoint toggles should be reset. This is a forward-ported version of a patch which fixes Bugzilla #12301. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: David Roka <roka@dawid.hu> Reported-by: Erik Ekman <erik@kryo.se> Tested-by: Erik Ekman <erik@kryo.se> Tested-by: Alon Bar-Lev <alon.barlev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24r6040: bump release number to 0.19Florian Fainelli
[ Upstream commit: 4707470ae7441733822efcd680b0ef3971921c4d ] This patch bumps the release number of the driver. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24r6040: save and restore MIER correctly in the interrupt routineJoe Chou
[ Upstream commit: 3e7c469f07ff14cbf9a814739e1fc99a863e0943 ] This patch saves the MIER register contents before treating interrupts, then restores them correcty at the end of the interrupt routine. Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24r6040: fix wrong logic in mdio codeJoe Chou
[ Upstream commit: 11e5e8f5d14a1229706576184d2cf4c4556ed94c ] This patch fixes a reverse logic in the MDIO code. Signed-off-by: Joe Chou <Joe.Chou@rdc.com.tw> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24usb-storage: set CAPACITY_HEURISTICS flag for bad vendorsAlan Stern
commit a81a81a25d3ecdab777abca87c5ddf484056103d upstream. This patch (as1194b) makes usb-storage set the CAPACITY_HEURISTICS flag for all devices made by Nokia, Nikon, or Motorola. These companies seem to include the READ CAPACITY bug in all of their devices. Since cell phones and digital cameras rely on flash storage, which always has an even number of sectors, setting CAPACITY_HEURISTICS shouldn't cause any problems. Not even if the companies wise up and start making devices without the bug. A large number of unusual_devs entries are now unnecessary, so the patch removes them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24usb-storage: add last-sector hacksAlan Stern
commit 25ff1c316f6a763f1eefe7f8984b2d8c03888432 upstream. This patch (as1189c) adds some hacks to usb-storage for dealing with the growing problems involving bad capacity values and last-sector accesses: A new flag, US_FL_CAPACITY_OK, is created to indicate that the device is known to report its capacity correctly. An unusual_devs entry for Linux's own File-backed Storage Gadget is added with this flag set, since g_file_storage always reports the correct capacity and since the capacity need not be even (it is determined by the size of the backing file). An entry in unusual_devs.h which has only the CAPACITY_OK flag set shouldn't prejudice libusual, since the device will work perfectly well with either usb-storage or ub. So a new macro, COMPLIANT_DEV, is added to let libusual know about these entries. When a last-sector access fails three times in a row and neither the FIX_CAPACITY nor the CAPACITY_OK flag is set, we assume the last-sector bug is present. We replace the existing status and sense data with values that will cause the SCSI core to fail the access immediately rather than retry indefinitely. This should fix the difficulties people have been having with Nokia phones. This version of the patch differs from the version accepted into the mainline only in that it does not trigger a WARN() when an odd-numbered last-sector access succeeds. In a stable kernel series we don't want to go around spamming users' logs and consoles for no good reason. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24drivers/net/irda/irda-usb.c: fix buffer overflowJos-Vicente Gilabert
commit 2950e952920811be465ec95c6b56f03dc66a05c0 upstream. Taken from http://bugzilla.kernel.org/show_bug.cgi?id=12397 We're doing an sprintf of an 11-char string into an 11-char buffer. Whoops. It breaks firmware uploading. Reported-by: Jos-Vicente Gilabert <josevteg@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24sgi-xp: eliminate false detection of no heartbeatDean Nelson
commit 158bc69effbf96f59c01cdeb20f8d4c184e59f8e upstream. After XPC has been up and running on multiple partitions for any length of time, if XPC on one of the partitions is stopped and restarted (either by a rmmod/insmod or a system restart), it is possible for the XPCs running on the other partitions to falsely detect a lack of heartbeat from the XPC that was just restarted. This false detection will occur if the restarted XPC comes up within the five-seconds preceding one of the other XPC's heartbeat check (which occurs once every twenty seconds). The detection of no heartbeat results in the detecting XPC deactivating from the just restarted XPC. The only remedy is to restart one of the XPCs and hope that one doesn't hit this five-second window on any of the other partitions. Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24p54usb: Add USB ID for Thomson Speedtouch 121gMichiel
commit 878e6a432f85690a2c0d88d96f177e54ff1d4a57 upstream. Add the USB ID for Thomson Speedtouch 121g to p54usb. Signed-off-by: Michiel <michiel@ettema.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24rt2x00: add USB ID for the Linksys WUSB200.Stefan Lippers-Hollmann
commit 3be36ae223271f9c2cfbe7406846c8fdcd2f50c3 upstream. add USB ID for the Linksys WUSB200 Wireless-G Business USB Adapter to rt73usb. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-24PCI: keep ASPM link state consistent throughout PCIe hierarchyShaohua Li
commit 46bbdfa44cfc0d352148a0dc33ba9f6db02ccdf0 upstream. In a PCIe hierarchy with a switch present, if the link state of an endpoint device is changed, we must check the whole hierarchy from the endpoint device to root port, and for each link in the hierarchy, the new link state should be configured. Previously, the implementation checked the state but forgot to configure the links between root port to switch. Fixes Novell bz #448987. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Tested-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18ath5k: ignore the return value of ath5k_hw_noise_floor_calibrationFelix Fietkau
commit 8b0162a3dc5c30e862b7a73da29e32de3170f5e4 upstream. Noise floor calibration occasionally fails on Atheros hardware. This is not fatal and can happen if there's simply too much noise on the air. Ignoring the calibration error is the right thing to do here, because when the error is ignored, the hardware will still work, whereas if the error causes the driver to bail out of a bigger configuration function and does not configure the tx queues or the IMR (as is the case in reset.c), the hw no longer works properly until the next reset. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Bob Copeland <me@bobcopeland.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18ibmvfc: Improve async event handlingBrian King
commit d2131b33c7e07c2905ee2f2321cc4dae1928c483 upstream. While doing various error injection testing, such as cable pulls and target moves, some issues were observed in handling these events. This patch improves the way these events are handled by increasing the delay waiting for the fabric to settle and also changes the behavior of Link Up to break the CRQ to ensure everything gets cleaned up properly on the VIOS. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18ibmvfc: Delay NPIV login retry and add retriesBrian King
commit 1c41fa8288277e76785acb50f52bb2f39509f903 upstream. Adds a delay prior to retrying a failed NPIV login. This fixes a scenario if the backing fibre channel adapter is getting reset due to an EEH event, NPIV login will fail. Currently, ibmvfc retries three times very quickly, resets the CRQ and tries one more time. If the adapter is getting reset due to EEH, this isn't enough time. This adds a delay prior to retrying a failed NPIV login and also increments the number of retries. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18ath9k: enable RXing of beacons on STA/IBSSLuis R. Rodriguez
commit ffb826767bffda61426d964a8fc24a216a14b0bd upstream. This enables beacons to come through on STA/IBSS. It should fix sporadic connection issues. Right now mac80211 expect beacons so give it beacons. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18mvsas: increase port type detection delay to suit Seagate's 10k6 drive ↵Reinhard Nissl
ST3450856SS 0003 commit ddccf307a3599e452804e228d8ed30fba578923e upstream. I increased the delay step by step until loading of mvsas reliably detected the drive 200 times in sequence. A much better approach would be to monitor the hardware for some flag which indicates that port detection has finished, but I do not have any hardware documentation. Signed-off-by: Reinhard Nissl <rnissl@gmx.de> Cc: Ke Wei <kewei@marvell.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18HID: fix error condition propagation in hid-sony driverJiri Kosina
commit 4dfdc46468a142216b284eea66040f49df3f7191 upstream. sony_set_operational() only propagates return value from usb_control_msg(), which returns negative on error and number of transferred bytes otherwise. Reported-by: Marcin Tolysz <tolysz@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18USB: storage: recognizing and enabling Nokia 5200 cell phoesPaulo Afonso Graner Fessel
commit b8d23491f127aa0cd1863bd6cb58e771c558b762 upstream. This patch corrects the issue when one connects a Nokia 5200 cell phone in data storage mode. If one uses an unpatched unusual_devs.h, the following messages appear on /var/log/messages: Dec 12 01:03:24 alberich kernel: usb 4-2: new full speed USB device using uhci_hcd and address 3 Dec 12 01:03:25 alberich kernel: usb 4-2: configuration #1 chosen from 1 choice Dec 12 01:03:25 alberich kernel: scsi10 : SCSI emulation for USB Mass Storage devices Dec 12 01:03:25 alberich kernel: usb 4-2: New USB device found, idVendor=0421, idProduct=04bd Dec 12 01:03:25 alberich kernel: usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Dec 12 01:03:25 alberich kernel: usb 4-2: Product: Nokia 5200 Dec 12 01:03:25 alberich kernel: usb 4-2: Manufacturer: Nokia Dec 12 01:03:25 alberich kernel: usb 4-2: SerialNumber: 353930018354523 Dec 12 01:03:25 alberich kernel: usbcore: registered new interface driver ub Dec 12 01:03:30 alberich kernel: scsi 10:0:0:0: Direct-Access Nokia Nokia 5200 0000 PQ: 0 AN SI: 4 Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] 3985409 512-byte hardware sectors (2041 MB) Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Write Protect is off Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Assuming drive cache: write through Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] 3985409 512-byte hardware sectors (2041 MB) Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Write Protect is off Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Assuming drive cache: write through Dec 12 01:03:30 alberich kernel: sdg: sdg1 Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Attached SCSI removable disk Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: Attached scsi generic sg9 type 0 Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Sense Key : No Sense [current] Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Add. Sense: No additional sense information Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Sense Key : No Sense [current] Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Add. Sense: No additional sense information Dec 12 01:03:30 alberich kernel: sd 10:0:0:0: [sdg] Sense Key : No Sense [current] (...) The MicroSD card in the phone remains inaccessible and finally the cell phone turns itself off. The patch solves this problem and makes the cell phone fully accessible: [root@alberich kernel-linus-2.6.27.5-1mdv]# df -h Sist. Arq. Tam Usad Disp Uso% Montado em /dev/sda6 31G 5,2G 26G 17% / /dev/sda1 92M 27M 61M 31% /boot /dev/mapper/homevg-homelv 240G 237G 3,5G 99% /home /dev/sda3 21G 7,9G 13G 40% /mnt/windows /dev/sdg1 2,0G 287M 1,7G 15% /media/disk <-------- I've found necessary to use the FL_US_CAPACITY_FIX switch, as without it the cell phone is recognized but it went berserk when performing low-level functions on it (a fdisk -l /dev/uba for example). lsusb -v output follows: Bus 004 Device 004: ID 0421:04bd Nokia Mobile Phones Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0421 Nokia Mobile Phones idProduct 0x04bd bcdDevice 6.03 iManufacturer 1 Nokia iProduct 2 Nokia 5200 iSerial 3 353930018354523 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0001 Self Powered Signed-off-by: Paulo Afonso Graner Fessel <pfessel@gmail.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18USB: storage: extend unusual range for 067b:3507Oliver Neukum
commit b16363991414a6025beb7269f9c1dd294f9b241f upstream. This device has been released in a new revision which is still buggy. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18USB: another unusual_devs entry for another bad Argosy storage deviceNguyen Anh Quynh
commit e2673b28911a43257265523e3672861be6e44093 upstream. I have another Argosy USB storage device, which has the same problem with the Argosy USB storage device already fixed in 2.6.27.7. But this device has another product ID (840:84), so this patch adds a new entry into unusual_devs to fix the mount problem. I enclose here two patches: one against 2.6.27.8, and another against the latest linus-git tree. The information about the Argosy device is like below: #lsusb -v -d 840:84 Bus 005 Device 005: ID 0840:0084 Argosy Research, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0840 Argosy Research, Inc. idProduct 0x0084 bcdDevice 0.01 iManufacturer 1 Generic iProduct 2 USB 2.0 Storage Device iSerial 3 8400000000002549 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk (Zip) iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Before the patch, dmesg returns a lot of information like below (my dmesg is overflown): .... [ 138.833390] sd 7:0:0:0: [sdb] Add. Sense: No additional sense information [ 138.877631] sd 7:0:0:0: [sdb] Sense Key : No Sense [current] [ 138.877643] sd 7:0:0:0: [sdb] Add. Sense: No additional sense information [ 138.921906] sd 7:0:0:0: [sdb] Sense Key : No Sense [current] [ 138.921923] sd 7:0:0:0: [sdb] Add. Sense: No additional sense information .... After the fix, dmesg returns below information: .... usb 5-1: new high speed USB device using ehci_hcd and address 5 usb 5-1: configuration #1 chosen from 1 choice scsi7 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 5 usb-storage: waiting for device to settle before scanning usb-storage: device scan complete scsi 7:0:0:0: Direct-Access HTS54808 0M9AT00 MG4O PQ: 0 ANSI: 0 sd 7:0:0:0: [sdb] 156301488 512-byte hardware sectors (80026 MB) sd 7:0:0:0: [sdb] Write Protect is off sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00 sd 7:0:0:0: [sdb] Assuming drive cache: write through sd 7:0:0:0: [sdb] 156301488 512-byte hardware sectors (80026 MB) sd 7:0:0:0: [sdb] Write Protect is off sd 7:0:0:0: [sdb] Mode Sense: 03 00 00 00 sd 7:0:0:0: [sdb] Assuming drive cache: write through sdb: sdb1 sd 7:0:0:0: [sdb] Attached SCSI disk sd 7:0:0:0: Attached scsi generic sg1 type 0 kjournald starting. Commit interval 5 seconds EXT3 FS on sdb1, internal journal EXT3-fs: recovery complete. EXT3-fs: mounted filesystem with ordered data mode. Cc: Kuniyasu Suzaki <k.suzaki@aist.go.jp> Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18System call wrappers part 26Heiko Carstens
commit c4ea37c26a691ad0b7e86aa5884aab27830e95c9 upstream. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18USB: unusual_devs.h additions for Pentax K10DDaniel Drake
commit e3f47f89a57ef115755184a8b3f03a47ee227418 upstream. Jaak Ristioja reported problems with his Pentax K10D camera: https://bugs.gentoo.org/show_bug.cgi?id=250406 /proc/bus/usb/devices: T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0a17 ProdID=006e Rev= 1.00 S: Manufacturer=PENTAX Corporation S: Product=K10D C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 64 Ivl=100ms The number of reported sectors is off-by-one. Signed-off-by: Daniel Drake <dsd@gentoo.org> Cc: Kadianakis George <desnacked@gmail.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18USB: isp1760: Fix probe in PCI glue codeKarl Bongers
commit 6013bbbab0dcbc43bcf9dd70beeab2a0b1ec5ea7 upstream. Contains fixes so probe on x86 PCI runs, apparently I'm first to try this. Several fixes to memory access to probe host scratch register. Previously would bug check on chip_addr var used uninitialized. Scratch reg write failed in one instance due to 16-bit initial access mode, so added "& 0x0000ffff" to the readl as fix. Includes some general cleanup - remove global vars, organize memory map resource use. Signed-off-by: Karl Bongers <kbongers@jged.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18USB: isp1760: use a specific PLX bridge instead of any bdridgeSebastian Andrzej Siewior
commit 6c0735687d37e25a65866823881bcbf39a6a023f upstream. this driver can't handle (of course) any brdige class devices. So we now are just active on one specific bridge which should be only the isp1761 chip behind a PLX bridge. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Karl Bongers <kblists08@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18ioat: fix self test for multi-channel caseDan Williams
commit b9bdcbba010c2e49c8f837ea7a49fe006b636f41 upstream. In the multiple device case we need to re-arm the completion and protect against concurrent self-tests. The printk from the test callback is removed as it can arbitrarily delay completion of the test. Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18SCSI: aha152x_cs: Fix regression that keeps driver from using shared interruptsLarry Finger
commit 58607b30fc0f2230a189500112c7a7cca02804cf upstream. At some point since 2.6.22, the aha152x_cs driver stopped working and started erring on load with the following messages: kernel: pcmcia: request for exclusive IRQ could not be fulfilled. kernel: pcmcia: the driver needs updating to supported shared IRQ lines. With the following change, the driver works with shared IRQs. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18md: fix bitmap-on-external-file bug.NeilBrown
commit 538452700d95480c16e7aa6b10ff77cd937d33f4 upstream. commit a2ed9615e3222645007fc19991aedf30eed3ecfd fixed a bug with 'internal' bitmaps, but in the process broke 'in a file' bitmaps. So they are broken in 2.6.28 This fixes it, and needs to go in 2.6.28-stable. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18dm log: fix dm_io_client leak on error pathsTakahiro Yasui
commit c7a2bd19b7c1e0bd2c7604c53d2583e91e536948 upstream. In create_log_context function, dm_io_client_destroy function needs to be called, when memory allocation of disk_header, sync_bits and recovering_bits failed, but dm_io_client_destroy is not called. Signed-off-by: Takahiro Yasui <tyasui@redhat.com> Acked-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18dm raid1: fix error countJonathan Brassow
commit d460c65a6a9ec9e0d284864ec3a9a2d1b73f0e43 upstream. Always increase the error count when I/O on a leg of a mirror fails. The error count is used to decide whether to select an alternative mirror leg. If the target doesn't use the "handle_errors" feature, the error count is not updated and the bio can get requeued forever by the read callback. Fix it by increasing error_count before the handle_errors feature checking. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18USB: emi26: fix oops on loadMarcin Slusarz
commit 327d74f6b65ddc8a042c43c11fdd4be0bb354668 upstream. Fix oops introduced by commit ae93a55bf948753de0bb8e43fa9c027f786abb05 (emi26: use request_firmware()): usb 1-1: new full speed USB device using uhci_hcd and address 2 usb 1-1: configuration #1 chosen from 1 choice emi26 - firmware loader 1-1:1.0: emi26_probe start usb 1-1: firmware: requesting emi26/loader.fw usb 1-1: firmware: requesting emi26/bitstream.fw usb 1-1: firmware: requesting emi26/firmware.fw usb 1-1: emi26_set_reset - 1 usb 1-1: emi26_set_reset - 0 BUG: unable to handle kernel NULL pointer dereference at 00000000 IP: [<f80dc487>] emi26_probe+0x2f7/0x620 [emi26] *pde = 00000000 Oops: 0000 [#1] SMP last sysfs file: /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/firmware/1-1/loading Modules linked in: emi26(+) ipv6 cpufreq_ondemand coretemp arc4 ecb iwl3945 irtty_sir sir_dev nsc_ircc ehci_hcd uhci_hcd mac80211 irda usbcore snd_hda_intel thinkpad_acpi rfkill hwmon led_class e1000e snd_pcm cfg80211 snd_timer crc_ccitt snd snd_page_alloc aes_generic Pid: 5082, comm: modprobe Not tainted (2.6.28 #2) 17023QG EIP: 0060:[<f80dc487>] EFLAGS: 00010206 CPU: 0 EIP is at emi26_probe+0x2f7/0x620 [emi26] EAX: 0000015c EBX: 00000000 ECX: c1ffd9c0 EDX: 00000000 ESI: 0000015c EDI: f6bb215c EBP: f6bb0400 ESP: f00ebcfc DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process modprobe (pid: 5082, ti=f00ea000 task=f5c7c700 task.ti=f00ea000) Stack: 0000015c 000000a5 f6a67cb8 f80dc7e0 c01c6262 fbef2986 f6bb2000 00008fe0 0000015c f715f748 f715f740 f715f738 f715f748 f6a67c00 f80dd040 f80dcfc0 f6bb0400 fbacb290 f6a67c94 fbae0160 c01c70bf 00000000 f6a67c1c 00000000 Call Trace: [<c01c6262>] sysfs_add_one+0x12/0x50 [<fbacb290>] usb_probe_interface+0xa0/0x140 [usbcore] [<c01c70bf>] sysfs_create_link+0xf/0x20 [<c02dead2>] driver_probe_device+0x82/0x180 [<fbac9eeb>] usb_match_id+0x3b/0x50 [usbcore] [<c02dec4e>] __driver_attach+0x7e/0x80 [<c02de27a>] bus_for_each_dev+0x3a/0x60 [<c02de956>] driver_attach+0x16/0x20 [<c02debd0>] __driver_attach+0x0/0x80 [<c02de7b1>] bus_add_driver+0x1a1/0x220 [<c02dee4d>] driver_register+0x4d/0x120 [<c024e622>] idr_get_empty_slot+0xf2/0x290 [<fbacab71>] usb_register_driver+0x81/0x100 [usbcore] [<f806c000>] emi26_init+0x0/0x14 [emi26] [<c0101126>] do_one_initcall+0x36/0x1b0 [<c01c5e70>] sysfs_ilookup_test+0x0/0x10 [<c0197a61>] ifind+0x31/0x90 [<c01c6229>] __sysfs_add_one+0x59/0x80 [<c01c64e4>] sysfs_addrm_finish+0x14/0x1c0 [<c0175ca3>] __vunmap+0xa3/0xd0 [<c014b854>] load_module+0x1544/0x1640 [<c014b9d7>] sys_init_module+0x87/0x1b0 [<c0187f41>] sys_read+0x41/0x70 [<c01032a5>] sysenter_do_call+0x12/0x21 [<c03d0000>] wait_for_common+0x40/0x110 Code: 66 c1 e8 08 66 09 d0 75 a5 31 d2 89 e8 e8 72 fc ff ff 85 c0 0f 88 9a 02 00 00 b8 fa 00 00 00 e8 30 46 05 c8 8b 74 24 28 8b 5e 04 <8b> 03 89 44 24 1c 0f c8 89 44 24 1c 0f b7 4b 04 c7 44 24 20 00 EIP: [<f80dc487>] emi26_probe+0x2f7/0x620 [emi26] SS:ESP 0068:f00ebcfc ---[ end trace 2eefa13825431230 ]--- After the last "package" of firmware data is sent to the device, we dereference NULL pointer (on access to rec->addr). Fix it. Reported--by: David Flatz <david@upcs.at> Tested-by: David Flatz <david@upcs.at> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-18SCSI: eata: fix the data buffer accessors conversion regressionFUJITA Tomonori
commit 20c09df7eb9c92a40e0ecf654b6e8f14c8583b9e upstream. This fixes the regression introduced by the commit 58e2a02eb18393e76a469580fedf7caec190eb5e (eata: convert to use the data buffer accessors), reported: http://marc.info/?t=122987621300006&r=1&w=2 - fix DMA_NONE handling in map_dma() - this driver can't use scsi_dma_map since host->shost_gendev.parent is not set properly (it uses scsi_register). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reported-by: Arthur Marsh <arthur.marsh@internode.on.net> Tested-by: Arthur Marsh <arthur.marsh@internode.on.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>