1
0
Fork 0
Commit Graph

19640 Commits (f5bb3a5e9dcdb8435471562b6cada89525cf4df1)

Author SHA1 Message Date
Linus Torvalds f5bb3a5e9d Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (79 commits)
  Jesper Juhl is the new trivial patches maintainer
  Documentation: mention email-clients.txt in SubmittingPatches
  fs/binfmt_elf.c: spello fix
  do_invalidatepage() comment typo fix
  Documentation/filesystems/porting fixes
  typo fixes in net/core/net_namespace.c
  typo fix in net/rfkill/rfkill.c
  typo fixes in net/sctp/sm_statefuns.c
  lib/: Spelling fixes
  kernel/: Spelling fixes
  include/scsi/: Spelling fixes
  include/linux/: Spelling fixes
  include/asm-m68knommu/: Spelling fixes
  include/asm-frv/: Spelling fixes
  fs/: Spelling fixes
  drivers/watchdog/: Spelling fixes
  drivers/video/: Spelling fixes
  drivers/ssb/: Spelling fixes
  drivers/serial/: Spelling fixes
  drivers/scsi/: Spelling fixes
  ...
2008-02-04 07:58:52 -08:00
Linus Torvalds 9853832c49 Merge branch 'locks' of git://linux-nfs.org/~bfields/linux
* 'locks' of git://linux-nfs.org/~bfields/linux:
  pid-namespaces-vs-locks-interaction
  file locks: Use wait_event_interruptible_timeout()
  locks: clarify posix_locks_deadlock
2008-02-04 07:58:03 -08:00
Linus Torvalds 519cb68807 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  scsi: fix dependency bug in aic7 Makefile
  kbuild: add svn revision information to setlocalversion
  kbuild: do not warn about __*init/__*exit symbols being exported
  Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig
  Add HAVE_KPROBES
  Add HAVE_OPROFILE
  Create arch/Kconfig
  Fix ARM to play nicely with generic Instrumentation menu
  kconfig: ignore select of unknown symbol
  kconfig: mark config as changed when loading an alternate config
  kbuild: Spelling/grammar fixes for config DEBUG_SECTION_MISMATCH
  Remove __INIT_REFOK and __INITDATA_REFOK
  kbuild: print only total number of section mismatces found
2008-02-04 07:56:17 -08:00
Linus Torvalds a2e4e108c5 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: (77 commits)
  [IPV6]: Reorg struct ifmcaddr6 to save some bytes
  [INET_TIMEWAIT_SOCK]: Reorganize struct inet_timewait_sock to save some bytes
  [DCCP]: Reorganize struct dccp_sock to save 8 bytes
  [INET6]: Reorganize struct inet6_dev to save 8 bytes
  [SOCK] proto: Add hashinfo member to struct proto
  EMAC driver: Fix bug: The clock divisor is set to all ones at reset.
  EMAC driver: fix bug - invalidate data cache of new_skb->data range when cache is WB
  EMAC driver: add power down mode
  EMAC driver: ADSP-BF52x arch/mach support
  EMAC driver: use simpler comment headers and strip out information that is maintained in the scm's log
  EMAC driver: bf537 MAC multicast hash filtering patch
  EMAC driver: define MDC_CLK=2.5MHz and caculate mdc_div according to SCLK.
  EMAC driver: shorten the mdelay value to solve netperf performance issue
  [netdrvr] sis190: build fix
  sky2: fix Wake On Lan interaction with BIOS
  sky2: restore multicast addresses after recovery
  pci-skeleton: Misc fixes to build neatly
  phylib: Add Realtek 821x eth PHY support
  natsemi: Update locking documentation
  PHYLIB: Locking fixes for PHY I/O potentially sleeping
  ...
2008-02-04 07:43:36 -08:00
Linus Torvalds a6cc48eeea Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  Driver core: Remove unneeded get_{device,driver}() calls.
  Driver core: Update some prototypes in platform.txt
  driver core: convert to use class_find_device api
  PM: Export device_pm_schedule_removal
  nozomi: finish constification
  nozomi: constify driver
  nozomi driver update
  Add ja_JP translation of stable_kernel_rules.txt
  kobject: kerneldoc comment fix
  kobject: Always build in kernel/ksysfs.o.
2008-02-04 07:42:46 -08:00
Linus Torvalds 7cf7669143 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  PCI: fix 4x section mismatch warnings
  PCI: fix section mismatch warnings referring to pci_do_scan_bus
  pci: pci_enable_device_bars() fix for lpfc driver
  Revert "PCI: PCIE ASPM support"
