GitHub/exynos8895/android_kernel_samsung_universal8895.git
16 years agoxtensa: Add support for the Sonic Ethernet device for the XT2000 board.
Chris Zankel [Tue, 6 May 2008 06:36:35 +0000 (23:36 -0700)]
xtensa: Add support for the Sonic Ethernet device for the XT2000 board.

Add support for the on-board Sonic Ethernet device for the XT2000
evaluation board.

Signed-off-by: Chris Zankel <chris@zankel.net>
16 years agoxtensa: replace remaining __FUNCTION__ occurrences
Harvey Harrison [Wed, 30 Jul 2008 19:48:54 +0000 (12:48 -0700)]
xtensa: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Zankel <chris@zankel.net>
16 years agoxtensa: use newer __SPIN_LOCK_UNLOCKED macro
Robert P. J. Day [Wed, 30 Jul 2008 19:48:55 +0000 (12:48 -0700)]
xtensa: use newer __SPIN_LOCK_UNLOCKED macro

SPIN_LOCK_UNLOCKED() breaks lockdep and is deprecated.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Zankel <chris@zankel.net>
16 years agoXTENSA: warn about including <asm/rwsem.h> directly.
Robert P. J. Day [Wed, 30 Jul 2008 19:48:53 +0000 (12:48 -0700)]
XTENSA: warn about including <asm/rwsem.h> directly.

For consistency with other architectures, warn about including
<asm-xtensa/rwsem.h> directly.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Zankel <chris@zankel.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 14 Oct 2008 17:28:49 +0000 (10:28 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  qlge: Fix page size ifdef test.
  net: Rationalise email address: Network Specific Parts
  dsa: fix compile bug on s390
  netns: mib6 section fixlet
  enic: Fix Kconfig headline description
  de2104x: wrong MAC address fix
  s390: claw compile fixlet
  net: export genphy_restart_aneg
  cxgb3: extend copyrights to 2008
  cxgb3: update driver version
  net/phy: add missing kernel-doc
  pktgen: fix skb leak in case of failure
  mISDN/dsp_cmx.c: fix size checks
  misdn: use nonseekable_open()
  net: fix driver build errors due to missing net/ip6_checksum.h include

16 years agoarch/m68k/mm/kmap.c: introduce missing kfree
Julia Lawall [Mon, 13 Oct 2008 19:59:04 +0000 (21:59 +0200)]
arch/m68k/mm/kmap.c: introduce missing kfree

Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
..
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
..>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonet/rfkill/rfkill-input.c needs <linux/sched.h>
Geert Uytterhoeven [Mon, 13 Oct 2008 19:59:03 +0000 (21:59 +0200)]
net/rfkill/rfkill-input.c needs <linux/sched.h>

For some m68k configs, I get:

| net/rfkill/rfkill-input.c: In function 'rfkill_start':
| net/rfkill/rfkill-input.c:208: error: dereferencing pointer to incomplete type

As the incomplete type is `struct task_struct', including <linux/sched.h> fixes
it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Atari SCSI needs NVRAM
Geert Uytterhoeven [Mon, 13 Oct 2008 19:59:02 +0000 (21:59 +0200)]
m68k: Atari SCSI needs NVRAM

ERROR: "nvram_read_byte" [drivers/scsi/atari_scsi.ko] undefined!
ERROR: "nvram_check_checksum" [drivers/scsi/atari_scsi.ko] undefined!

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: init_irq_proc depends on CONFIG_PROC_FS
Geert Uytterhoeven [Mon, 13 Oct 2008 19:59:01 +0000 (21:59 +0200)]
m68k: init_irq_proc depends on CONFIG_PROC_FS

If CONFIG_PROC_FS is not set, I get:

| arch/m68k/kernel/ints.c:433: error: redefinition of 'init_irq_proc'
| include/linux/interrupt.h:438: error: previous definition of 'init_irq_proc' was here

This was introduced by commit 6168a702ab0be181e5e57a0b2d0e7376f7a47f0b
("Declare init_irq_proc before we use it."), which replaced the #ifdef
protection of the init_irq_proc() call by a static inline dummy if
CONFIG_PROC_FS is not set.

Make init_irq_proc() depend on CONFIG_PROC_FS to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: remove the dead PCI code
Adrian Bunk [Mon, 13 Oct 2008 19:59:00 +0000 (21:59 +0200)]
m68k: remove the dead PCI code

This patch removes the no longer used m68k PCI code.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Remove the broken Hades support
Adrian Bunk [Mon, 13 Oct 2008 19:58:59 +0000 (21:58 +0200)]
m68k: Remove the broken Hades support

This patch removes the Hades support that was marked as BROKEN 5 years ago.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoHP input: kill warnings due to suseconds_t differences
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:58 +0000 (21:58 +0200)]
HP input: kill warnings due to suseconds_t differences

Kill compiler warnings related to printf() formats in the input drivers for
various HP9000 machines, which are shared between PA-RISC (suseconds_t is int)
and m68k (suseconds_t is long). As both are 32-bit, it's safe to cast to int.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: <asm/pci.h> needs <asm-generic/pci-dma-compat.h>
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:57 +0000 (21:58 +0200)]
m68k: <asm/pci.h> needs <asm-generic/pci-dma-compat.h>

Several multi-bus subsystems:

| include/linux/ssb/ssb.h: In function 'ssb_dma_mapping_error':
| include/linux/ssb/ssb.h:430: error: implicit declaration of function 'pci_dma_mapping_error'
| include/linux/ssb/ssb.h: In function 'ssb_dma_map_single':
| include/linux/ssb/ssb.h:444: error: implicit declaration of function 'pci_map_single'
| include/linux/ssb/ssb.h: In function 'ssb_dma_unmap_single':
| include/linux/ssb/ssb.h:458: error: implicit declaration of function 'pci_unmap_single'
| include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_for_cpu':
| include/linux/ssb/ssb.h:475: error: implicit declaration of function 'pci_dma_sync_single_for_cpu'
| include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_for_device':
| include/linux/ssb/ssb.h:493: error: implicit declaration of function 'pci_dma_sync_single_for_device'

or legacy drivers:

| drivers/net/hp100.c: In function 'pdl_map_data':
| drivers/net/hp100.c:291: error: implicit declaration of function 'pci_map_single'
| drivers/net/hp100.c: In function 'hp100_probe1':
| drivers/net/hp100.c:707: error: implicit declaration of function 'pci_alloc_consistent'
| drivers/net/hp100.c:782: error: implicit declaration of function 'pci_free_consistent'
| drivers/net/hp100.c: In function 'hp100_clean_txring':
| drivers/net/hp100.c:1614: error: implicit declaration of function 'pci_unmap_single'

and

| drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_allocate_scb':
| drivers/scsi/aic7xxx_old.c:2573: error: implicit declaration of function 'pci_alloc_consistent'
| drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_done':
| drivers/scsi/aic7xxx_old.c:2697: error: implicit declaration of function 'pci_unmap_single'
| drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_handle_seqint':
| drivers/scsi/aic7xxx_old.c:4275: error: implicit declaration of function 'pci_map_single'
| drivers/scsi/aic7xxx_old.c: In function 'aic7xxx_free':
| drivers/scsi/aic7xxx_old.c:8460: error: implicit declaration of function 'pci_free_consistent'

rely on PCI DMA operations to be always available.

Add #include <asm-generic/pci-dma-compat.h> to <asm/pci.h> to make them happy.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Add missing dma_sync_single_range_for_{cpu,device}()
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:56 +0000 (21:58 +0200)]
m68k: Add missing dma_sync_single_range_for_{cpu,device}()

| include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_range_for_cpu':
| include/linux/ssb/ssb.h:517: error: implicit declaration of function 'dma_sync_single_range_for_cpu'
| include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_range_for_device':
| include/linux/ssb/ssb.h:538: error: implicit declaration of function 'dma_sync_single_range_for_device'

Add the missing dma_sync_single_range_for_{cpu,device}(), and remove the
`inline' for the non-static function dma_sync_single_for_device().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Define rtc_lock on Atari
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:55 +0000 (21:58 +0200)]
m68k: Define rtc_lock on Atari

