]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoide: add struct ide_host (take 3)
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:57 +0000 (19:55 +0200)]
ide: add struct ide_host (take 3)

* Add struct ide_host which keeps pointers to host's ports.

* Add ide_host_alloc[_all]() and ide_host_remove() helpers.

* Pass 'struct ide_host *host' instead of 'u8 *idx' to
  ide_device_add[_all]() and rename it to ide_host_register[_all]().

* Convert host drivers and core code to use struct ide_host.

* Remove no longer needed ide_find_port().

* Make ide_find_port_slot() static.

* Unexport ide_unregister().

v2:
* Add missing 'struct ide_host *host' to macide.c.

v3:
* Fix build problem in pmac.c (s/ide_alloc_host/ide_host_alloc/)
  (Noticed by Stephen Rothwell).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add struct ide_tp_ops (take 2)
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:56 +0000 (19:55 +0200)]
ide: add struct ide_tp_ops (take 2)

* Add struct ide_tp_ops for transport methods.

* Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info
  and ide_hwif_t.

* Set the default hwif->tp_ops in ide_init_port_data().

* Set host driver specific hwif->tp_ops in ide_init_port().

* Export ide_exec_command(), ide_read_status(), ide_read_altstatus(),
  ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}()
  and ata_{in,out}put_data().

* Convert host drivers and core code to use struct ide_tp_ops.

* Remove no longer needed default_hwif_transport().

* Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops.

While at it:

* Use struct ide_port_info in falconide.c and q40ide.c.

* Rename ata_{in,out}put_data() to ide_{in,out}put_data().

v2:

* Fix missing convertion in ns87415.c.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add 'config' field to hw_regs_t
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:56 +0000 (19:55 +0200)]
ide: add 'config' field to hw_regs_t

Add 'config' field to hw_regs_t and use it to set hwif->config_data in
ide_init_port_hw(), then convert ide_legacy_init_one() to use hw->config.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-generic: probing fix
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:56 +0000 (19:55 +0200)]
ide-generic: probing fix

* Don't skip probing IDE port if the corresponding ide_hwifs[] slot
  is already occupied.

* Remove duplicate idx[i] assignment.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agogayle: reserve memory resources at once
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:56 +0000 (19:55 +0200)]
gayle: reserve memory resources at once

* Reserve memory resources for all IDE ports at once by moving
  request_mem_region() out of 'for ()' loop and always defining
  GAYLE_IDEREG_SIZE to 0x2000.

* Keep memory resources even if no free IDE slots can be found
  (this driver is unloadable currently).

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: filter out "default" transfer mode values in set_xfer_rate()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:56 +0000 (19:55 +0200)]
ide: filter out "default" transfer mode values in set_xfer_rate()

* Filter out "default" transfer mode values (0x00 - default PIO mode,
  0x01 - default PIO mode w/ IORDY disabled) in write handler for obsoleted
  /proc/ide/hd?/settings:current_speed setting.

  Allowing "default" transfer mode values is a dangerous thing to do as
  we don't support programming controller to the "default" transfer mode
  and devices often use different values for the default and maximum PIO
  mode (i.e. PIO2 default and PIO4 maximum) so the controller will stay
  programmed for higher PIO mode while device will use the lower PIO mode.

  There is no functionality loss as by using special IOCTLs device can
  still be programmed to "default" transfer modes (it is only useful for
  debugging/testing purposes anyway).

* Remove no longer needed IDE_HFLAG_ABUSE_SET_DMA_MODE host flag, it was
  previously used by few host drivers to program the controller to PIO0
  timings for "default" transfer mode == 0x01 (although some host drivers
  would program invalid PIO timings instead).

* Cleanup ide_set_xfer_rate() and add BUG_ON().

Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: filter out invalid transfer mode values in set_xfer_rate()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:55 +0000 (19:55 +0200)]
ide: filter out invalid transfer mode values in set_xfer_rate()

Filter out invalid transfer mode values (0x02-0x07) in write handler
for obsoleted /proc/ide/hd?/settings:current_speed setting.

While at it:

* Use XFER_UDMA_6 define.

Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove dead Virtual DMA support
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:55 +0000 (19:55 +0200)]
ide: remove dead Virtual DMA support

Lets remove dead Virtual DMA support for now so it doesn't clutter
core IDE code (it can be bring back when there is a need for it):

* Remove IDE_HFLAG_VDMA host flag.

* Remove ide_drive_t.vdma flag.

* cs5520.c: remove stale FIXMEs, cs5520_dma_host_set() and cs5520_dma_ops
  (also there is no longer a need to set IDE_HFLAG_NO_ATAPI_DMA).

There should be no functional changes caused by this patch.

Cc: TAKADA Yoshihito <takada@mbf.nifty.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: mark hpt34x host driver as BROKEN
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:55 +0000 (19:55 +0200)]
ide: mark hpt34x host driver as BROKEN

