powerpc.git
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Mon, 4 Feb 2008 15:42:46 +0000 (07:42 -0800)]
Merge git://git./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.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
Linus Torvalds [Mon, 4 Feb 2008 15:42:16 +0000 (07:42 -0800)]
Merge git://git./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"

16 years agoDriver core: Remove unneeded get_{device,driver}() calls.
Cornelia Huck [Thu, 31 Jan 2008 09:39:38 +0000 (10:39 +0100)]
Driver core: Remove unneeded get_{device,driver}() calls.

Driver core: Remove unneeded get_{device,driver}() calls.

Code trying to add/remove attributes must hold a reference to
the device resp. driver anyway, so let's remove those reference
count games.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoDriver core: Update some prototypes in platform.txt
Stephen Rothwell [Sat, 2 Feb 2008 11:15:07 +0000 (22:15 +1100)]
Driver core: Update some prototypes in platform.txt

Just make these match the actual code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: convert to use class_find_device api
Dave Young [Mon, 28 Jan 2008 08:56:11 +0000 (16:56 +0800)]
driver core: convert to use class_find_device api

Convert to use class_find_device api in drivers/base/core.c

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPM: Export device_pm_schedule_removal
Rafael J. Wysocki [Fri, 25 Jan 2008 00:30:25 +0000 (01:30 +0100)]
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>
16 years agonozomi: finish constification
Frank Seidel [Fri, 1 Feb 2008 08:14:05 +0000 (09:14 +0100)]
nozomi: finish constification

Even some more constifications

Signed-off-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agonozomi: constify driver
Jan Engelhardt [Fri, 1 Feb 2008 08:13:53 +0000 (09:13 +0100)]
nozomi: constify driver

nozomi: constify structures and annotate vars

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agonozomi driver update
Frank Seidel [Fri, 25 Jan 2008 20:13:24 +0000 (21:13 +0100)]
nozomi driver update

Minor cleanups and removal of in-file changelog:

- Correction of misspellings and wrong encoded Name
- changed 'unsigned' to 'unsigned int' for better readability
- use of generic devicefile access macro
- fixed/added explanatory comment to ntty_put_char

Signed-off-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoAdd ja_JP translation of stable_kernel_rules.txt
Tsugikazu Shibata [Thu, 31 Jan 2008 00:46:36 +0000 (09:46 +0900)]
Add ja_JP translation of stable_kernel_rules.txt

Contents are reviewed by Japanese translation community called "JF".
Thanks a lot!

Singed-off-by: Tsugikazu Shibata <tshibata@ab.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: kerneldoc comment fix
Dave Young [Mon, 28 Jan 2008 08:58:00 +0000 (16:58 +0800)]
kobject: kerneldoc comment fix

Fix kerneldoc comment of kobject_create.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: Always build in kernel/ksysfs.o.
Paul Mundt [Thu, 31 Jan 2008 09:12:34 +0000 (18:12 +0900)]
kobject: Always build in kernel/ksysfs.o.

kernel/ksysfs.c seems to be a random dumping group for misc globals
that the rest of the tree depend on. This has caused problems with
exports in the past when sysfs is disabled, which can already be
observed in commit-id 51107301b629640f9ab76fe23bf385e187b9ac29.

The latest one is the kernel_kobj usage, which presently results in:

fs/built-in.o: In function `debugfs_init':
inode.c:(.init.text+0xc34): undefined reference to `kernel_kobj'
make: *** [.tmp_vmlinux1] Error 1

kernel/ksysfs.c itself at this point only contains globals and some
basic sysfs initialization, the sysfs initialization code is optimized
out when we build with sysfs disabled. Given that, it's easier to just
build in unconditionally, rather than trying to find some other random
place to dump and initialize the globals.

Additionally, the current trend seems to be decoupling of kobjects from
sysfs, in which case it still makes sense to perform the kernel_kobj
initialization that happens here even if sysfs is disabled, as
lib/kobject.o is built-in unconditionally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: fix 4x section mismatch warnings
Sam Ravnborg [Sat, 2 Feb 2008 21:33:43 +0000 (22:33 +0100)]
PCI: fix 4x section mismatch warnings

