aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide
AgeCommit message (Collapse)Author
2008-02-06ide-tape: fix syntax error in idetape_identify_device()Borislav Petkov
Spotted by Sergei Shtylyov. CC: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: remove leftover OnStream support warningBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: collect module-related macro calls at the endBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: include proper headersBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: remove unused "length" arg from idetape_create_read_buffer_cmd()Borislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: remove struct idetape_id_gcwBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: cleanup and fix commentsBorislav Petkov
Also, remove redundant ones and cleanup whitespace. Bart: - minor fixups Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: shorten some function namesBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: remove idetape_increase_max_pipeline_stages()Borislav Petkov
This function was being used only at one place so fold it in there. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: struct idetape_tape_t: shorten member names v2Borislav Petkov
Shorten some member names not too aggressively since this driver might be gone anyway soon. Bart: - minor fixes Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: struct idetape_tape_t: remove unused membersBorislav Petkov
- last_frame_position: only being written to once - firmware_revision, product_id, vendor_id: used once, remove from struct idetape_tape_t and deal with them locally - firmware_revision_num: only written to once - tape_still_time_begin: completely unused - tape_still_time: never written to; remove corresponding code chunk - uncontrolled_last_pipeline_head: only once written to - blocks_in_buffer: only written to Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: remove typedef idetape_chrdev_direction_tBorislav Petkov
.. and replace it with plain enums. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: simplify code branching in the interrupt handlerBorislav Petkov
... by adding a new typedef function pointer idetape_io_buf in order to call the proper buffer i/o handler depending on the data direction. Bart: - move idetape_io_buf before idetape_pc_intr() comment Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: remove unreachable code chunkBorislav Petkov
tape->speed_control is set to 1 in idetape_setup(), but, in calculate_speeds() its value is tested for being 0, 1, or 2. Remove the if-branches where tape->speed_control != 1 since they are never executed. Also, rename calculate_speeds() by adding driver's prefix as is with the other function names. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: remove struct idetape_read_position_result_tBorislav Petkov
There should be no functional changes resulting from this patch. Bart: - remove needless "!!" Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-tape: refactor the debug logging facilityBorislav Petkov
Teach the debug logging macro to differentiate between log levels based on the type of debug level enabled specifically instead of a threshold-based one. Thus, convert tape->debug_level to a bitmask that is written to over /proc. Also, - cleanup and simplify the debug macro thus removing a lot of code lines, - get rid of unused debug levels, - adjust the loglevel at several places where it was simply missing (e.g. idetape_chrdev_open()) - move the tape ptr initialization up in idetape_chrdev_open() so that we can use it in the debug_log macro earlier in the function. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide: add ide_read_error() inline helperBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide: add ide_read_[alt]status() inline helpersBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide: remove ide_setup_ports()Bartlomiej Zolnierkiewicz
ide-cris.c: * Add cris_setup_ports() helper and use it instead of ide_setup_ports() (fixes random value being set in ->io_ports[IDE_IRQ_OFFSET]). buddha.c: * Add buddha_setup_ports() helper and use it instead of ide_setup_ports(). falconide.c: * Add falconide_setup_ports() helper and use it instead of ide_setup_ports(), also fix return value of falconide_init() while at it. gayle.c: * Add gayle_setup_ports() helper and use it instead of ide_setup_ports(). macide.c: * Add macide_setup_ports() helper and use it instead of ide_setup_ports() (fixes incorrect value being set in ->io_ports[IDE_IRQ_OFFSET]). q40ide.c: * Fix q40_ide_setup_ports() comments. ide.c: * Remove no longer needed ide_setup_ports(). Cc: Mikael Starvik <starvik@axis.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide: remove redundant BUG_ON() from [atapi_]reset_pollfunc()Bartlomiej Zolnierkiewicz
Same BUG_ON() is present inside ide_set_handler(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide: remove write-only ->sata_misc[] from ide_hwif_tBartlomiej Zolnierkiewicz
* Remove write-only ->sata_misc[] from ide_hwif_t. * Remove no longer used SATA_{MISC,PHY,IEN}_OFFSET defines. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-pci-generic: kill the unused ifdef/endif/MODULE codeDenis Cheng
with module_param macro, the __setup code can be killed now: const __setup("all-generic-ide", ide_generic_all_on); and the module name "generic.ko" is not descriptive to its functionality, can be changed in Makefile, the "ide-pci-generic.ko" is better. the ide-pci-generic.all-generic-ide parameter also documented in Documentation/kernel-parameters.txt Signed-off-by: Denis Cheng <crquan@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06drivers/ide/legacy/hd.c: fix uninitialized var warningAndrew Morton
drivers/ide/legacy/hd.c: In function 'hd_request': drivers/ide/legacy/hd.c:424: warning: 'stat' may be used uninitialized in this function gcc is being stupid. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06drivers/ide/ide-acpi.c: fix uninitialized var warningAndrew Morton
drivers/ide/ide-acpi.c: In function 'ide_acpi_init': drivers/ide/ide-acpi.c:175: warning: 'dev_handle' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06Palmchip BK3710 IDE driverAnton Salnikov
This is Palmchip BK3710 IDE controller support. The IDE controller logic supports PIO, MultiWord-DMA and Ultra-DMA modes. Supports interface to Compact Flash (CF) configured in True-IDE mode. Bart: - remove dead code - fix ide_hwif_setup_dma() build problem Signed-off-by: Anton Salnikov <asalnikov@ru.mvista.com> Reviewed-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide-generic: probing bugfixBartlomiej Zolnierkiewicz
On Tuesday 05 February 2008, Linus Torvalds wrote: > > On Sat, 2 Feb 2008, Bartlomiej Zolnierkiewicz wrote: > > > > * next part of IDE probing code re-organization saga > >   (that would be me) > > This seems to cause very irritating and bogus messages for me: > >       Probing IDE interface ide0... >       Probing IDE interface ide1... >       ide2: I/O resource 0x0-0x7 not free. >       ide2: ports already in use, skipping probe >       ide3: I/O resource 0x0-0x7 not free. >       ide3: ports already in use, skipping probe >       ide4: I/O resource 0x0-0x7 not free. >       ide4: ports already in use, skipping probe >       ide5: I/O resource 0x0-0x7 not free. >       ide5: ports already in use, skipping probe >       ide6: I/O resource 0x0-0x7 not free. >       ide6: ports already in use, skipping probe >       ide7: I/O resource 0x0-0x7 not free. >       ide7: ports already in use, skipping probe >       ide8: I/O resource 0x0-0x7 not free. >       ide8: ports already in use, skipping probe >       ide9: I/O resource 0x0-0x7 not free. >       ide9: ports already in use, skipping probe > > and that's just totally bogus. It shouldn't even request that region, > since it's not been allocated! The commit 139ddfcab50e5eabcc88341c8743a990ac1be6a2 ("ide: move handling of I/O resources out of ide_probe_port()") changed the ordering of hwif->noprobe check vs ide_hwif_request_regions() call (so that we now reserve I/O regions before checking for hwif->noprobe). However ide-generic host driver depended on hwif->noprobe to be set for skipping probing of empty ide_hwifs[] slots. Fix it by passing only indexes of non-empty slots to ide_device_add_all() from ide_generic_init(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-03Spelling fixes: lenght->lengthPaulius Zaleckas
Signed-off-by: Paulius Zaleckas <pauliusz@yahoo.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-02ide-tape: remove idetape_config_t typedefBorislav Petkov
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>
2008-02-02ide-tape: remove mtio.h related commentsBorislav Petkov
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>
2008-02-02ide-tape: make function name more accurateBorislav Petkov
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>
2008-02-02ide-tape: remove unused sense packet commands.Borislav Petkov
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: use generic byteorder macrosBorislav Petkov
This is not a network driver. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: remove EXPERIMENTAL driver statusBorislav Petkov
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>
2008-02-02ide-tape: use generic scsi commandsBorislav Petkov
Also, remove those which weren't used. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: remove struct idetape_block_size_page_tBorislav Petkov
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_tBorislav Petkov
They seem just to sit there completely unused. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: remove struct idetape_parameter_block_descriptor_tBorislav Petkov
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>
2008-02-02ide-tape: remove struct idetape_medium_partition_page_tBorislav Petkov
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>
2008-02-02ide-tape: remove struct idetape_data_compression_page_tBorislav Petkov
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>
2008-02-02ide-tape: remove struct idetape_inquiry_result_tBorislav Petkov
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>
2008-02-02ide-tape: remove struct idetape_capabilities_page_tBorislav Petkov
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>
2008-02-02ide-tape: remove IDETAPE_DEBUG_BUGSBorislav Petkov
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: remove IDETAPE_DEBUG_INFOBorislav Petkov
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>
2008-02-02ide-tape: dump gcw fields on error in idetape_identify_device()Bartlomiej Zolnierkiewicz
Cc: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: remove struct idetape_mode_parameter_header_tBorislav Petkov
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>
2008-02-02ide-tape: remove struct idetape_request_sense_result_tBorislav Petkov
Bart: - remove unnecessary comment change - remove two needless "!!" Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: remove dead codeBorislav Petkov
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-tape: move historical changelog to ↵Borislav Petkov
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>
2008-02-02ide-cs: use ide_std_init_ports()Bartlomiej Zolnierkiewicz
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>
2008-02-02ide: move check_dma_crc() to ide-dma.cBartlomiej Zolnierkiewicz
* 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>