The nvram and rtc-cmos drivers use the spinlock rtc_lock to protect against
concurrent accesses to the CMOS memory. As m68k doesn't support SMP or preempt
yet, the spinlock calls tend to get optimized away, but not for all
configurations, causing in some rare cases:

| ERROR: "rtc_lock" [drivers/rtc/rtc-cmos.ko] undefined!
| ERROR: "rtc_lock" [drivers/char/nvram.ko] undefined!

Add the spinlock to the Atari core code to avoid this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Remove unused atari_kbd_translate()
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:54 +0000 (21:58 +0200)]
m68k: Remove unused atari_kbd_translate()

If CONFIG_VT=n, I get:

| arch/m68k/atari/built-in.o: In function `atari_kbd_translate':
| arch/m68k/atari/atakeyb.c:640: undefined reference to `shift_state'

Just remove atari_kbd_translate(), as it's unused.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Modular Amiga keyboard needs key_maps
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:53 +0000 (21:58 +0200)]
m68k: Modular Amiga keyboard needs key_maps

| ERROR: "key_maps" [drivers/input/keyboard/amikbd.ko] undefined!

Export key_maps in the Amiga core code, as its defined in an autogenerated
file (drivers/char/defkeymap.c)

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Reverse platform MMU logic so Sun 3 is last
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:51 +0000 (21:58 +0200)]
m68k: Reverse platform MMU logic so Sun 3 is last

Currently Sun 3 support is the first platform option, as the Sun 3 MMU is
incompatible with standard Motorola MMUs. However, this means that
`allmodconfig' enables support for Sun 3, and thus disables support for all
other platforms.

Reverse the logic and move Sun 3 last, so `allmodconfig' enables all
platforms except for Sun 3, increasing compile-coverage.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Add NOTES to init data so its discarded at boot
Roman Zippel [Mon, 13 Oct 2008 19:58:50 +0000 (21:58 +0200)]
m68k: Add NOTES to init data so its discarded at boot

Add .note.gnu.build-id to init data so it's discarded at boot.

[Andreas Schwab] Use NOTES macro

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Put .bss at the end of the data section
Roman Zippel [Mon, 13 Oct 2008 19:58:49 +0000 (21:58 +0200)]
m68k: Put .bss at the end of the data section

Put .bss at the end of the data section

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: Use new printk() extension %pS to print symbols
Geert Uytterhoeven [Mon, 13 Oct 2008 19:58:48 +0000 (21:58 +0200)]
m68k: Use new printk() extension %pS to print symbols

