Stefan Richter [Mon, 2 Apr 2007 00:22:21 +0000 (02:22 +0200)]
ieee1394: eth1394: some conditions are unlikely
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:21:46 +0000 (02:21 +0200)]
ieee1394: eth1394: clean up fragment_overlap
offset > fi->offset + fi->len - 1 == !(offset < fi->offset + fi->len)
offset + len - 1 < fi->offset == !(offset + len > fi->offset)
!(A || B) == (!A && !B)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:20:37 +0000 (02:20 +0200)]
ieee1394: eth1394: don't use alloc_etherdev
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:19:48 +0000 (02:19 +0200)]
ieee1394: eth1394: omit useless set_mac_address callback
We can't reconfigure the MAC address, hence we don't need the callback.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:19:02 +0000 (02:19 +0200)]
ieee1394: eth1394: CONFIG_INET is always defined
because CONFIG_IEEE1394_ETH1394 depends on it.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Tue, 3 Apr 2007 21:55:40 +0000 (23:55 +0200)]
ieee1394: eth1394: allow MTU bigger than 1500
RFC 2734 says: "IP-capable nodes may operate with an MTU size larger
than the default [1500 octets], but the means by which a larger MTU is
configured are beyond the scope of this document."
Allow users to set an MTU bigger than 1500.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Adrian Bunk [Thu, 26 Apr 2007 23:47:32 +0000 (01:47 +0200)]
ieee1394: unexport highlevel_host_reset
highlevel_host_reset no longer has any modular users.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:16:40 +0000 (02:16 +0200)]
ieee1394: eth1394: contain host reset
Call only eth1394's own host reset handler from .tx_timeout, not the
reset hooks of all other IEEE 1394 drivers.
A minor drawback of this patch is that ether1394_host_reset by timeout
is not serialized against ether1394_host_reset by bus reset.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:15:53 +0000 (02:15 +0200)]
ieee1394: eth1394: shorter error messages
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:15:21 +0000 (02:15 +0200)]
ieee1394: eth1394: correct a memset argument
The old argument calculated the correct value in a wrong way.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:14:45 +0000 (02:14 +0200)]
ieee1394: eth1394: refactor .probe and .update
Move common code into an extra function. This implicitly adds a missing
node_info->fifo = CSR1212_INVALID_ADDR_SPACE; to .update.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:13:51 +0000 (02:13 +0200)]
ieee1394: eth1394: .probe and .update may sleep
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 2 Apr 2007 00:12:32 +0000 (02:12 +0200)]
ieee1394: eth1394: coding style
Adjust white space and line wraps. Remove unnecessary parentheses and
braces, unused macros, and some of the more redundant comments.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Jean Delvare [Sun, 1 Apr 2007 08:06:33 +0000 (10:06 +0200)]
ieee1394: eth1394: Move common recv_init code to helper function
There is some common code between ether1394_open and ether1394_add_host
which can be moved to a separate helper function for a slightly smaller
eth1394 driver (-160 bytes on i386.)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 26 Mar 2007 23:36:50 +0000 (01:36 +0200)]
ieee1394: eth1394: don't autoload by hotplug when ohci1394 starts
Until now, ieee1394 put an IP-over-1394 capability entry into each new
host's config ROM. As soon as the controller was initialized --- i.e.
right after modprobe ohci1394 --- this entry triggered a hotplug event
which typically caused auto-loading of eth1394.
This irritated or annoyed many users and distributors. Of course they
could blacklist eth1394, but then ieee1394 wrongly advertized IP-over-
1394 capability to the FireWire bus.
Therefore
- remove the offending kernel config option
IEEE1394_CONFIG_ROM_IP1394,
- let eth1394 add the ROM entry by itself, i.e. only after eth1394 was
loaded.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7793 .
To emulate the behaviour of older kernels, simply add the following to
to /etc/modprobe.conf:
install ohci1394 /sbin/modprobe eth1394; \
/sbin/modprobe --ignore-install ohci1394
Note, autoloading of eth1394 when an _external_ IP-over-1394 capable
device is discovered is _not_ affected by this patch.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 18 Mar 2007 11:23:11 +0000 (12:23 +0100)]
ieee1394: eth1394: reduce excessive function inlining
Shrinks eth1394.ko by about 5%.
Many of these functions have only one caller and are therefore auto-
inlined anyway.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sat, 10 Feb 2007 22:57:57 +0000 (23:57 +0100)]
ieee1394: eth1394: clean up host removal
ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sat, 10 Feb 2007 22:56:38 +0000 (23:56 +0100)]
ieee1394: eth1394: unregister address space in failure case
Warn if hpsb_allocate_and_register_addrspace() failed.
Unregister the address space if something else failed.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 23 Apr 2007 19:27:13 +0000 (21:27 +0200)]
ieee1394: send async streams at S100
The comment says it all. This affects only asynchronous streams sent
via raw1394; the eth1394 driver has own code and needs an own fix.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Milind Arun Choudhary [Wed, 11 Apr 2007 17:54:34 +0000 (23:24 +0530)]
ieee1394: SPIN_LOCK_UNLOCKED cleanup
SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK instead
Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Fri, 30 Mar 2007 17:21:05 +0000 (19:21 +0200)]
ieee1394: nodemgr: unify some error messages
Shrinks object file size a little bit.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Fri, 30 Mar 2007 17:19:55 +0000 (19:19 +0200)]
ieee1394: nodemgr: less noise in dmesg
Everytime when eth1394 or a libraw1394 client updates the configuration
ROM, a certain sysfs attribute cannot be added since it already exists.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sat, 17 Mar 2007 23:55:15 +0000 (00:55 +0100)]
ieee1394: unroll a weird macro
This is a coding style touch-up for ieee1394's handle_incoming_packet().
A preprocessor macro contained hardwired variable names and, even worse,
the 'break' keyword. This macro is now unrolled and removed.
Also, all 'break's which had the effect of a return are replaced by
return. And a FIXME comment is brought up to date.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Andrew Morton [Thu, 26 Apr 2007 07:16:04 +0000 (00:16 -0700)]
ieee1394: iso.c needs sched.h
alpha:
drivers/ieee1394/iso.c: In function 'hpsb_iso_xmit_sync':
drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct'
drivers/ieee1394/iso.c:440: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/iso.c:440: error: (Each undeclared identifier is reported only once
drivers/ieee1394/iso.c:440: error: for each function it appears in.)
drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'signal_pending'
drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct'
drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'schedule'
drivers/ieee1394/iso.c: In function 'hpsb_iso_wake':
drivers/ieee1394/iso.c:562: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
Stefan Richter [Tue, 10 Apr 2007 00:39:07 +0000 (02:39 +0200)]
ieee1394: some more includes
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Torsten Kaiser [Mon, 9 Apr 2007 19:03:15 +0000 (21:03 +0200)]
ieee1394: ieee1394_transactions needs sched.h
drivers/ieee1394/ieee1394_transactions.c fails for me if CONFIG_SMP=n
gcc complains:
CC drivers/ieee1394/ieee1394_transactions.o
drivers/ieee1394/ieee1394_transactions.c: In function 'hpsb_get_tlabel':
drivers/ieee1394/ieee1394_transactions.c:183: error:
'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/ieee1394_transactions.c:183: error: (Each undeclared
identifier is reported only once
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added comment)
Randy Dunlap [Tue, 3 Apr 2007 20:00:47 +0000 (13:00 -0700)]
ieee1394: ieee1394_core printk format
Fix printk format string:
drivers/ieee1394/ieee1394_core.c:702: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 25 Mar 2007 20:22:40 +0000 (22:22 +0200)]
ieee1394: remove usage of skb_queue as packet queue
This considerably reduces the memory requirements for a packet and
eliminates ieee1394's dependency on CONFIG_NET.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Tue, 13 Mar 2007 23:29:20 +0000 (00:29 +0100)]
ieee1394: csr1212: log if devices have CRC errors in their ROM
This will point out firmware bugs.
I tested with 11 SBP-2 devices and one OS X PC and got these errors from
two old CD-RWs only.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Tue, 13 Mar 2007 23:28:36 +0000 (00:28 +0100)]
ieee1394: csr1212: more sensible names for jump targets
Code beneath two labels called "fail" is actually also reached in case
of success.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Tue, 13 Mar 2007 23:27:46 +0000 (00:27 +0100)]
ieee1394: csr1212: warn on unreachable code
We want bugs to show themselves.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Tue, 13 Mar 2007 23:27:18 +0000 (00:27 +0100)]
ieee1394: shrink csr1212_new_string_descriptor_leaf
Make unnecessarily generic code specific and thus simpler.
Shrink a lookup table from 128 to 16 bytes.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Tue, 13 Mar 2007 23:26:38 +0000 (00:26 +0100)]
ieee1394: csr1212: coding style
Whitespace, line breaks, braces...
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 11 Mar 2007 21:51:24 +0000 (22:51 +0100)]
ieee1394: replace vmalloc by kmalloc in csr1212
The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes +
sizeof(struct csr1212_csr_rom_cache) big. Most of the time much
smaller data structures are allocated. Therefore vmalloc is a waste.
The one exception is csr1212_append_new_cache() which is called to
append a chunk of CSR1212_EXTENDED_ROM_SIZE + sizeof(struct
csr1212_csr_rom_cache) if the currently allocated ROM cache is too
small. CSR1212_EXTENDED_ROM_SIZE is generously defined as 256 kBytes.
In SVN commit 1220, Steve Kinneberg lowered this to 2 kBytes in the
config_rom_2.4 branch. This same commit also switched CSR1212_MALLOC
from kmalloc to vmalloc in the SVN trunk branch:
> r1220 | kberg | 2004-05-31 01:51:44 +0200 (Mon, 31 May 2004) | 13 lines
>
> CSR1212 Extended ROM bug fixes:
> trunk line changes:
> - Use vmalloc instead of kmalloc
> - Change delayed_reset_bus() to operate in a work_queue instead of a
> timer interrupt.
> - Fix hpsb_allocate_and_register_addrspace() to not allocate space
> on top of already allocated space.
> - Fix problems in csr1212.c filling ConfigROM images when extend
> ROMs are present.
> config-rom-2.4 changes:
> - Changed extended rom allocation from 256K to 8K.
(It was actually 2 kB, not 8 kB.)
> - Fix hpsb_allocate_and_register_addrspace() to not allocate space
> on top of already allocated space.
> - Fix problems in csr1212.c filling ConfigROM images when extend
> ROMs are present.
I am now setting CSR1212_EXTENDED_ROM_SIZE to 2 kB minus the overhead of
struct csr1212_csr_rom_cache. Note, this code path is not used by the
in-kernel drivers though. raw1394 could trigger it, but the respective
libraw1394 functions don't exist yet.
Furthermore, userspace programs can replace the entire local ROM via
raw1394. If kmalloc does not fulfill their needs --- well, tough luck.
I decree that nobody needs such huge extended ROMs. (Extended ROMs are
defined by IEEE 1212 clause 7.7.18. The spec does not impose
practically relevant restrictions on the size of extended ROM chunks.)
Another potentially demanding use of CSR1212_MALLOC is if external
FireWire devices come with Extended ROM entries. If they are too big
for kmalloc (or have been too big for vmalloc) we just fail to read
their ROM. This is quite unlikely though, to my knowledge.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Tue, 13 Mar 2007 23:20:53 +0000 (00:20 +0100)]
ieee1394: de-inline some functions
This small reorganization of public csr1212 functions saves one
exported symbol and a few bytes in the driver modules.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 11 Mar 2007 21:50:13 +0000 (22:50 +0100)]
ieee1394: stricter error checks in csr1212
return -EINVAL becomes BUG_ON in checks of function call parameters.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 11 Mar 2007 21:49:34 +0000 (22:49 +0100)]
ieee1394: csr1212: rename some types
Use u8, u32 etc. instead of u_int8_t, csr1212_quad_t etc.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 11 Mar 2007 21:49:05 +0000 (22:49 +0100)]
ieee1394: drop csr1212's support for external compilation
csr1212 was written to be compiled either as part of the ieee1394 kernel
driver or of an anticipated IEEE 1212 userspace library. We now drop
support for the latter. The costs in terms of code footprint and depth
of abstraction are not countered by any actual benefit.
Also remove some obsolete #includes.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 11 Mar 2007 21:47:34 +0000 (22:47 +0100)]
ieee1394: remove unused csr1212 code
Delete unused code.
Make some extern functions static.
Remove superfluous inline keywords.
Move private definitions from csr1212.h to csr1212.c.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 5 Mar 2007 02:07:38 +0000 (03:07 +0100)]
ieee1394: small header cleanup
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 5 Mar 2007 02:06:23 +0000 (03:06 +0100)]
ieee1394: move some comments from declaration to definition
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Mon, 5 Mar 2007 02:05:32 +0000 (03:05 +0100)]
ieee1394: remove declarations of nonexisting functions
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Andrew Morton [Mon, 23 Apr 2007 18:50:56 +0000 (11:50 -0700)]
ieee1394: sbp2: include fixes
drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout':
drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once
drivers/ieee1394/sbp2.c:399: error: for each function it appears in.)
drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending'
drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout'
drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg':
drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address'
drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast
drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write':
drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
Possibly due to changes in -mm, but this file should explicitly include the
headers for the stuff it uses.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
Stefan Richter [Sun, 4 Feb 2007 19:57:38 +0000 (20:57 +0100)]
ieee1394: sbp2: move some memory allocations into non-atomic context
When the command ORB pool is created, the ORB list won't be accessed
concurrently. Therefore we don't have to take the spinlock there.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 4 Feb 2007 19:54:57 +0000 (20:54 +0100)]
ieee1394: sbp2: optimize DMA direction of s/g tables
Unlike the name suggests, "cmd->scatter_gather_element" holds only the
s/g table, not the actual s/g elements. Since the table is only read
but never written by the device, DMA_BIDIRECTIONAL can be replaced by
DMA_TO_DEVICE which may be cheaper on some architectures.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 4 Feb 2007 19:25:43 +0000 (20:25 +0100)]
ieee1394: sbp2: enforce 32bit DMA mapping
In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
ORBs, and response buffers have to reside within the first 4 GB of the
FireWire controller's physical address space. Set the correct mask for
DMA mappings.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 4 Feb 2007 12:04:32 +0000 (13:04 +0100)]
ieee1394: sbp2: remove unnecessary alignments of struct members
The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of
sbp2.h::sbp2_command_info do not have to be aligned themselves --- only
the memory which they point to has to be.
The member "struct sbp2_command_orb command_orb" has to be aligned on
4 bytes boundary which is guaranteed because it contains u32 members.
The member "struct sbp2_unrestricted_page_table scatter_gather_element",
i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary
according to the SBP-2 spec. This is not a requirement for FireWire
controllers but could be expected by SBP-2 targets.
I see no need to align the members command_orb and
scatter_gather_element on CPU cacheline boundaries. It could have
performance benefits, but on the other hand sbp2 has a somewhat wasteful
allocation scheme which should be optimized first before further tweaks
like cacheline alignments. (E.g. don't always allocate SG_ALL s/g table
elements.)
Note, before as well as after the patch, the code relies on the
assumption that memory alignment in the virtual address space is
preserved in the physical address space after DMA mapping.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Linus Torvalds [Sat, 28 Apr 2007 00:49:50 +0000 (17:49 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
sis900: Allocate rx replacement buffer before rx operation
usb-net/pegasus: simplify carrier detection
Neil Horman [Thu, 26 Apr 2007 17:47:36 +0000 (13:47 -0400)]
sis900: Allocate rx replacement buffer before rx operation
Just found a hole in my last patch. It was reported to me that shortly after we
integrated this patch. The report was of an oops that took place inside of
netif_rx when using the sis900 driver. Looking at my origional patch I noted
that there was a spot between the new skb_alloc and the refill_rx_ring label
where skb got reassigned to the pointer currently held in the rx_ring for the
purposes of receiveing the frame. The result of this is however that the buffer
that gets passed to netif_rx (if it is called), then gets placed right back into
the rx_ring. So if you receive frames fast enough the skb being processed by
the network stack can get corrupted. The reporter is testing out the fix I've
written for this below (I'm not near my hardware at the moment to test myself),
but I wanted to post it for review ASAP. I'll post test results when I hear
them, but I think this is a pretty straightforward fix. It just uses a separate
pointer to do the rx operation, so that we don't improperly reassign the pointer
that we use to refill the rx ring.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Dan Williams [Thu, 26 Apr 2007 01:30:29 +0000 (21:30 -0400)]
usb-net/pegasus: simplify carrier detection
Simplify pegasus carrier detection; rely only on the periodic MII
polling. Reverts pieces of
c43c49bd61fdb9bb085ddafcaadb17d06f95ec43.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Linus Torvalds [Fri, 27 Apr 2007 23:21:02 +0000 (16:21 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SCSI] esp_scsi.c: Fix compilation.
Linus Torvalds [Fri, 27 Apr 2007 23:20:37 +0000 (16:20 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[NET]: Fix networking compilation errors
[AF_RXRPC/AFS]: Arch-specific fixes.
[AFS]: Fix VLocation record update wakeup
[NET]: Revert sk_buff walker cleanups.
Linus Torvalds [Fri, 27 Apr 2007 22:34:57 +0000 (15:34 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (46 commits)
[MTD] [MAPS] drivers/mtd/maps/ck804xrom.c: convert pci_module_init()
[MTD] [NAND] CM-x270 MTD driver
[MTD] [NAND] Wrong calculation of page number in nand_block_bad()
[MTD] [MAPS] fix plat-ram printk format
[JFFS2] Fix compr_rubin.c build after include file elimination.
[JFFS2] Handle inodes with only a single metadata node with non-zero isize
[JFFS2] Tidy up licensing/copyright boilerplate.
[MTD] [OneNAND] Exit loop only when column start with 0
[MTD] [OneNAND] Fix access the past of the real oobfree array
[MTD] [OneNAND] Update Samsung OneNAND official URL
[JFFS2] Better fix for all-zero node headers
[JFFS2] Improve read_inode memory usage, v2.
[JFFS2] Improve failure mode if inode checking leaves unchecked space.
[JFFS2] Fix cross-endian build.
[MTD] Finish conversion mtd_blkdevs to use the kthread API
[JFFS2] Obsolete dirent nodes immediately on unlink, where possible.
Use menuconfig objects: MTD
[MTD] mtd_blkdevs: Convert to use the kthread API
[MTD] Fix fwh_lock locking
[JFFS2] Speed up mount for directly-mapped NOR flash
...
Adrian Bunk [Thu, 26 Apr 2007 23:48:01 +0000 (01:48 +0200)]
[MTD] [MAPS] drivers/mtd/maps/ck804xrom.c: convert pci_module_init()
This patch converts the pci_module_init() usage to pci_register_driver().
It's currently #if 0'ed, but still not a bad idea to change it.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Howells [Fri, 27 Apr 2007 22:31:24 +0000 (15:31 -0700)]
[NET]: Fix networking compilation errors
Fix miscellaneous networking compilation errors.
(*) Export ktime_add_ns() for modules.
(*) wext_proc_init() should have an ANSI declaration.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Howells [Fri, 27 Apr 2007 22:28:45 +0000 (15:28 -0700)]
[AF_RXRPC/AFS]: Arch-specific fixes.
Fixes for various arch compilation problems:
(*) Missing module exports.
(*) Variable name collision when rxkad and af_rxrpc both built in
(rxrpc_debug).
(*) Large constant representation problem (AFS_UUID_TO_UNIX_TIME).
(*) Configuration dependencies.
(*) printk() format warnings.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Howells [Fri, 27 Apr 2007 22:26:30 +0000 (15:26 -0700)]
[AFS]: Fix VLocation record update wakeup
Fix the wakeup transitions after a VLocation record update completes
one way or another. This builds on Dave Miller's partial fix.
Also move wakeups outside the spinlocked sections.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 27 Apr 2007 22:21:23 +0000 (15:21 -0700)]
[NET]: Revert sk_buff walker cleanups.
This reverts
eefa3906283a2b60a6d02a2cda593a7d7d7946c5
The simplification made in that change works with the assumption that
the 'offset' parameter to these functions is always positive or zero,
which is not true. It can be and often is negative in order to access
SKB header values in front of skb->data.
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Fri, 27 Apr 2007 22:19:27 +0000 (15:19 -0700)]
[SCSI] esp_scsi.c: Fix compilation.
irqreturn.h for irqreturn_t and dma_addr_t being u128 warnings ;-)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Rapoport [Sun, 22 Apr 2007 05:53:21 +0000 (08:53 +0300)]
[MTD] [NAND] CM-x270 MTD driver
This patch provides MTD support for NAND flash devices on CM-x270 modules.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Linus Torvalds [Fri, 27 Apr 2007 21:19:17 +0000 (14:19 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (78 commits)
USB: update MAINAINERS and CREDITS for Freescale USB driver
USB: update gadget files for fsl_usb2_udc driver
USB: add Freescale high-speed USB SOC device controller driver
USB: quirk for broken suspend of IT8152F/G
USB: iowarrior.c: timeouts too small in usb_control_msg calls
USB: dell device id for option.c
USB: Remove Huawei unusual_devs entry
USB: CP2101 New Device IDs
USB: add picdem device to ldusb
usbfs micro optimitation
USB: remove ancient/broken CRIS hcd
usb ethernet gadget, workaround network stack API glitch
USB: add "busnum" attribute for USB devices
USB: cxacru: ADSL state management
usbatm: Detect usb device shutdown and ignore failed urbs
USB: Remove duplicate define of OHCI_QUIRK_ZFMICRO
USB: BandRich BandLuxe HSDPA Data Card Driver
USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug
USB Elan FTDI: check for driver registration status
USB: sierra: add more checks on shutdown
...
Linus Torvalds [Fri, 27 Apr 2007 21:18:45 +0000 (14:18 -0700)]
Merge branch 'master' of ssh:///linux/kernel/git/mchehab/v4l-dvb
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (184 commits)
V4L/DVB (5563): Radio-maestro.c Replace radio_ioctl to use video_ioctl2
V4L/DVB (5562): Radio-gemtek-pci.c Replace gemtek_pci_ioctl to use video_ioctl2
V4L/DVB (5560): Ivtv: fix incorrect bitwise-and for command flags.
V4L/DVB (5558): Opera: use 7-bit i2c addresses
V4L/DVB (5557): Cafe_ccic: check return value of pci_enable_device
V4L/DVB (5556): Radio-gemtek.c Replace gemtek_ioctl to use video_ioctl2
V4L/DVB (5555): Radio-aimslab.c Replace rt_ioctl to use video_ioctl2
V4L/DVB (5554): Fix: vidioc_g_parm were not zeroing the memory
V4L/DVB (5553): Replace typhoon_do_ioctl to use video_ioctl2
V4L/DVB (5552): Plan-b: Switch to refcounting PCI API
V4L/DVB (5551): Plan-b: header change
V4L/DVB (5550): Radio-sf16fmi.c Replace fmi_do_ioctl to use video_ioctl2
V4L/DVB (5549): Radio-sf16fmr2.c Replace fmr2_do_ioctl to use video_ioctl2
V4L/DVB (5548): Fix v4l2 buffer to the length
V4L/DVB (5547): Add ENUM_FRAMESIZES and ENUM_FRAMEINTERVALS ioctls
V4L/DVB (5546): Radio-terratec.c Replace tt_do_ioctl to use video_ioctl2
V4L/DVB (5545): Saa7146: Release capture buffers on device close
V4L/DVB (5544): Budget-av: Make inversion setting configurable, add KNC ONE V1.0 card
V4L/DVB (5543): Tda10023: Add support for frontend TDA10023
V4L/DVB (5542): Budget-av: Remove polarity switching of the clock for DVB-C
...
Li Yang [Mon, 23 Apr 2007 17:38:18 +0000 (10:38 -0700)]
USB: update MAINAINERS and CREDITS for Freescale USB driver
Add MAINAINERS and CREDITS entry for Freescale Highspeed USB device
driver.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Li Yang [Mon, 23 Apr 2007 17:37:36 +0000 (10:37 -0700)]
USB: update gadget files for fsl_usb2_udc driver
Update gadget_chip.c, ether.c for newly added Freescale Highspeed USB
device driver.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Li Yang [Mon, 23 Apr 2007 17:54:25 +0000 (10:54 -0700)]
USB: add Freescale high-speed USB SOC device controller driver
Freescale high-speed USB SOC can be found on some Freescale processors
among different architectures. It supports both host and device functions.
This driver adds its device support for Linux USB Gadget layer.
It is tested on MPC8349 and MPC8313, but should work on other platforms
with minor tweaks. The driver passed USBCV 1.3 compliance tests. Note
that this driver doesn't yet include OTG support.
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jiang Bo <tanya.jiang@freescale.com>
Signed-off-by: Bruce Schmid <duck@freescale.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Raphael Assenat [Tue, 17 Apr 2007 20:09:18 +0000 (13:09 -0700)]
USB: quirk for broken suspend of IT8152F/G
Here's a patch which adds my device to the list.
This patch enables the broken suspend quirk for the PCI OHCI controller
present in the IT8152F/G RISC-to-PCI Companion Chip.
Signed-off-by: Raphael Assenat <raph@8d.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Eberhard Fahle [Thu, 5 Apr 2007 09:13:21 +0000 (11:13 +0200)]
USB: iowarrior.c: timeouts too small in usb_control_msg calls
The driver uses usb_control_msg() for exchanging data with the device.
When the driver lived freeley _outside_ the kernel tree (pre 2.6.21) the
timeouts for these calls where set to 5*HZ for reading, 1HZ for writing.
(These timeouts seemed to work fine for all users of the driver, at
least nobody complained in the last 2 years.
The current code (2.6.21-rc5) removed the 'HZ' from the timeouts and
left the driver with 5 jiffies for reading and 1 jiffy for writing. My
new machine is fast, but not that fast.
The patch also removes a useless debug statement, which was left over
from testing a broken firmware version
From: Eberhard Fahle <e.fahle@wayoda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Hans Engelen [Thu, 12 Apr 2007 12:40:26 +0000 (14:40 +0200)]
USB: dell device id for option.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Phil Dibowitz [Mon, 16 Apr 2007 06:42:40 +0000 (23:42 -0700)]
USB: Remove Huawei unusual_devs entry
Per the Rui Santos and the hardware manufacturers, this actually inhibits
useful parts of the hardware. The correct way to use this hardware is with the
software at http://www.kanoistika.sk/bobovsky/archiv/umts/ and the manufacturers
are also planning on including Linux drivers/material in future revisions.
CC: Rui Santos <rsantos@grupopie.com>
CC: <johann.wilhelm@student.tugraz.at>
CC: <zihan@huawei.com>
CC: <wanganyu1983@huawei.com>
CC: <dingjianjian@huawei.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Craig Shelley [Fri, 20 Apr 2007 13:37:17 +0000 (14:37 +0100)]
USB: CP2101 New Device IDs
Two new device IDs for CP2101 driver.
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Joey Goncalves [Fri, 20 Apr 2007 18:05:54 +0000 (11:05 -0700)]
USB: add picdem device to ldusb
Hi Greg:
I have found that /drivers/usb/misc/ldusb.c works with the "PICDEM Full
Speed USB"
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940
Signed-off-by: Joey S Goncalves <jgoncalves@peragrin.com>
Cc: Michael Hund <MHund@LD-Didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Fri, 20 Apr 2007 18:50:48 +0000 (20:50 +0200)]
usbfs micro optimitation
the memory barrier is needed only with smp.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Sun, 22 Apr 2007 18:05:52 +0000 (11:05 -0700)]
USB: remove ancient/broken CRIS hcd
Remove the old crisv10 HCD ... it can't have built for some time,
doesn't even have a Kconfig entry, was the last driver not to have
been converted to the "hcd" framework, and considering the usbcore
changes since its last patch was merged, has just got to buggy as
all get-out.
I'm told Axis has a new driver, and will be submitting it soon.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Erik Hovland [Mon, 23 Apr 2007 17:50:15 +0000 (10:50 -0700)]
usb ethernet gadget, workaround network stack API glitch
Another workaround for the glitch in the network layer, whereby one call
ignores the (otherwise kernel-wide) convention that free() calls should
not oops when passed nulls. This code already handles that API glitch in
most other paths.
From: Erik Hovland <erik@hovland.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Wed, 25 Apr 2007 19:15:43 +0000 (15:15 -0400)]
USB: add "busnum" attribute for USB devices
This patch (as903) adds a "busnum" sysfs attribute for USB devices.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Simon Arlott [Thu, 26 Apr 2007 07:38:05 +0000 (00:38 -0700)]
USB: cxacru: ADSL state management
The device has commands to start/stop the ADSL function, so this adds a
sysfs attribute to allow it to be started/stopped/restarted. It also stops
polling the device for status when the ADSL function is disabled.
There are no problems with sending multiple start or stop commands, even
with a fast loop of them the device still works. There is no need to
protect the restart process from further user actions while it's waiting
for 1.5s.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Simon Arlott [Thu, 26 Apr 2007 07:38:04 +0000 (00:38 -0700)]
usbatm: Detect usb device shutdown and ignore failed urbs
Detect usb device shutdown and ignore failed urbs. This happens when the
driver is unloaded or the device is unplugged.
I'm not sure what other urb statuses should be ignored, and the warning
message doesn't need to be shown when the module is unloaded or the device
is removed.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@math.u-psud.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
S.Caglar Onur [Thu, 26 Apr 2007 07:38:03 +0000 (00:38 -0700)]
USB: Remove duplicate define of OHCI_QUIRK_ZFMICRO
Remove duplicate define of OHCI_QUIRK_ZFMICRO from ftdi-elan.c, its already
defined in drivers/ush/host/ohci.c
Signed-off-by: "S.Caglar Onur" <caglar@pardus.org.tr>
Cc: <tony.olech@elandigitalsystems.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Leon Leong [Thu, 26 Apr 2007 07:38:02 +0000 (00:38 -0700)]
USB: BandRich BandLuxe HSDPA Data Card Driver
Add the detection for the BandRich BandLuxe C100/C100S/C120 HSDPA Data
Card. With the vendor and product IDs are set properly, the data card can
be detected and works fine.
Signed-off-by: Leon Leong <upleong@bandrich.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wu, Bryan [Thu, 26 Apr 2007 07:38:01 +0000 (00:38 -0700)]
USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug
skb_push function may return a pointer which is not aligned as required
by struct rndis_packet_msg_type. Using attribute trick to fix this bug.
Signed-off-by: Roy Huang <roy.huang@analog.com>
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cyrill Gorcunov [Thu, 26 Apr 2007 07:38:00 +0000 (00:38 -0700)]
USB Elan FTDI: check for driver registration status
Add checking of driver registration status and release allocated resources
if it failed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Thu, 26 Apr 2007 07:12:01 +0000 (00:12 -0700)]
USB: sierra: add more checks on shutdown
This should help with any potential NULL pointer usages as reported by a
few users.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 17 Apr 2007 20:06:29 +0000 (13:06 -0700)]
USB: add an ohci board-specific quirk
Use the new ohci-pci quirk infrastructure to address the problem it was
created to address: a quirk specific to the Portege 4000, in buzilla as
http://bugzilla.kernel.org/show_bug.cgi?id=6723
Also fix a misuse of "__devinit" for the quirk functions. It must not
be used without first ensuring that the references from the quirk tables
are gone, and that the function using those quirk tables is also gone.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 17 Apr 2007 23:10:10 +0000 (16:10 -0700)]
USB: usbnet reports minidriver name through ethtool
Update "usbnet" so that ethtool reports the name of the minidriver in use
(e.g. asix, cdc_ether, dm9601, rndis_host) instead of "usbnet". This is a
better match to how other network drivers work, resolving a minor open issue.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Wed, 18 Apr 2007 00:53:20 +0000 (17:53 -0700)]
USB: rndis_host, various cleanups
Cleanups to the rndis_host code, and a tweak that helps talking to
PXA hardware. Mostly from Ole André Vadla Ravnås <oleavr@gmail.com>
- Prevent SET_INTERFACE requests, they give PXA hardware bad indigestion
- For paranoia, null a pointer after freeing its data
- Wrap up ActiveSync oddities for RNDIS_QUERY in one routine
- Use that wrapper when getting the Ethernet address
- Whitespace fixes
Plus add a comment noting the open issues about some RNDIS clients still
needing TBD kinds of browbeating to accept non-jumbogram packets.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Wed, 18 Apr 2007 00:51:38 +0000 (17:51 -0700)]
USB: <linux/usb/ch9.h> minor doc update
Minor doc update to <linux/usb/ch9.h> ... say where USB_DT_CS_* came
from and update the definitions to match how they're derived there.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Wed, 11 Apr 2007 16:06:16 +0000 (12:06 -0400)]
USB: fix signed jiffies issue in autosuspend logic
This patch (as897) changes the autosuspend timer code to use the
standard types and macros in dealing with jiffies values.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pete Zaitcev [Wed, 11 Apr 2007 20:47:26 +0000 (13:47 -0700)]
usbmon: bus zero
Add the "bus zero" feature to the usbmon. If a user process specifies bus
with number zero, it receives events from all buses. This is useful when
we wish to see initial enumeration when a bus is created, typically after
a modprobe. Until now, an application had to loop until a new bus could
be open, then start capturing on it. This procedure was cumbersome and
could lose initial events. Also, often it's too bothersome to find exactly
to which bus a specific device is attached.
Paolo Albeni provided the original concept implementation. I added the
handling of "bus->monitored" flag and generally fixed it up.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tony Lindgren [Sun, 1 Apr 2007 01:15:43 +0000 (18:15 -0700)]
USB: Allow transfer_buffer with transfer_dma
Some host controller drivers may need a PIO fallback when a DMA channel
is temporarily unavailable. This patch provides an address that such
drivers can use for PIO in those cases, and nulls that field out when
no such address is available (highmem) which should help usbmon.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Mon, 2 Apr 2007 13:16:36 +0000 (15:16 +0200)]
USB: cleanup ofd adutux
this driver does
- ignore errors during open
- submit a running urb
- use down_interruptible not handling signals
- GFP_KERNEL with a spinlock held
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 27 Mar 2007 17:33:59 +0000 (13:33 -0400)]
USB: add "last_busy" field for use in autosuspend
This patch (as877) adds a "last_busy" field to struct usb_device, for
use by the autosuspend framework. Now if an autosuspend call comes at
a time when the device isn't busy but hasn't yet been idle for long
enough, the timer can be set to exactly the desired value. And we
will be ready to handle things like HID drivers, which can't maintain
a useful usage count and must rely on the time-of-last-use to decide
when to autosuspend.
The patch also makes some related minor improvements:
Move the calls to the autosuspend condition-checking routine
into usb_suspend_both(), which is the only place where it
really matters.
If the autosuspend timer is already running, don't stop
and restart it.
Replace immediate returns with gotos so that the optional
debugging ouput won't be bypassed.
If autoresume is disabled but the device is already awake,
don't return an error for an autoresume call.
Don't try to autoresume a device if it isn't suspended.
(Yes, this undercuts the previous change -- so sue me.)
Don't duplicate existing code in the autosuspend work routine.
Fix the kerneldoc in usb_autopm_put_interface(): If an
autoresume call fails, the usage counter is left unchanged.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Richard Knutsson [Tue, 27 Mar 2007 06:00:28 +0000 (22:00 -0800)]
USB: whiteheat: Convert to generic boolean
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Stuart MacDonald <stuartm@connecttech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Tue, 27 Mar 2007 14:02:34 +0000 (16:02 +0200)]
USB: fix omninet write vs. close race
omninet kills all URBs in close. However write() returns as soon as
the URB has been submitted. Killing the last URB means a race that
can lose that date written in the last call to write().
As a fix this is moved to shutdown().
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Thu, 29 Mar 2007 08:45:17 +0000 (10:45 +0200)]
USB: fix error handling for mct_u232
we report errors to the caller. THis patch adds error handling to the driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Thu, 29 Mar 2007 09:23:54 +0000 (11:23 +0200)]
USB: fix error handling in kl5kusb
- report errors
- cleanup in error case
- use of endianness macros
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Fri, 30 Mar 2007 11:11:00 +0000 (13:11 +0200)]
USB: fix catc error handling
this driver ignores errors while starting the transmit queue. It will
never be reported stopped as the completion handler won't run
and it will never be started again as it will be considered started.
This patch adds error handling.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Fri, 30 Mar 2007 08:52:16 +0000 (10:52 +0200)]
USB: cypress_cy7c63: race disconnect/sysfs read-write leading to following NULL pointer
this driver sets intfdata to NULL while it still can be read and happily followed.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Mon, 26 Mar 2007 16:12:44 +0000 (18:12 +0200)]
USB: fix ark3116 memory leak
this driver has a memory leak in an error case.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jelle Foks [Mon, 26 Mar 2007 01:08:35 +0000 (21:08 -0400)]
USB: ftdi_sio: Add USB ID of ADSTech USBX-707
This patch adds the USB ID of the ADS Tech USBX-707 USB IR blaster (that
comes with the ADS Tech PTV-305 grabber card), which has a ftdi232bm
inside hooked up to a pic.
With this it should be fairly straightforward to make at least lirc
receiving work with this device. I will submit a patch to lirc for that
as soon as I have one ready, I'm getting data with minicom with this
patch, but need to figure out some more details such as best/correct
baudrate.
Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Oliver Neukum [Fri, 23 Mar 2007 13:30:16 +0000 (14:30 +0100)]
USB: fix race in ftdio_write
this has the same race as the visor driver. The counter must be incremented
under the lock it is checked under.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>