The following warnings were issued during build of
drivers/pci with an allyesconfig build:
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xdaf): Section mismatch in reference from the function pci_add_new_bus() to the function .devinit.text:pci_alloc_child_bus()
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x15e2): Section mismatch in reference from the function pci_scan_single_device() to the function .devinit.text:pci_scan_device()
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b0c5): Section mismatch in reference from the function pci_bus_assign_resources() to the function .devinit.text:pci_setup_bridge()
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b32d): Section mismatch in reference from the function pci_bus_size_bridges() to the function .devinit.text:pci_bus_size_cardbus()

Investigating each case closer it looked like all
referred functions are only used in the init phase
or during hotplug.
So to avoid wasting too much memory in the non-hotplug
case the simpler fix was to allow the fuctions to
use code/data from the __devinit sections.
This was done in all four case by adding the __ref
annotation.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoPCI: fix section mismatch warnings referring to pci_do_scan_bus
Sam Ravnborg [Sat, 2 Feb 2008 21:32:23 +0000 (22:32 +0100)]
PCI: fix section mismatch warnings referring to pci_do_scan_bus

Fix following warnings:
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xb054): Section mismatch in reference from the function cpci_configure_slot() to the function .devinit.text:pci_do_scan_bus()
WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x153ab): Section mismatch in reference from the function shpchp_configure_device() to the function .devinit.text:pci_do_scan_bus()
WARNING: o-x86_64/drivers/pci/built-in.o(__ksymtab+0xc0): Section mismatch in reference from the variable __ksymtab_pci_do_scan_bus to the function .devinit.text:pci_do_scan_bus()

PCI hotplug were the only user of pci_do_scan_bus()
so moving this function to a separate file that is build
only when we enable CONFIG_HOTPLUG_PCI.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sat, 2 Feb 2008 20:58:57 +0000 (07:58 +1100)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (95 commits)
  ide-tape: remove idetape_config_t typedef
  ide-tape: remove mtio.h related comments
  ide-tape: make function name more accurate
  ide-tape: remove unused sense packet commands.
  ide-tape: use generic byteorder macros
  ide-tape: remove EXPERIMENTAL driver status
  ide-tape: use generic scsi commands
  ide-tape: remove struct idetape_block_size_page_t
  ide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_t
  ide-tape: remove struct idetape_parameter_block_descriptor_t
  ide-tape: remove struct idetape_medium_partition_page_t
  ide-tape: remove struct idetape_data_compression_page_t
  ide-tape: remove struct idetape_inquiry_result_t
  ide-tape: remove struct idetape_capabilities_page_t
  ide-tape: remove IDETAPE_DEBUG_BUGS
  ide-tape: remove IDETAPE_DEBUG_INFO
  ide-tape: dump gcw fields on error in idetape_identify_device()
  ide-tape: remove struct idetape_mode_parameter_header_t
  ide-tape: remove struct idetape_request_sense_result_t
  ide-tape: remove dead code
  ...

16 years agofix writev regression: pan hanging unkillable and un-straceable
Nick Piggin [Sat, 2 Feb 2008 14:01:17 +0000 (15:01 +0100)]
fix writev regression: pan hanging unkillable and un-straceable

Frederik Himpe reported an unkillable and un-straceable pan process.

Zero length iovecs can go into an infinite loop in writev, because the
iovec iterator does not always advance over them.

The sequence required to trigger this is not trivial. I think it
requires that a zero-length iovec be followed by a non-zero-length iovec
which causes a pagefault in the atomic usercopy. This causes the writev
code to drop back into single-segment copy mode, which then tries to
copy the 0 bytes of the zero-length iovec; a zero length copy looks like
a failure though, so it loops.

