Commit graph

132603 commits

Author SHA1 Message Date
Bartlomiej Zolnierkiewicz 2ed0ef543a ide: fix ->init_chipset method to return 'int' value
* Return 0 instead of dev->irq in ->init_chipset implementations.

* Fix ->init_chipset method to return 'int' value instead of
  'unsigned int' one.

This fixes ->init_chipset handling for host drivers (cs5530, hpt366
and pdc202xx_new) for which it is possible for this method to fail.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:53 +01:00
Bartlomiej Zolnierkiewicz a182807a89 ide: remove try_to_identify() wrapper
There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:53 +01:00
Bartlomiej Zolnierkiewicz f77e03c68f ide: remove no longer needed IRQ auto-probing from try_to_identify() (v2)
v2:
Update actual_try_to_identify() documentation.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:53 +01:00
Bartlomiej Zolnierkiewicz 8b07ed26f8 ide: remove no longer needed IRQ fallback code from hwif_init()
Then remove no longer used __ide_default_irq().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:52 +01:00
Bartlomiej Zolnierkiewicz bd0c08470f amd74xx: remove no longer needed ->init_hwif method
This is now handled by core IDE PCI code.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:52 +01:00
Bartlomiej Zolnierkiewicz 2467922a56 ide: remove no longer needed IDE_HFLAG[_FORCE]_LEGACY_IRQS
There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:52 +01:00
Bartlomiej Zolnierkiewicz f65dedfd7b ide: use ide_pci_is_in_compatibility_mode() in ide_pci_init_{one,two}()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:51 +01:00
Bartlomiej Zolnierkiewicz 5bae8bf450 ide: use pci_get_legacy_ide_irq() in ide_pci_init_{one,two}()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:49 +01:00
Bartlomiej Zolnierkiewicz 80d15a607a ide: handle IDE_HFLAG[_FORCE]_LEGACY_IRQS in ide_pci_init_{one,two}()
Move handling of IDE_HFLAG[_FORCE]_LEGACY_IRQS from ide_init_port()
to ide_pci_init_{one,two}().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:49 +01:00
Bartlomiej Zolnierkiewicz 1b166ae7bb trm290: small ->init_hwif cleanup
Core IDE PCI code takes care of assigning hwif->irq for both ports.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:49 +01:00
Bartlomiej Zolnierkiewicz 49727e3d20 ns87415: small ->init_hwif cleanup
Core IDE PCI code takes care of assigning hwif->irq for both ports.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:49 +01:00
Bartlomiej Zolnierkiewicz 973d9e7439 ns87415: use pci_get_legacy_ide_irq()
Fix ->init_hwif to use pci_get_legacy_ide_irq() instead of
__ide_default_irq().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:48 +01:00
Bartlomiej Zolnierkiewicz 213e4b0a34 amd74xx: use ide_pci_is_in_compatibility_mode()
Fix ->init_hwif to check if IDE PCI controller is in compatibility
mode instead of checking for hwif->irq == 0.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:48 +01:00
Bartlomiej Zolnierkiewicz b75aa122ed mn10300: add pci_get_legacy_ide_irq() to <asm/pci.h>
Add missing pci_get_legacy_ide_irq() implementation
before it becomes required by core IDE PCI code.

Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:48 +01:00
Bartlomiej Zolnierkiewicz 327fa1c294 ide: move error handling code to ide-eh.c (v2)
Do some CodingStyle fixups in <linux/ide.h> while at it.

v2:
Add missing <linux/delay.h> include (reported by Stephen Rothwell).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:47 +01:00
Bartlomiej Zolnierkiewicz 122f06f8bc ide: checkpatch.pl fixes for ide-iops.c
Fix following checkpatch.pl warnings/errors:
- WARNING: space prohibited between function name and open parenthesis '('
- WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
- WARNING: line over 80 characters
- ERROR: trailing whitespace
- ERROR: space required before the open parenthesis '('

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:47 +01:00
Bartlomiej Zolnierkiewicz ee1b1cc974 ide: fix comments in ide_config_drive_speed()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:47 +01:00
Bartlomiej Zolnierkiewicz 4d7bb471ce ide: fix printk() levels in [atapi_]reset_pollfunc()
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:47 +01:00
Bartlomiej Zolnierkiewicz 1574cf6cb4 ide: move standard I/O code to ide-io-std.c
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:46 +01:00
Bartlomiej Zolnierkiewicz 0d6a9754c0 ide: move ide_read_bcount_and_ireason() to ide-atapi.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:46 +01:00
Bartlomiej Zolnierkiewicz 7eeaaaa522 ide: move xfer mode tuning code to ide-xfer-mode.c
* Move xfer mode tuning code to ide-xfer-mode.c.

* Add CONFIG_IDE_XFER_MODE config option to be selected by host drivers
  that support xfer mode tuning.

* Add CONFIG_IDE_XFER_MODE=n static inline versions of ide_set_pio()
  and ide_set_xfer_rate().

