sfrench/cifs-2.6.git
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
David Woodhouse [Sun, 3 Feb 2008 07:29:41 +0000 (18:29 +1100)]
Merge git://git./linux/kernel/git/torvalds/linux-2.6.git

16 years ago[MTD] Unlocking all Intel flash that is locked on power up.
Justin Treon [Wed, 30 Jan 2008 18:25:49 +0000 (10:25 -0800)]
[MTD] Unlocking all Intel flash that is locked on power up.

Patch for unlocking all Intel flash that has instant locking on power up.
The patch has been tested on Intel M18, P30 and J3D Strata Flash.
  1.    The automatic unlocking can be disabled for a particular partition
         in the map or the command line.
     a. For the bit mask in the map it should look like:
         .mask_flags   = MTD_POWERUP_LOCK,
     b. For the command line parsing it should look like:
         mtdparts=0x80000(bootloader)lk
  2.    This will only unlock parts with instant individual block locking.
         Intel parts with legacy unlocking will not be unlocked.

Signed-off-by: Justin Treon <justin_treon@yahoo.com>
Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NAND] at91_nand: Make mtdparts option can override board info
Atsushi Nemoto [Tue, 29 Jan 2008 13:28:22 +0000 (22:28 +0900)]
[MTD] [NAND] at91_nand: Make mtdparts option can override board info

Call parse_mtd_partitions before checking board's partition_info, so
that "mtdparts=" option can override board's default setting.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] mtdoops: Various minor cleanups
Richard Purdie [Tue, 29 Jan 2008 10:25:55 +0000 (10:25 +0000)]
[MTD] mtdoops: Various minor cleanups

Various minor cleaups to mtdoops:
  * Don't support the mtd->erasesize < OOPS_PAGE_SIZE case
  * Tweak printks and make the device mtdoops connects to more visible
  * CON_PRINTBUFFER flag is uneeded

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] mtdoops: Ensure sequential write to the buffer
Richard Purdie [Tue, 29 Jan 2008 10:21:56 +0000 (10:21 +0000)]
[MTD] mtdoops: Ensure sequential write to the buffer

Add a spinlock to ensure writes to the mtdoops buffer memory are
sequential and don't race.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] mtdoops: Perform write operations in a workqueue
Richard Purdie [Tue, 29 Jan 2008 11:27:11 +0000 (11:27 +0000)]
[MTD] mtdoops: Perform write operations in a workqueue

Writing to the flash needs to be done in a workqueue. The console
write functions may be called in any context which can lead to
lockups otherwise.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] mtdoops: Add further error return code checking
Richard Purdie [Tue, 29 Jan 2008 11:27:09 +0000 (11:27 +0000)]
[MTD] mtdoops: Add further error return code checking

Add further error return code checks to the mtdoops driver.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c
Roel Kluin [Mon, 28 Jan 2008 10:48:09 +0000 (11:48 +0100)]
[MTD] [NOR] Test devtype, not definition in flash_probe(), drivers/mtd/devices/lart.c

drivers/mtd/devices/lart.c:119:#define FLASH_DEVICE_16mbit_BOTTOM 0x88f488f4
As was, unless "manufacturer != FLASH_MANUFACTURER" this returned true

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[UBI] drivers/mtd/ubi/scan.c: fix uninitialized var warning
akpm@linux-foundation.org [Wed, 16 Jan 2008 10:48:49 +0000 (02:48 -0800)]
[UBI] drivers/mtd/ubi/scan.c: fix uninitialized var warning

drivers/mtd/ubi/scan.c: In function 'ubi_scan':
drivers/mtd/ubi/scan.c:772: warning: 'ec' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[UBI] drivers/mtd/ubi/wl.c: fix uninitialized var warning
akpm@linux-foundation.org [Wed, 16 Jan 2008 10:47:01 +0000 (02:47 -0800)]
[UBI] drivers/mtd/ubi/wl.c: fix uninitialized var warning

drivers/mtd/ubi/wl.c:746: warning: 'pe' may be used uninitialized in this function

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[UBI] drivers/mtd/ubi/cdev.c: unused var
akpm@linux-foundation.org [Wed, 16 Jan 2008 09:24:27 +0000 (01:24 -0800)]
[UBI] drivers/mtd/ubi/cdev.c: unused var

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] Factor out OF partition support from the NOR driver.
Scott Wood [Tue, 15 Jan 2008 23:54:43 +0000 (17:54 -0600)]
[MTD] Factor out OF partition support from the NOR driver.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] jedec probe: drop unnecessary forward declarations
Ilpo Järvinen [Mon, 7 Jan 2008 16:00:58 +0000 (18:00 +0200)]
[MTD] jedec probe: drop unnecessary forward declarations

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] JEDEC probe: kill some inline bloat
Ilpo Järvinen [Mon, 7 Jan 2008 16:00:17 +0000 (18:00 +0200)]
[MTD] JEDEC probe: kill some inline bloat

$ codiff $OBJ.old $OBJ
drivers/mtd/chips/jedec_probe.c:
  cfi_jedec_setup  | -320
  jedec_probe_chip | -7073
 2 functions changed, 7393 bytes removed, diff: -7393

drivers/mtd/chips/jedec_probe.c:
  jedec_reset | +1151
 1 function changed, 1151 bytes added, diff: +1151

drivers/mtd/chips/jedec_probe.o:
 3 functions changed, 1151 bytes added, 7393 bytes removed, diff: -6242

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
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 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>
16 years agoide-floppy: include the proper headers
Borislav Petkov [Sat, 2 Feb 2008 18:56:34 +0000 (19:56 +0100)]
ide-floppy: include the proper headers

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

There were two almost identical function names in ide-floppy.c, which makes
their distinction almost impossible. While ide_floppy_release() cleans up the
object after the last reference to it has been dropped, idefloppy_release() is
the blkdev .release method from struct block_device_operations which releases
that last reference.

Rename ide_floppy_release() to idefloppy_cleanup_obj() in order to make its
purpose more clear.

There should be no functionality change resulting from this patch.

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