Alan Cox has noticed some time ago that hpt34x is broken
(http://lkml.org/lkml/2007/7/3/257):

"No the old driver doesn't even do that. It starts up. It spuriously
adjusts some non writable PCI BAR registers, prints a message about
resources being in use already then exits."

Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: limit cy82c693 host driver to ALPHA
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:54 +0000 (19:55 +0200)]
ide: limit cy82c693 host driver to ALPHA

Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove ->INB, ->OUTB and ->OUTBSYNC methods
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:54 +0000 (19:55 +0200)]
ide: remove ->INB, ->OUTB and ->OUTBSYNC methods

* Remove no longer needed ->INB, ->OUTB and ->OUTBSYNC methods.

Then:

* Remove no longer used default_hwif_[mm]iops() and ide_[mm_]outbsync().

* Cleanup SuperIO handling in ns87415.c.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ide_read_bcount_and_ireason() helper
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:54 +0000 (19:55 +0200)]
ide: add ide_read_bcount_and_ireason() helper

Add ide_read_bcount_and_ireason() helper and use it instead of ->INB
in {cdrom_newpc,ide_pc}_intr().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ide_read_ireason() helper
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:54 +0000 (19:55 +0200)]
ide: add ide_read_ireason() helper

Add ide_read_ireason() helper and use instead of ->INB for reading
ATAPI Interrupt Reason register.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ide_read_device() helper
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:54 +0000 (19:55 +0200)]
ide: add ide_read_device() helper

Add ide_read_device() helper and convert do_probe() to use it
instead of ->INB.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: use ->tf_read in ide_read_error()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:53 +0000 (19:55 +0200)]
ide: use ->tf_read in ide_read_error()

* Add IDE_TFLAG_IN_FEATURE taskfile flag for reading Feature
  register and handle it in ->tf_read.

* Convert ide_read_error() to use ->tf_read instead of ->INB,
  then uninline and export it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: use ->tf_load in SELECT_DRIVE()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:53 +0000 (19:55 +0200)]
ide: use ->tf_load in SELECT_DRIVE()

Convert SELECT_DRIVE() to use ->tf_load instead of ->OUTB.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: use ->tf_load in actual_try_to_identify()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:53 +0000 (19:55 +0200)]
ide: use ->tf_load in actual_try_to_identify()

Convert actual_try_to_identify() to use ->tf_load instead of ->OUTB.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: use ->tf_load in ide_config_drive_speed()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:52 +0000 (19:55 +0200)]
ide: use ->tf_load in ide_config_drive_speed()

Convert ide_config_drive_speed() to use ->tf_load instead of ->OUTB.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: change order of register access in ide_config_drive_speed()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:52 +0000 (19:55 +0200)]
ide: change order of register access in ide_config_drive_speed()

Write ATA Feature register before ATA Sector Count register as
a preparation to use ->tf_load in ide_config_drive_speed().

This change shouldn't affect anything (just an usual paranoia).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ->set_irq method
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:52 +0000 (19:55 +0200)]
ide: add ->set_irq method

Add ->set_irq method for setting nIEN bit of ATA Device Control
register and use it instead of ide_set_irq().

While at it:

* Use ->set_irq in init_irq() and do_reset1().

* Don't use HWIF() macro in ide_check_pm_state().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ->read_altstatus method
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:52 +0000 (19:55 +0200)]
ide: add ->read_altstatus method

* Remove ide_read_altstatus() inline helper.

* Add ->read_altstatus method for reading ATA Alternate Status
  register and use it instead of ->INB.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ->read_status method
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:52 +0000 (19:55 +0200)]
ide: add ->read_status method

* Remove ide_read_status() inline helper.

* Add ->read_status method for reading ATA Status register
  and use it instead of ->INB.

While at it:

* Don't use HWGROUP() macro.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ->exec_command method
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:51 +0000 (19:55 +0200)]
ide: add ->exec_command method

Add ->exec_command method for writing ATA Command register
and use it instead of ->OUTBSYNC.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: factor out simplex handling from ide_pci_dma_base()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:51 +0000 (19:55 +0200)]
ide: factor out simplex handling from ide_pci_dma_base()

* Factor out simplex handling from ide_pci_dma_base() to
  ide_pci_check_simplex().

* Set hwif->dma_base early in ->init_dma method / ide_hwif_setup_dma()
  and reset it in ide_init_port() if DMA initialization fails.

* Use ->read_sff_dma_status instead of ->INB in ide_pci_dma_base().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove ide_setup_dma()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:51 +0000 (19:55 +0200)]
ide: remove ide_setup_dma()

Export sff_dma_ops and then remove ide_setup_dma().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove ->dma_{status,command} fields from ide_hwif_t
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:51 +0000 (19:55 +0200)]
ide: remove ->dma_{status,command} fields from ide_hwif_t

* Use ->dma_base + offset instead of ->dma_{status,command}
  and remove no longer needed ->dma_{status,command}.

While at it:

* Use ATA_DMA_* defines.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: use I/O ops directly in ide-dma.c
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:50 +0000 (19:55 +0200)]
ide: use I/O ops directly in ide-dma.c

Use I/O ops directly in ide_dma_host_set(), ide_dma_setup(),
ide_dma_start() and __ide_dma_end().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ->read_sff_dma_status method
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:50 +0000 (19:55 +0200)]
ide: add ->read_sff_dma_status method