* Make IDE_TIMINGS and BLK_DEV_IDEDMA config options select IDE_XFER_MODE,
  also add explicit selects for few host drivers that need it.

* Build/link ide-xfer-mode.o and ide-pio-blacklist.o (it is needed only
  by ide-xfer-mode.o) only if CONFIG_IDE_XFER_MODE=y.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:46 +01:00
Bartlomiej Zolnierkiewicz 11938c9290 ide: move device settings code to ide-devsets.c
Remove stale comment from ide.c while at it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:44 +01:00
Bartlomiej Zolnierkiewicz c4e66c36cc ide: move ide_do_park_unpark() to ide-park.c
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:44 +01:00
Bartlomiej Zolnierkiewicz 1bc6daae4a ide: factor out processing of special commands from ide_special_rq()
Factor out processing of special commands from ide_special_rq()
to ide_do_devset() and ide_do_park_unpark().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:44 +01:00
Bartlomiej Zolnierkiewicz 1866082339 ide: remove ide_do_drive_cmd()
* Use elv_add_request() instead of __elv_add_request() in ide_do_drive_cmd().

* ide_do_drive_cmd() is used only in ide-{atapi,cd}.c so inline it there.

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>
2009-03-24 23:22:44 +01:00
Bartlomiej Zolnierkiewicz 65ca537732 ide: move ide_dma_timeout_retry() to ide-dma.c
Move ide_dma_timeout_retry() to ide-dma.c and add static inline
version for CONFIG_BLK_DEV_IDEDMA=n.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:43 +01:00
Bartlomiej Zolnierkiewicz b6a45a0b1e ide: move drive_is_ready() to ide-io.c
Move drive_is_ready() to ide-io.c, then make it static.

Also make some minor CodingStyle fixups while at it.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:43 +01:00
Bartlomiej Zolnierkiewicz 75a0cff4e8 ide: unexport ide_devset_execute()
There are no modular ide_devset_execute() users left so unexport it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:43 +01:00
Bartlomiej Zolnierkiewicz 2b9ae4608f ide: remove stale comments from drive_is_ready()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:42 +01:00
Bartlomiej Zolnierkiewicz b0b391430b ide-acpi: remove taskfile_load_raw()
* taskfile_load_raw() is used only by do_drive_set_taskfiles()
  so inline it there.

While at it:
- rename 'args' variable to 'task'
- remove struct taskfile_array
- do ide_acpigtf check early
- use REGS_PER_GTF

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:42 +01:00
Bartlomiej Zolnierkiewicz 1f5892a5d2 ide-acpi: cleanup do_drive_set_taskfiles()
* ide_noacpi is already checked by ide_acpi_exec_tfs()
  which is the only user of do_drive_set_taskfiles().

* ide_acpi_exec_tfs() prints sufficient debug info about the
  device so no need to do it again.

* do_drive_get_GTF() + ide_acpi_exec_tfs() make sure that this
  function will never be called with incorrect gtf_length argument
  or if device is not present.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:42 +01:00
Bartlomiej Zolnierkiewicz 2f0d0fd2a6 ide-acpi: cleanup do_drive_get_GTF()
* ide_noacpi is already checked by ide_acpi_exec_tfs()
  which is the only user of do_drive_get_GTF().

* ide_acpi_exec_tfs() prints sufficient debug info about the
  device so no need to have excessive data about port/host.

* It is sufficient to check for drive->acpidata->obj_handle
  as it will be NULL if dev == NULL or hwif->acpidata == NULL
  or device is not present.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:42 +01:00
Bartlomiej Zolnierkiewicz 8b803bd184 ide: sanitize ACPI initialization
* ide_acpi_init() -> ide_acpi_init_port()

* ide_acpi_blacklist() -> ide_acpi_init()

* Call ide_acpi_init() only once (do it during IDE core
  initialization) and cleanup the function accordingly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:41 +01:00
Bartlomiej Zolnierkiewicz 7ed5b157d9 ide: add ide_for_each_present_dev() iterator
* Add ide_for_each_present_dev() iterator and convert IDE code to use it.

* Do some drive-by CodingStyle fixups in ide-acpi.c while at it.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:41 +01:00
Bartlomiej Zolnierkiewicz 8cd3c60562 ide-acpi: init ACPI handles early for devices
Init ACPI handles for devices in ide_acpi_port_init_devices()
and remove no longer needed ide_acpi_drive_get_handle().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:41 +01:00
Bartlomiej Zolnierkiewicz 94635d3ecf ide-acpi: no need to zero ->acpidata for devices
ide_acpi_init() takes care of it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:41 +01:00
Bartlomiej Zolnierkiewicz 1902a253e4 ide: remove superfluous check from ide_proc_port_register_devices()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:40 +01:00
Bartlomiej Zolnierkiewicz 0688d3a6ba ide: init_irq() doesn't need to hold ide_cfg_mtx
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:39 +01:00
Bartlomiej Zolnierkiewicz 7362951b48 ide: move ->lock and ->timer init from init_irq() to ide_init_port_data()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:39 +01:00
Bartlomiej Zolnierkiewicz d336ae3cf5 ide: no need to touch local IRQs in ide_probe_port()
Remove superfluous

	local_save_flags()
	local_irq_enable_in_hardirq()

	...

	local_irq_restore()