Put a test into iov_iter_advance to catch zero-length iovecs. We could
just put the test in the fallback path, but I feel it is more robust to
skip over zero-length iovecs throughout the code (iovec iterator may be
used in filesystems too, so it should be robust).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Sat, 2 Feb 2008 20:51:38 +0000 (07:51 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: sbp2: fix bogus s/g access change

16 years agopci: pci_enable_device_bars() fix for lpfc driver
Greg Kroah-Hartman [Sat, 2 Feb 2008 11:13:22 +0000 (12:13 +0100)]
pci: pci_enable_device_bars() fix for lpfc driver

Based on a patch from Ingo Molnar <mingo@elte.hu> as he pointed out that
I wrongly missed this.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoRevert "PCI: PCIE ASPM support"
Greg Kroah-Hartman [Sat, 2 Feb 2008 19:32:01 +0000 (11:32 -0800)]
Revert "PCI: PCIE ASPM support"

This reverts commit 6c723d5bd89f03fc3ef627d50f89ade054d2ee3b.

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>
16 years agoide-tape: remove idetape_config_t typedef
Borislav Petkov [Sat, 2 Feb 2008 18:56:51 +0000 (19:56 +0100)]
ide-tape: remove idetape_config_t typedef

Since this is used only in idetape_blkdev_ioctl(), remove the typedef and make
the struct function-local.

Bart:
- s/sizeof(struct idetape_config)/sizeof(config)/

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove mtio.h related comments
Borislav Petkov [Sat, 2 Feb 2008 18:56:51 +0000 (19:56 +0100)]
ide-tape: remove mtio.h related comments

Those are already in mtio.h.

Bart:
- undo 'unsigned int/unsigned long' -> 'uint/ulong' conversion

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: make function name more accurate
Borislav Petkov [Sat, 2 Feb 2008 18:56:51 +0000 (19:56 +0100)]
ide-tape: make function name more accurate

idetape_active_next_stage() was rather ambiguous wrt its purpose. Make that
more explicit and remove superfluous comment.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove unused sense packet commands.
Borislav Petkov [Sat, 2 Feb 2008 18:56:51 +0000 (19:56 +0100)]
ide-tape: remove unused sense packet commands.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: use generic byteorder macros
Borislav Petkov [Sat, 2 Feb 2008 18:56:50 +0000 (19:56 +0100)]
ide-tape: use generic byteorder macros

This is not a network driver.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove EXPERIMENTAL driver status
Borislav Petkov [Sat, 2 Feb 2008 18:56:50 +0000 (19:56 +0100)]
ide-tape: remove EXPERIMENTAL driver status

ide-tape has depended on EXPERIMENTAL for ages. Change that since the driver is
being only maintained now.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: use generic scsi commands
Borislav Petkov [Sat, 2 Feb 2008 18:56:50 +0000 (19:56 +0100)]
ide-tape: use generic scsi commands

Also, remove those which weren't used.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_block_size_page_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:50 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_block_size_page_t

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:50 +0000 (19:56 +0100)]
ide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_t

They seem just to sit there completely unused.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_parameter_block_descriptor_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:50 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_parameter_block_descriptor_t

Also, shorten function name idetape_get_blocksize_from_block_descriptor() and
move its definition up thereby getting rid of its forward declaration.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_medium_partition_page_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:49 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_medium_partition_page_t

There should be no functional changes resulting from this patch.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_data_compression_page_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:49 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_data_compression_page_t

There should be no functional changes resulting from this patch.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_inquiry_result_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:49 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_inquiry_result_t

There should be no functional changes resulting from this patch.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_capabilities_page_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:49 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_capabilities_page_t

All those 2-byte values denoting the different capabilities are being written to
the local copy of the caps buffer without being converted to big endian for
simplicity of usage and shorter code later.  Also, we add some comments stating
which are the fields of the caps page in question in order to alleviate the
cryptic pointer casting exercises as in e.g. idetape_get_mode_sense_results().

There should be no functional changes resulting from this patch.

Bart:
- remove two needless "!!"

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove IDETAPE_DEBUG_BUGS
Borislav Petkov [Sat, 2 Feb 2008 18:56:49 +0000 (19:56 +0100)]
ide-tape: remove IDETAPE_DEBUG_BUGS

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove IDETAPE_DEBUG_INFO
Borislav Petkov [Sat, 2 Feb 2008 18:56:49 +0000 (19:56 +0100)]
ide-tape: remove IDETAPE_DEBUG_INFO

The device capabilities are probed for during device initialization so this
info is available through proc/ioctl() und it is redundant here.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: dump gcw fields on error in idetape_identify_device()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:48 +0000 (19:56 +0100)]
ide-tape: dump gcw fields on error in idetape_identify_device()