2008-02-04 07:42:16 -08:00
Vitaliy Gusev ab1f161165 pid-namespaces-vs-locks-interaction
fcntl(F_GETLK,..) can return pid of process for not current pid namespace
(if process is belonged to the several namespaces).  It is true also for
pids in /proc/locks.  So correct behavior is saving pointer to the struct
pid of the process lock owner.

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-02-03 17:51:36 -05:00
Joe Perches 1e4478c325 include/scsi/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:47:00 +02:00
Joe Perches fd3f8984f6 include/linux/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:45:46 +02:00
Joe Perches ab690d9fed include/asm-m68knommu/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:38:04 +02:00
Joe Perches 62018b5b58 include/asm-frv/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:34:55 +02:00
Joe Perches 3641e79e25 include/media/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:19:47 +02:00
Joe Perches aee07ba683 include/acpi/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:07:16 +02:00
Joe Perches 9636cb0ff6 include/asm-parisc/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:00:11 +02:00
Joe Perches eebfa976ad include/asm-mips/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 16:57:20 +02:00
Joe Perches 84c079239d include/asm-arm/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 16:50:59 +02:00
Marcin Ślusarz 8b3de0df4e asm-*/compat.h: fix typo in comment
Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 16:32:51 +02:00
Li Zefan ef08cce81d time: delete comments that refer to noexistent symbols
Function do_timer_interrupt_hook() don't take argument regs,
and structure hrtimer_sleeper don't have member cb_pending.
So delete comments refering to these symbols.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 16:20:13 +02:00
Tim Pepper eb8dc5e7b5 radix_tree.h trivial comment correction
There is an unmatched parenthesis in the locking commentary of radix_tree.h
which is trivially fixed by the patch below.

Signed-off-by: Tim Pepper <lnxninja@linux.vnet.ibm.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 16:12:47 +02:00
Frank Lichtenheld 8457403db6 vga.h: Fix prepocessor warning
Mark comment as comment, fixes:
include/asm/vga.h:6:8: warning: extra tokens at end of #endif directive

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:59:02 +02:00
Adrian Bunk 0868ff7a42 move frv docs one level up
My first guess for "fujitsu" was it might be related to the
fujitsu-laptop.c driver...

Move the frv directory one level up since frv is the name of the
architecture in the Linux kernel.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:54:28 +02:00
Paulius Zaleckas efad798b9f Spelling fixes: lenght->length
Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:42:53 +02:00
Robert P. J. Day 14e4a0f2bb Fix a small number of "memeber" typoes.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:12:15 +02:00
Robert P. J. Day 96532babc3 linux/dma-mapping.h: rename macro to prevent multiple inclusion
Having the macro to prevent multiple inclusion of
include/linux/dma-mapping.h contain the prefix "_ASM" is just begging
for possible confusion some day.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 15:06:26 +02:00
Uwe Kleine-König a247b5d594 fix typo 'the same the\>'
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 14:59:11 +02:00
David S. Miller a80f509f4a Merge branch 'fixes' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-02-03 04:43:34 -08:00
Arnaldo Carvalho de Melo 246f19d194 [IPV6]: Reorg struct ifmcaddr6 to save some bytes
/home/acme/git/net-2.6/net/ipv6/mcast.c:
  struct ifmcaddr6 |   -8
 1 struct changed
  igmp6_group_dropped  |   -6
  add_grec             |   -3
  mld_ifc_timer_expire |  -18
  ip6_mc_add_src       |   -3
  ip6_mc_del_src       |   -3
  igmp6_group_added    |   -3
 6 functions changed, 36 bytes removed, diff: -36

ipv6.ko:
 6 functions changed, 36 bytes removed, diff: -36

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:54 -08:00
Arnaldo Carvalho de Melo ad8bb78083 [INET_TIMEWAIT_SOCK]: Reorganize struct inet_timewait_sock to save some bytes
/home/acme/git/net-2.6/net/ipv6/tcp_ipv6.c:
  struct inet_timewait_sock |   -8
  struct tcp_timewait_sock  |   -8
 2 structs changed
  tcp_v6_rcv                |   -6
 1 function changed, 6 bytes removed, diff: -6

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:54 -08:00
Arnaldo Carvalho de Melo cf6b5fbe74 [DCCP]: Reorganize struct dccp_sock to save 8 bytes
/home/acme/git/net-2.6/net/dccp/ipv6.c:
  struct dccp_sock  |   -8
  struct dccp6_sock |   -8
 2 structs changed

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:53 -08:00
Arnaldo Carvalho de Melo 4e7e5cfe38 [INET6]: Reorganize struct inet6_dev to save 8 bytes
And make it a multiple of a 64 bytes, reducing cacheline trashing:

