* fix/hda:
ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecs
ALSA: hda - Add quirk for Gateway T6834c laptop
ALSA: hda_codec: Check for invalid zero connections
On Soundblaster X-FI Titanium with emu20k2 the SIDE and SURROUND
channels were swapped and wrong.
I double checked it with connector colors and creative soundblaster
windows drivers.
So I swapped them to the true order.
Now "speaker-test -c6" and "speaker-test -c8" are working fine.
Signed-off-by: Frank Roth <frashman@freenet.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent rewrite of the codec parser for STAC9872 caused a regression
for some Sony VAIO models that don't give proper pin default configs
by BIOS. Even using model=vaio doesn't work because the pin definitions
are set after the pin overrides.
This patch fixes the pin definitions in patch_stac9872() to be put
in the right place before the pin overrides. Also the patch adds the
new quirk entry for VAIO F/S to have the correct pin default configs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
Gateway T6834c laptops need EAPD always on while the default behavior
for the STAC9205 reference board is to turn it off upon every HP plug.
By using the special "eapd" model, which is first introduced for Gateway
T1616 laptops for this same reason, this peculiarity can be properly
handled.
Signed-off-by: Hao Song <baritono.tux@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
To prevent "Too many connections" message and the error path for some HDMI
codecs (which makes onboard audio unusable), check for invalid zero
connections for CONNECT_LIST verb.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We need to check returning error for pci_register_driver(&joystick_driver)
On failure, we should unregister formerly registered audio drivers
This also fixed the compiler warning :
CC [M] sound/pci/riptide/riptide.o
sound/pci/riptide/riptide.c: In function ‘alsa_card_riptide_init’:
sound/pci/riptide/riptide.c:2200: warning: ignoring return value of ‘__pci_register_driver’, declared with attribute warn_unused_result
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Blue Microphones USB devices have an alternate setting that sends two
channels of data to the computer. Unfortunately, the descriptors of
that altsetting have a wrong channel setting, which means that any
recorded data from such a device has twice the sample rate from what
would be expected.
This patch adds a workaround to ignore that altsetting. Since these
devices have only one actual channel, no data is lost.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
jbd2: fix race between write_metadata_buffer and get_write_access
ext4: Fix ext4_mb_initialize_context() to initialize all fields
ext4: fix null handler of ioctls in no journal mode
ext4: Fix buffer head reference leak in no-journal mode
ext4: Move __ext4_journalled_writepage() to avoid forward declaration
ext4: Fix mmap/truncate race when blocksize < pagesize && !nodellaoc
ext4: Fix mmap/truncate race when blocksize < pagesize && delayed allocation
ext4: Don't look at buffer_heads outside i_size.
ext4: Fix goal inum check in the inode allocator
ext4: fix no journal corruption with locale-gen
ext4: Calculate required journal credits for inserting an extent properly
ext4: Fix truncation of symlinks after failed write
jbd2: Fix a race between checkpointing code and journal_get_write_access()
ext4: Use rcu_barrier() on module unload.
ext4: naturally align struct ext4_allocation_request
ext4: mark several more functions in mballoc.c as noinline
ext4: Fix potential reclaim deadlock when truncating partial block
jbd2: Remove GFP_ATOMIC kmalloc from inside spinlock critical region
ext4: Fix type warning on 64-bit platforms in tracing events header
The function jbd2_journal_write_metadata_buffer() calls
jbd_unlock_bh_state(bh_in) too early; this could potentially allow
another thread to call get_write_access on the buffer head, modify the
data, and dirty it, and allowing the wrong data to be written into the
journal. Fortunately, if we lose this race, the only time this will
actually cause filesystem corruption is if there is a system crash or
other unclean shutdown of the system before the next commit can take
place.
Signed-off-by: dingdinghua <dingdinghua85@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging: stlc45xx: convert config_interface to bss_info_changed, fixing a build error
Staging: comedi: s626: use subvendor:subdevice ids for SAA7146 board
Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME
Staging: prevent rtl8187se from crashing dev_ioctl() in SIOCGIWNAME
Staging: rtl8192su: convert to net_device_ops
Staging: serqt_usb2: declare qt_open static in serqt_usb2
Staging: serqt_usb2: fix qt_close parameters in serqt_usb2
Staging: comedi: jr3_pci.c: add required includes
Staging: meilhaus: add email address to TODO
Staging: rspiusb: use NULL virtual address instead of a bogus one
Staging: vt6655: compile fix
Staging: rt2870: Add USB ID for Sitecom WL-608
JFS hasn't really been supported for a while. It's still maintained,
but saying it's supported is a stretch. Updating my preferred email
address as well.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pavel Roskin pointed out that kmemcheck indicated that
ext4_mb_store_history() was accessing uninitialized values of
ac->ac_tail and ac->ac_buddy leading to garbage in the mballoc
history. Fix this by initializing the entire structure to all zeros
first.
Also, two fields were getting doubly initialized by the caller of
ext4_mb_initialize_context, so remove them for efficiency's sake.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
The EXT4_IOC_GROUP_ADD and EXT4_IOC_GROUP_EXTEND ioctls should not
flush the journal in no_journal mode. Otherwise, running resize2fs on
a mounted no_journal partition triggers the following error messages:
BUG: unable to handle kernel NULL pointer dereference at 00000014
IP: [<c039d282>] _spin_lock+0x8/0x19
*pde = 00000000
Oops: 0002 [#1] SMP
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
We found a problem with buffer head reference leaks when using an ext4
partition without a journal. In particular, calls to ext4_forget() would
not to a brelse() on the input buffer head, which will cause pages they
belong to to not be reclaimable.
Further investigation showed that all places where ext4_journal_forget() and
ext4_journal_revoke() are called are subject to the same problem. The patch
below changes __ext4_journal_forget/__ext4_journal_revoke to do an explicit
release of the buffer head when the journal handle isn't valid.
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Platform_device instance (pd) is not set to NULL in
usb_nop_xceiv_unregister() causing usb_nop_xceiv_register()
to fail during module reinsert.
From: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Babu Ravi <ravibabu@ti.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
This patch (as1262) fixes a bug in usbfs: It refuses to accept
zero-length transfers, and it insists that the buffer pointer be valid
even if there is no data being transferred.
The patch also consolidates a bunch of repetitive access_ok() checks
into a single check, which incidentally fixes the lack of such a check
for Isochronous URBs.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1259b) makes ehci-hcd return the total number of bytes
transferred in urb->actual_length for Isochronous transfers.
Until now, the actual_length value was unaccountably left at 0.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1264) removes a bunch of unnecessary and erroneous stuff
from the option USB-serial driver. Clearly there's no need to verify
that the device pointer stored in the URBs is right or to store the
same pointer over again. After all, the pointer can't change once it
has been set up.
There's also no need to call usb_clear_halt for the IN endpoint
multiple times -- in fact, doing so is an error since every time after
the first there will be active URBs queued for that endpoint. Since
the Clear-Halts don't appear to be needed at all, the patch simply
removes them.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1265) removes an erroneous call to usb_clear_halt from
the cypress_m8 driver. The call isn't valid because it is made from
interrupt context whereas usb_clear_halt is a blocking routine.
Presumably the code has never been executed; if it did it would cause
an oops. So instead treat -EPIPE like any other sort of unexplained
error.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit c9cd06b3d6 (musb_host: refactor
URB giveback) included due to my overlook the change incorrect in the
context of the current kernel -- undo it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
commit b7af0bb ("USB: allow malformed LANGID descriptors") broke support
for devices without string descriptor support.
Reporting string descriptors is optional to USB devices, and a device
lets us know it can't deal with strings by responding to the LANGID
request with a STALL token.
The kernel handled that correctly before b7af0bb came in, but failed
hard if the LANGID was reported but broken. More than that, if a device
was not able to provide string descriptors, the LANGID was retrieved
over and over again at each string read request.
This patch changes the behaviour so that
a) the LANGID is only queried once
b) devices which can't handle string requests are not asked again
c) devices with malformed LANGID values have a sane fallback to 0x0409
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- Updated the id_table with all devices that Sierra Wireless currently
support
- Re-ordered the contents of the id_table for better readability
Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adds USB ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter.
Signed-off-by: Krzysztof Ha³asa <khc@pm.waw.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1263) fixes a mixup that occurred when conflicting
patches for the sierra driver were merged incorrectly. The former
sierra_shutdown routine should have been become sierra_release, not
sierra_disconnect.
The symptom this fixes is an oops when the device file is closed after
a Sierra device has been unplugged (Bugzilla #13675).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Peter Naulls <peter@mushroomnetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add A-Link 3GU device id 1e0e:9200 into option driver. The device
has 4 interfaces, of which 1 is handled by storage and the other 3
by option driver.
The device appears first as CD-only 1e0e:f000 device and must be
switched to 1e0e:9200 mode either by using "eject CD" or
usb_modeswitch.
For the record, the device does not work with generic usbserial
driver (usb disconnect when sending the ATDT command).
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
As reported by David Potts from Arkham Technology, the current driver
works with their hardware on addition of the device ids.
Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit 32ebbe7b6a which filters the
SCSI REZERO command in option_ms based on a SCSI INQUIRY with a vendor
of Option breaks my Option Icon 225 (0af0:6971). This device returns a
vendor of ZCOPTION for the ZeroCD device. The following trivial patch
fixes things for me.
Signed-Off-By: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix USB gadget audio: select SND_PCM, like many other sound
drivers do, to fix build errors:
drivers/built-in.o: In function `f_audio_playback_work':
audio.c:(.text+0x15a3e7): undefined reference to `snd_pcm_kernel_ioctl'
audio.c:(.text+0x15a471): undefined reference to `snd_pcm_lib_write'
drivers/built-in.o: In function `_snd_pcm_hw_param_set':
audio.c:(.text+0x15aca7): undefined reference to `snd_interval_refine'
drivers/built-in.o: In function `gaudio_setup':
(.init.text+0x12adf): undefined reference to `_snd_pcm_hw_params_any'
drivers/built-in.o: In function `gaudio_setup':
(.init.text+0x12b43): undefined reference to `snd_pcm_kernel_ioctl'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
It enhances the driver for FTDI-based USB serial adapters to recognize and
support Northern Digital Inc (NDI) measurement equipment. NDI has been
providing this patch for various kernel flavors for several years and we would
like to see these changes built in to the driver so that our equipement works
without the need for customers to patch the kernel themselves.
The patch makes small modifications to 2 files: ./drivers/usb/serial/ftdi_sio.c
and ./drivers/usb/serial/ftdi_sio.h. It accomplishes 3 things:
1. Define the VID and PIDs to allow the driver to recognize the NDI devices.
2. Map the 19200 baud rate setting to our higher baud rate of 1.2Mb
We would have chosen to map 38400 to the higher rate, similar to what
several other vendors have done, but some of our legacy customers actually
use 38400, therefore we remap 19200 to the higher rate.
3. We set the default transmit latency in the FTDI chip to 1ms for our devices.
Our devices are typically polled at 60Hz and the default ftdi latency
seriously affects turn-around time and results in missed data frames. We
have created a modprobe option that allows this setting to be increased.
This has proven necessary particularly in some virtualized environments.
Signed-off-by: Martin P. Geleynse <mgeleyns@ndigital.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This reverts commit cc71329b3b, so that
Red Hat machines can boot properly. It seems that the Red Hat initrd
code tries to watch the /proc/bus/usb/devices file to monitor usb
devices showing up. While this task is prone to lots of races and does
not show the true state of the system, they seem to like it.
So for now, don't move this option under the EMBEDDED config option.
Cc: Scott James Remnant <scott@canonical.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix usb.h kernel-doc warnings:
Warning(include/linux/usb.h:918): Excess struct/union/enum/typedef member 'nodename' description in 'usb_device_driver'
Warning(include/linux/usb.h:939): No description found for parameter 'nodename'
Warning(include/linux/usb.h:1219): No description found for parameter 'sg'
Warning(include/linux/usb.h:1219): No description found for parameter 'num_sgs'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The reworked Ethernet gadget has an RNDIS interop problem when used
with the CDC subset driver ... e.g. on PXA 2xx and 3xx hardware,
which currently has a hard time talking to MS-Windows hosts.
The issue is that Microsoft requires USB_CLASS_COMM. Fix by tweaking
the CDC subset driver to not switch to USB_CLASS_VENDOR_SPEC if RNDIS
is used in some other device configuration.
[ UPDATED: some "statements" were comma-terminated; fix that. ]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Aric Blumer <aric@sdgsystems.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
It seems an USB device with vendor id 0403 and product code FB80 has an
FTDI serial io chip as well: http://ftdichip.com/Drivers/D2XX.htm
This device in fact is a true random generantor by comsci:
http://comscire.com/Products/R2000KU/
So the following patch should add support for this device if I am
correct. Not tested as I do not own this device (I would like support in
the kernel so that my entropybroker application (which distributes
entrop data (random values) between servers and clients)).
From: Folkert van Heusden <folkert@vanheusden.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The commit 335f8514f2 introduced a
regression which stopped usb consoles from working correctly as a
kernel boot console as well as interactive login device.
The addition of the serial_close() which in turn calls
tty_port_close_start() will change the reference count of port.count
and warn about it. The usb console code had previously incremented
the port.count to indicate it was making use of the device as a
console and the forced change causes a double open on the usb device
which leads to a non obvious kernel oops later on when the tty is
freed.
To fix the problem instead make use of port->console to track if the
port is in fact an active console port to avoid double initialization
of the usb serial device. The port.count is incremented and
decremented only with in the scope of usb_console_setup() for the
purpose of the low level driver initialization.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added descriptions (for WIRELESS_CONTROLLER and MISC) were taken from
the usb-devices script now included in usbutils.
Also sort the classes in the same order as in include/linux/usb/ch9.h
for easier comparison for future updates.
Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes a memory leak in devio.c::processcompl
If writing to user space fails the packet must be discarded, as it
already has been removed from the queue of completed packets.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1257) revises the way ehci-hcd detects STALLs. The
logic is a little peculiar because there's no hardware status bit
specifically meant to indicate a STALL. You just have to guess that a
STALL was received if the BABBLE bit (which is fatal) isn't set and
the transfer stopped before all its retries were used up.
The existing code doesn't do this properly, because it tests for MMF
(Missed MicroFrame) and DBE (Data Buffer Error) before testing the
retry counter. Thus, if a transaction gets either MMF or DBE the
corresponding flag is set and the transaction is retried. If the
second attempt receives a STALL then -EPIPE is the correct return
value. But the existing code would see the MMF or DBE flag instead
and return -EPROTO, -ENOSR, or -ECOMM.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1256) changes ehci-hcd and all the other drivers in the
EHCI family to make use of the new clear_tt_buffer callbacks. When a
Clear-TT-Buffer request is in progress for a QH, the QH is not allowed
to be linked into the async schedule until the request is finished.
At that time, if there are any URBs queued for the QH, it is linked
into the async schedule.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1255) updates the interface for calling
usb_hub_clear_tt_buffer(). Even the name of the function is changed!
When an async URB (i.e., Control or Bulk) going through a high-speed
hub to a non-high-speed device is cancelled or fails, the hub's
Transaction Translator buffer may be left busy still trying to
complete the transaction. The buffer has to be cleared; that's what
usb_hub_clear_tt_buffer() does.
It isn't safe to send any more URBs to the same endpoint until the TT
buffer is fully clear. Therefore the HCD needs to be told when the
Clear-TT-Buffer request has finished. This patch adds a callback
method to struct hc_driver for that purpose, and makes the hub driver
invoke the callback at the proper time.
The patch also changes a couple of names; "hub_tt_kevent" and
"tt.kevent" now look rather antiquated.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>