Cc: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_mode_parameter_header_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:48 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_mode_parameter_header_t

Bart:
- remove 'capabilities->speed' chunk
- re-add brackets to block_descrp assignment

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove struct idetape_request_sense_result_t
Borislav Petkov [Sat, 2 Feb 2008 18:56:48 +0000 (19:56 +0100)]
ide-tape: remove struct idetape_request_sense_result_t

Bart:
- remove unnecessary comment change
- remove two needless "!!"

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove dead code
Borislav Petkov [Sat, 2 Feb 2008 18:56:48 +0000 (19:56 +0100)]
ide-tape: remove dead code

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: move historical changelog to Documentation/ide/ChangeLog.ide-tape.1995...
Borislav Petkov [Sat, 2 Feb 2008 18:56:48 +0000 (19:56 +0100)]
ide-tape: move historical changelog to Documentation/ide/ChangeLog.ide-tape.1995-2002

Also, cleanup whitespace and update comments.

Bart:
- remove reference to drivers/block/ide.c
- move driver documentation to Documentation/ide/ide-tape.txt

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cs: use ide_std_init_ports()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:47 +0000 (19:56 +0100)]
ide-cs: use ide_std_init_ports()

No reason to use ide_init_hwif_ports() in ide-cs (as a nice side-effect
this makes ide-cs work on archs that don't define IDE_ARCH_OBSOLETE_INIT).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move check_dma_crc() to ide-dma.c
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:47 +0000 (19:56 +0100)]
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>
16 years agoide: remove ide_auto_reduce_xfer()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:47 +0000 (19:56 +0100)]
ide: remove ide_auto_reduce_xfer()

While at it:

* Remove needless '!drive->crc_count' check.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move drive->crc_count check out from check_dma_crc()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:47 +0000 (19:56 +0100)]
ide: move drive->crc_count check out from check_dma_crc()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ide_ata66_check()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:46 +0000 (19:56 +0100)]
ide: remove ide_ata66_check()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove set_transfer()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:46 +0000 (19:56 +0100)]
ide: remove set_transfer()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: unexport SELECT_DRIVE()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:46 +0000 (19:56 +0100)]
ide: unexport SELECT_DRIVE()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-scsi: remove needless SELECT_DRIVE() call
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:46 +0000 (19:56 +0100)]
ide-scsi: remove needless SELECT_DRIVE() call

SELECT_DRIVE() is called by IDE core code in start_request() before device
driver's ->do_request method.  In ide-scsi case ->do_request is implemented
by idescsi_do_request() which is also the only user of idescsi_issue_pc().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use __ide_set_handler() in ide_execute_command()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:46 +0000 (19:56 +0100)]
ide: use __ide_set_handler() in ide_execute_command()

* Use __ide_set_handler() in ide_execute_command().

While at it:

* Fix whitespace damage in ide_execute_command().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove SATA_*_REG macros
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:45 +0000 (19:56 +0100)]
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>
16 years agoide: remove ->nice0 and ->nice2 fields from ide_drive_t
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:45 +0000 (19:56 +0100)]
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>
16 years agoide: convert ->straight8 field in ide_hwif_t to bit flag
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:45 +0000 (19:56 +0100)]
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>
16 years agoide: remove unused ->auto_poll field from ide_hwif_t
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:45 +0000 (19:56 +0100)]
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>
16 years agoide-probe: remove needless Status register reads
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:45 +0000 (19:56 +0100)]
ide-probe: remove needless Status register reads

* Cache value read from the Status register in 'stat' variable in do_probe()
  and enable_nest(), then remove remove needless Status register reads.

While at it:

* Add proper KERN_* levels to printk() calls.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cris: use ide_execute_command()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:44 +0000 (19:56 +0100)]
ide-cris: use ide_execute_command()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agotrm290: use ide_execute_command()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:44 +0000 (19:56 +0100)]
trm290: use ide_execute_command()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-scsi: use ide_execute_command()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:44 +0000 (19:56 +0100)]
ide-scsi: use ide_execute_command()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: use ide_execute_command()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:44 +0000 (19:56 +0100)]
ide-tape: use ide_execute_command()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move create_proc_ide_drives() call to ide_device_add_all()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:43 +0000 (19:56 +0100)]
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>
16 years agoide: move hwif->present check out from ide_proc_register_port()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:43 +0000 (19:56 +0100)]
ide: move hwif->present check out from ide_proc_register_port()