Before:

[acme@doppio net-2.6]$ pahole -C inet6_dev net/dccp/ipv6.o
struct inet6_dev {
	<SNIP>
	long unsigned int          mc_maxdelay;          /*    48     8 */
	unsigned char              mc_qrv;               /*    56     1 */
	unsigned char              mc_gq_running;        /*    57     1 */
	unsigned char              mc_ifc_count;         /*    58     1 */

	/* XXX 5 bytes hole, try to pack */

	/* --- cacheline 1 boundary (64 bytes) --- */
	struct timer_list          mc_gq_timer;          /*    64    48 */
	<SNIP>
	__u32                      if_flags;             /*   180     4 */
	int                        dead;                 /*   184     4 */
	u8                         rndid[8];             /*   188     8 */

	/* XXX 4 bytes hole, try to pack */

	/* --- cacheline 3 boundary (192 bytes) was 8 bytes ago --- */
	struct timer_list          regen_timer;          /*   200    48 */

	<SNIP>

	/* size: 456, cachelines: 8 */
	/* sum members: 447, holes: 2, sum holes: 9 */
	/* last cacheline: 8 bytes */
};

After:

net-2.6/net/ipv6/af_inet6.c:
  struct inet6_dev |   -8
 1 struct changed

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:52 -08:00
Arnaldo Carvalho de Melo ab1e0a13d7 [SOCK] proto: Add hashinfo member to struct proto
This way we can remove TCP and DCCP specific versions of

sk->sk_prot->get_port: both v4 and v6 use inet_csk_get_port
sk->sk_prot->hash:     inet_hash is directly used, only v6 need
                       a specific version to deal with mapped sockets
sk->sk_prot->unhash:   both v4 and v6 use inet_hash directly

struct inet_connection_sock_af_ops also gets a new member, bind_conflict, so
that inet_csk_get_port can find the per family routine.

Now only the lookup routines receive as a parameter a struct inet_hashtable.

With this we further reuse code, reducing the difference among INET transport
protocols.

Eventually work has to be done on UDP and SCTP to make them share this
infrastructure and get as a bonus inet_diag interfaces so that iproute can be
used with these protocols.

net-2.6/net/ipv4/inet_hashtables.c:
  struct proto			     |   +8
  struct inet_connection_sock_af_ops |   +8
 2 structs changed
  __inet_hash_nolisten               |  +18
  __inet_hash                        | -210
  inet_put_port                      |   +8
  inet_bind_bucket_create            |   +1
  __inet_hash_connect                |   -8
 5 functions changed, 27 bytes added, 218 bytes removed, diff: -191

net-2.6/net/core/sock.c:
  proto_seq_show                     |   +3
 1 function changed, 3 bytes added, diff: +3

net-2.6/net/ipv4/inet_connection_sock.c:
  inet_csk_get_port                  |  +15
 1 function changed, 15 bytes added, diff: +15

net-2.6/net/ipv4/tcp.c:
  tcp_set_state                      |   -7
 1 function changed, 7 bytes removed, diff: -7

net-2.6/net/ipv4/tcp_ipv4.c:
  tcp_v4_get_port                    |  -31
  tcp_v4_hash                        |  -48
  tcp_v4_destroy_sock                |   -7
  tcp_v4_syn_recv_sock               |   -2
  tcp_unhash                         | -179
 5 functions changed, 267 bytes removed, diff: -267

net-2.6/net/ipv6/inet6_hashtables.c:
  __inet6_hash |   +8
 1 function changed, 8 bytes added, diff: +8

net-2.6/net/ipv4/inet_hashtables.c:
  inet_unhash                        | +190
  inet_hash                          | +242
 2 functions changed, 432 bytes added, diff: +432

vmlinux:
 16 functions changed, 485 bytes added, 492 bytes removed, diff: -7

/home/acme/git/net-2.6/net/ipv6/tcp_ipv6.c:
  tcp_v6_get_port                    |  -31
  tcp_v6_hash                        |   -7
  tcp_v6_syn_recv_sock               |   -9
 3 functions changed, 47 bytes removed, diff: -47

