firefly-linux-kernel-4.4.55.git
17 years agogit-libata-all-ipr-fix
Andrew Morton [Mon, 26 Mar 2007 09:17:43 +0000 (02:17 -0700)]
git-libata-all-ipr-fix

drivers/scsi/ipr.c: In function '__ipr_eh_dev_reset':
drivers/scsi/ipr.c:3865: warning: passing argument 4 of 'ata_do_eh' from incompatible pointer type

Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: hardreset on SERR_INTERNAL
Tejun Heo [Tue, 13 Mar 2007 16:20:51 +0000 (01:20 +0900)]
libata: hardreset on SERR_INTERNAL

There was a rare report where SB600 reported SERR_INTERNAL and SRST
couldn't get it out of the failure mode.  Hardreset on SERR_INTERNAL.
As the problem is intermittent, whether this fixes the problem or not
hasn't been verified yet, but hardresetting the channel on internal
error is a good idea anyway.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_promise: decode and report error reasons
Mikael Pettersson [Wed, 14 Mar 2007 08:51:35 +0000 (09:51 +0100)]
sata_promise: decode and report error reasons

This patch adds much needed error reason decoding and
reporting to sata_promise. It's simplistic but should
log all relevant error info the controller provides.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_promise: separate SATA and PATA ops
Mikael Pettersson [Sun, 11 Mar 2007 20:20:43 +0000 (21:20 +0100)]
sata_promise: separate SATA and PATA ops

This patch changes sata_promise so that the PATA ports
on TX2plus chips are bound to the pdc_pata_ops structure.
This means that operations called from the SATA ops
structures don't need any SATA-vs-PATA tests any more.
Instead, operations that depend on a port being SATA or
PATA are separated into different procedures.

* pdc_cable_type() is split into a PATA version and a
  SATA version