Move hwif->present check out from ide_proc_register_port() to
ide_device_add_all().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: factor out devices setup from ide_acpi_init()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:43 +0000 (19:56 +0100)]
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>
16 years agoide-acpi: remove dead code from do_drive_get_GTF()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:43 +0000 (19:56 +0100)]
ide-acpi: remove dead code from do_drive_get_GTF()

These pointers are always setup in ide_acpi_init().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-acpi: remove needless exports
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:42 +0000 (19:56 +0100)]
ide-acpi: remove needless exports

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move ide_acpi_init() call to ide_device_add_all()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:41 +0000 (19:56 +0100)]
ide: move ide_acpi_init() call to ide_device_add_all()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: factor out devices setup from init_irq()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:41 +0000 (19:56 +0100)]
ide: factor out devices setup from init_irq()

* Factor out devices setup from init_irq() to ide_port_setup_devices().

While at it:
* Do devices setup after printing port information.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: factor out adding drive to hwgroup from init_irq()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:41 +0000 (19:56 +0100)]
ide: factor out adding drive to hwgroup from init_irq()

Factor out adding drive to hwgroup from init_irq() to
ide_add_drive_to_hwgroup().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move hwif->rqsize init from ide_init_queue() to init_irq()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:41 +0000 (19:56 +0100)]
ide: move hwif->rqsize init from ide_init_queue() to init_irq()

Move hwif->rqsize init from ide_init_queue() to init_irq().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: merge init_gendisk() into hwif_register_devices()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:41 +0000 (19:56 +0100)]
ide: merge init_gendisk() into hwif_register_devices()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: call init_gendisk() after ide_acpi_init()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:40 +0000 (19:56 +0100)]
ide: call init_gendisk() after ide_acpi_init()

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: move blk_register_region() call out from init_gendisk()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:40 +0000 (19:56 +0100)]
ide: move blk_register_region() call out from init_gendisk()

Move blk_register_region() call out from init_gendisk() to hwif_init().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: skip not present devices in init_gendisk()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:40 +0000 (19:56 +0100)]
ide: skip not present devices in init_gendisk()

No need to initialize drive->gendev and waste memory on IDE settings
for not present devices.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove incorrect init_gendisk() comment
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:40 +0000 (19:56 +0100)]
ide: remove incorrect init_gendisk() comment

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ->port_init_devs method to ide_hwif_t
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:40 +0000 (19:56 +0100)]
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>
16 years agoide: add IDE_HFLAG_NO_{IO32_BIT,UNMASK_IRQS} host flags
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:40 +0000 (19:56 +0100)]
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>
16 years agoide: factor out code initializing devices from ide_init_port()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:39 +0000 (19:56 +0100)]
ide: factor out code initializing devices from ide_init_port()

* Factor out code initializing devices from ide_init_port() to
  ide_port_init_devices().

* Call the new function from ide_device_add_all().

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix ide_unregister() usage in host drivers
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:39 +0000 (19:56 +0100)]
ide: fix ide_unregister() usage in host drivers

bast-ide.c/ide-cs.c/delkin_cb.c:

* Don't set 'restore' flag for ide_unregister() when initializing new
  interface.

rapide.c/ide-pnp.c/ide-cs.c/ide_platform.c/au1xxx-ide.c/delkin_cb.c/scc_pata.c:

* Don't set 'init_default' and 'restore' flags for ide_unregister() when
  removing interface.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_deprecated_find_port() helper
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:39 +0000 (19:56 +0100)]
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>
16 years agoide: add 'init_default' and 'restore' arguments to ide_unregister()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:39 +0000 (19:56 +0100)]
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>
16 years agoide: remove redundant init_hwif_default() call from ide_register_hw()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:38 +0000 (19:56 +0100)]
ide: remove redundant init_hwif_default() call from ide_register_hw()