combo.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:39 +01:00
Bartlomiej Zolnierkiewicz 7a254df007 ide: move ide_pktcmd_tf_load() to ide-atapi.c
Then make it static and remove 'dma' argument.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:39 +01:00
Bartlomiej Zolnierkiewicz 7610c4f5ef ide: fix IDE_DFLAG_NO_IO_32BIT handling
* IDE_DFLAG_NO_IO_32BIT may be set by cmd640's ->init_dev method
  so don't clear it in ide_port_tune_devices() (+ no need to do it).

* Move IDE_DFLAG_NO_IO_32BIT handling to ide_port_init_devices().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-03-24 23:22:38 +01:00
Linus Torvalds 8e0ee43bc2 Linux 2.6.29 2009-03-23 16:12:14 -07:00
Kyle McMartin 003086497f Build with -fno-dwarf2-cfi-asm
With a sufficiently new compiler and binutils, code which wasn't
previously generating .eh_frame sections has begun to.  Certain
architectures (powerpc, in this case) may generate unexpected relocation
formats in response to this, preventing modules from loading.

While the new relocation types should probably be handled, revert to the
previous behaviour with regards to generation of .eh_frame sections.

(This was reported against Fedora, which appears to be the only distro
doing any building against gcc-4.4 at present: RH bz#486545.)

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Alexandre Oliva <aoliva@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-23 14:21:26 -07:00
Jody McIntyre 1db4b2d221 trivial: fix orphan dates in ext2 documentation
Revert the change to the orphan dates of Windows 95, DOS, compression.
Add a new orphan date for OS/2.

Signed-off-by: Jody McIntyre <scjody@sun.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-23 14:21:26 -07:00
Linus Torvalds d56ffd38a9 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: (32 commits)
  ucc_geth: Fix oops when using fixed-link support
  dm9000: locking bugfix
  net: update dnet.c for bus_id removal
  dnet: DNET should depend on HAS_IOMEM
  dca: add missing copyright/license headers
  nl80211: Check that function pointer != NULL before using it
  sungem: missing net_device_ops
  be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle
  be2net: replenish when posting to rx-queue is starved in out of mem conditions
  bas_gigaset: correctly allocate USB interrupt transfer buffer
  smsc911x: reset last known duplex and carrier on open
  sh_eth: Fix mistake of the address of SH7763
  sh_eth: Change handling of IRQ
  netns: oops in ip[6]_frag_reasm incrementing stats
  net: kfree(napi->skb) => kfree_skb
  net: fix sctp breakage
  ipv6: fix display of local and remote sit endpoints
  net: Document /proc/sys/net/core/netdev_budget
  tulip: fix crash on iface up with shirq debug
  virtio_net: Make virtio_net support carrier detection
  ...
2009-03-23 09:25:58 -07:00
Linus Torvalds 12a37b5e2c 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:
  sparc64: Fix crash with /proc/iomem
  sparc64: Reschedule KGDB capture to a software interrupt.
  sbus: Auto-load openprom module when device opened.
2009-03-23 09:25:24 -07:00
Miklos Szeredi 53da1d9456 fix ptrace slowness
This patch fixes bug #12208:

  Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=12208
  Subject         : uml is very slow on 2.6.28 host

This turned out to be not a scheduler regression, but an already
existing problem in ptrace being triggered by subtle scheduler
changes.

The problem is this:

 - task A is ptracing task B
 - task B stops on a trace event
 - task A is woken up and preempts task B
 - task A calls ptrace on task B, which does ptrace_check_attach()
 - this calls wait_task_inactive(), which sees that task B is still on the runq
 - task A goes to sleep for a jiffy
 - ...

Since UML does lots of the above sequences, those jiffies quickly add
up to make it slow as hell.

This patch solves this by not rescheduling in read_unlock() after
ptrace_stop() has woken up the tracer.

Thanks to Oleg Nesterov and Ingo Molnar for the feedback.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-23 09:22:31 -07:00
Linus Torvalds b0dcb4a91d Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc:
  powerpc/mm: Fix Respect _PAGE_COHERENT on classic ppc32 SW TLB load machines
2009-03-23 08:03:09 -07:00
Kumar Gala 345953cf9a powerpc/mm: Fix Respect _PAGE_COHERENT on classic ppc32 SW TLB load machines
Grant picked up the wrong version of "Respect _PAGE_COHERENT on classic
ppc32 SW" (commit a4bd6a93c3)

It was missing the code to actually deal with the fixup of
_PAGE_COHERENT based on the CPU feature.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-03-23 08:38:26 -05:00