/home/acme/git/net-2.6/net/dccp/proto.c:
  dccp_destroy_sock                  |   -7
  dccp_unhash                        | -179
  dccp_hash                          |  -49
  dccp_set_state                     |   -7
  dccp_done                          |   +1
 5 functions changed, 1 bytes added, 242 bytes removed, diff: -241

/home/acme/git/net-2.6/net/dccp/ipv4.c:
  dccp_v4_get_port                   |  -31
  dccp_v4_request_recv_sock          |   -2
 2 functions changed, 33 bytes removed, diff: -33

/home/acme/git/net-2.6/net/dccp/ipv6.c:
  dccp_v6_get_port                   |  -31
  dccp_v6_hash                       |   -7
  dccp_v6_request_recv_sock          |   +5
 3 functions changed, 5 bytes added, 38 bytes removed, diff: -33

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:52 -08:00
Nate Case 35b5f6b1a8 PHYLIB: Locking fixes for PHY I/O potentially sleeping
PHY read/write functions can potentially sleep (e.g., a PHY accessed
via I2C).  The following changes were made to account for this:

    * Change spin locks to mutex locks
    * Add a BUG_ON() to phy_read() phy_write() to warn against
      calling them from an interrupt context.
    * Use work queue for PHY state machine handling since
      it can potentially sleep
    * Change phydev lock from spinlock to mutex

Signed-off-by: Nate Case <ncase@xes-inc.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-03 04:28:41 -08:00
Ralf Baechle 470a81ae15 Remove __INIT_REFOK and __INITDATA_REFOK
Commit 312b1485fb made __INIT_REFOK expand
into .section .section ".ref.text", "ax".  Since the assembler doesn't
tolerate stuttering in the source that broke all MIPS builds.

Since with this change Sam downgraded __INIT_REFOK to just a backward
compat thing and there being only a single use in the MIPS arch code the
best solution is to delete both of __INIT_REFOK and __INITDATA_REFOK (which
was equally broken) being unused anyway these can be deleted.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:58:07 +01:00
Rafael J. Wysocki 9617c3e460 PM: Export device_pm_schedule_removal
Move the declaration of device_pm_schedule_removal() to device.h
and make it exported, as it will be used directly by some drivers
for unregistering device objects during suspend/resume cycles in a
safe way.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-02 15:14:48 -08:00
Greg Kroah-Hartman cc3a1378b4 Revert "PCI: PCIE ASPM support"
This reverts commit 6c723d5bd8.