ide_init_port_hw() call overrides setup done by init_hwif_default().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove redundant hwif->present check from ide_register_hw()
Bartlomiej Zolnierkiewicz [Sat, 2 Feb 2008 18:56:38 +0000 (19:56 +0100)]
ide: remove redundant hwif->present check from ide_register_hw()

We check earlier for hwif->present and call ide_unregister() if necessary
(after ide_unregister() hwif->present will be always cleared).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agopdc202xx_old: remove surplus initialiser
Alan Cox [Sat, 2 Feb 2008 18:56:38 +0000 (19:56 +0100)]
pdc202xx_old: remove surplus initialiser

Bart:
- drive-by CodingStyle fixups

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: bump driver version number
Borislav Petkov [Sat, 2 Feb 2008 18:56:38 +0000 (19:56 +0100)]
ide-floppy: bump driver version number

Acknowledge major ide-floppy code refactoring and cleanup by bumping the driver
version number. Also, remove a wrong comment.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: fix most of the remaining checkpatch.pl issues
Borislav Petkov [Sat, 2 Feb 2008 18:56:38 +0000 (19:56 +0100)]
ide-floppy: fix most of the remaining checkpatch.pl issues

such as
ERROR: switch and case should be at the same indent
ERROR: need spaces around that '=' (ctx:VxV)
ERROR: trailing statements should be on next line
WARNING: no space between function name and open parenthesis '('
WARNING: printk() should include KERN_ facility level
ERROR: That open brace { should be on the previous line
ERROR: use tabs not spaces
ERROR: do not use assignment in if condition
WARNING: braces {} are not necessary for single statement blocks
ERROR: need space after that ',' (ctx:VxV)
WARNING: line over 80 characters
ERROR: do not use assignment in if condition
...
and so on.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove atomic test_*bit macros
Borislav Petkov [Sat, 2 Feb 2008 18:56:37 +0000 (19:56 +0100)]
ide-floppy: remove atomic test_*bit macros

..and replace them with flag enums.

Bart:
- fix idefloppy_media_changed() return value

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove unused flag PC_ABORT
Borislav Petkov [Sat, 2 Feb 2008 18:56:37 +0000 (19:56 +0100)]
ide-floppy: remove unused flag PC_ABORT

This flag was never being set in the code so remove it. By the way, the
code in the second patch was being executed unconditionally, i.e. in case
pc->retries > IDEFLOPPY_MAX_PC_RETRIES is true (actually that is the only case
when the outer if-test passed), !test_bit(PC_ABORT, &pc->flags)
was always true so the comment is now incorrect and has to go.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove IDEFLOPPY_DEBUG_INFO
Borislav Petkov [Sat, 2 Feb 2008 18:56:36 +0000 (19:56 +0100)]
ide-floppy: remove IDEFLOPPY_DEBUG_INFO

This info is already available through ioctl() and /proc

Bart:
- dump 'gcw.packet_size' for unsupported packet sizes

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove unused IDEFLOPPY_USE_READ12
Borislav Petkov [Sat, 2 Feb 2008 18:56:36 +0000 (19:56 +0100)]
ide-floppy: remove unused IDEFLOPPY_USE_READ12

This flag is not being set anywhere in the driver so it can go.

Bart:
- minor CodingStyle fixup

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: merge idefloppy_{input,output}_buffers
Borislav Petkov [Sat, 2 Feb 2008 18:56:36 +0000 (19:56 +0100)]
ide-floppy: merge idefloppy_{input,output}_buffers

We merge idefloppy_{input,output}_buffers() into idefloppy_io_buffers() by
introducing a 4th arg. called direction. According to its value
we atapi_input_bytes() or atapi_output_bytes(). Also, this simplifies the
interrupt handler logic a bit. Finally, rename idefloppy_io_buffers() to
ide_floppy_io_buffers().

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: use an xfer_func_t and io_buf_t typedefs in order to unify rw
Borislav Petkov [Sat, 2 Feb 2008 18:56:36 +0000 (19:56 +0100)]
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>
16 years agoide-floppy: remove IDEFLOPPY_DEBUG_BUGS macro
Borislav Petkov [Sat, 2 Feb 2008 18:56:36 +0000 (19:56 +0100)]
ide-floppy: remove IDEFLOPPY_DEBUG_BUGS macro

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: mv idefloppy_{should_,}report_error
Borislav Petkov [Sat, 2 Feb 2008 18:56:35 +0000 (19:56 +0100)]
ide-floppy: mv idefloppy_{should_,}report_error

In addition to shortening the function name, move the printk-call into the
function thereby saving some code lines. Also, make the function out_of_line
since it is not on a performance critical path. Finally, rename the reworked
function to ide_floppy..().

Bart:
- minor CodingStyle fixup

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: report DMA handling in idefloppy_pc_intr() properly
Borislav Petkov [Sat, 2 Feb 2008 18:56:35 +0000 (19:56 +0100)]
ide-floppy: report DMA handling in idefloppy_pc_intr() properly

Bart:
- use 'hwif' instead of 'HWIF(drive)'
- minor CodingStyle fixup

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: factor out ioctl handlers from idefloppy_ioctl()
Borislav Petkov [Sat, 2 Feb 2008 18:56:35 +0000 (19:56 +0100)]
ide-floppy: factor out ioctl handlers from idefloppy_ioctl()

By passing idefloppy_floppy_t *floppy to the factored out functions, we get
rid of (almost) all local vars so stack usage should be at minimum here. Also,
we merge idefloppy_begin_format() into idefloppy_format_start() since it is its
only user. Also, rename idefloppy_format_start() to idefloppy_format_unit().
Finally, rename the reworked functions to ide_floppy..().

Bart
- minor CodingStyle fixup

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove struct idefloppy_capacity_descriptor
Borislav Petkov [Sat, 2 Feb 2008 18:56:35 +0000 (19:56 +0100)]
ide-floppy: remove struct idefloppy_capacity_descriptor

Also,
- remove the accompanying 4 byte idefloppy_capacity_header.
- rename functions from idefloppy_... to ide_floppy_... after cleanup.
- simplify loop in ide_floppy_get_capacity() by reversing if-test condition
  logically.
- finally, fix white space and checkpatch.pl issues

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove struct idefloppy_flexible_disk_page
Borislav Petkov [Sat, 2 Feb 2008 18:56:35 +0000 (19:56 +0100)]
ide-floppy: remove struct idefloppy_flexible_disk_page

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove struct idefloppy_mode_parameter_header
Borislav Petkov [Sat, 2 Feb 2008 18:56:34 +0000 (19:56 +0100)]
ide-floppy: remove struct idefloppy_mode_parameter_header

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove struct idefloppy_request_sense_result
Borislav Petkov [Sat, 2 Feb 2008 18:56:34 +0000 (19:56 +0100)]
ide-floppy: remove struct idefloppy_request_sense_result

While at it, collapse idefloppy_analyze_error() into
idefloppy_request_sense_callback() since the latter was its only user.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove struct idefloppy_inquiry_result
Borislav Petkov [Sat, 2 Feb 2008 18:56:34 +0000 (19:56 +0100)]
ide-floppy: remove struct idefloppy_inquiry_result

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove struct idefloppy_capabilities_page
Borislav Petkov [Sat, 2 Feb 2008 18:56:34 +0000 (19:56 +0100)]
ide-floppy: remove struct idefloppy_capabilities_page

This change is rather temporary and is in preparation of using generic commands
as is the case with ide-cd and the uniform cdrom layer (i.e. init_cdrom_command())
However, before this happens, we'll have to remove all typedefs and teach
idefloppy_create_mode_sense_cmd() to work directly on u8 buffers.

Also, since idefloppy_get_capability_page() was used to read only the sfrp bit,
rename the latter so that the name reflects what it does.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: cleanup and unify debugging macro calls
Borislav Petkov [Sat, 2 Feb 2008 18:56:34 +0000 (19:56 +0100)]
ide-floppy: cleanup and unify debugging macro calls

* some debug_log() calls were not using "ide-floppy: " prefix

* a few used printk levels different than KERN_INFO (KERN_NOTICE
  and KERN_ERR, which is the default one if no level is given)

Bart:
- fix build issues for IDEFLOPPY_DEBUG_LOG set to 1 while at it
- s/__FUNCTION__/__func__/

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>