Commit Graph

23 Commits

Author SHA1 Message Date
Namhyung Kim 16350a7258 uwb: fix compiler warning on i1480_est_id_table
Annotate i1480_est_id_table as '__used' to fix following warning:

  CC      drivers/uwb/i1480/i1480-est.o
drivers/uwb/i1480/i1480-est.c:94: warning: ‘i1480_est_id_table’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-03 12:06:04 -08:00
David Vrabel 446396bfab uwb: Remove the WLP subsystem and drivers
The only Wimedia LLC Protocol (WLP) hardware was an Intel i1480 chip
with a beta release of firmware that was never commercially available as
a product.  This hardware and firmware is no longer available as Intel
sold their UWB/WLP IP.  I also see little prospect of other WLP
capable hardware ever being available.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2010-10-25 14:03:45 +01:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Linus Torvalds b50df7d1fb Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: remove duplicate cpu_to_le16()
  uwb: declare MODULE_FIRMWARE() in i1480 DFU driver
  uwb: make USB device id table constant
  uwb: wlp: refactor wlp_get_<attribute>() macros
2010-03-19 18:14:22 -07:00
Dan Carpenter bcf59e2c4d uwb: remove duplicate cpu_to_le16()
These parameters should be passed as cpu endian because we change it to
little endian inside usb_control_msg().  On x86 cpu_to_le16() doesn't
do anything so either way works but I think the original code would break
on big endian systems.

I removed the masks as well because that usb_control_msg() parameters
are __u16 so we already only use the lower bits.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2010-02-25 13:38:51 +00:00
Peter Huewe 473a72a18b uwb/i1480: add __init/__exit macros
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of

	uwb/i1480/i1480-est.c

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-05 12:22:31 +01:00
Ben Hutchings 35fb2a816a uwb: declare MODULE_FIRMWARE() in i1480 DFU driver
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2010-01-14 17:15:20 +00:00
Márton Németh 34446d05dd uwb: make USB device id table constant
The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it is worth to make the initialization data also constant.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2010-01-14 17:14:08 +00:00
André Goddard Rosa af901ca181 tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:55 +01:00
Joe Perches a419aef8b8 trivial: remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:58 +02:00
Stephen Hemminger 3a27c149ab uwb: convert to netdev_tx_t
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-01 01:13:44 -07:00
David S. Miller 7f46b1343f Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-01-08 11:05:59 -08:00
Stephen Hemminger c4a80d7e67 uwb: convert devices to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-07 18:09:07 -08:00
Nick Andrew 8eb09d8d24 trivial: Fix misspelling of "firmware" in usb.c
Fix misspelling of "firmware" in usb.c

It's spelled "firmware".

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-06 11:28:09 +01:00
David Vrabel a01777ecf2 uwb: remove unused include/linux/uwb/debug.h
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-22 18:30:29 +00:00
David Vrabel bce83697c5 uwb: use dev_dbg() for debug messages
Instead of the home-grown d_fnstart(), d_fnend() and d_printf() macros,
use dev_dbg() or remove the message entirely.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-22 18:22:50 +00:00
David Vrabel e8e1594c81 wlp: start/stop radio on network interface up/down
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-19 14:47:04 +00:00
Huang Weiyi 7bc9149422 uwb: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/uwb/drp-ie.c
  drivers/uwb/hwa-rc.c
  drivers/uwb/i1480/dfu/usb.c
  drivers/uwb/i1480/i1480u-wlp/lc.c
  drivers/uwb/i1480/i1480u-wlp/sysfs.c
  drivers/uwb/rsv.c
  drivers/uwb/whc-rc.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-31 15:00:18 +00:00
David Vrabel 8092d7c978 uwb: don't use printk_ratelimit() so often
Avoid using printk_ratelimit() in many places because:
  - many were error messages reporting broken hardware (it's useful to
    get all of these).
  - the message itself wasn't useful so the message has been removed.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-16 13:56:53 +01:00
Anderson Lizardo b5784f10d5 uwb: i1480/GUWA100U: fix firmware download issues
IOGear firmware versions >= 1.4.12224 fail to be downloaded because of a
spurious (and harmless) RCEB received after the download notification. This
patch handles this RCEB and keeps compatibility with future versions that might
not emit this RCEB.

i1480_rceb_check() is reused to check for the RCEB. It is also refactored with
improved comments and reused in another place in mac.c where the checking was
being duplicated.

This patch was tested on both i1480 and GUWA100U HWAs, with all firmware
versions currently available.

Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
2008-09-17 16:54:34 +01:00
Anderson Lizardo 8c7e8cb855 uwb: i1480: remove MAC/PHY information checking function
Some hardware/firmware combinations (most notably an IOGear HWA using the i1480
firmware) kill the host controller after issuing a GET_MAC_PHY_INFO command.
Removing this check seems harmless otherwise.

The patch fixes the issue where the HC is killed, showing the message:

ehci_hcd 0000:00:1d.7: HC died; cleaning up

After this error, USB comes back only after reloading the ehci_hcd module.

Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:34 +01:00
Inaky Perez-Gonzalez a21b963aa4 uwb: add the i1480 WLP driver
Add the driver for the WLP capability of the Intel i1480 device.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:28 +01:00
Inaky Perez-Gonzalez 1ba47da527 uwb: add the i1480 DFU driver
Add the driver for downloading the firmware to an Intel i1480 device.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:28 +01:00