Allow gadget drivers to omit the unbind() method. When they're
statically linked, that's an appropriate memory saving tweak.
Similarly, provide consistent/simpler handling for a should-not-happen
error case: removing a peripheral controller driver when a gadget
driver is still loaded. Such code dates back to early versions of the
first implementation of the gadget API, and has never been triggered.
Includes relevant section annotation fixs for gmidi.c, file_storage.c,
and serial.c; we don't yet have an "init or exit" annotation. Also
some whitespace fixes in gmidi.c (space at EOL, before tabs, etc).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Certain boards seem to like to issue false overcurrent notifications,
for example on ports that don't have anything connected to them. This
looks like a hardware error, at the level of noise to those ports'
overcurrent input signals (or non-debounced VBUS comparators). This
surfaces to users as truly massive amounts of syslog spam from khubd
(which is appropriate for real hardware problems, except for the
volume from multiple ports).
Using this new "ignore_oc" flag helps such systems work more sanely,
by preventing such indications from getting to khubd (and spamming
syslog). The downside is of course that true overcurrent errors will
be masked; they'll appear as spontaneous disconnects, without the
diagnostics that will let users troubleshoot issues like
short-circuited cables. In addition, controllers with no devices
attached will be forced to poll for new devices rather than relying on
interrupts, since each overcurrent event would generate a new
interrupt.
This patch (as826) is essentially a copy of David Brownell's ignore_oc
patch for ehci-hcd, ported to uhci-hcd.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508
When the Nokia E70 Phone is plugged in to the USB port, I get:
end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000
The fix is to add these lines to drivers/usb/storage/unusual_devs.h:
Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added VendorId and ProductId for Huawei E220 USB Modem
Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This prevents the kernel from detecting the virtual cd-drive with the
Windows drivers.
Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This one adds another vendor ID to rtl8150 driver. Please apply.
Signed-off-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When u132-hcd is built, it includes local header ohci.h, which appears
to have been intended only for use by ohci-hcd.
This throws warnings about functions which are defined and not used.
The warnings thrown are because three small functions are implemented in
the header, but not declared 'inline', a rather strange affair.
Since these functions are small, let's go ahead and define them as
'inline', just like the inline functions surrounding them. This makes
things more consistent, and kills the warnings.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added a device specific ioctl function to prevent the disabling of canonical
mode. EINVAL is returned for any TCSETSF ioctl that doesn't have ICANON set.
This patch is for 2.6.17 or later kernels.
When "hwinfo --modem" is executed it opens the funsoft USB serial device and
disables canonical mode. The device is kept this way until hwininfo has
finished probing any modems on a system. The funsoft device expects to be
running in canonical mode. Switching the device to raw mode can cause
incomplete data packets and device timeouts.
Signed-off-by: David Clare <david@funsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this patch adds the Baltech Reader ID to the list of USB IDs in the
CP2101 driver.
From: Johannes Hoelzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this patch:
- converts usblp fully to mutex
- makes sleeping interruptible where EINTR can be returned anyway
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Several drivers have bogus ioctl code that tries unneccessarily to
override the standard processing. In the three cases here the actual code
is not only wrong but also not required as they implement the proper
set_termios method as well.
Remove the junk.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
as David has objected to the patch against the gl620a driver,
here's a patch implementing David' suggestion of removing the incomplete
ifdefed code from the gl620a driver.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
below is a patch for the ftdi_sio driver to include a new device ID for
CCS MachX PIC programmer.
From: Jan Capek <jan@ccsinfo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added the device id (0x413c, 0x8115) for the Dell wireless HSDPA 5500,
which is a rebranded Novatel EU730.
Signed-off-by: Eagle Jones <eagle@newdream.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
in disconnect you set the interface's private data to NULL. In your IO
methods you unconditionally follow the pointer into never never land.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The PhidgetServo causes an Oops when any of its sysfs attributes are read
or written too, making the driver useless.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
[PATCH] Generic HID layer - update MAINTAINERS
input/hid: Supporting more keys from the HUT Consumer Page
[PATCH] Generic HID layer - build: USB_HID should select HID
Linus has changed work queue structure and has not tested it with
connector compiled in, his changes break the build.
Attached patch fixes compilation error.
Patch is against commit 99f5e97181.
Thanks to Toralf Förster for pointing this out.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
The 5906 PHY requires a special register bit to power down and up the
PHY.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hot-plug scripts can call tg3_open() as soon as register_netdev() is
called in tg3_init_one(). We need to call pci_set_drvdata() before
register_netdev(), and netif_carrier_off() needs to be moved to
tg3_open() to avoid race conditions.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tp->link_config.orig_* values must be assigned during
tg3_set_settings() because these values will be used to setup the
link speed during tg3_open(). Without these assignments, the link
speed settings will be all messed by if tg3_set_settings() is called
when the device is down.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Use the configured MAC address instead of the permanent MAC address
for loopback frames.
Update version to 1.5.2.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Length was not calculated correctly if the NVRAM offset is on a non-
aligned offset.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
There was an off-by-one bug in bnx2_tx_avail(). If the tx ring is
completely full, the producer and consumer indices may be apart by
256 even though the ring size is only 255. One entry in the ring is
unused and must be properly accounted for when calculating the number
of available entries. The bug caused the tx ring entries to be
reused by mistake, overwriting active entries, and ultimately causing
it to crash.
This bug rarely occurs because the tx ring is rarely completely full.
We always stop when there is less than MAX_SKB_FRAGS entries available
in the ring.
Thanks to Corey Kovacs <cjk@techma.com> and Andy Gospodarek
<agospoda@redhat.com> for reporting the problem and helping to collect
debug information.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
* master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] longhaul compile fix.
[CPUFREQ] Advise not to use longhaul on VIA C7.
[CPUFREQ] set policy->curfreq on initialization
[CPUFREQ] Trivial cleanup for acpi read/write port in acpi-cpufreq.c
[CPUFREQ] fixes typo in cpufreq.c
"sunkbd_enable(sunkbd, 0);" has no effect. Adding "sunkbd->enabled =
enable" in sunkbd_enable (obvious)
Signed-off-by: Fabrice Knevez <nuxdoors@cegetel.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
The UDMA66 VIA hardware has no controller side cable detect bits we can
use. This patch minimally fixes the problem by reporting unknown in this
case and using drive side detection.
The old drivers/ide code does some additional tricks but those aren't
appropriate now we are in -rc.
Without this update UDMA66 via controllers run slowly. They don't fail so
it's a borderline call whether this is -rc material or not.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
> Thanks for clarifying Bill, and sorry Alan. ata_piix does indeed work
> correctly. The help text is a bit confusing:
>
> config ATA_PIIX
> tristate "Intel PIIX/ICH SATA support"
> depends on PCI
> help
> This option enables support for ICH5/6/7/8 Serial ATA.
> If PATA support was enabled previously, this enables
> support for select Intel PIIX/ICH PATA host controllers.
New help text
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This removes the extra definition of the .error_handler member
in the pata_rz1000 driver.
Signed-off-by: Ira W. Snyder <kernel@irasnyder.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The return value of platform_device_register_simple() should be checked
by IS_ERR().
Cc: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Do not mangle with HOST_CAP while resetting controller. The code is
there for a historical reason. The mangling breaks controller feature
detection and 0 PORTS_IMPL workaround code.
This problem was spotted by Manoj Kasichainula.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Manoj Kasichainula <manoj@io.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Calling sg_init_one() with NULL buf causes oops on certain
configurations. Don't initialize sg in ata_exec_internal() if
DMA_NONE and make the function complain if @buf is NULL when dma_dir
isn't DMA_NONE. While at it, fix comment.
The problem is discovered and initial patch was submitted by Arnd
Bergmann.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Current Broadcom/Serverworks SATA boards (including Apple K2 SATA)
have problems with ATAPI DMA, so it is disabled. ATAPI PIO, ATA PIO,
and ATA DMA continue to work just fine.
Acked-by: Anantha Subramanyam <ananth@broadcom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
piix_init_one() allocates host private data which should be freed by
piix_host_stop(). ich_pata_ops wasn't converted to piix_host_stop()
while merging, leaking 4 bytes on driver detach. Fix it.
This was spotted using Kmemleak by Catalin Marinas.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Catalin Marinas <catalin.marinas@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This updated patch adds the Intel ICH9 IDE mode SATA controller DID's.
Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Acked-by: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
mthca_device_mutex() can be initialized automatically with
DEFINE_MUTEX() rather than explicitly calling mutex_init(). This
saves a bit of text and shrinks the source by a line, so we may as
well do it....
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Add module parameters that enable settting some of the HCA
profile values, such as the number of QPs, CQs, etc.
Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Moni Shoua <monis@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
struct srp_device.fmr_page_mask was unsigned long, which means that
the top part of addresses above 4G was being chopped off on 32-bit
architectures. Of course nothing good happens when data from SRP
targets is DMAed to the wrong place.
Fix this by changing fmr_page_mask to u64, to match the addresses
actually used by IB devices.
Thanks to Brian Cain <Brian.Cain@ge.com> and David McMillen
<davem@systemfabricworks.com> for help diagnosing the bug and testing
the fix.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Asynchronous probe can release memory of a subchannel before
css_get_ssd_info is called. To fix this call css_get_ssd_info
before registering with driver core.
Signed-off-by: Stefan Bader <shbader@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Reboot hangs on LPARs without diag308 support. The reason for this is,
that before the reboot is done, the channel subsystem is shut down.
During the reset on each possible subchannel a "store subchannel" is
done. This operation can end in a program check interruption, if the
specified subchannel set is not implemented by the hardware. During
the reset, currently we do not have a program check handler, which
leads to the described kernel bug. We install now a new program check
handler for the reboot code to fix this problem.
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
sclp_cpi is GPL. Make the module not taint the kernel
Signed-off-by: Christian Borntraeger <cborntra@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Add code to reset all queues for a domain and add missing tasklet_kill
call to ap bus module exit code.
Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>