This changes the oops and backtrace code to use the new `%pS' printk()
extension to print out symbols rather than manually calling print_symbol.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agom68k: use bcd2bin/bin2bcd
Adrian Bunk [Mon, 13 Oct 2008 19:58:47 +0000 (21:58 +0200)]
m68k: use bcd2bin/bin2bcd

This patch changes m68k to use the new bcd2bin/bin2bcd functions instead
of the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.

It also remove local bcd2bin/bin2bcd implementations
in favor of the global ones.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago8250: Fix lock warning (and possible crash)
Alan Cox [Tue, 14 Oct 2008 10:29:06 +0000 (11:29 +0100)]
8250: Fix lock warning (and possible crash)

Splitting the 8250 code back up to avoid a clash with the NR_IRQS removal
patch introduced a last minute bug. Put back the additional needed lines
for the old lock init

Signed-off-by: Alan Cox <alan@redhat.com>
[ Ingo also reports that this can cause a spontaneous reboot crash with
  certain configs, and sends in an identical patch ]
Tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoqlge: Fix page size ifdef test.
Ron Mercer [Tue, 14 Oct 2008 05:55:59 +0000 (22:55 -0700)]
qlge: Fix page size ifdef test.

This ASIC does support all page sizes. For 4k and 8k page size the TX
control block needs an external scatter gather list.  For page sizes
larger than 8k the max frags is satisfied by the original TX control
block.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Rationalise email address: Network Specific Parts
Alan Cox [Tue, 14 Oct 2008 02:01:08 +0000 (19:01 -0700)]
net: Rationalise email address: Network Specific Parts

Clean up the various different email addresses of mine listed in the code
to a single current and valid address. As Dave says his network merges
for 2.6.28 are now done this seems a good point to send them in where
they won't risk disrupting real changes.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodsa: fix compile bug on s390
Heiko Carstens [Tue, 14 Oct 2008 01:58:48 +0000 (18:58 -0700)]
dsa: fix compile bug on s390

git commit 45cec1bac0719c904bb5f4405c2937f7e715888c
"dsa: Need to select PHYLIB." causes this build bug on s390:

drivers/built-in.o: In function `phy_stop_interrupts':
/home/heicarst/linux-2.6/drivers/net/phy/phy.c:631: undefined reference to `free_irq'
/home/heicarst/linux-2.6/drivers/net/phy/phy.c:646: undefined reference to `enable_irq'
drivers/built-in.o: In function `phy_start_interrupts':
/home/heicarst/linux-2.6/drivers/net/phy/phy.c:601: undefined reference to `request_irq'
drivers/built-in.o: In function `phy_interrupt':
/home/heicarst/linux-2.6/drivers/net/phy/phy.c:528: undefined reference to `disable_irq_nosync'
drivers/built-in.o: In function `phy_change':
/home/heicarst/linux-2.6/drivers/net/phy/phy.c:674: undefined reference to `enable_irq'
/home/heicarst/linux-2.6/drivers/net/phy/phy.c:692: undefined reference to `disable_irq'

PHYLIB has alread a depend on !S390, however select PHYLIB at DSA overrides
that unfortunately. So add a depend on !S390 to DSA as well.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetns: mib6 section fixlet
Alexey Dobriyan [Tue, 14 Oct 2008 01:54:07 +0000 (18:54 -0700)]
netns: mib6 section fixlet

  LD      net/ipv6/ipv6.o
WARNING: net/ipv6/ipv6.o(.text+0xd8): Section mismatch in reference from the function inet6_net_init() to the function .init.text:ipv6_init_mibs()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoenic: Fix Kconfig headline description
Roland Dreier [Tue, 14 Oct 2008 01:53:05 +0000 (18:53 -0700)]
enic: Fix Kconfig headline description

I don't think the enic driver has anything to do with Mark Everett
(http://en.wikipedia.org/wiki/A_Man_Called_E).  Fix the Kconfig
description.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agode2104x: wrong MAC address fix
Martin Langer [Tue, 14 Oct 2008 01:49:38 +0000 (18:49 -0700)]
de2104x: wrong MAC address fix

The de2104x returns sometimes a wrong MAC address. The wrong one is
like the original one, but it comes with an one byte shift. I found
this bug on an older alpha ev5 cpu. More details are available in Gentoo
bugreport #240718.

It seems the hardware is sometimes a little bit too slow for an
immediate access. This patch solves the problem by introducing a small
udelay.

Signed-off-by: Martin Langer <martin-langer@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agos390: claw compile fixlet
Alexey Dobriyan [Tue, 14 Oct 2008 01:48:43 +0000 (18:48 -0700)]
s390: claw compile fixlet

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: export genphy_restart_aneg
Adrian Bunk [Tue, 14 Oct 2008 01:48:09 +0000 (18:48 -0700)]
net: export genphy_restart_aneg

This patch fixes the following build error caused by
commit ed94493fb38a665cebcf750dfabe8a6dd13e136f
(mv643xx_eth: convert to phylib):

<--  snip  -->

...
  Building modules, stage 2.
  MODPOST 1280 modules
ERROR: "genphy_restart_aneg" [drivers/net/mv643xx_eth.ko] undefined!
...
make[2]: *** [__modpost] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocxgb3: extend copyrights to 2008
Divy Le Ray [Tue, 14 Oct 2008 01:47:30 +0000 (18:47 -0700)]
cxgb3: extend copyrights to 2008

Update copyright banner to 2008.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agocxgb3: update driver version
Divy Le Ray [Tue, 14 Oct 2008 01:47:02 +0000 (18:47 -0700)]
cxgb3: update driver version

Add a field to the driver versioning info.
Update version to 1.1.0.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet/phy: add missing kernel-doc
Randy Dunlap [Tue, 14 Oct 2008 01:46:22 +0000 (18:46 -0700)]
net/phy: add missing kernel-doc

Fix kernel-doc warning, missing description:

Warning(lin2627-g3-kdocfixes//drivers/net/phy/mdio_bus.c:63): No description found for parameter 'd'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopktgen: fix skb leak in case of failure
Ilpo Järvinen [Tue, 14 Oct 2008 01:43:59 +0000 (18:43 -0700)]
pktgen: fix skb leak in case of failure

Seems that skb goes into void unless something magic happened
in pskb_expand_head in case of failure.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomISDN/dsp_cmx.c: fix size checks
Adrian Bunk [Tue, 14 Oct 2008 01:42:55 +0000 (18:42 -0700)]
mISDN/dsp_cmx.c: fix size checks

The checks for ensuring that the array indices are inside the range
were flipped.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agomisdn: use nonseekable_open()
Andrew Morton [Tue, 14 Oct 2008 01:42:07 +0000 (18:42 -0700)]
misdn: use nonseekable_open()

The driver just sets ->llseek to NULL.  It should also clear FMODE_LSEEK to
tell the VFS that seeks are not supported.

Pointed out by Christoph Hellwig.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: fix driver build errors due to missing net/ip6_checksum.h include
Kamalesh Babulal [Tue, 14 Oct 2008 01:41:01 +0000 (18:41 -0700)]
net: fix driver build errors due to missing net/ip6_checksum.h include

  2.6.27-git2 kernel build fails with allyesconfig on powerpc with
build error

<introduced by commit 01f2e4ead2c51226ed1283ef6a8388ca6f4cff8f>

CC    drivers/net/enic/enic_main.o
drivers/net/enic/enic_main.c: In function Ã¢\80\98enic_queue_wq_skb_tsoâ\80\99:
drivers/net/enic/enic_main.c:576: error: implicit declaration of function Ã¢\80\98csum_ipv6_magicâ\80\99
make[3]: *** [drivers/net/enic/enic_main.o] Error 1

<introduced by commit c4e84bde1d595d857d3c74b49b9c45cc770df792>

drivers/net/qlge/qlge_main.c: In function Ã¢\80\98ql_tsoâ\80\99:
drivers/net/qlge/qlge_main.c:1862: error: implicit declaration of function Ã¢\80\98csum_ipv6_magicâ\80\99
make[3]: *** [drivers/net/qlge/qlge_main.o] Error 1

<introduced by commit 95252236e73e789dd186ce796a2abc60b3a61ebe>

drivers/net/jme.c: In function Ã¢\80\98jme_tx_tsoâ\80\99:
drivers/net/jme.c:1784: error: implicit declaration of function Ã¢\80\98csum_ipv6_magicâ\80\99
make[2]: *** [drivers/net/jme.o] Error 1

Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 13 Oct 2008 21:15:06 +0000 (14:15 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (66 commits)
  ata: Add documentation for hard disk shock protection interface (v3)
  ide: Implement disk shock protection support (v4)
  ide-cd: fix printk format warning
  piix: add Hercules EC-900 mini-notebook to ich_laptop short cable list
  ide-atapi: assign taskfile flags per device type
  ide-cd: move cdrom_info.dma to ide_drive_t.dma
  ide: add ide_drive_t.dma flag
  ide-cd: add a debug_mask module parameter
  ide-cd: convert driver to new ide debugging macro (v3)
  ide: move SFF DMA code to ide-dma-sff.c
  ide: cleanup ide-dma.c
  ide: cleanup ide_build_dmatable()
  ide: remove needless includes from ide-dma.c
  ide: switch to DMA-mapping API part #2
  ide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
  ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
  ide: __ide_dma_end() -> ide_dma_end()
  pmac: remove needless pmac_ide_destroy_dmatable() wrapper
  pmac: remove superfluous pmif == NULL checks
  ide: Two fixes regarding memory allocation
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
Linus Torvalds [Mon, 13 Oct 2008 21:12:40 +0000 (14:12 -0700)]
Merge git://git./linux/kernel/git/brodo/pcmcia-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (49 commits)
  pcmcia: ioctl-internal definitions
  pcmcia: cistpl header cleanup
  pcmcia: remove unused argument to pcmcia_parse_tuple()
  pcmcia: card services header cleanup
  pcmcia: device_id header cleanup
  pcmcia: encapsulate ioaddr_t
  pcmcia: cleanup device driver header file
  pcmcia: cleanup socket services header file
  pcmcia: merge ds_internal.h into cs_internal.h
  pcmcia: cleanup cs_internal.h
  pcmcia: cs_internal.h is internal
  pcmcia: use dev_printk for cs_error()
  pcmcia: remove CS_ error codes alltogether
  pcmcia: deprecate CS_BAD_TUPLE
  pcmcia: deprecate CS_BAD_ARGS
  pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZE
  pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGE
  pcmcia: deprecate CS_NO_MORE_ITEMS
  pcmcia: deprecate CS_IN_USE
  pcmcia: deprecate CS_CONFIGURATION_LOCKED
  ...

Fix trivial conflict in drivers/pcmcia/ds.c manually

16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Mon, 13 Oct 2008 21:03:59 +0000 (14:03 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (313 commits)
  V4L/DVB (9186): Added support for Prof 7300 DVB-S/S2 cards
  V4L/DVB (9185): S2API: Ensure we have a reasonable ROLLOFF default
  V4L/DVB (9184): cx24116: Change the default SNR units back to percentage by default.
  V4L/DVB (9183): S2API: Return error of the caller provides 0 commands.
  V4L/DVB (9182): S2API: Added support for DTV_HIERARCHY
  V4L/DVB (9181): S2API: Add support fot DTV_GUARD_INTERVAL and DTV_TRANSMISSION_MODE
  V4L/DVB (9180): S2API: Added support for DTV_CODE_RATE_HP/LP
  V4L/DVB (9179): S2API: frontend.h cleanup
  V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO.
  V4L/DVB (9177): S2API: Change _8PSK / _16APSK to PSK_8 and APSK_16
  V4L/DVB (9176): Add support for DvbWorld USB cards with STV0288 demodulator.
  V4L/DVB (9175): Remove NULL pointer in stb6000 driver.
  V4L/DVB (9174): Allow custom inittab for ST STV0288 demodulator.
  V4L/DVB (9173): S2API: Remove the hardcoded command limit during validation
  V4L/DVB (9172): S2API: Bugfix related to DVB-S / DVB-S2 tuning for the legacy API.
  V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in S2API.
  V4L/DVB (9170): cx24116: Sanity checking to data input via S2API to the cx24116 demod.
  V4L/DVB (9169): uvcvideo: Support two new Bison Electronics webcams.
  V4L/DVB (9168): Add support for MSI TV@nywhere Plus remote
  V4L/DVB: v4l2-dev: remove duplicated #include
  ...

16 years agoata: Add documentation for hard disk shock protection interface (v3)
Elias Oltmanns [Mon, 13 Oct 2008 19:39:50 +0000 (21:39 +0200)]
ata: Add documentation for hard disk shock protection interface (v3)

Put some information (and pointers to more) into the kernel's doc tree,
describing briefly the interface to the kernel's disk head unloading
facility. Information about how to set up a complete shock protection
system under GNU/Linux can be found on the web and is referenced
accordingly.

v3:
Here is some final polish including various spelling corrections
pointed out by Grant Grundler and Peter Moulder. Also, I have added some
information about the timing constraints related to disk head parking.
The patch looks more impressive than it really is and I think it would
be alright just to incorporate it into the original patch so as not to
clutter up the git log.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: Implement disk shock protection support (v4)
Elias Oltmanns [Mon, 13 Oct 2008 19:39:50 +0000 (21:39 +0200)]
ide: Implement disk shock protection support (v4)

On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD
FEATURE as specified in ATA-7 is issued to the device and processing of
the request queue is stopped thereafter until the specified timeout
expires or user space asks to resume normal operation. This is supposed
to prevent the heads of a hard drive from accidentally crashing onto the
platter when a heavy shock is anticipated (like a falling laptop expected
to hit the floor). Port resets are deferred whenever a device on that
port is in the parked state.

v3:
Elias Oltmanns <eo@nebensachen.de> wrote:
[...]
> >> 1. Make sure that no negative value is being passed to
> >>    jiffies_to_msecs() in ide_park_show().
> >> 2. Drop the superfluous variable hwif in ide_special_rq().
> >> 3. Skip initialisation of task and tf in ide_special_rq() if we are not
> >>    handling a (un)park request.
> >
> > Well, #3 should have been done differently because we donn't want to
> > check for REQ_(UN)?PARK_HEADS more often than is necessary.
>
> While preparing the backport to 2.6.27, it has just occurred to me that
> we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset()
> because this flag must not be set after *any* sort of access to the
> device.

v4:
Fix a memory leak due to a missing blk_put_request() in
issue_park_cmd(). Additionally, we should plug the queue when enqueueing
the unpark request because there is no guarantee that the park timeout
has not expired by then. Even though the chance for that to happen is
very slim, the request might end up hanging in the queue until the next
I/O operation is queued up. While at it, clean up the code a little:
- make issue_park_cmd() a function of type void since nobody cares for
  the return value anyway;
- use blk_start_queueing() instead of __blk_run_queue() since we don't
  have to worry about recursion;
- remove a superfluous pointer deference in task_no_data_intr().

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Cc: Jeff Garzik <jeff@garzik.org>,
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: fix printk format warning
Alexander Beregalov [Mon, 13 Oct 2008 19:39:50 +0000 (21:39 +0200)]
ide-cd: fix printk format warning

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agopiix: add Hercules EC-900 mini-notebook to ich_laptop short cable list
Herton Ronaldo Krzesinski [Mon, 13 Oct 2008 19:39:50 +0000 (21:39 +0200)]
piix: add Hercules EC-900 mini-notebook to ich_laptop short cable list

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-atapi: assign taskfile flags per device type
Borislav Petkov [Mon, 13 Oct 2008 19:39:50 +0000 (21:39 +0200)]
ide-atapi: assign taskfile flags per device type

There should be no functional change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: move cdrom_info.dma to ide_drive_t.dma
Borislav Petkov [Mon, 13 Oct 2008 19:39:49 +0000 (21:39 +0200)]
ide-cd: move cdrom_info.dma to ide_drive_t.dma

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_drive_t.dma flag
Borislav Petkov [Mon, 13 Oct 2008 19:39:49 +0000 (21:39 +0200)]
ide: add ide_drive_t.dma flag

This flag is to accomodate ide-cd functionality into ide atapi.

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: add a debug_mask module parameter
Borislav Petkov [Mon, 13 Oct 2008 19:39:49 +0000 (21:39 +0200)]
ide-cd: add a debug_mask module parameter

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
[bart: no need to zero debug_mask + move it next to module_param()]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: convert driver to new ide debugging macro (v3)
Borislav Petkov [Mon, 13 Oct 2008 19:39:48 +0000 (21:39 +0200)]
ide-cd: convert driver to new ide debugging macro (v3)

Also,

- leave in the possibility for optimizing away all debugging macros
- add a PFX macro and prepend all printk calls with it for consistency
- add debug macro calls in important driver paths
- remove #if 0-ed code
- mv restore_request -> ide_cd_restore_request
- add a driver registration printk

v2:
failed_command can be NULL so check it before accessing it

v3:
fix another NULL ptr in debug statement

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move SFF DMA code to ide-dma-sff.c
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:47 +0000 (21:39 +0200)]
ide: move SFF DMA code to ide-dma-sff.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: cleanup ide-dma.c
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:47 +0000 (21:39 +0200)]
ide: cleanup ide-dma.c

- s/HWIF(drive)/drive->hwif/
- s/HWGROUP(drive)/[drive->]hwif->hwgroup/
- fixup error messages in ide_dma_intr() & dma_timer_expiry()
- fix checkpatch.pl errors/warnings

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: cleanup ide_build_dmatable()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:47 +0000 (21:39 +0200)]
ide: cleanup ide_build_dmatable()

- use for_each_sg()
- move printing 'DMA table too small' message below use_pio_instead label
- merge '64KB bug' comment with function documentation
- fix intendation

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove needless includes from ide-dma.c
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:47 +0000 (21:39 +0200)]
ide: remove needless includes from ide-dma.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: switch to DMA-mapping API part #2
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:47 +0000 (21:39 +0200)]
ide: switch to DMA-mapping API part #2

Follow-up to commit 5c05ff68b9a9b40a9be949497e0aa980185565cf
("ide: switch to DMA-mapping API"):

* pci_{alloc,free}_consistent() -> dma_{alloc,free}_coherent()
  in ide_{allocate,release}_dma_engine().

* Add ->prd_max_nents and ->prd_ent_size fields to ide_hwif_t
  (+ set default values in ide_allocate_dma_engine()).

* Make ide_{allocate,release}_dma_engine() available also
  for CONFIG_BLK_DEV_IDEDMA_SFF=n.  Then convert au1xxx-ide.c,
  scc_pata.c and sgiioc4.c to use them.

* Add missing ->init_dma method to scc_pata.

This patch also fixes:
- ->dmatable_cpu leak for au1xxx-ide
- too early realease of ->dmatable_cpu for scc_pata
- wrong amount of ->dmatable_cpu memory being freed for sgiioc4

While at it:
- remove superfluous ->dma_base check from ide_unregister()
- return -ENOMEM on error in ide_release_dma_engine()
- beautify error message in ide_release_dma_engine()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:46 +0000 (21:39 +0200)]
ide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n

Make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
and convert {ics,au1xxx-}ide.c to use it.

While at it:
- dump ATA Status register content on error
- use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:46 +0000 (21:39 +0200)]
ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n

Make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n
and convert {ics,au1xxx-}ide.c to use it.

While at it:
- use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: __ide_dma_end() -> ide_dma_end()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:46 +0000 (21:39 +0200)]
ide: __ide_dma_end() -> ide_dma_end()

While at it:
- use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agopmac: remove needless pmac_ide_destroy_dmatable() wrapper
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:45 +0000 (21:39 +0200)]
pmac: remove needless pmac_ide_destroy_dmatable() wrapper

hwif->sg_nents is always != 0 when this function is called
and there is also no need to explicitely zero hwif->sg_nents.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agopmac: remove superfluous pmif == NULL checks
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:45 +0000 (21:39 +0200)]
pmac: remove superfluous pmif == NULL checks

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: Two fixes regarding memory allocation
Elias Oltmanns [Mon, 13 Oct 2008 19:39:45 +0000 (21:39 +0200)]
ide: Two fixes regarding memory allocation

In function ide_devset_execute() we should use __GFP_WAIT rather than
GFP_KERNEL. Also, the allocation cannot possibly fail at that point.
More importantly, there is a potential memory leak in the device probing
code. The infrastructure seems rather complex and I hope I haven't messed
anything up by trying to fix this.

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
[bart: remove superfluous ide_lock taking]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: move /proc handling to ide-disk_proc.c (take 3)
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:45 +0000 (21:39 +0200)]
ide-disk: move /proc handling to ide-disk_proc.c (take 3)

While at it:
- idedisk_capacity() -> ide_disk_capacity()
- idedisk_proc[] -> ide_disk_proc[]
- idedisk_settings[] -> ide_disk_settings[]

v2/3:
Build fix for CONFIG_IDE_PROC_FS=n from Elias Oltmanns.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: move all ioctl handling to ide-disk_ioctl.c
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:45 +0000 (21:39 +0200)]
ide-disk: move all ioctl handling to ide-disk_ioctl.c

While at it:
- idedisk_ioctl() -> ide_disk_ioctl()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: move /proc handling to ide-floppy_proc.c (take 2)
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:44 +0000 (21:39 +0200)]
ide-floppy: move /proc handling to ide-floppy_proc.c (take 2)

While at it:
- idefloppy_capacity() -> ide_floppy_capacity()
- idefloppy_proc[] -> ide_floppy_proc[]
- idefloppy_settings[] -> ide_floppy_settings[]

v2:
Build fix for CONFIG_IDE_PROC_FS=n from Elias Oltmanns.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: move all ioctl handling to ide-floppy_ioctl.c (take 2)
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:44 +0000 (21:39 +0200)]
ide-floppy: move all ioctl handling to ide-floppy_ioctl.c (take 2)

While at it:
- idefloppy_ioctl() -> ide_floppy_ioctl()

v2:
Fix for idefloppy_ioctl name change from Stephen Rothwell.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: no need to zero drive->special.all
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:43 +0000 (21:39 +0200)]
ide-cd: no need to zero drive->special.all

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: set IDE_AFLAG_DRQ_INTERRUPT in do_identify()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:43 +0000 (21:39 +0200)]
ide: set IDE_AFLAG_DRQ_INTERRUPT in do_identify()

Set IDE_AFLAG_DRQ_INTERRUPT in do_identify() instead of ATAPI
device drivers *_setup() methods.

While at it:
- use ata_id_cdb_intr()

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ide_host_alloc_all()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:43 +0000 (21:39 +0200)]
ide: remove ide_host_alloc_all()

* Remove no longer used ide_host_alloc_all().

* Add MAX_HOST_PORTS define and use it instead of MAX_HWIFS
  as the maximum number of host ports possible.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-generic: remove no longer needed ide_probe_legacy()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:42 +0000 (21:39 +0200)]
ide-generic: remove no longer needed ide_probe_legacy()

There is now a generic solution [ide_generic_check_pci_legacy_iobases()]
so MIPS-specific ide_probe_legacy() is no longer necessary.

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-generic: no need to probe all ports at once
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:42 +0000 (21:39 +0200)]
ide-generic: no need to probe all ports at once

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: ->ide_dma_clear_irq() -> ->clear_irq()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:42 +0000 (21:39 +0200)]
ide: ->ide_dma_clear_irq() -> ->clear_irq()

* Rename ->ide_dma_clear_irq method to ->clear_irq
  and move it from ide_hwif_t to struct ide_port_ops.

* Move ->waiting_for_dma check inside ->clear_irq method.

* Move ->dma_base check inside ->clear_irq method.

piix.c:
* Add ich_port_ops and remove init_hwif_ich() wrapper.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use unique names for struct pci_driver instances
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:41 +0000 (21:39 +0200)]
ide: use unique names for struct pci_driver instances

Noticed-by: Russell King <rmk+lkml@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: merge all TASKFILE_NO_DATA data phase handlers into taskfile_no_intr()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:41 +0000 (21:39 +0200)]
ide: merge all TASKFILE_NO_DATA data phase handlers into taskfile_no_intr()

* Add 'struct task_s' to ide_hwif_t and init it to the current command
  in do_rw_taskfile().

* Merge all TASKFILE_NO_DATA data phase handlers into taskfile_no_intr().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: factor out reset error reporting from reset_pollfunc()
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:41 +0000 (21:39 +0200)]
ide: factor out reset error reporting from reset_pollfunc()

Factor out reset error reporting from reset_pollfunc()
to ide_reset_report_error() helper.

While at it:
- fix KERN_* printk() levels
- remove 'switch ()'

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: convert 'pio_mode' device setting to use DS_SYNC flag
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:40 +0000 (21:39 +0200)]
ide: convert 'pio_mode' device setting to use DS_SYNC flag

* Convert 'pio_mode' device setting to use DS_SYNC flag.

* Remove unused special_t.b.{set_tune,serviced} and ide_drive_t.tune_req.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove [ata_]select_t
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:40 +0000 (21:39 +0200)]
ide: remove [ata_]select_t

* Use 'drive->dn & 1' in ide_init_disk().

* remove [ata_]select_t.

While at it:

* Use ATA_DEVICE_OBS define in ide_port_init_devices_data().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use 'drive->dn & 1' instead of drive->select.b.unit
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:40 +0000 (21:39 +0200)]
ide: use 'drive->dn & 1' instead of drive->select.b.unit

* Call ide_port_init_devices() in ide_host_register()
  also if 'struct ide_port_info *d' is not available.

* Init drive->dn in ide_port_init_devices() instead of
  ide_probe_port() so it is valid also in ->init_dev.

* Pass device number to ide_dev_apply_params().

* Use 'drive->dn & 1' instead of drive->select.b.unit.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agocy82c693: remove no longer needed CY82C693_DEBUG_LOGS code
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:39 +0000 (21:39 +0200)]
cy82c693: remove no longer needed CY82C693_DEBUG_LOGS code

Having CY82C693_DEBUG_INFO is enough nowadays.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agocy82c693: remove dead CY82C693_SETDMA_CLOCK code
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:39 +0000 (21:39 +0200)]
cy82c693: remove dead CY82C693_SETDMA_CLOCK code

Remove dead CY82C693_SETDMA_CLOCK code and now not needed
init_chipset_cy82c693().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: sanitize ide*_pm_* enums
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:38 +0000 (21:39 +0200)]
ide: sanitize ide*_pm_* enums

* Move ide*_pm_* enums from ide-io.c to <linux/ide.h>.

* idedisk_pm_* -> ide_pm_*

* ide_pm_state_* -> ide_pm_*

* No need to set ide_pm_* enums to the fixed values.

* Uppercase ide_pm_* enums.

* Fix/update comments.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix HDIO_DRIVE_TASK[FILE] ioctls for CHS commands on LBA devices
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:38 +0000 (21:39 +0200)]
ide: fix HDIO_DRIVE_TASK[FILE] ioctls for CHS commands on LBA devices

Add IDE_DFLAG_LBA device flag and use it instead of ->select.b.lba.

Since ->tf_load uses ->select.all for ATA Device/Head register this
fixes HDIO_DRIVE_TASK[FILE] ioctls for CHS commands on LBA devices.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove superfluous ->waiting_for_dma checks
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:38 +0000 (21:39 +0200)]
ide: remove superfluous ->waiting_for_dma checks

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove superfluous ->dma field from ide_hwif_t
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:37 +0000 (21:39 +0200)]
ide: remove superfluous ->dma field from ide_hwif_t

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove superfluous ->media field from ide_driver_t
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:37 +0000 (21:39 +0200)]
ide: remove superfluous ->media field from ide_driver_t

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: DMA_PIO_RETRY -> IDE_DFLAG_DMA_PIO_RETRY
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:37 +0000 (21:39 +0200)]
ide: DMA_PIO_RETRY -> IDE_DFLAG_DMA_PIO_RETRY

Add IDE_DFLAG_DMA_PIO_RETRY and use it instead of
ide_drive_t.state + DMA_PIO_RETRY.

There should be no functional changes cause by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add device flags
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:36 +0000 (21:39 +0200)]
ide: add device flags

Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
to IDE_DFLAG_* flags.

While at it:
- IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48
- fixup some comments
- remove needless g->flags zeroing from ide*_probe()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: add ide_do_setfeature() helper
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:36 +0000 (21:39 +0200)]
ide-disk: add ide_do_setfeature() helper

Add ide_do_setfeature() helper and convert set_{wcache,acoustic}()
to use it.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: set_addressing() fixes
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:36 +0000 (21:39 +0200)]
ide-disk: set_addressing() fixes

* Return -EIO if arg > 0 and LBA48 is unsupported.

* No need to reset ->addressing.

* Make ->addressing a single bit flag.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix IDE ACPI for slave device-only configurations
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:35 +0000 (21:39 +0200)]
ide: fix IDE ACPI for slave device-only configurations

ACPI _GTM / _PS0 / _STM were not called if only slave device was present.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: add a debug_mask module parameter
Borislav Petkov [Mon, 13 Oct 2008 19:39:35 +0000 (21:39 +0200)]
ide-floppy: add a debug_mask module parameter

... with which to control to verbosity of debug messages on module load time.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
[bart: no need to zero debug_mask + move module_param() closer debug_mask]
[bart: init drive->debug_mask in ide_floppy_probe() not in idefloppy_open()]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: convert driver to the new debugging macro
Borislav Petkov [Mon, 13 Oct 2008 19:39:35 +0000 (21:39 +0200)]
ide-floppy: convert driver to the new debugging macro

Also:

- leave in the possibility for optimizing away all debugging macros
- add a PFX macro and prepend all printk calls with it for consistency
- change idefloppy_create_rw_cmd's 1st arg from idefloppy_floppy_t * to
ide_drive_t *.
- add a missing printk-level in idefloppy_init
- fix minor checkpatch warnings

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add a driver-wide debugging macro
Borislav Petkov [Mon, 13 Oct 2008 19:39:35 +0000 (21:39 +0200)]
ide: add a driver-wide debugging macro

Add __ide_debug_log() debugging macro which is controlled by drive->debug_mask.
The macro has to have the macro DRV_NAME defined in each driver before use.
Also, add different debugging levels depending on the functionality debugged.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add drive->debug_mask switch
Borislav Petkov [Mon, 13 Oct 2008 19:39:34 +0000 (21:39 +0200)]
ide: add drive->debug_mask switch

Add a debugging on/off switch for controlling driver debugging
messages dynamically.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: unify conversion macros
Borislav Petkov [Mon, 13 Oct 2008 19:39:34 +0000 (21:39 +0200)]
ide: unify conversion macros

Introduce to_ide_drv() and ide_drv_g() macros and replace the respective
definitions of similar ones in each driver.

There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoxtensa: remove dead CONFIG_BLK_DEV_IDE code
Adrian Bunk [Mon, 13 Oct 2008 19:39:34 +0000 (21:39 +0200)]
xtensa: remove dead CONFIG_BLK_DEV_IDE code

I don't know why this was there, but it was dead code.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: chris@zankel.net
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove unnecessary MAX_HWIFS checks from ide-probe.c
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:33 +0000 (21:39 +0200)]
ide: remove unnecessary MAX_HWIFS checks from ide-probe.c

MAX_HWIFS is now always equal to the number of IDE major numbers.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove CONFIG_BLK_DEV_IDE config option (take 2)
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:33 +0000 (21:39 +0200)]
ide: remove CONFIG_BLK_DEV_IDE config option (take 2)

Because hd.c was moved to drivers/block/ this config option
is superfluous now and may be removed.

v2:
Fix drivers/ide/Makefile (noticed by Adrian Bunk).

Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make ide_transfer_pc() static
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:32 +0000 (21:39 +0200)]
ide: make ide_transfer_pc() static

* Move ->ticks field from struct ide_floppy_obj to ide_drive_t.

* Move idefloppy_transfer_pc() to ide-atapi.c and make
  ide_transfer_pc() use it.

* Always use ide_transfer_pc as a handler in ide_issue_pc().

* Remove no longer used idefloppy_start_pc_transfer(),
  ide*_transfer_pc() and 'handler' argument from ide_issue_pc().

* Make ide_transfer_pc() static.

While at it:

* idefloppy_transfer_pc() -> ide_delayed_transfer_pc()

* IDEFLOPPY_TICKS_DELAY -> IDEFLOPPY_PC_DELAY

* ->ticks -> ->pc_delay

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make ide_pc_intr() static
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:32 +0000 (21:39 +0200)]
ide: make ide_pc_intr() static

* Always use ide_pc_intr as a handler in ide_pc_intr().

* Remove no longer used ide*_pc_intr() and 'handler'
  argument from ide_{transfer_pc,pc_intr}().

* Make ide_pc_intr() static.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ->pc_{update,io}_buffers methods
Bartlomiej Zolnierkiewicz [Mon, 13 Oct 2008 19:39:32 +0000 (21:39 +0200)]
ide: add ->pc_{update,io}_buffers methods

Add ->pc_{update,io}_buffers methods to ide_drive_t and use
them instead of {update,io}_buffers ide_pc_intr() arguments.

There should be no functional changes caused by this patch.

Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>