* pdc_error_handler() is split into a PATA version and a
  SATA version, that both call a common version after
  setting up the `hardreset' function pointer
* pdc_old_check_atapi_dma() is now only used for SATAI
  ports, so is renamed to pdc_old_sata_check_atapi_dma()
  and simplified
* pdc_sata_scr_{read,write}() are now only used for SATA
  ports, so their is-not-SATA tests are removed
* pdc_port_start() is split into three procedures: a wrapper
  which performs the ->ops adjustment on TX2plus PATA ports,
  a procedure with the common code, and a procedure with
  the SATA-specific code (this bit might be cleaned up by
  Tejun's new init model)

Tested on 20619, 20575, and 20775 chips.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_promise: add missing cable_detect hooks
Mikael Pettersson [Sun, 11 Mar 2007 20:19:27 +0000 (21:19 +0100)]
sata_promise: add missing cable_detect hooks

The recent change which moved cable detection from
pdc_pre_reset() to the new ->cable_detect hook only
added the hook for SATAII chips, leaving SATAI chips
and the 20619 without the hook. Fixed by this patch.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata/IDE: remove combined mode quirk
Jeff Garzik [Fri, 9 Mar 2007 15:54:42 +0000 (10:54 -0500)]
libata/IDE: remove combined mode quirk

Both old-IDE and libata should be able handle all controllers and
devices found using normal resource reservation methods.

This eliminates the awful, low-performing split-driver configuration
where old-IDE drove the PATA portion of a PCI device, in PIO-only mode,
and libata drove the SATA portion of the /same/ PCI device, in DMA mode.
Typically vendors would ship SATA hard drive / PATA optical
configuration, which would lend itself to slow (PIO-only) CD-ROM
performance.

For Intel users running in combined mode, it is now wholly dependent on
your driver choice (potentially link order, if you compile both drivers
in) whether old-IDE or libata will drive your hardware.

In either case, you will get full performance from both SATA and PATA
ports now, without having to pass a kernel command line parameter.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] turn on !IORDY filter
Jeff Garzik [Fri, 9 Mar 2007 14:56:46 +0000 (09:56 -0500)]
[libata] turn on !IORDY filter

The previous commit erroneously noted that the !IORDY filter was turned
on.  No true, that change was split out into this commit.

Originally authored and signed-off-by Alan Cox.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] sata_mv: support ->cable_detect
Jeff Garzik [Fri, 9 Mar 2007 14:46:47 +0000 (09:46 -0500)]
[libata] sata_mv: support ->cable_detect

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: Change prototype of mode_filter to remove ata_port*
Alan Cox [Fri, 9 Mar 2007 14:34:07 +0000 (09:34 -0500)]
libata: Change prototype of mode_filter to remove ata_port*

With Tejun having added adev->ap some time ago we can get rid of the
almost unused port being passed to mode filters. And while we are
doing filters, lets turn on the !IORDY filter as well.

Signed-off-by: Alan Cox <alan@redhat.com>
With some hand massaging from
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_sil: First step to removing ->post_set_mode
Alan Cox [Thu, 8 Mar 2007 23:09:12 +0000 (23:09 +0000)]
sata_sil: First step to removing ->post_set_mode

Now that we have ata_do_set_mode() available for drivers to use we don't
actually need ->post_set_mode() as the driver can wrap set_mode nicely
and do stuff before or after (eg PCMCIA needs before), so we can kill off
a method in all the structs

While I was at it I added kernel-doc to the function involved.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata-core: Fix the iordy methods
Alan Cox [Thu, 8 Mar 2007 23:22:59 +0000 (23:22 +0000)]
libata-core: Fix the iordy methods

This alone isn't sufficient to save the universe from prehistoric disks
and controllers but it is a first important step. Split off a separate
function to provide a mode filter when controller iordy is not available.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata: expose set_mode method so it can be wrapped
Alan [Tue, 6 Mar 2007 10:37:52 +0000 (02:37 -0800)]
pata: expose set_mode method so it can be wrapped

This splits set_mode into do_set_mode and the wrapper so that a driver can
call the standard method inside its own.  This in theory also obsoletes
->post_set_mode().

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_hpt37x: Updates from drivers/ide work
Alan Cox [Thu, 8 Mar 2007 23:28:52 +0000 (23:28 +0000)]
pata_hpt37x: Updates from drivers/ide work

Drag pata_hpt37x kicking and screaming in the direction of
drivers/ide/pci/hpt366.c and all the work that Sergei has been doing
there. Plenty left to be done but this is a good snapshot for folks to
work on and to review

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoiomap: implement pcim_iounmap_regions()
Tejun Heo [Fri, 9 Mar 2007 10:45:58 +0000 (19:45 +0900)]
iomap: implement pcim_iounmap_regions()

Implement pcim_iounmap_regions() - the opposite of
pcim_iomap_regions().

Signed-off-by: Tejun heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] More PATA driver ->cable_detect support
Jeff Garzik [Fri, 9 Mar 2007 13:37:46 +0000 (08:37 -0500)]
[libata] More PATA driver ->cable_detect support

Roll-up of ->cable_detect feature addition patches, authored and
signed-off-by Alan Cox.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_hpt366: support ->cable_detect
Alan Cox [Thu, 8 Mar 2007 19:34:28 +0000 (19:34 +0000)]
pata_hpt366: support ->cable_detect

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_efar: support ->cable_detect
Alan Cox [Thu, 8 Mar 2007 19:33:29 +0000 (19:33 +0000)]
pata_efar: support ->cable_detect

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_atiixp: support ->cable_detect
Alan Cox [Thu, 8 Mar 2007 19:27:31 +0000 (19:27 +0000)]
pata_atiixp: support ->cable_detect

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_radisys: support cable_detect
Alan Cox [Thu, 8 Mar 2007 22:56:07 +0000 (22:56 +0000)]
pata_radisys: support cable_detect

Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_sc1200: restore cable type
Alan Cox [Thu, 8 Mar 2007 22:58:03 +0000 (22:58 +0000)]
pata_sc1200: restore cable type

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_rz1000: support cable_detect
Alan Cox [Thu, 8 Mar 2007 22:57:03 +0000 (22:57 +0000)]
pata_rz1000: support cable_detect

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_platform: Add cable_detect method
Alan Cox [Thu, 8 Mar 2007 22:54:04 +0000 (22:54 +0000)]
pata_platform: Add cable_detect method

Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_promise: Switch to cable method, clean up some bits as a result
Alan Cox [Thu, 8 Mar 2007 23:06:47 +0000 (23:06 +0000)]
sata_promise: Switch to cable method, clean up some bits as a result

Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata-core: fix comments on cable type
Alan Cox [Thu, 8 Mar 2007 23:19:19 +0000 (23:19 +0000)]
libata-core: fix comments on cable type

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: Restore Kconfig updated experimental levels and correct
Alan Cox [Thu, 8 Mar 2007 23:24:49 +0000 (23:24 +0000)]
libata: Restore Kconfig updated experimental levels and correct

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_cmd640: Multiple updates
Alan Cox [Wed, 7 Mar 2007 16:43:29 +0000 (16:43 +0000)]
pata_cmd640: Multiple updates

Fix suspend/resume support
Write 0x5B to 0 not 0x5C

The former is important as we must kill the FIFO on a resume

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_via: Use cable_detect method
Alan Cox [Wed, 7 Mar 2007 16:56:54 +0000 (16:56 +0000)]
pata_via: Use cable_detect method

We end up shifting a few bits of logic around in this driver but the
basic change is the same.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_sis: Clean up using cable_detect methods
Alan Cox [Wed, 7 Mar 2007 16:54:24 +0000 (16:54 +0000)]
pata_sis: Clean up using cable_detect methods

This changeset revolves around the fact that all the SiS controllers have
the same enable bits, but differing cable detection methods. Previously
that meant each type had its own error_handler methods. Instead we can
now implement different ->cable_detect methods and share a single
error_handler which does the filtering by enable bits.

In addition we had some auto const arrays that should be static const. I'm
not sure if gcc already treats them intelligently but adding the static
will make sure.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_marvell: Cable and reset fixes
Alan Cox [Wed, 7 Mar 2007 16:48:09 +0000 (16:48 +0000)]
pata_marvell: Cable and reset fixes

There are two changes here. Firstly we switch to a cable detect method,
secondly the old code forgot to call ata_std_prereset() but somehow
managed to work anyway. Fix the missing call.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_it8213: Cable detect
Alan Cox [Wed, 7 Mar 2007 16:46:20 +0000 (16:46 +0000)]
pata_it8213: Cable detect

Another not-quite PIIX, another cable type conversion

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] Update several PATA drivers for new ->cable_detect hook
Jeff Garzik [Fri, 9 Mar 2007 12:24:15 +0000 (07:24 -0500)]
[libata] Update several PATA drivers for new ->cable_detect hook

All patches authored and signed-off-by Alan Cox, sent on Mar 7, 2007.
I merely combined them all into a single patch.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoSupport for Marvell 7042 Chip
Morrison, Tom [Tue, 6 Mar 2007 10:38:10 +0000 (02:38 -0800)]
Support for Marvell 7042 Chip

Added Support for Marvell 7042 Chip - 7042 has same capabilities & behavior
as 6042.

Signed-off-by: Thomas A. Morrison <tmorrison@empirix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_cmd640: CMD640 PCI support
Alan Cox [Tue, 6 Mar 2007 10:38:11 +0000 (02:38 -0800)]
pata_cmd640: CMD640 PCI support

Support for the PCI CMD640 (not VLB)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: cable detection fixes
Alan Cox [Tue, 6 Mar 2007 10:37:56 +0000 (02:37 -0800)]
libata: cable detection fixes

2.6.21-rc has horrible problems with libata and PATA cable types (and
thus speeds). This occurs because Tejun fixed a pile of other bugs and
we now do cable detect enforcement for drive side detection properly.

Unfortunately we don't do the process around cable detection right. Tejun
identified the problem and pointed to the right Annex in the spec, this patch
implements the rest of the needed changes.

We add a ->cable_detect() method called after the identify
sequence which allows a host to do host side detection at this point
should it wish, or to modify the results of the drive side identify.

This separate ->cable_detect method also cleans up a lot of code because
many drivers have their own error_handler methods which really just set
the cable type.

If there is no ->cable_detect method the cable type is left alone so a
driver setting it earlier (eg because it has the SATA flags set or
because it uses the old error_handler approach) will still do the right
thing (or at least the same thing) as before.

This patch simply adds the cable_detect method and helpers it doesn't use
them but other follow up patches will (ie Adrian please don't submit
patches to unexport them ;))

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: handle ata_pci_device_do_resume() failure while resuming
Dmitriy Monakhov [Tue, 6 Mar 2007 10:37:54 +0000 (02:37 -0800)]
libata: handle ata_pci_device_do_resume() failure while resuming

Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b
ata_pci_device_do_resume() can return error code, all callers was updated
except this one.

Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: warn if speed limited due to 40-wire cable
Robert Hancock [Tue, 6 Mar 2007 10:37:51 +0000 (02:37 -0800)]
libata: warn if speed limited due to 40-wire cable

Warn the user if a drive's transfer rate is limited because of a 40-wire
cable detection.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoRESEND: libata: check cdb len per dev instead of per host
Mark Lord [Fri, 2 Feb 2007 17:36:25 +0000 (12:36 -0500)]
RESEND: libata: check cdb len per dev instead of per host

Resending, with s/printk/DPRINTK/ as pointed out by Alan.

Fix libata to perform CDB len validation per device
rather than per host.  This way, validation still works
when we have a mix of 12-byte and 16-byte devices on
a common host interface.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: dev_config does not need ap and adev passing
Alan [Fri, 2 Mar 2007 00:56:15 +0000 (00:56 +0000)]
libata: dev_config does not need ap and adev passing

It used to be impossible to get from ata_device to ata_port but that is
no longer true. Various methods have been cleaned up over time but
dev_config still takes both and most users don't need both anyway. Tidy
this one up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] sata_mv: clean up DMA boundary issues, turn on 64-bit DMA
Jeff Garzik [Mon, 26 Feb 2007 06:26:06 +0000 (01:26 -0500)]
[libata] sata_mv: clean up DMA boundary issues, turn on 64-bit DMA

The chips covered by sata_mv have a 32-bit DMA boundary they must not
cross, not a 64K boundary.  We are merely limited to a 64K maximum
segment size.  Therefore, the DMA scatter/gather table fill code can be
greatly simplified, and we need not cut in half the S/G table size as
reported to the SCSI layer.

Also, the driver forget to turn on 64-bit DMA at the PCI layer.  All
other data structures (both hardware and software) have been prepped for
64-bit PCI DMA.  It was simply never turned on.  <fingers crossed> let's
see if it still works...

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] export sata_print_link_status()
Jeff Garzik [Sun, 25 Feb 2007 21:50:52 +0000 (16:50 -0500)]
[libata] export sata_print_link_status()

To be used in sata_mv's exception handling code, and overall is a
generally useful function.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[libata] sata_mv: remove extra braces
Jeff Garzik [Sun, 25 Feb 2007 02:26:42 +0000 (21:26 -0500)]
[libata] sata_mv: remove extra braces

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
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

17 years agosis900: Allocate rx replacement buffer before rx operation
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>
17 years agousb-net/pegasus: simplify carrier detection
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>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
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.

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
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.

17 years agoMerge git://git.infradead.org/mtd-2.6
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
  ...

17 years ago[MTD] [MAPS] drivers/mtd/maps/ck804xrom.c: convert pci_module_init()
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>
17 years ago[NET]: Fix networking compilation errors
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>
17 years ago[AF_RXRPC/AFS]: Arch-specific fixes.
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>
17 years ago[AFS]: Fix VLocation record update wakeup
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>
17 years ago[NET]: Revert sk_buff walker cleanups.
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>
17 years ago[SCSI] esp_scsi.c: Fix compilation.
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>
17 years ago[MTD] [NAND] CM-x270 MTD driver
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>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
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
  ...

17 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
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
  ...

17 years agoUSB: update MAINAINERS and CREDITS for Freescale USB driver
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>
17 years agoUSB: update gadget files for fsl_usb2_udc driver
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>
17 years agoUSB: add Freescale high-speed USB SOC device controller driver
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>
17 years agoUSB: quirk for broken suspend of IT8152F/G
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>
17 years agoUSB: iowarrior.c: timeouts too small in usb_control_msg calls
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>
17 years agoUSB: dell device id for option.c
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>
17 years agoUSB: Remove Huawei unusual_devs entry
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>
17 years agoUSB: CP2101 New Device IDs
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>
17 years agoUSB: add picdem device to ldusb
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>
17 years agousbfs micro optimitation
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>
17 years agoUSB: remove ancient/broken CRIS hcd
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>
17 years agousb ethernet gadget, workaround network stack API glitch
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>
17 years agoUSB: add "busnum" attribute for USB devices
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>
17 years agoUSB: cxacru: ADSL state management
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>
17 years agousbatm: Detect usb device shutdown and ignore failed urbs
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>
17 years agoUSB: Remove duplicate define of OHCI_QUIRK_ZFMICRO
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>
17 years agoUSB: BandRich BandLuxe HSDPA Data Card Driver
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>
17 years agoUSB gadget rndis: fix struct rndis_packet_msg_type unaligned bug
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>
17 years agoUSB Elan FTDI: check for driver registration status
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>
17 years agoUSB: sierra: add more checks on shutdown
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>
17 years agoUSB: add an ohci board-specific quirk
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>
17 years agoUSB: usbnet reports minidriver name through ethtool
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>
17 years agoUSB: rndis_host, various cleanups
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>
17 years agoUSB: <linux/usb/ch9.h> minor doc update
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>
17 years agoUSB: fix signed jiffies issue in autosuspend logic
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>
17 years agousbmon: bus zero
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>
17 years agoUSB: Allow transfer_buffer with transfer_dma
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>
17 years agoUSB: cleanup ofd adutux
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>
17 years agoUSB: add "last_busy" field for use in autosuspend
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>
17 years agoUSB: whiteheat: Convert to generic boolean
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>
17 years agoUSB: fix omninet write vs. close race
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>
17 years agoUSB: fix error handling for mct_u232
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>
17 years agoUSB: fix error handling in kl5kusb
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>
17 years agoUSB: fix catc error handling
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>
17 years agoUSB: cypress_cy7c63: race disconnect/sysfs read-write leading to following NULL pointer
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>
17 years agoUSB: fix ark3116 memory leak
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>
17 years agoUSB: ftdi_sio: Add USB ID of ADSTech USBX-707
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>
17 years agoUSB: fix race in ftdio_write
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>
17 years agoUSB: fix race in visor_write
Oliver Neukum [Fri, 23 Mar 2007 10:58:03 +0000 (11:58 +0100)]
USB: fix race in visor_write

this fixes a small race in visor_write.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: aircable cleanup
Oliver Neukum [Mon, 26 Mar 2007 14:55:16 +0000 (16:55 +0200)]
USB: aircable cleanup

- proper endianness macros
- scheduling in interrupt in error case

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
17 years agoUSB: make usbdevices export their device nodes instead of using a separate class
Kay Sievers [Tue, 13 Mar 2007 14:59:31 +0000 (15:59 +0100)]
USB: make usbdevices export their device nodes instead of using a separate class

o The "real" usb-devices export now a device node which can
  populate /dev/bus/usb.

o The usb_device class is optional now and can be disabled in the
  kernel config. Major/minor of the "real" devices and class devices
  are the same.

o The environment of the usb-device event contains DEVNUM and BUSNUM to
  help udev and get rid of the ugly udev rule we need for the class
  devices.

o The usb-devices and usb-interfaces share the same bus, so I used
  the new "struct device_type" to let these devices identify
  themselves. This also removes the current logic of using a magic
  platform-pointer.
  The name of the device_type is also added to the environment
  which makes it easier to distinguish the different kinds of devices
  on the same subsystem.

  It looks like this:
    add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1
    SUBSYSTEM=usb
    SEQNUM=1533
    MAJOR=189
    MINOR=131
    DEVTYPE=usb_device
    PRODUCT=46d/c03e/2000
    TYPE=0/0/0
    BUSNUM=002
    DEVNUM=004

This udev rule works as a replacement for usb_device class devices:
  SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
    NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"

Updated patch, which needs the device_type patches in Greg's tree.

I also got a bugzilla assigned for this. :)
  https://bugzilla.novell.com/show_bug.cgi?id=250659

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: gadget-storage needs BLOCK
Randy Dunlap [Wed, 21 Mar 2007 20:57:51 +0000 (13:57 -0700)]
USB: gadget-storage needs BLOCK

With CONFIG_BLOCK=n, this build error happens:
WARNING: "bdev_read_only" [drivers/usb/gadget/g_file_storage.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: add power/level sysfs attribute
Alan Stern [Tue, 20 Mar 2007 18:59:39 +0000 (14:59 -0400)]
USB: add power/level sysfs attribute

This patch (as874) adds another piece to the user-visible part of the
USB autosuspend interface.  The new power/level sysfs attribute allows
users to force the device on (with autosuspend off), force the device
to sleep (with autoresume off), or return to normal automatic operation.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: ati_remote2: Add channel support
Peter Stokes [Sat, 17 Mar 2007 14:14:12 +0000 (16:14 +0200)]
USB: ati_remote2: Add channel support

Add logical channel support for ATI Remote Wonder II

The ATI Remote Wonder II can be configured with one of 16 unique logical
channels. Allowing up to 16 remotes to be used independently within
range of each other. This change adds functionality to configure the
receiver and filter the input data to respond or exclude remotes
configured with different logical channels.

Signed-off-by: Peter Stokes <linux@dadeos.freeserve.co.uk>
Acked-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>