Add ->read_sff_dma_status method for reading DMA Status register
and use it instead of ->INB.

While at it:

* Use inb() directly in ns87415.c::ns87415_dma_end().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: pass hw_regs_t-s to ide_device_add[_all]() (take 3)
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:50 +0000 (19:55 +0200)]
ide: pass hw_regs_t-s to ide_device_add[_all]() (take 3)

* Add 'hw_regs_t **hws' argument to ide_device_add[_all]() and convert
  host drivers + ide_legacy_init_one() + ide_setup_pci_device[s]() to use
  it instead of calling ide_init_port_hw() directly.

  [ However if host has > 1 port we must still set hwif->chipset to hint
    consecutive ide_find_port() call that the previous slot is occupied. ]

* Unexport ide_init_port_hw().

v2:
* Use defines instead of hard-coded values in buddha.c, gayle.c and q40ide.c.
  (Suggested by Geert Uytterhoeven)

* Better patch description.

v3:
* Fix build problem in ide-cs.c. (Noticed by Stephen Rothwell)

There should be no functional changes caused by this patch.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: move ide_pci_setup_ports() call out from do_ide_setup_pci_device()
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:49 +0000 (19:55 +0200)]
ide: move ide_pci_setup_ports() call out from do_ide_setup_pci_device()

* Move ide_pci_setup_ports() call out from do_ide_setup_pci_device()
  to ide_setup_pci_device[s]().

* Drop no longer needed idx argument from do_ide_setup_pci_device().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-pmac: move ide_find_port() call to pmac_ide_setup_device() (take 2)
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:49 +0000 (19:55 +0200)]
ide-pmac: move ide_find_port() call to pmac_ide_setup_device() (take 2)

Move ide_find_port() call to pmac_ide_setup_device().

While at it:

- fix return value (s/-ENODEV/-ENOENT/)

- add DRV_NAME define and use it to set name field of pmac_port_info

- use ide_find_port_slot() instead of ide_find_port()

- remove superfluous error message (ide_find_port_slot() takes care of it)

- drop IDE interface number from driver banner message (but include bus type)

v2:
* Build fix (thanks to Stephen Rothwell for noticing the issue).

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-pmac: add ->init_dev method (take 4)
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:49 +0000 (19:55 +0200)]
ide-pmac: add ->init_dev method (take 4)

v2/3:
* Build fixes from Stephen Rothwell.

v4:
* Fix ->noprobe setting. (From Benjamin Herrenschmidt)

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-pmac: store pmif instead of hwif in ->driver_data (take 2)
Bartlomiej Zolnierkiewicz [Wed, 23 Jul 2008 17:55:48 +0000 (19:55 +0200)]
ide-pmac: store pmif instead of hwif in ->driver_data (take 2)

* Pass pmif instead of hwif to pmac_ide_do_{suspend,resume}().

* Store pmif instead of hwif in ->driver_data.

* Use dev_get_drvdata() instead of ->hwif_data to obtain pmif.

v2:
* Build fixes from Stephen Rothwell.

There should be no functional changes caused by this patch.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Wed, 23 Jul 2008 16:44:31 +0000 (09:44 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: apple_fn_keys F5 and F6
  HID: remove quirk lookup from usbkbd/usbmouse
  HID: Add mapping of new KEY_MEDIA_REPEAT keycode
  HID: gyration remote support
  HID: gyration sleep button quirk
  HID: add quirk for Logitech DiNovo desktop
  HID: fix quirk handling in usbmouse/kbd
  HID: fix memory leak in hidraw_release
  HID: add n-trig digitizer usage
  HID: Invert HWHEEL mappings for some Logitech mice
  HID:usbkbd:mark usb_kbd_keycode array as const
  HID: add fn key support on Macbook Pro 4,1 and Macbook Air
  HID: remove unused variable from hiddev compat ioctl
  HID: fix compile issue in hiddev ioctl
  HID: Push down BKL into ioctl handler in hidraw
  HID: Switch hiddev to unlocked_ioctl
  HID: use get/put_unaligned_* helpers
  HID: fix report descriptor handling for MS Wireless model 1028

15 years agoUML - Fix boot crash
Jeff Dike [Wed, 23 Jul 2008 15:46:50 +0000 (11:46 -0400)]
UML - Fix boot crash

My copying of linux/init.h didn't go far enough.  The definition of
__used singled out gcc minor version 3, but didn't care what the major
version was.  This broke when unit-at-a-time was added and gcc started
throwing out initcalls.

This results in an early boot crash when ptrace tries to initialize a
process with an empty, uninitialized register set.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/char/nvram.c: Removed duplicated include
Huang Weiyi [Wed, 23 Jul 2008 14:45:20 +0000 (22:45 +0800)]
drivers/char/nvram.c: Removed duplicated include

Removed duplicated include file <linux/smp_lock.h> in
drivers/char/nvram.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoset_irq_wake: fix return code and wake status tracking
Uwe Kleine-König [Wed, 23 Jul 2008 12:42:25 +0000 (14:42 +0200)]
set_irq_wake: fix return code and wake status tracking

Since 15a647eba94c3da27ccc666bea72e7cca06b2d19 set_irq_wake returned -ENXIO
if another device had it already enabled.  Zero is the right value to
return in this case.  Moreover the change to desc->status was not reverted
if desc->chip->set_wake returned an error.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokgdb: kgdboc console poll hooks for mpsc uart
Jason Wessel [Wed, 23 Jul 2008 16:30:16 +0000 (11:30 -0500)]
kgdb: kgdboc console poll hooks for mpsc uart

Add in console polling hooks for the mpsc uart for use with kgdb and
kgdboc.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agokgdb: kgdboc console poll hooks for cpm uart
Jason Wessel [Wed, 23 Jul 2008 16:30:16 +0000 (11:30 -0500)]
kgdb: kgdboc console poll hooks for cpm uart

Add in console polling hooks for the cpm uart for use with kgdb and
kgdboc.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
CC: galak@kernel.crashing.org
15 years agokgdb, powerpc: arch specific powerpc kgdb support
Jason Wessel [Wed, 23 Jul 2008 16:30:15 +0000 (11:30 -0500)]
kgdb, powerpc: arch specific powerpc kgdb support

This patch removes the old kgdb reminants from ARCH=powerpc and
implements the new style arch specific stub for the common kgdb core
interface.

It is possible to have xmon and kgdb in the same kernel, but you
cannot use both at the same time because there is only one set of
debug hooks.

The arch specific kgdb implementation saves the previous state of the
debug hooks and restores them if you unconfigure the kgdb I/O driver.
Kgdb should have no impact on a kernel that has no kgdb I/O driver
configured.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agokgdb: support for ARCH=arm
Jason Wessel [Wed, 20 Feb 2008 19:33:40 +0000 (13:33 -0600)]
kgdb: support for ARCH=arm

This patch adds the ARCH=arm specific a kgdb backend, originally
written by Deepak Saxena <dsaxena@plexity.net> and George Davis
<gdavis@mvista.com>.  Geoff Levand <geoffrey.levand@am.sony.com>,
Nicolas Pitre, Manish Lachwani, and Jason Wessel have contributed
various fixups here as well.

The KGDB patch makes one change to the core ARM architecture such that
the traps are initialized early for use with the debugger or other
subsystems.

[ mingo@elte.hu: small cleanups. ]
[ ben-linux@fluff.org: fixed early_trap_init ]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Deepak Saxena <dsaxena@plexity.net>
15 years agokgdb: remove unused HAVE_ARCH_KGDB_SHADOW_INFO config variable
Jason Wessel [Wed, 23 Jul 2008 16:30:15 +0000 (11:30 -0500)]
kgdb: remove unused HAVE_ARCH_KGDB_SHADOW_INFO config variable

Remove HAVE_ARCH_KGDB_SHADOW_INFO because it does not
exist anywhere in the kernel mainline sources

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agoMerge branches 'upstream' and 'upstream-fixes' into for-linus
Jiri Kosina [Wed, 23 Jul 2008 13:26:10 +0000 (15:26 +0200)]
Merge branches 'upstream' and 'upstream-fixes' into for-linus

15 years agoHID: apple_fn_keys F5 and F6
Henrik Rydberg [Tue, 22 Jul 2008 13:54:05 +0000 (15:54 +0200)]
HID: apple_fn_keys F5 and F6

In drivers/hid/hid-input.c, the apple_fn_keys translation table
contains no entries for the F5 and F6 keys. This patch maps the F5 and
F6 keys to KBDILLUMDOWN and KBDILLUMUP, respektively, which make them
work as keyboard backlight control keys.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: remove quirk lookup from usbkbd/usbmouse
Jiri Kosina [Mon, 21 Jul 2008 16:30:05 +0000 (18:30 +0200)]
HID: remove quirk lookup from usbkbd/usbmouse

This patch completely removes the dependency of usbkbd and usbmouse drivers
on usbhid code.

usbkbd/usbmouse drivers are not needed in the vast majority of cases anyway,
and they shouldn't be loaded in standard configurations at all. They are supposed
to be as trivial as possible, and searching for HID_QUIRK_IGNORE can even be
bad in some cases.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: Add mapping of new KEY_MEDIA_REPEAT keycode
Dmitry Torokhov [Fri, 4 Jul 2008 16:48:20 +0000 (12:48 -0400)]
HID: Add mapping of new KEY_MEDIA_REPEAT keycode

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: gyration remote support
Daniel Walker [Fri, 4 Jul 2008 13:23:10 +0000 (15:23 +0200)]
HID: gyration remote support

This adds in a quirk for the additional un-mapped buttons on the
gyration MCE remote.

Defines are now alphabetical.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: gyration sleep button quirk
Jiri Kosina [Fri, 4 Jul 2008 13:22:53 +0000 (15:22 +0200)]
HID: gyration sleep button quirk

This patch is based on one provided by Jiri Kosina to handle the sleep
button. I just added some cleanup and integrated it into my series.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: add quirk for Logitech DiNovo desktop
Jiri Kosina [Tue, 1 Jul 2008 10:35:16 +0000 (12:35 +0200)]
HID: add quirk for Logitech DiNovo desktop

Logitech DiNovo desktop needs the same quirk as other DiNovo
devices.

Reported-by: Farid Benamrouche <farid.benamrouche@free.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: fix quirk handling in usbmouse/kbd
Jiri Slaby [Fri, 27 Jun 2008 20:09:25 +0000 (22:09 +0200)]
HID: fix quirk handling in usbmouse/kbd

When usbmouse/kbd is set to build, USB_HID is never defined due to
the USB_HID!=y Kconfig rule. Test CONFIG_USB_HID_MODULE in both
drivers instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: fix memory leak in hidraw_release
Jiri Kosina [Tue, 24 Jun 2008 12:45:27 +0000 (14:45 +0200)]
HID: fix memory leak in hidraw_release

hidraw_release() forgot to free the linked list structure, causing memory
leak.

Reported-by: Juan Marcos Diez Esteban <juan_m_diez@yahoo.es>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: add n-trig digitizer usage
Rafi Rubin [Thu, 19 Jun 2008 09:51:04 +0000 (11:51 +0200)]
HID: add n-trig digitizer usage

This adds a hid usage that is reported by the N-Trig digitizer in the Dell
Latitude XT screen.

Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: Invert HWHEEL mappings for some Logitech mice
Dan Nicholson [Sat, 14 Jun 2008 17:26:24 +0000 (10:26 -0700)]
HID: Invert HWHEEL mappings for some Logitech mice

Some Logitech mice have a tilt wheel which register as HWHEEL buttons.
The events are positive for a click to the right and negative for a
click to the left. Applications expect the opposite, though.

I suspect this affects a lot more Logitech mice, but these are the only
two I have. I tested this using evtest and a GTK application. A similar
Microsoft Intellimouse I have works correctly.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID:usbkbd:mark usb_kbd_keycode array as const
Ming Lei [Sun, 8 Jun 2008 08:15:16 +0000 (16:15 +0800)]
HID:usbkbd:mark usb_kbd_keycode array as const

mark it as const because it is read only

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: add fn key support on Macbook Pro 4,1 and Macbook Air
Alexandre Karpenko [Wed, 4 Jun 2008 08:31:24 +0000 (10:31 +0200)]
HID: add fn key support on Macbook Pro 4,1 and Macbook Air

Added device ids to hid-quriks for detection of keyboards on 4th
generation Macbook Pro and Macbook Air

The naming scheme is consistent with past Apple keyboards in hid-quirks;
as defined by Apple (including device ids) in:
/System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/Co
ntents/Info.plist
Patch was originally posted and tested at:
https://bugs.launchpad.net/mactel-support/+bug/207127

Signed-off-by: Alexandre Karpenko <alexander@comm.utoronto.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: remove unused variable from hiddev compat ioctl
Jiri Kosina [Wed, 4 Jun 2008 13:29:42 +0000 (15:29 +0200)]
HID: remove unused variable from hiddev compat ioctl

Remove unused inode variable from hiddev compat ioctl handler.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: fix compile issue in hiddev ioctl
Jiri Kosina [Tue, 27 May 2008 09:36:40 +0000 (11:36 +0200)]
HID: fix compile issue in hiddev ioctl

Fix build failure introduced by Alan's ioctl -> unlocked_ioctl
(pushing BKL down to the driver) conversion patch for hiddev.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: Push down BKL into ioctl handler in hidraw
Alan Cox [Mon, 26 May 2008 09:25:26 +0000 (11:25 +0200)]
HID: Push down BKL into ioctl handler in hidraw

In this case I simply wrapped it as code review suggests the locking
already terminally broken and I didn't want to make it first. See added
comment

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: Switch hiddev to unlocked_ioctl
Alan Cox [Mon, 26 May 2008 09:25:20 +0000 (11:25 +0200)]
HID: Switch hiddev to unlocked_ioctl

Push down the BKL. In some cases compat_ioctl already doesn't take the
BKL so we don't either. Some of the locking here seems already dubious
and object lifetimes want documenting

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: use get/put_unaligned_* helpers
Harvey Harrison [Fri, 16 May 2008 09:00:23 +0000 (11:00 +0200)]
HID: use get/put_unaligned_* helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Jiri Kosina [Wed, 23 Jul 2008 13:19:00 +0000 (15:19 +0200)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

15 years agosdhci: highmem capable PIO routines
Pierre Ossman [Sun, 20 Jul 2008 22:32:11 +0000 (00:32 +0200)]
sdhci: highmem capable PIO routines

Improve the PIO handling so that it can service highmem pages.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agosg: reimplement sg mapping iterator
Tejun Heo [Sat, 19 Jul 2008 14:03:35 +0000 (23:03 +0900)]
sg: reimplement sg mapping iterator

This is alternative implementation of sg content iterator introduced
by commit 83e7d317... from Pierre Ossman in next-20080716.  As there's
already an sg iterator which iterates over sg entries themselves, name
this sg_mapping_iterator.

Slightly edited description from the original implementation follows.

Iteration over a sg list is not that trivial when you take into
account that memory pages might have to be mapped before being used.
Unfortunately, that means that some parts of the kernel restrict
themselves to directly accesible memory just to not have to deal with
the mess.

This patch adds a simple iterator system that allows any code to
easily traverse an sg list and not have to deal with all the details.
The user can decide to consume part of the iteration.  Also, iteration
can be stopped and resumed later if releasing the kmap between
iteration steps is necessary.  These features are useful to implement
piecemeal sg copying for interrupt drive PIO for example.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc_test: print message when attaching to card
Pierre Ossman [Tue, 22 Jul 2008 12:38:35 +0000 (14:38 +0200)]
mmc_test: print message when attaching to card

Make it a bit more obvious that the card has been claimed by the
mmc_test driver so that people don't have to wonder why their block
device never shows up.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc: Remove Russell as primecell mci maintainer
Pierre Ossman [Tue, 22 Jul 2008 12:36:57 +0000 (14:36 +0200)]
mmc: Remove Russell as primecell mci maintainer

Russell no longer has the resources to fully test the controller, so
he is stepping down as maintainer.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc_block: bounce buffer highmem support
Pierre Ossman [Tue, 22 Jul 2008 12:35:42 +0000 (14:35 +0200)]
mmc_block: bounce buffer highmem support

Support highmem pages in the bounce buffer code by using the
sg_copy_from/to_buffer() functions.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agosdhci: fix bad warning from commit c8b3e02
Pierre Ossman [Tue, 22 Jul 2008 11:23:23 +0000 (13:23 +0200)]
sdhci: fix bad warning from commit c8b3e02

Commit c8b3e02 renamed a variable, but missed one reference to it
inside a WARN_ON, causing it to incorrectly trigger.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agosdhci: add warnings for bad buffers in ADMA path
Pierre Ossman [Sun, 20 Jul 2008 22:45:15 +0000 (00:45 +0200)]
sdhci: add warnings for bad buffers in ADMA path

The ADMA code path assumes that the 3 byte alignment fix doesn't cross
a page boundary. I'm not convinced this is worth supporting, but at
least print a warning in the off chance we'll actually see such a request.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc_test: test oversized sg lists
Pierre Ossman [Sun, 20 Jul 2008 22:14:52 +0000 (00:14 +0200)]
mmc_test: test oversized sg lists

Add tests that make sure the driver properly checks the blocks and
blksz fields and doesn't assume the sg list has a size that perfectly
matches the current request.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc_test: highmem tests
Pierre Ossman [Fri, 4 Jul 2008 16:17:13 +0000 (18:17 +0200)]
mmc_test: highmem tests

Add a couple of tests to make sure the host driver handles highmem
memory pages properly. Unfortunately there is no way to guarantee an
allocation below 4 GB in i386, so it might give you addresses that
are out of reach for the hardware (OTOH, so will any other highmem
allocation in the kernel).

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agos3cmci: ensure host stopped on machine shutdown
Ben Dooks [Thu, 17 Jul 2008 14:32:54 +0000 (15:32 +0100)]
s3cmci: ensure host stopped on machine shutdown

Ensure that the s3cmci host controller is turned off
when the machine is shutdown, otherwise we end up
leaving the card powered and processing insertion and
removal events after the system prints "System halted."

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agoau1xmmc: suspend/resume implementation
Manuel Lauss [Thu, 17 Jul 2008 11:07:28 +0000 (13:07 +0200)]
au1xmmc: suspend/resume implementation

Basic suspend/resume support: disable peripheral on suspend and
reinit on resume.

Tested on Au1200.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agos3cmci: fixes for section mismatch warnings
Ben Dooks [Thu, 17 Jul 2008 10:54:01 +0000 (11:54 +0100)]
s3cmci: fixes for section mismatch warnings

Fix the naming of various functions in the s3cmc
driver to stop triggering section mismatch warnings.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agopxamci: trivial fix of DMA alignment register bit clearing
Karl Beldan [Wed, 16 Jul 2008 16:29:11 +0000 (18:29 +0200)]
pxamci: trivial fix of DMA alignment register bit clearing

Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agotty: Fix up escaped character
Alan Cox [Tue, 22 Jul 2008 22:38:04 +0000 (23:38 +0100)]
tty: Fix up escaped character

Louis Rilling noticed this.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 23 Jul 2008 02:09:51 +0000 (19:09 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (82 commits)
  ipw2200: Call netif_*_queue() interfaces properly.
  netxen: Needs to include linux/vmalloc.h
  [netdrvr] atl1d: fix !CONFIG_PM build
  r6040: rework init_one error handling
  r6040: bump release number to 0.18
  r6040: handle RX fifo full and no descriptor interrupts
  r6040: change the default waiting time
  r6040: use definitions for magic values in descriptor status
  r6040: completely rework the RX path
  r6040: call napi_disable when puting down the interface and set lp->dev accordingly.
  mv643xx_eth: fix NETPOLL build
  r6040: rework the RX buffers allocation routine
  r6040: fix scheduling while atomic in r6040_tx_timeout
  r6040: fix null pointer access and tx timeouts
  r6040: prefix all functions with r6040
  rndis_host: support WM6 devices as modems
  at91_ether: use netstats in net_device structure
  sfc: Create one RX queue and interrupt per CPU package by default
  sfc: Use a separate workqueue for resets
  sfc: I2C adapter initialisation fixes
  ...

15 years agoRe-delete zombie 'drivers/usb/serial/airprime.c' file
Linus Torvalds [Wed, 23 Jul 2008 02:06:00 +0000 (19:06 -0700)]
Re-delete zombie 'drivers/usb/serial/airprime.c' file

Stephen Rothwell points out that this file got deleted (on purpose) by
commit 640c1bce86d1e11ee6a1263fdf6170d3210b1684 ("USB: delete airprime
driver"), but then almost immediately incorrectly resurrected by commit
95da310e66ee8090119596c70ca8432e57f9a97f ("usb_serial: API all change").

Delete it again.  If it comes back, we'll need to drive a stake through
its heart.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 23 Jul 2008 02:04:22 +0000 (19:04 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc32: pass -m32 when building vmlinux.lds
  sparc: Fixes the DRM layer build on sparc.
  ide: merge <asm-sparc/ide_64.h> with <asm-sparc/ide_32.h>
  ide: <asm-sparc/ide_64.h>: use __raw_{read,write}w()
  ide: <asm-sparc/ide_32.h>: use __raw_{read,write}w()
  ide: <asm-sparc/ide_64.h>: use %r0 for outw_be()
  sparc64: Do not define BIO_VMERGE_BOUNDARY.

15 years agoipw2200: Call netif_*_queue() interfaces properly.
David S. Miller [Wed, 23 Jul 2008 01:32:47 +0000 (18:32 -0700)]
ipw2200: Call netif_*_queue() interfaces properly.

netif_carrier_{on,off}() handles starting and stopping packet
flow into the driver.  So there is no reason to invoke netif_stop_queue()
and netif_wake_queue() in response to link status events.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetxen: Needs to include linux/vmalloc.h
David S. Miller [Wed, 23 Jul 2008 01:29:10 +0000 (18:29 -0700)]
netxen: Needs to include linux/vmalloc.h

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Wed, 23 Jul 2008 01:19:22 +0000 (18:19 -0700)]
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

15 years ago[netdrvr] atl1d: fix !CONFIG_PM build
Jeff Garzik [Wed, 23 Jul 2008 01:17:38 +0000 (21:17 -0400)]
[netdrvr] atl1d: fix !CONFIG_PM build

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoMerge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Wed, 23 Jul 2008 00:54:47 +0000 (17:54 -0700)]
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

15 years agoI/OAT: I/OAT version 3.0 support
Maciej Sosnowski [Wed, 23 Jul 2008 00:30:57 +0000 (17:30 -0700)]
I/OAT: I/OAT version 3.0 support

This patch adds to ioatdma and dca modules
support for Intel I/OAT DMA engine ver.3 (aka CB3 device).
The main features of I/OAT ver.3 are:
 * 8 single channel DMA devices (8 channels total)
 * 8 DCA providers, each can accept 2 requesters
 * 8-bit TAG values and 32-bit extended APIC IDs

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: tcp_dma_copybreak default value dependent on I/OAT version
Maciej Sosnowski [Wed, 23 Jul 2008 00:30:57 +0000 (17:30 -0700)]
I/OAT: tcp_dma_copybreak default value dependent on I/OAT version

I/OAT DMA performance tuning showed different optimal values of
tcp_dma_copybreak for different I/OAT versions (4096 for 1.2 and 2048
for 2.0).  This patch lets ioatdma driver set tcp_dma_copybreak value
according to these results.

[dan.j.williams@intel.com: remove some ifdefs]
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agor6040: rework init_one error handling
Florian Fainelli [Mon, 21 Jul 2008 10:32:29 +0000 (12:32 +0200)]
r6040: rework init_one error handling

This patch reworks the error handling in r6040_init_one
in order not to leak resources and correcly unmap and release
PCI regions of the MAC. Also prefix printk's with the driver name
for clarity.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: bump release number to 0.18
Florian Fainelli [Sun, 13 Jul 2008 12:36:04 +0000 (14:36 +0200)]
r6040: bump release number to 0.18

This patch bumps the release of the r6040 driver. There has been
quite some versions of it out there, but this one is the one
people should report bugs against.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: handle RX fifo full and no descriptor interrupts
Florian Fainelli [Sun, 13 Jul 2008 12:35:32 +0000 (14:35 +0200)]
r6040: handle RX fifo full and no descriptor interrupts

This patch allows the MAC to handle the RX FIFO full
and no descriptor available interrupts. While we are at it
replace the TX interrupt with its corresponding definition.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: change the default waiting time
Florian Fainelli [Sun, 13 Jul 2008 12:35:00 +0000 (14:35 +0200)]
r6040: change the default waiting time

This patch changes the default waiting time of a packet, which
along with our previous r6040_rx path, was causing huge delays
with another host (160 to 230 ms).

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: use definitions for magic values in descriptor status
Florian Fainelli [Sun, 13 Jul 2008 12:34:15 +0000 (14:34 +0200)]
r6040: use definitions for magic values in descriptor status

Define all the descriptor status the MAC can set.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: completely rework the RX path
Florian Fainelli [Sun, 13 Jul 2008 12:33:36 +0000 (14:33 +0200)]
r6040: completely rework the RX path

This patch completely reworks the RX path in order to be
more accurate about what is going on with the MAC.
We no longer read the error from the MLSR register instead read
the descriptor status register which reflects, the error per descriptor.
We now allocate skbs on the fly in r6040_rx, and we handle allocation
failure instead of simply dropping the packet. Remove the
rx_free_desc counter of r6040_private structure since we
allocate skbs in the RX path.

r6040_rx_buf_alloc is now removed and becomes unuseless.

Signed-Off-By: Joerg Albert <jal2@gmx.de>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: call napi_disable when puting down the interface and set lp->dev accordingly.
Florian Fainelli [Sun, 13 Jul 2008 12:32:45 +0000 (14:32 +0200)]
r6040: call napi_disable when puting down the interface and set lp->dev accordingly.

We did not call napi_disabled when putting down the interface
which should be done. Finally initialize lp->dev when everything
is set.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agomv643xx_eth: fix NETPOLL build
Lennert Buytenhek [Sun, 6 Jul 2008 22:03:00 +0000 (00:03 +0200)]
mv643xx_eth: fix NETPOLL build

Joseph Fannin <jfannin@gmail.com> and Takashi Iwai <tiwai@suse.de>
noticed that commit 073a345c04b01da0cc5b79ac7be0c7c8b1691ef5
("mv643xx_eth: clarify irq masking and unmasking") broke the
mv643xx_eth build when NETPOLL is enabled, due to it not renaming
one instance of INT_CAUSE_EXT in mv643xx_eth_netpoll().  This patch
takes care of that instance as well.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: Dale Farnsworth <dale@farnsworth.org>
Cc: Joseph Fannin <jfannin@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: rework the RX buffers allocation routine
Florian Fainelli [Sun, 13 Jul 2008 12:32:18 +0000 (14:32 +0200)]
r6040: rework the RX buffers allocation routine

Rework the RX buffers allocation function so that we do not
leak memory in the case we could not allocate skbs for the
RX path. Propagate the errors to the r6040_up function
where we call the RX buffers allocation function.

Also rename the r6040_alloc_txbufs function to
r6040_init_txbufs, to reflect what it really does.

Signed-Off-By: Joerg Albert <jal2@gmx.de>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: fix scheduling while atomic in r6040_tx_timeout
Florian Fainelli [Sun, 13 Jul 2008 12:29:20 +0000 (14:29 +0200)]
r6040: fix scheduling while atomic in r6040_tx_timeout

Add a helper function which only modifies R6040 MAC registers
use it when we timeout, and on adapter initialization. Fix
the scheduling while atomic but in the timeout routine due
to the reallocation of rx/tx buffers.

Signed-Off-By: Joerg Albert <jal2@gmx.de>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: fix null pointer access and tx timeouts
Florian Fainelli [Sun, 13 Jul 2008 12:28:27 +0000 (14:28 +0200)]
r6040: fix null pointer access and tx timeouts

This patch fixes a null pointer access in r6040_rx due
to lp->dev not being initialized.

Fix the TX timeouts, TX irq was not re-enabled on RX irq

Signed-Off-By: Joerg Albert <jal2@gmx.de>
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agor6040: prefix all functions with r6040
Florian Fainelli [Sun, 13 Jul 2008 11:39:32 +0000 (13:39 +0200)]
r6040: prefix all functions with r6040

Prefix all functions inside the r6040 driver with r6040 to
avoid namespace clashing.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agorndis_host: support WM6 devices as modems
Thomas Backlund [Tue, 22 Jul 2008 20:55:58 +0000 (13:55 -0700)]
rndis_host: support WM6 devices as modems

This patch allows Windows Mobile 6 devices to be used for
tethering -- that is, used as modems.  It was requested by
AdamW in kernel bugzilla:

  http://bugzilla.kernel.org/show_bug.cgi?id=11119

and Mandriva kernel-discuss list.  It is tested and confirmed
to work by Peterl:

  http://forum.eeeuser.com/viewtopic.php?pid=323543#p323543

This patch is based on the patch in the above kernel bugzilla,
which is from the usb-rndis-lite tree.

[ dbrownell@users.sourceforge.net: misc fixes ]
Signed-off-by: Thomas Backlund <tmb@mandriva.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoat91_ether: use netstats in net_device structure
Paulius Zaleckas [Thu, 17 Jul 2008 08:01:26 +0000 (11:01 +0300)]
at91_ether: use netstats in net_device structure

Use net_device_stats from net_device structure instead of local.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Tested-by: Marc Pignat <marc.pignat@hevs.ch>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosfc: Create one RX queue and interrupt per CPU package by default
Ben Hutchings [Fri, 18 Jul 2008 18:03:10 +0000 (19:03 +0100)]
sfc: Create one RX queue and interrupt per CPU package by default

Using multiple cores in the same package to handle received traffic
does not appear to provide a performance benefit.  Therefore use CPU
topology information to count CPU packages and use that as the default
number of RX queues and interrupts.  We rely on interrupt balancing to
spread the interrupts across packages.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>