01 Nov, 2011
1 commit
-
They were getting this implicitly by an include of module.h
from device.h -- but we are going to clean that up and break
that include chain, so include export.h explicitly now.Signed-off-by: Paul Gortmaker
23 May, 2009
1 commit
-
Conflicts:
drivers/ide/ide-io.cSigned-off-by: Jens Axboe
22 May, 2009
2 commits
-
Nowadays we (almost) always store the currently executing command
in hwif->cmd so we can use it for the failed opcode reporting.Cc: Martin Lottermoser
Signed-off-by: Bartlomiej Zolnierkiewicz -
Fixes "" in error messages like this one:
hdc: cdrom_decode_status: error=0x40 { LastFailedSense=0x04 }
Reported-by: Martin Lottermoser
Signed-off-by: Bartlomiej Zolnierkiewicz
11 May, 2009
1 commit
-
ide doesn't manipulate request fields anymore and thus all hard and
their soft equivalents are always equal. Convert all references to
accessors.[ Impact: use pos and nr_sectors accessors ]
Signed-off-by: Tejun Heo
Acked-by: Bartlomiej Zolnierkiewicz
Cc: Borislav Petkov
Cc: Sergei Shtylyov
Signed-off-by: Jens Axboe
08 Apr, 2009
3 commits
-
Simplify tf_read() method, making it deal only with 'struct ide_taskfile' and
the validity flags that the upper layer passes, and factoring out the code that
deals with the high order bytes into ide_tf_readback() to be called from the
only two functions interested, ide_complete_cmd() and ide_dump_sector().This should stop the needless code duplication in this method and so make
it about twice smaller than it was; along with simplifying the setup for
the method call, this should save both time and space...Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Make 'struct ide_taskfile' cover only 8 register values and thus put two such
fields ('tf' and 'hob') into 'struct ide_cmd', dropping unnecessary 'tf_array'
field from it.This required changing the prototype of ide_get_lba_addr() and ide_tf_dump().
Signed-off-by: Sergei Shtylyov
[bart: fix setting of ATA_LBA bit for LBA48 commands in __ide_do_rw_disk()]
Signed-off-by: Bartlomiej Zolnierkiewicz -
Replace IDE_TFLAG_{IN|OUT}_* flags meaning to the taskfile register validity on
input/output by the IDE_VALID_* flags and introduce 4 symmetric 8-bit register
validity indicator subfields, 'valid.{input/output}.{tf|hob}', into the 'struct
ide_cmd' instead of using the 'tf_flags' field for that purpose (this field can
then be turned from 32-bit into 8-bit one).Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
27 Mar, 2009
1 commit
-
While at it:
- rename struct ide_task_s to struct ide_cmd
- remove stale comments from idedisk_{read_native,set}_max_address()
- drop unused 'cmd' argument from ide_{cmd,task}_ioctl()
- drop unused 'task' argument from tx4939ide_tf_load_fixup()
- rename ide_complete_task() to ide_complete_cmd()
- use consistent naming for struct ide_cmd variablesThere should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
25 Mar, 2009
1 commit
-
* Move xfer mode tuning code to ide-xfer-mode.c.
* Add CONFIG_IDE_XFER_MODE config option to be selected by host drivers
that support xfer mode tuning.* Add CONFIG_IDE_XFER_MODE=n static inline versions of ide_set_pio()
and ide_set_xfer_rate().* Make IDE_TIMINGS and BLK_DEV_IDEDMA config options select IDE_XFER_MODE,
also add explicit selects for few host drivers that need it.* Build/link ide-xfer-mode.o and ide-pio-blacklist.o (it is needed only
by ide-xfer-mode.o) only if CONFIG_IDE_XFER_MODE=y.Signed-off-by: Bartlomiej Zolnierkiewicz
07 Jan, 2009
1 commit
-
* Merge ide_hwgroup_t with ide_hwif_t.
* Cleanup init_irq() accordingly, then remove no longer needed
ide_remove_port_from_hwgroup() and ide_ports[].* Remove now unused HWGROUP() macro.
While at it:
* ide_dump_ata_error() fixups
v2:
* Fix ->quirk_list check in do_ide_request()
(s/hwif->cur_dev/prev_port->cur_dev).Signed-off-by: Bartlomiej Zolnierkiewicz
30 Dec, 2008
3 commits
-
No reason to run this function with local IRQs off.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Fix following errors/warnings detected by checkpatch.pl:
- WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
- WARNING: space prohibited between function name and open parenthesis '('
- ERROR: trailing whitespace
- ERROR: trailing statements should be on next line
- WARNING: printk() should include KERN_ facility levelSigned-off-by: Bartlomiej Zolnierkiewicz
-
While at it:
- no need to check for hwgroup presence in ide_dump_opcode()Signed-off-by: Bartlomiej Zolnierkiewicz
14 Oct, 2008
1 commit
-
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
to IDE_DFLAG_* flags.While at it:
- IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48
- fixup some comments
- remove needless g->flags zeroing from ide*_probe()There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
11 Oct, 2008
4 commits
-
* Include directly in
instead of through .* Include only when needed.
Cc: Christoph Hellwig
Signed-off-by: Bartlomiej Zolnierkiewicz -
* ERR_STAT -> ATA_ERR
* INDEX_STAT -> ATA_IDX
* ECC_STAT -> ATA_CORR
* DRQ_STAT -> ATA_DRQ
* SEEK_STAT -> ATA_DSC
* WRERR_STAT -> ATA_DF
* READY_STAT -> ATA_DRDY
* BUSY_STAT -> ATA_BUSY* MARK_ERR -> ATA_AMNF
* TRK0_ERR -> ATA_TRK0NF
* ABRT_ERR -> ATA_ABORTED
* MCR_ERR -> ATA_MCR
* ID_ERR -> ATA_IDNF
* MC_ERR -> ATA_MC
* ECC_ERR -> ATA_UNC
* ICRC_ERR -> ATA_ICRC* BBD_ERR -> ATA_BBK
Also:
* ILI_ERR -> ATAPI_ILI
* EOM_ERR -> ATAPI_EOM
* LFS_ERR -> ATAPI_LFS* CD -> ATAPI_COD
* IO -> ATAPI_IOSigned-off-by: Bartlomiej Zolnierkiewicz
-
* Factor out HDIO_[OBSOLETE,GET]_IDENTITY ioctls handling
to ide_get_identity_ioctl().* Use temporary buffer in ide_get_identity_ioctl() instead
of accessing drive->id directly.* Add ide_id_to_hd_driveid() inline to convert raw id into
struct hd_driveid format (needed on big-endian).* Use ide_id_to_hd_driveid() in ide_get_identity_ioctl(),
cleanup ide_fix_driveid() and switch ide to use use raw id.* Remove no longer needed drive->driveid.
This leaves us with 3 users of struct hd_driveid in tree:
- arch/um/drivers/ubd_kern.c
- drivers/block/xsysace.c
- drivers/usb/storage/isd200.cWhile at it:
* Use ata_id_u{32,64}() and ata_id_has_{dma,lba,iordy}() macros.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Make drive->id an unnamed union so id can be accessed either by using
'u16 *id' or 'struct hd_driveid *driveid'. Then convert all existing
drive->id users accordingly (using 'u16 *id' when possible).This is an intermediate step to make ide 'struct hd_driveid'-free.
While at it:
- Add missing KERN_CONTs in it821x.c.
- Use ATA_ID_WORDS and ATA_ID_*_LEN defines.
- Remove unnecessary checks for drive->id.
- s/drive_table/table/ in ide_in_drive_list().
- Cleanup ide_config_drive_speed() a bit.
- s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave().
v2:
Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell)There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
24 Jul, 2008
2 commits
-
* Add struct ide_tp_ops for transport methods.
* Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info
and ide_hwif_t.* Set the default hwif->tp_ops in ide_init_port_data().
* Set host driver specific hwif->tp_ops in ide_init_port().
* Export ide_exec_command(), ide_read_status(), ide_read_altstatus(),
ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}()
and ata_{in,out}put_data().* Convert host drivers and core code to use struct ide_tp_ops.
* Remove no longer needed default_hwif_transport().
* Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops.
While at it:
* Use struct ide_port_info in falconide.c and q40ide.c.
* Rename ata_{in,out}put_data() to ide_{in,out}put_data().
v2:
* Fix missing convertion in ns87415.c.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
* Filter out "default" transfer mode values (0x00 - default PIO mode,
0x01 - default PIO mode w/ IORDY disabled) in write handler for obsoleted
/proc/ide/hd?/settings:current_speed setting.Allowing "default" transfer mode values is a dangerous thing to do as
we don't support programming controller to the "default" transfer mode
and devices often use different values for the default and maximum PIO
mode (i.e. PIO2 default and PIO4 maximum) so the controller will stay
programmed for higher PIO mode while device will use the lower PIO mode.There is no functionality loss as by using special IOCTLs device can
still be programmed to "default" transfer modes (it is only useful for
debugging/testing purposes anyway).* Remove no longer needed IDE_HFLAG_ABUSE_SET_DMA_MODE host flag, it was
previously used by few host drivers to program the controller to PIO0
timings for "default" transfer mode == 0x01 (although some host drivers
would program invalid PIO timings instead).* Cleanup ide_set_xfer_rate() and add BUG_ON().
Suggested-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
17 Jul, 2008
4 commits
-
Move PIO blacklist to ide-pio-blacklist.c.
While at it:
- fix comment
- fix whitespace damage
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
All ide_pio_cycle_time() users already select CONFIG_IDE_TIMINGS
so move the function from ide-lib.c to ide-timings.c.While at it:
- convert ide_pio_cycle_time() to use ide_timing_find_mode()
- cleanup ide_pio_cycle_time() a bit
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Signed-off-by: Bartlomiej Zolnierkiewicz
29 Apr, 2008
1 commit
-
* Add ->tf_load and ->tf_read methods to ide_hwif_t and set the default
methods in default_hwif_transport().* Use ->tf_{load,read} instead o calling ide_tf_{load,read}() directly.
* Make ide_tf_{load,read}() static.
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
27 Apr, 2008
2 commits
-
__FUNCTION__ is gcc-specific, use __func__
[bart: fix checkpatch.pl errors in ide-lib.c and ppc/mpc8xx.c while at it]
Signed-off-by: Harvey Harrison
Cc: Andrew Morton
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Move hooks for port/host specific methods from ide_hwif_t to
'struct ide_port_ops'.* Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info'
and ide_hwif_t.* Update host drivers and core code accordingly.
While at it:
* Rename ata66_*() cable detect functions to *_cable_detect() to match
the standard naming. (Suggested by Sergei Shtylyov)v2:
* Fix build for bast-ide. (Noticed by Andrew Morton)Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
26 Apr, 2008
2 commits
-
* Check for IDE_HFLAG_NO_SET_MODE host flag in ide_set_pio(),
ide_set_[pio,dma]_mode(), ide_set_xfer_rate() and set_pio_mode().* Remove no longer needed IDE_HFLAG_NO_SET_MODE host flag checking
from ide_tune_dma().* Remove superfluous ->set_pio_mode checking from do_special().
This is a part of preparations for adding 'struct ide_port_ops'.
Signed-off-by: Bartlomiej Zolnierkiewicz
-
No need for it nowadays so remove quirk code from ide_get_best_pio_mode()
and IDE_HFLAG_PIO_DOWNGRADE host flag.Signed-off-by: Bartlomiej Zolnierkiewicz
22 Mar, 2008
1 commit
-
Signed-off-by: Bartlomiej Zolnierkiewicz
11 Feb, 2008
1 commit
-
Signed-off-by: Bartlomiej Zolnierkiewicz
06 Feb, 2008
1 commit
-
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
02 Feb, 2008
1 commit
-
Keep pointer to struct device instead of struct pci_dev in ide_hwif_t.
While on it:
* Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce().There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
27 Jan, 2008
1 commit
-
Based on the earlier work by Tejun Heo.
All users are gone so we can finally remove it.
Cc: Tejun Heo
Signed-off-by: Bartlomiej Zolnierkiewicz
26 Jan, 2008
5 commits
-
* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide
what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate().* Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it
(aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old,
serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode
methods in host drivers that don't (IDE core code guarantees that
->set_dma_mode will be called only for modes which are present
in SWDMA/MWDMA/UDMA masks).While at it:
* Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in
hpt34x/hpt366/pdc202xx_old/serverworks host driver.There should be no functionality changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Move the common code from ide_dump_{ata,atapi}_status() to
ide_dump_status().* ide_dump_{ata,atapi}_status() -> ide_dump_{ata,atapi}_error().
There should be no functionality changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Export ide_get_lba_addr().
* Convert idedisk_{read_native,set}_max_address() to use ide_get_lba_addr().
* Remove incorrect comment from idedisk_read_native_max_address()
(noticed by Sergei).There should be no functionality changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
power4:
drivers/ide/ide-lib.c: In function `ide_dump_sector':
drivers/ide/ide-lib.c:516: warning: long long unsigned int format, u64 arg (arg 2)We don't know what type is used to implement u64 hence it must always be cast
when printed.Signed-off-by: Andrew Morton
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Factor out code reading taskfile registers from ide_end_drive_cmd()
to the new ide_tf_read() helper.* Add IDE_TFLAG_IN_* taskfile flags to indicate the need to load
particular IDE taskfile register in ide_tf_read().* Update ide_end_drive_cmd() to set respective IDE_TFLAG_IN_* taksfile flags.
* Add ide_get_lba_addr() for getting LBA sector address from taskfile struct.
* Factor out code getting sector address from ide_dump_ata_status()
to the new ide_dump_sector() function.* Convert ide_dump_sector() to use ide_tf_read() and ide_get_lba_addr().
* Remove no longer needed ide_read_24().
The only change in functionality caused by this patch is that
ide_dump_ata_status() no longer prints "high"/"low" parts of LBA48
sector address (of course LBA48 sector address is still printed).Cc: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz