aboutsummaryrefslogtreecommitdiffstats
path: root/ipc (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2008-02-02ide: move hwif->present check out from ide_proc_register_port()Bartlomiej Zolnierkiewicz2-5/+7
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>
2008-02-02ide: factor out devices setup from ide_acpi_init()Bartlomiej Zolnierkiewicz3-29/+23
* Factor out devices setup from ide_acpi_init() to ide_acpi_port_init_devices(). * Call ide_acpi_port_init_devices() in ide_device_add_all(). While at it: * Remove no longer needed 'drive' field from struct ide_acpi_drive_link. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-acpi: remove dead code from do_drive_get_GTF()Bartlomiej Zolnierkiewicz1-10/+0
These pointers are always setup in ide_acpi_init(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-acpi: remove needless exportsBartlomiej Zolnierkiewicz1-4/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: move ide_acpi_init() call to ide_device_add_all()Bartlomiej Zolnierkiewicz1-1/+2
There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: factor out devices setup from init_irq()Bartlomiej Zolnierkiewicz1-16/+28
* 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>
2008-02-02ide: factor out adding drive to hwgroup from init_irq()Bartlomiej Zolnierkiewicz1-11/+18
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>
2008-02-02ide: move hwif->rqsize init from ide_init_queue() to init_irq()Bartlomiej Zolnierkiewicz1-7/+8
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>
2008-02-02ide: merge init_gendisk() into hwif_register_devices()Bartlomiej Zolnierkiewicz1-28/+16
There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: call init_gendisk() after ide_acpi_init()Bartlomiej Zolnierkiewicz1-1/+1
There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: move blk_register_region() call out from init_gendisk()Bartlomiej Zolnierkiewicz1-2/+2
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>
2008-02-02ide: skip not present devices in init_gendisk()Bartlomiej Zolnierkiewicz1-0/+4
No need to initialize drive->gendev and waste memory on IDE settings for not present devices. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: remove incorrect init_gendisk() commentBartlomiej Zolnierkiewicz1-6/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: add ->port_init_devs method to ide_hwif_tBartlomiej Zolnierkiewicz5-26/+59
* Add ->port_init_devs method to ide_hwif_t for a host specific initialization of devices on a port. Call the new method from ide_port_init_devices(). * Convert ht6560b, qd65xx and opti621 host drivers to use the new ->port_init_devs method. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: add IDE_HFLAG_NO_{IO32_BIT,UNMASK_IRQS} host flagsBartlomiej Zolnierkiewicz5-17/+16
* Use the same bit for IDE_HFLAG_CS5520 and IDE_HFLAG_VDMA host flags (both are used only by cs5520 host driver currently). * Add IDE_HFLAG_NO_IO32_BIT host flag and use it instead of ->no_io_32bit ide_hwif_t field. * Add IDE_HFLAG_NO_UNMASK_IRQS host flag, then convert dtc2278 and rz1000 host drivers to use it. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: factor out code initializing devices from ide_init_port()Bartlomiej Zolnierkiewicz1-15/+17
* 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>
2008-02-02ide: fix ide_unregister() usage in host driversBartlomiej Zolnierkiewicz8-10/+10
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>
2008-02-02ide: add ide_deprecated_find_port() helperBartlomiej Zolnierkiewicz5-20/+100
* Factor out code for finding ide_hwifs[] slot from ide_register_hw() to ide_deprecated_find_port(). * Convert bast-ide, ide-cs and delkin_cb host drivers to use ide_device_add() instead of ide_register_hw() (while at it drop doing "ide_unregister()" loop which tries to unregister _all_ IDE interfaces if useable ide_hwifs[] slot cannot be find). This patch leaves us with only two ide_register_hw() users: - drivers/macintosh/mediabay.c - drivers/ide/ide.c Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: add 'init_default' and 'restore' arguments to ide_unregister()Bartlomiej Zolnierkiewicz10-18/+25
* Add 'init_default' (flag for calling init_hwif_default()) and 'restore' (flag for calling ide_hwif_restore()) arguments to ide_unregister(). * Update ide_unregister() users to set 'init_default' and 'restore' flags. * No need to set 'init_default' flag in ide_register_hw() if the setup done by init_hwif_default() is going to be overridden by ide_init_port_hw(). * No need to set 'init_default' and 'restore' flags in cleanup_module(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: remove redundant init_hwif_default() call from ide_register_hw()Bartlomiej Zolnierkiewicz1-3/+1
ide_init_port_hw() call overrides setup done by init_hwif_default(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: remove redundant hwif->present check from ide_register_hw()Bartlomiej Zolnierkiewicz1-2/+0
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>
2008-02-02pdc202xx_old: remove surplus initialiserAlan Cox1-1/+1
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>
2008-02-02ide-floppy: bump driver version numberBorislav Petkov1-4/+1
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>
2008-02-02ide-floppy: fix most of the remaining checkpatch.pl issuesBorislav Petkov1-195/+160
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>
2008-02-02ide-floppy: remove atomic test_*bit macrosBorislav Petkov1-56/+69
..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>
2008-02-02ide-floppy: remove unused flag PC_ABORTBorislav Petkov1-13/+6
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>
2008-02-02ide-floppy: remove IDEFLOPPY_DEBUG_INFOBorislav Petkov1-50/+13
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>
2008-02-02ide-floppy: remove unused IDEFLOPPY_USE_READ12Borislav Petkov1-11/+7
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>
2008-02-02ide-floppy: merge idefloppy_{input,output}_buffersBorislav Petkov1-46/+19
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>
2008-02-02ide-floppy: use an xfer_func_t and io_buf_t typedefs in order to unify rwBorislav Petkov3-19/+19
Also, move xfer_func_t typedef to the ide.h since it is used by two drivers now (more coming). Bart: - use __func__ while at it Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: remove IDEFLOPPY_DEBUG_BUGS macroBorislav Petkov1-6/+1
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: mv idefloppy_{should_,}report_errorBorislav Petkov1-24/+14
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>
2008-02-02ide-floppy: report DMA handling in idefloppy_pc_intr() properlyBorislav Petkov1-1/+5
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>
2008-02-02ide-floppy: factor out ioctl handlers from idefloppy_ioctl()Borislav Petkov1-75/+78
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>
2008-02-02ide-floppy: remove struct idefloppy_capacity_descriptorBorislav Petkov1-100/+76
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>
2008-02-02ide-floppy: remove struct idefloppy_flexible_disk_pageBorislav Petkov1-54/+36
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: remove struct idefloppy_mode_parameter_headerBorislav Petkov1-23/+3
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: remove struct idefloppy_request_sense_resultBorislav Petkov1-58/+24
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>
2008-02-02ide-floppy: remove struct idefloppy_inquiry_resultBorislav Petkov1-41/+0
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: remove struct idefloppy_capabilities_pageBorislav Petkov1-49/+6
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>
2008-02-02ide-floppy: cleanup and unify debugging macro callsBorislav Petkov1-37/+31
* 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>
2008-02-02ide-floppy: include the proper headersBorislav Petkov1-3/+3
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: disambiguate function namesBorislav Petkov1-3/+3
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>
2008-02-02ide-floppy: remove unnecessary ->handler != NULL checkBorislav Petkov1-4/+3
This BUG_ON is unneeded since the ->handler != NULL check is performed in ide_set_handler(). Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: replace ntoh{s,l} and hton{s,l} calls with the generic byteorderBorislav Petkov1-14/+14
Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide-floppy: convert to generic packet commandsBorislav Petkov1-32/+12
Replace the ide-floppy packet commands opcode defines with the generic ones. Add a missing GPCMD_WRITE_12 (opcode 0xaa) to the generic ones in cdrom.h. The last one can be found in the current version of INF-8090, p.905. [ Bart: Tejun's libata patch also adding GPCMD_WRITE_12 got merged first ] Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: remove needless includes from PCI host driversBartlomiej Zolnierkiewicz32-134/+4
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: add ->cable_detect method to ide_hwif_tBartlomiej Zolnierkiewicz22-150/+137
* Add ->cable_detect method to ide_hwif_t. * Call the new method in ide_init_port() if: - the host supports UDMA modes > UDMA2 ('hwif->ultra_mask & 78') - DMA initialization was successful (if hwif->dma_base is not set ide_init_port() sets hwif->ultra_mask to zero) - "idex=ata66" is not used ('hwif->cbl != ATA_CBL_PATA40_SHORT') * Convert PCI host drivers to use ->cable_detect method. While at it: * Factor out cable detection to separate functions (if not already done). * hpt366.c/it8213.c/slc90e66.c: - don't check cable type if "idex=ata66" is used * pdc202xx_new.c: - add __devinit tag to pdcnew_cable_detect() * pdc202xx_old.c: - rename pdc202xx_old_cable_detect() to pdc2026x_old_cable_detect() - add __devinit tag to pdc2026x_old_cable_detect() Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: add struct ide_port_info instances to legacy host driversBartlomiej Zolnierkiewicz29-270/+258
* Remove 'struct pci_dev *dev' argument from ide_hwif_setup_dma(). * Un-static ide_hwif_setup_dma() and add CONFIG_BLK_DEV_IDEDMA_PCI=n version. * Add 'const struct ide_port_info *d' argument to ide_device_add[_all](). * Factor out generic ports init from ide_pci_setup_ports() to ide_init_port(), move it to ide-probe.c and call it in in ide_device_add_all() instead of ide_pci_setup_ports(). * Move ->mate setup to ide_device_add_all() from ide_port_init(). * Add IDE_HFLAG_NO_AUTOTUNE host flag for host drivers that don't enable ->autotune currently. * Setup hwif->chipset in ide_init_port() but iff pi->chipset is set (to not override setup done by ide_hwif_configure()). * Add ETRAX host handling to ide_device_add_all(). * cmd640.c: set IDE_HFLAG_ABUSE_* also for CONFIG_BLK_DEV_CMD640_ENHANCED=n. * pmac.c: make pmac_ide_setup_dma() return an error value and move DMA masks setup to pmac_ide_setup_device(). * Add 'struct ide_port_info' instances to legacy host drivers, pass them to ide_device_add() calls and then remove open-coded ports initialization. Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: separate PCI specific init from generic init in ide_pci_setup_ports()Bartlomiej Zolnierkiewicz1-8/+21
* Setup ->mate and ->channel in ide_pci_setup_ports() instead of in ide_hwif_configure(). * Make 'port' parameter for ide_hwif_configure() 'unsigned int'. * Separate PCI specific init from generic init in ide_pci_setup_ports(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>