[PPPoE]: move lock_sock() in pppoe_sendmsg() to the right location
and the last one for now: Acquire the sock lock in pppoe_sendmsg()
before accessing the sock - and in particular avoid releasing the lock
even though it hasn't been acquired.
Signed-off-by: Florian Zumbiehl <florz@florz.de> Signed-off-by: David S. Miller <davem@davemloft.net>
[PPPoX/E]: return ENOTTY on unknown ioctl requests
here another patch for the PPPoX/E code that makes sure that ENOTTY is
returned for unknown ioctl requests rather than 0 (and removes another
unneeded initializer which I didn't bother creating a separate patch for).
Signed-off-by: Florian Zumbiehl <florz@florz.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Johnson [Tue, 31 Jul 2007 00:19:31 +0000 (17:19 -0700)]
[IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses.
ipv6_addr_type() doesn't check for 'Unique Local IPv6 Unicast
Addresses' (RFC4193) and returns IPV6_ADDR_RESERVED for that range.
SCTP uses this function and will fail bind() and connect() calls that
use RFC4193 addresses, SCTP will also ignore inbound connections from
RFC4193 addresses if listening on IPV6_ADDR_ANY.
There may be other users of ipv6_addr_type() that could also have
problems.
Signed-off-by: Dave Johnson <djohnson@sw.starentnetworks.com> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Fix the check in prio_tune() to see if sch->parent is TC_H_ROOT instead of
sch->handle to load or reject the qdisc for multiqueue devices.
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Tue, 31 Jul 2007 00:11:50 +0000 (17:11 -0700)]
[NET]: Fix sch_api to properly set sch->parent on the root.
Fix sch_api to correctly set sch->parent for both ingress and egress
qdiscs in qdisc_create().
Signed-off-by: Patrick McHardy <trash@kaber.net> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fix handling of empty or completely non-matching filter chains. In
that case -1 is returned and tcf_result is uninitialized, the
qdisc should fall back to default classification in that case.
Noticed by PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Tue, 31 Jul 2007 00:05:49 +0000 (17:05 -0700)]
[IPV6]: Remove circular dependency on if_inet6.h
net/if_inet6.h includes linux/ipv6.h which also tries to include
net/if_inet6.h. Since the latter only needs it for forward
declarations, we can fix this by adding the declarations.
A number of files are implicitly including net/if_inet6.h through
linux/ipv6.h. They also use net/ipv6.h so this patch includes
net/if_inet6.h there.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Tue, 31 Jul 2007 00:04:52 +0000 (17:04 -0700)]
[IPV4/IPV6]: Fail registration if inet device construction fails
Now that netdev notifications can fail, we can use this to signal
errors during registration for IPv4/IPv6. In particular, if we
fail to allocate memory for the inet device, we can fail the netdev
registration.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Tue, 31 Jul 2007 00:03:38 +0000 (17:03 -0700)]
[NET]: Allow netdev REGISTER/CHANGENAME events to fail
This patch adds code to allow errors to be passed up from event
handlers of NETDEV_REGISTER and NETDEV_CHANGENAME. It also adds
the notifier_from_errno/notifier_to_errnor helpers to pass the
errno value up to the notifier caller.
If an error is detected when a device is registered, it causes
that operation to fail. A NETDEV_UNREGISTER will be sent to
all event handlers.
Similarly if NETDEV_CHANGENAME fails the original name is restored
and a new NETDEV_CHANGENAME event is sent.
As such all event handlers must be idempotent with respect to
these events.
When an event handler is registered NETDEV_REGISTER events are
sent for all devices currently registered. Should any of them
fail, we will send NETDEV_GOING_DOWN/NETDEV_DOWN/NETDEV_UNREGISTER
events to that handler for the devices which have already been
registered with it. The handler registration itself will fail.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 30 Jul 2007 23:35:46 +0000 (16:35 -0700)]
[NET]: Take dev_base_lock when moving device name hash list entry
When we added name-based hashing the dev_base_lock was designated as the
lock to take when changing the name hash list. Unfortunately, because
it was a preexisting lock that just happened to be taken in the right
spots we neglected to take it in dev_change_name.
The race can affect calles of __dev_get_by_name that do so without taking
the RTNL. They may end up walking down the wrong hash chain and end up
missing the device that they're looking for.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 30 Jul 2007 23:29:40 +0000 (16:29 -0700)]
[NET]: Call uninit if necessary in register_netdevice
This patch makes register_netdevice call dev->uninit if the regsitration
fails after dev->init has completed successfully. Very few drivers use
the init/uninit calls but at least one (drivers/net/wan/sealevel.c) may
leak without this change.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Sun, 29 Jul 2007 07:18:23 +0000 (00:18 -0700)]
[BLUETOOTH] l2cap: don't mangle cmd.len
Since nobody uses it after we convert it to host-endian,
no need to do that at all. At that point l2cap is endian-clean.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Sun, 29 Jul 2007 07:17:25 +0000 (00:17 -0700)]
[BLUETOOTH]: pass (host-endian) cmd length as explicit argument to l2cap_conf_req()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Sun, 29 Jul 2007 07:16:36 +0000 (00:16 -0700)]
[BLUETOOTH] l2cap: endianness annotations
no code changes, just documenting existing types
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Sun, 29 Jul 2007 07:15:18 +0000 (00:15 -0700)]
[BLUETOOTH]: Fix endianness bug in l2cap_sock_listen()
We loop through psm values, calling __l2cap_get_sock_by_addr(psm, ...)
until we get NULL; then we set ->psm of our socket to htobs(psm).
IOW, we find unused psm value and put it into our socket. So far, so
good, but... __l2cap_get_sock_by_addr() compares its argument with
->psm of sockets. IOW, the entire thing works correctly only on
little-endian. On big-endian we'll get "no socket with such psm"
on the first iteration, since we won't find a socket with ->psm == 0x1001.
We will happily conclude that 0x1001 is unused and slap htobs(0x1001)
(i.e. 0x110) into ->psm of our socket. Of course, the next time around
the same thing will repeat and we'll just get a fsckload of sockets
with the same ->psm assigned.
Fix: pass htobs(psm) to __l2cap_get_sock_by_addr() there. All other
callers are already passing little-endian values and all places that
store something in ->psm are storing little-endian.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro pointed out that dma_memcpy_to_kernel_iovec() really was
unreachable and thus unused. The code originally was there to support
in-kernel dma needs, but since it remains unused, we'll pull it out.
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
if printbuf allocation or tipc_node_attach_link() fails, invalid
references to the link are left in the associated node and bearer
structures.
Fix by allocating printbuf early and moving timer initialization
and the addition of the new link to the b_ptr->links list after
tipc_node_attach_link() succeeded.
Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Thu, 26 Jul 2007 07:03:29 +0000 (00:03 -0700)]
[NET]: kernel-doc fixes
Fix kernel-doc omissions in net/:
Warning(linux-2.6.23-rc1//net/core/dev.c:2728): No description found for parameter 'addr'
Warning(linux-2.6.23-rc1//net/core/dev.c:2752): No description found for parameter 'addr'
Warning(linux-2.6.23-rc1//net/core/dev.c:3839): No description found for parameter 'net_dma'
Warning(linux-2.6.23-rc1//net/core/dev.c:3877): No description found for parameter 'state'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Change HTCP to use measured RTT rather than smooth RTT.
Srtt is computed using the TCP receive timestamp
options, so it is vulnerable to hostile receivers. To avoid any problems
this might cause use the measured RTT instead.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
[TCP]: cubic - eliminate use of receive time stamp
Remove use of received timestamp option value from RTT calculation in Cubic.
A hostile receiver may be returning a larger timestamp option than the original
value. This would cause the sender to believe the malevolent receiver had
a larger RTT and because Cubic tries to provide some RTT friendliness, the
sender would then favor the liar.
Instead, use the jiffie resolutionRTT value already computed and
passed back after ack.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
[TCP]: congestion control API pass RTT in microseconds
This patch changes the API for the callback that is done after an ACK is
received. It solves a couple of issues:
* Some congestion controls want higher resolution value of RTT
(controlled by TCP_CONG_RTT_SAMPLE flag). These don't really want a ktime, but
all compute a RTT in microseconds.
* Other congestion control could use RTT at jiffies resolution.
To keep API consistent the units should be the same for both cases, just the
resolution should change.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23:
sh: Fix fs.h removal from mm.h regressions.
sh: fix get_wchan() for SH kernels without framepointers
sh: arch/sh/boot - fix shell usage
rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts.
sh: remove support for sh7300 and solution engine 7300
sh: Add sh to the CC_OPTIMIZE_FOR_SIZE dependencies.
sh: Kill off virt_to_bus()/bus_to_virt().
sh: sh-sci - fix SH7708 support
sh: Restrict DSP support to specific CPUs.
sh: Silence sq compile warning on sh4 nommu.
sh: Kill the rest of the SE73180 cruft.
sh: remove support for sh73180 and solution engine 73180
sh: remove old broken pint code
sh: Reclaim beginning of P3 space for vmalloc area.
sh: Fix Dreamcast DMA issues.
sh: Add kmap_coherent()/kunmap_coherent() interface for SH-4.
Paul Mundt [Tue, 31 Jul 2007 04:07:37 +0000 (13:07 +0900)]
sh64: Fix irq_intc build failure.
Needs interrupt.h:
CC arch/sh64/kernel/irq_intc.o
arch/sh64/kernel/irq_intc.c: In function 'make_intc_irq':
arch/sh64/kernel/irq_intc.c:179: error: implicit declaration of function 'disable_irq_nosync'
make[1]: *** [arch/sh64/kernel/irq_intc.o] Error 1
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c
PATCH kernel 2.6.22] PCMCIA-NETDEV : modify smc91c92_cs.c to become SMP safe
S2io: Increment received packet count correctly
S2io: Fix crash when resetting adapter
S2io: Mask spurious interrupts
S2IO: Implementing review comments from old patches
S2IO: Checking for the return value of pci map function
S2IO: Removing MSI support from driver
S2IO: Removing 3 buffer mode support from the driver
netxen: drop redudant spinlock
netxen: Fix interrupt handling for multiport adapters
netxen: re-init station address after h/w init
tulip: Remove tulip maintainer
forcedeth: mac address correct
gfar: Fix modpost warning
lib8390: comment on locking by Alan Cox
Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/ipath: Workaround problem of errormask register being overwritten
IB/ipath: Fix some issues with buffer cancel and sendctrl register update
IB/ipath: Use faster put_tid_2 routine after initialization
IB/ipath: Remove unsafe fastrcvint code from interrupt handler
IB/ehca: Move extern declarations from .c files to .h files
IB/mlx4: Whitespace fix
IB/ehca: Fix include order to better match kernel style
mlx4_core: Remove kfree() in mlx4_mr_alloc() error flow
RDMA/amso1100: Initialize the wait_queue_head_t in the c2_qp structure
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
modules: better error messages when modules fail to load due to a sysfs problem.
kobject: update documentation
kset: kernel-doc cleanups
driver core: revert "device" link creation check
stable_api_nonsense.txt: Disambiguate the use of "this" by using "that" to refer to the syscall interface
Fix Doc/sysfs-rules typos
kernel-doc fixes for PCI and drivers/base/
kobject: put kobject_actions in kobject.h
kobject: fix link error when CONFIG_HOTPLUG is disabled
HOWTO: sync Japanese HOWTO
HOWTO: adjust translation header of Japanese stable_api_nonsense.txt
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: "sparse" cleanups for usb gadgets
usb-serial: Fix edgeport regression on non-EPiC devices
USB: more pxa2xx_udc dead code removal
USB: NIKON D50 is an unusual device
USB: drivers/usb/serial/sierra.c: make 3 functions static
USB: fix BUG: sleeping function called from invalid context at /home/jeremy/hg/xen/paravirt/linux/drivers/usb/core/urb.c:524, in_atomic():1, irqs_disabled():0
USB: mct_u232: Convert to proper speed handling API
digi_acceleport: Drag the driver kicking and screaming into coding style
cp2101: Remove broken termios optimisation, use proper speed API
USB: Fix a bug in usb_start_wait_urb
USB: fix scatterlist PIO case (IOMMU)
USB: fix usb_serial_suspend(): buggy code
USB: yet another quirky device
USB: Add CanonScan LiDE30 to the quirk list
USB: even more quirks
USB: usb.h kernel-doc additions
USB: more quirky devices
USB: Don't let usb-storage steal Blackberry Pearl
USB: devices misc: Trivial patch to build the IOWARRIOR when it is selected in Kconfig
Commit 2ee97caf0a6602f749ddbfdb1449e383e1212707 introduced an extra
check on when to create the "device" symlink. Unfortunately, this
breaks input, so let's revert to the old behaviour.
Randy Dunlap [Tue, 24 Jul 2007 04:42:11 +0000 (21:42 -0700)]
kernel-doc fixes for PCI and drivers/base/
Fix undocumented function parameters in PCI and drivers/base.
Warning(linux-2.6.23-rc1//drivers/pci/pci.c:1526): No description found for parameter 'rq'
Warning(linux-2.6.23-rc1//drivers/base/firmware_class.c:245): No description found for parameter 'bin_attr'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kobject: fix link error when CONFIG_HOTPLUG is disabled
Leaving kobject_actions[] in kobject_uevent.c, but putting it outside
the #ifdef looks indeed like the best solution to me. This way, we
avoid adding #ifdef CONFIG_HOTPLUG into core.c, when all other
functions called do not need such a thing.
David Brownell [Mon, 30 Jul 2007 19:31:07 +0000 (12:31 -0700)]
USB: "sparse" cleanups for usb gadgets
This removes complaints about the gadget stack which are generated by
the currrent "sparse": it doesn't like the fact that zero is the null
pointer. (Last I checked, C guarantees that's correct ...)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adam Kropelin [Sun, 29 Jul 2007 15:03:29 +0000 (11:03 -0400)]
usb-serial: Fix edgeport regression on non-EPiC devices
Fix serious regression on non-EPiC edgeport usb-serial devices. Baud
rate and MCR/LCR registers are not being written on these models due
to apparent copy-n-paste errors introduced with EPiC support.
Failure reported by Nick Pasich <Nick@NickAndBarb.net>.
David Brownell [Sat, 21 Jul 2007 18:43:35 +0000 (11:43 -0700)]
USB: more pxa2xx_udc dead code removal
Remove some more dead code from the pxa2xx_udc driver: support
for a no-longer-undocumented hardware "test mode". Newer chips
made this the default, evidently as the best workaround for deep
silicon bugs. The interest was that this seemed to be the only
way to kick in the (documented!) double buffering capability.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This short patch allows NIKON D50 to be mounted as UMS[unusual device]
on Linux niam 2.6.22-rc7-cfs-v18 #2 PREEMPT Tue Jul 3 22:35:53 EEST
2007 i686 Intel(R) Celeron(R) M processor 1.50GHz GenuineIntel
GNU/Linux,
some previous kernels...
lsusb -v
Bus 001 Device 006: ID 04b0:0409 Nikon Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x04b0 Nikon Corp.
idProduct 0x0409
bcdDevice 1.00
iManufacturer 1 NIKON
iProduct 2 NIKON DSC D50
iSerial 0
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: 0x0001
Self Powered
Signed-off-by: Milinevsky Dmitry <niam.niam@gmail.com> Cc: Oliver Neukum <oliver@neukum.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: <caglar@pardus.org.tr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Tue, 24 Jul 2007 13:13:42 +0000 (15:13 +0200)]
USB: fix BUG: sleeping function called from invalid context at /home/jeremy/hg/xen/paravirt/linux/drivers/usb/core/urb.c:524, in_atomic():1, irqs_disabled():0
Clearly there's a bug in
drivers/usb/serial/usb-serial.c:usb_serial_put(). It shouldn't call
kref_put() while holding a spinlock.
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Thu, 26 Jul 2007 17:57:52 +0000 (18:57 +0100)]
digi_acceleport: Drag the driver kicking and screaming into coding style
- The outbreak of acute bracketitus has been cured
- The belief that brackets should have spaces everywhere likewise
- Various other coding style tweaks
- Use baud rates not Bfoo in the speed setup switch
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 24 Jul 2007 22:23:23 +0000 (18:23 -0400)]
USB: Fix a bug in usb_start_wait_urb
This patch (as941) fixes a bug recently added to the USB synchronous
API. The status of a completed URB must be preserved separately
across a completion callback. Also, the actual_length value isn't
available until after the URB has fully completed.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Sun, 22 Jul 2007 22:13:13 +0000 (15:13 -0700)]
USB: fix scatterlist PIO case (IOMMU)
Update the scatterlist logic so that PIO options are also disabled
when an IOMMU may have coalesced pages during dma_map_sg() ... it's
not just HIGHMEM that can make trouble supporting both PIO and DMA
based host controller drivers.
There also seems to be a cross-arch issue here, with 64bit powerpc
not using an IOMMU define ... and its IOMMU_VMERGE config can always
be overridden on the kernel command line. So this is better, but
still imperfect.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Mon, 23 Jul 2007 06:58:39 +0000 (08:58 +0200)]
USB: fix usb_serial_suspend(): buggy code
Am Montag 23 Juli 2007 schrieb Adrian Bunk:
> Commit ec22559e0b7a05283a3413bda5d177e42c950e23 added the following
> function to drivers/usb/serial/usb-serial.c:
>
[..]
>
> The Coverity checker spotted the inconsequent NULL checking for "serial".
>
> Looking at the code it also doesn't seem to have been intended to always
> return 0.
Coverity is right. The check for NULL is wrongly done and the error
return is lost.
Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Thu, 19 Jul 2007 17:21:37 +0000 (10:21 -0700)]
USB: usb.h kernel-doc additions
Add kernel-doc entries in <linux/usb.h> for:
Warning(linux-2.6.22-git12//include/linux/usb.h:162): No description found for parameter 'intf_assoc'
Warning(linux-2.6.22-git12//include/linux/usb.h:268): No description found for parameter 'intf_assoc[USB_MAXIADS]'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jeremy Katz [Thu, 19 Jul 2007 13:37:42 +0000 (09:37 -0400)]
USB: Don't let usb-storage steal Blackberry Pearl
The Blackberry Pearl can run in two modes; a usb-storage only mode
and a mode that allows access via mass storage and to its database.
The berry_charge module will set the device to dual mode and thus we
should ignore its native mode if that module is built
Signed-off-by: Jeremy Katz <katzj@redhat.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dave Olson [Fri, 20 Jul 2007 21:41:26 +0000 (14:41 -0700)]
IB/ipath: Workaround problem of errormask register being overwritten
On some system hardware, we are seeing moderately common cases of the
chip errormask register being overwritten due to a chip bug in iba6120
that is triggered by a vendor-specific PCIe broadcast message. This
patch merely checks periodically, and corrects it if needed (the
overwrite can cause us to not get error and hardware error
interrupts). Also, make dd->ipath_errormask the one, true canonical
source for kr_errormask, and remove references to ipath_ignorederrs as
it is currently unused.
Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: John Gregor <john.gregor@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Dave Olson [Fri, 20 Jul 2007 21:23:37 +0000 (14:23 -0700)]
IB/ipath: Fix some issues with buffer cancel and sendctrl register update
There was confused use of INFINIPATH_S_PIOBUFAVAILUPD (value) and
IPATH_S_PIOBUFAVAILUPD (bit position). Also, some callers of
ipath_cancel_sends() need kr_sendctrl restored, and some want to do it
later.
Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Dave Olson [Fri, 20 Jul 2007 20:34:02 +0000 (13:34 -0700)]
IB/ipath: Use faster put_tid_2 routine after initialization
At one time the ipath_minrev field was initialized prior to the
ipath_init_iba6120_funcs call, but that is no longer the case, so the
slower put_tid routine was always being used.
Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Dave Olson [Fri, 20 Jul 2007 19:50:55 +0000 (12:50 -0700)]
IB/ipath: Remove unsafe fastrcvint code from interrupt handler
The fastrcvint code's purpose was to avoid reading the interrupt
status if kernel packets were in the receive queue (to reduce
overhead). Because intstatus was not read, we could miss the error
interrupt bit indicating freeze mode, since it only delivers a single
interrupt, even if still pending after intclear is written.
This patch removes that unsafe optimization.
Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c
This patch fixes a potential null dereference bug where we dereference
DEV before a null check. This patch simply moves the dereferencing after
the null check.
Signed-off-by: Micah Gruber <micah.gruber@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
S2IO: Checking for the return value of pci map function
- Checking for the return value of pci map function
- Implemented Francois Romieu's comments on eliminating code duplication
using goto
- Implemented Francois Romieu's comments on using a temporary variable for
accessing statistics structure
Signed-off-by: Veena Parat <veena.parat@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
S2IO: Removing 3 buffer mode support from the driver
- Removed 3 buffer mode support from driver - unused feature
- Incorporated Jeff Garzik's comments on elimination of inline typecasting
- Code cleanup : Removed a few extra spaces
Signed-off-by: Veena Parat <veena.parat@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Some leftover code that makes use of adapter->lock in tx_timeout function,
which resets the interface under this lock. In close() when the workqueue
is flushed, prints the warning about sleeping with interrupts disabled
(when spinlock debug is enabled). The lock was required with private netxen
IOCTLs, which were removed a while ago.
netxen: Fix interrupt handling for multiport adapters
This patch fixes masking of interrupts on multiport adapters. Also disables
interrupts upon ifdown interface. The wrong mask could result in interrupt
flood after interface is down.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This is a workaround for firmware bug with 2nd port of multiport adapter,
where MAC address is reset. Driver just needs to overwrite it with the
value read from PROM.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Ayaz Abdulla [Fri, 27 Jul 2007 03:46:00 +0000 (23:46 -0400)]
forcedeth: mac address correct
In older chipsets, the mac address was stored in reversed order.
However, in newer chipsets, the mac address is in correct order. This
patch takes those newer chipsets into account and does not rely on a
special bit setup by BIOS'.
Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Additional explanation of problems with locking by Alan Cox.
Signed-off-by: Jarek Poplawski <jarkao2@o2.pl> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c
This patch fixes a potential null dereference bug where we dereference
pegasus before a null check. This patch simply moves the dereferencing
after the null check.
Signed-off-by: Micah Gruber <micah.gruber@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Adrian Bunk [Sun, 29 Jul 2007 15:40:48 +0000 (12:40 -0300)]
V4L/DVB (5939): dvb-pll: make struct dvb_pll_fcv1236d static
The fcv1236d support patch was created before the "dvb: remove static
dependencies on dvb-pll" patch was applied, but the fcv1236d patch didn't
get merged until after the fact.
struct dvb_pll_fcv1236d can become static.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Hans Verkuil [Sun, 22 Jul 2007 12:39:56 +0000 (09:39 -0300)]
V4L/DVB (5918): ivtv: fix TV-out VBI handling, only reset on last close.
While decoding (MPEG or YUV) is active or when VBI output is in use, then
do not clear the VBI output of the saa7127. Only after the last user is
gone can we clear it.
This fixes the case where playback was stopped, another channel was chosen
and playback was restarted, while /dev/vbi16 was used to set the WSS
(widescreen) setting. Without this fix the WSS was reset on every stop
instead of just keeping the last value.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
First try polling for the result of a mailbox command, then
switch to a test/sleep loop. Also reduce the sleep time from 10 ms
to 1 ms. Improves the responsiveness of the mailbox handling.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Pausing a decoder followed by a Play command would do nothing. Fixed.
Pausing a decoder running at non-standard speed following by a Continue
would reset the speed to 100%. Fixed.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
s_register was assigning the return code to (unsigned)reg->val, rather than
errCode, which it what it would return. Except reg->val can't be < 0, so it
would never actually return an error.
g_register never actually put the value it read into reg->val.
V4L/DVB (5899): bttv: Fix Viewcast Osprey 440 support
Various gpio and mux settings for the Osprey 440 weren't correct. Fix them
and provide some documentation about how the gpios work.
The osprey eeprom routine wasn't run for the 440, add it. It was also crap,
re-written to be better.
Add the Osprey 440 to the Bt878 ALSA driver's whitelist. Currently the sample
rate is fixed at 32kHz, as the driver doesn't support different rates for
digital input mode, though the card can select the rate from 32, 44.1, or 48
kHz via gpio.
Setting the audio gain via ALSA isn't supported yet; a userspace tool that
programs the X9221 via i2c-dev must be used.
The Bt878 digital audio format isn't programmed correctly for the CS5331A ADC
used, resulting in extremely garbled sound. That is fixed in a followup
patch.