It caused build errors on non-x86 platforms, config file confusion, and
even some boot errors on some x86-64 boxes.  All around, not quite ready
for prime-time :(

Cc: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-02 11:32:01 -08:00
Bartlomiej Zolnierkiewicz 578cfa0d72 ide: move check_dma_crc() to ide-dma.c
* Move check_dma_crc() to ide-dma.c and add inline version for
  CONFIG_BLK_DEV_IDEDMA=n case.

* Rename check_dma_crc() to ide_check_dma_crc().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:47 +01:00
Bartlomiej Zolnierkiewicz af10f77390 ide: remove ide_ata66_check()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:46 +01:00
Bartlomiej Zolnierkiewicz 5efe7c540e ide: remove set_transfer()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:46 +01:00
Bartlomiej Zolnierkiewicz 835457def9 ide: remove SATA_*_REG macros
* siimage.c: use hwif->sata_scr[SATA_{ERROR,STATUS}_OFFSET] instead of
  SATA_{ERROR,STATUS}_REG macros.

* Remove no longer needed SATA_*_REG macros.

While at it:

* Remove needless SATA Status register read from sil_sata_reset_poll().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:45 +01:00
Bartlomiej Zolnierkiewicz 92b83c8f32 ide: remove ->nice0 and ->nice2 fields from ide_drive_t
* ->nice0 and ->nice2 ide_drive_t fields are always zero so remove them.

* IDE_NICE_0 and IDE_NICE_2 defines from <linux/hdreg.h> are no longer
  used by any kernel code so cover them with #ifndef/#endif __KERNEL__.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:45 +01:00
Bartlomiej Zolnierkiewicz b034304a28 ide: convert ->straight8 field in ide_hwif_t to bit flag
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:45 +01:00
Bartlomiej Zolnierkiewicz b60acab1e7 ide: remove unused ->auto_poll field from ide_hwif_t
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:45 +01:00
Bartlomiej Zolnierkiewicz d9270a3f1d ide: move create_proc_ide_drives() call to ide_device_add_all()
* Un-static create_proc_ide_drives() and call it from ide_device_add_all().

While at it:
* Rename create_proc_ide_drives() to ide_proc_port_register_devices().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:43 +01:00
Bartlomiej Zolnierkiewicz eafd88a3b5 ide: factor out devices setup from ide_acpi_init()
* Factor out devices setup from ide_acpi_init() to
  ide_acpi_port_init_devices().

* Call ide_acpi_port_init_devices() in ide_device_add_all().

While at it:
* Remove no longer needed 'drive' field from struct ide_acpi_drive_link.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:43 +01:00
Bartlomiej Zolnierkiewicz 1f2cf8b001 ide: add ->port_init_devs method to ide_hwif_t
* Add ->port_init_devs method to ide_hwif_t for a host specific
  initialization of devices on a port.  Call the new method from
  ide_port_init_devices().

* Convert ht6560b, qd65xx and opti621 host drivers to use the new
  ->port_init_devs method.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:40 +01:00
Bartlomiej Zolnierkiewicz 807b90d0be ide: add IDE_HFLAG_NO_{IO32_BIT,UNMASK_IRQS} host flags
* Use the same bit for IDE_HFLAG_CS5520 and IDE_HFLAG_VDMA host flags
  (both are used only by cs5520 host driver currently).

* Add IDE_HFLAG_NO_IO32_BIT host flag and use it instead of ->no_io_32bit
  ide_hwif_t field.

* Add IDE_HFLAG_NO_UNMASK_IRQS host flag, then convert dtc2278 and rz1000
  host drivers to use it.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:40 +01:00
Bartlomiej Zolnierkiewicz 9e016a7192 ide: add ide_deprecated_find_port() helper
* Factor out code for finding ide_hwifs[] slot from ide_register_hw()
  to ide_deprecated_find_port().

* Convert bast-ide, ide-cs and delkin_cb host drivers to use ide_device_add()
  instead of ide_register_hw() (while at it drop doing "ide_unregister()" loop
  which tries to unregister _all_ IDE interfaces if useable ide_hwifs[] slot
  cannot be find).

This patch leaves us with only two ide_register_hw() users:
- drivers/macintosh/mediabay.c
- drivers/ide/ide.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:39 +01:00
Bartlomiej Zolnierkiewicz f82c2b1719 ide: add 'init_default' and 'restore' arguments to ide_unregister()
* Add 'init_default' (flag for calling init_hwif_default()) and 'restore'
  (flag for calling ide_hwif_restore()) arguments to ide_unregister().

* Update ide_unregister() users to set 'init_default' and 'restore' flags.

* No need to set 'init_default' flag in ide_register_hw() if the setup done
  by init_hwif_default() is going to be overridden by ide_init_port_hw().

* No need to set 'init_default' and 'restore' flags in cleanup_module().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:39 +01:00
Borislav Petkov 0eea6458c0 ide-floppy: use an xfer_func_t and io_buf_t typedefs in order to unify rw
Also, move xfer_func_t typedef to the ide.h since it is used by two drivers
now (more coming).

Bart:
- use __func__ while at it

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:36 +01:00
Bartlomiej Zolnierkiewicz bfa14b42a3 ide: add ->cable_detect method to ide_hwif_t
* Add ->cable_detect method to ide_hwif_t.

* Call the new method in ide_init_port() if:
  - the host supports UDMA modes > UDMA2 ('hwif->ultra_mask & 78')
  - DMA initialization was successful (if hwif->dma_base is not set
    ide_init_port() sets hwif->ultra_mask to zero)
  - "idex=ata66" is not used ('hwif->cbl != ATA_CBL_PATA40_SHORT')

* Convert PCI host drivers to use ->cable_detect method.

While at it:

* Factor out cable detection to separate functions (if not already done).

* hpt366.c/it8213.c/slc90e66.c:
  - don't check cable type if "idex=ata66" is used

* pdc202xx_new.c:
  - add __devinit tag to pdcnew_cable_detect()

* pdc202xx_old.c:
  - rename pdc202xx_old_cable_detect() to pdc2026x_old_cable_detect()
  - add __devinit tag to pdc2026x_old_cable_detect()

Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02 19:56:31 +01:00