09 May, 2011
1 commit
-
The IDE code is still including asm/mutex.h instead of linux/mutex.h
Signed-off-by: Anton Blanchard
Signed-off-by: David S. Miller
17 Jun, 2010
2 commits
-
Signed-off-by: Uwe Kleine-König
Signed-off-by: Jiri Kosina
24 May, 2010
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
cmd640: fix kernel oops in test_irq() method
pdc202xx_old: ignore "FIFO empty" bit in test_irq() method
pdc202xx_old: wire test_irq() method for PDC2026x
IDE: pass IRQ flags to the IDE core
ide: fix comment typo in ide.h
22 May, 2010
1 commit
-
bdops->set_capacity() is unnecessarily generic. All that's required
is a simple one way notification to lower level driver telling it to
try to unlock native capacity. There's no reason to pass in target
capacity or return the new capacity. The former is always the
inherent native capacity and the latter can be handled via the usual
device resize / revalidation path. In fact, the current API is always
used that way.Replace ->set_capacity() with ->unlock_native_capacity() which take
only @disk and doesn't return anything. IDE which is the only current
user of the API is converted accordingly.Signed-off-by: Tejun Heo
Cc: Ben Hutchings
Cc: Bartlomiej Zolnierkiewicz
Acked-by: David S. Miller
Signed-off-by: Jens Axboe
15 Apr, 2010
1 commit
-
Fix typo in the comment to the 'dma_mode' field of the 'struct ide_drive_s'
introduced by the commit 3fccaa192b9501e79a57e02e62b6bf420d2b461e (ide: add
drive->dma_mode field).Whilt at it, convert spaces to a tab in the declaration of the neighbouring
'dn' field...Signed-off-by: Sergei Shtylyov
Signed-off-by: David S. Miller
01 Apr, 2010
1 commit
-
I noticed that my KVM virtual machines were experiencing IDE
issues resulting in processes stuck on waiting for buffers to
complete.The root cause is of course race conditions in the ancient qemu
backend that I'm using. However, the fact that the guest isn't
recovering is a bug.I've tracked it down to the change made last year to dequeue
requests at the start rather than at the end in the IDE layer.commit 8f6205cd572fece673da0255d74843680f67f879
Author: Tejun Heo
Date: Fri May 8 11:53:59 2009 +0900ide: dequeue in-flight request
The problem is that the function ide_dma_timeout_retry does not
requeue the current request, causing one request to be lost for
each DMA timeout.This patch fixes this by requeueing the request.
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
19 Jan, 2010
5 commits
-
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller -
Change ->set_dma_mode method parameters to match ->set_dmamode method
used in struct ata_port_operations.Signed-off-by: Bartlomiej Zolnierkiewicz
-
Change ->set_pio_mode method parameters to match ->set_piomode method
used in struct ata_port_operations.Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller -
Add dma_mode field to ide_drive_t matching dma_mode field used in
struct ata_device.The validity of the field is restricted to ->dma_pio_mode method
only currently in IDE subsystem.Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller -
Add pio_mode field to ide_drive_t matching pio_mode field used in
struct ata_device.The validity of the field is restricted to ->set_pio_mode method
only currently in IDE subsystem.Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller
03 Dec, 2009
1 commit
-
Based upon a patch by Philippe De Muyter, and feedback from Mark
Lord and Robert Hancock.As noted by Mark Lord, the outdated ATA1 spec specifies a 20msec
timeout for setting DRQ but lots of common devices overshoot this.Signed-off-by: David S. Miller
02 Sep, 2009
1 commit
-
->read_proc, ->write_proc are going away, ->proc_fops should be used instead.
The only tricky place is IDENTIFY handling: if for some reason
taskfile_lib_get_identify() fails, buffer _is_ changed and at least
first byte is overwritten. Emulate old behaviour with returning
that first byte to userspace and reporting length=1 despite overall -E.Signed-off-by: Alexey Dobriyan
Signed-off-by: David S. Miller
08 Aug, 2009
2 commits
-
* Make cmd->tf_flags field 'u16' and add IDE_TFLAG_SET_XFER taskfile flag.
* Update ide_finish_cmd() to set xfer / re-read id if the new flag is set.
* Convert set_xfer_rate() (write handler for /proc/ide/hd?/current_speed)
and ide_cmd_ioctl() (HDIO_DRIVE_CMD ioctl handler) to use the new flag.* Remove no longer needed disable_irq_nosync() + enable_irq() from
ide_config_drive_speed().Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller -
* Un-static __ide_wait_stat().
* Allow ide_dev_read_id() helper to be called from the IRQ context by
adding irq_ctx flag and using mdelay()/__ide_wait_stat() when needed.* Switch ide_driveid_update() to set irq_ctx flag.
This change is needed for the consecutive patch which fixes races in
handling of user-space SET XFER commands but for improved bisectability
and clarity it is better to do it in a separate patch.Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller
30 Jun, 2009
1 commit
-
commit 2f0d0fd2a605666d38e290c5c0d2907484352dc4 ("ide-acpi: cleanup
do_drive_get_GTF()") didn't account for the lack of hwif->acpidata
check in generic_ide_suspend() [ indirect user of do_drive_get_GTF()
through ide_acpi_exec_tfs() ] resulting in broken resume when ACPI
support is enabled but ACPI data is unavailable.Fix it by adding ide_port_acpi() helper for checking if port needs
ACPI handling and cleaning generic_ide_{suspend,resume}() to use it
instead of hiding hwif->acpidata and ide_noacpi checks in IDE ACPI
helpers (this should help in preventing similar bugs in the future).While at it:
- kill superfluous debugging printks in ide_acpi_{get,push}_timing()Reported-and-tested-by: Etienne Basset
Also-reported-and-tested-by: Jeff Chua
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller
26 Jun, 2009
1 commit
-
* Use blk_rq_bytes() instead of obsolete ide_rq_bytes() in ide_kill_rq()
and ide_floppy_do_request() for failed requests.
[ bugfix part ]* Use blk_rq_bytes() instead of obsolete ide_rq_bytes() in ide_do_devset()
and ide_complete_drive_reset(). Then remove ide_rq_bytes().
[ cleanup part ]Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller
24 Jun, 2009
1 commit
-
There are some broken devices that report multiple DMA xfer modes
enabled at once (ATA spec doesn't allow it) but otherwise work fine
with DMA so just delete ide_id_dma_bug().[ As discovered by detective work by Frans and Bart, due to how
handling of the ID block was handled before commit c419993
("ide-iops: only clear DMA words on setting DMA mode") this
check was always seeing zeros in the fields or other similar
garbage. Therefore this check wasn't actually checking anything.
Now that the tests actually check the real bits, all we see are
devices that trigger the check yet work perfectly fine, therefore
killing this useless check is the best thing to do. -DaveM ]Reported-by: Frans Pop
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: David S. Miller
16 Jun, 2009
4 commits
-
Change ide_drive_t 'drive_data' field from 'unsigned int' type to 'void *'
type, allowing a wider range of values/types to be stored in this field.Added 'ide_get_drivedata' and 'ide_set_drivedata' helpers to get and set
the 'drive_data' field.Fixed all host drivers to maintain coherency with the change in the
'drive_data' field type.Signed-off-by: Joao Ramos
[bart: fix qd65xx build, cast to 'unsigned long', minor Coding Style fixups]
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Move the ack_intr() method into 'struct ide_port_ops', also renaming it to
test_irq() while at it...Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Add 'unsigned long port_flags' field to ide_hwif_t.
* Add IDE_PFLAG_PROBING port flag and keep it set during probing.
* Fix ide_pio_need_iordy() to not enable IORDY at a probe time
(IORDY may lead to controller lock up on certain controllers
if the port is not occupied).Loosely based on the recent libata's fix by Tejun, thanks to Alan
for the hint that IDE may also need it.Signed-off-by: Bartlomiej Zolnierkiewicz
-
Add ide_pio_need_iordy() helper and convert host drivers to use it.
This fixes it8172, it8213, pdc202xx_old, piix, slc90e66 and siimage
host drivers to handle IORDY correctly.Signed-off-by: Bartlomiej Zolnierkiewicz
13 Jun, 2009
1 commit
-
Conflicts:
drivers/ide/ide-tape.c
07 Jun, 2009
5 commits
-
Add IDE_DFLAG_NIEN_QUIRK device flag and use it instead of
drive->quirk_list.There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Add ide_check_nien_quirk_list() helper to the core code
and then use it in ide_port_tune_devices().* Remove no longer needed ->quirkproc methods from hpt366.c
and pdc202xx_{new,old}.c.Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
From the perspective of most users of recent systems, disabling Host
Protected Area (HPA) can break vendor RAID formats, GPT partitions and
risks corrupting firmware or overwriting vendor system recovery tools.Unfortunately the original (kernels < 2.6.30) behavior (unconditionally
disabling HPA and using full disk capacity) was introduced at the time
when the main use of HPA was to make the drive look small enough for the
BIOS to allow the system to boot with large capacity drives.Thus to allow the maximum compatibility with the existing setups (using
HPA and partitioned with HPA disabled) we automically disable HPA if
any partitions overlapping HPA are detected. Additionally HPA can also
be disabled using the "nohpa" module parameter (i.e. "ide_core.nohpa=0.0"
to disable HPA on /dev/hda).v2:
Fix ->resume HPA support.While at it:
- remove stale "idebus=" entry from Documentation/kernel-parameters.txtCc: Robert Hancock
Cc: Frans Pop
Cc: "Andries E. Brouwer"
Cc: Al Viro
Acked-by: Sergei Shtylyov
[patch description was based on input from Alan Cox and Frans Pop]
Emphatically-Acked-by: Alan Cox
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Use ->probed_capacity to store native device capacity for ATA disks.
* Add ->set_capacity method to struct ide_disk_ops.
* Implement disk device ->set_capacity method for ATA disks.
* Implement block device ->set_capacity method.
v2:
* Check if LBA and HPA are supported in ide_disk_set_capacity().* According to the spec the SET MAX ADDRESS command shall be
immediately preceded by a READ NATIVE MAX ADDRESS command.* Add ide_disk_hpa_{get_native,set}_capacity() helpers.
Together with the previous patch adding ->set_capacity block device
method this allows automatic disabling of Host Protected Area (HPA)
if any partitions overlapping HPA are detected.Cc: Robert Hancock
Cc: Frans Pop
Cc: "Andries E. Brouwer"
Cc: Al Viro
Emphatically-Acked-by: Alan Cox
Signed-off-by: Bartlomiej Zolnierkiewicz
22 May, 2009
2 commits
-
* change 'hwif' argument to 'drive'
* report an error on timeoutSigned-off-by: Bartlomiej Zolnierkiewicz
18 May, 2009
4 commits
-
Remove hw_regs_t typedef and rename struct hw_regs_s to struct ide_hw.
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Pass number of ports to ide_host_{alloc,add}() and then update
all users accordingly.v2:
- drop no longer needed NULL initializers in buddha.c, cmd640.c and gayle.c
(noticed by Sergei)There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
* Convert host drivers that still use hw_regs_t's chipset field to use
the one in struct ide_port_info instead.* Move special handling of ide_pci chipset type from ide_hw_configure()
to ide_init_port().* Remove chipset field from hw_regs_t.
While at it:
- remove stale comment in delkin_cb.cThere should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Replace:
- special_t typedef by IDE_SFLAG_* flags
- 'special_t special' ide_drive_t's field by 'u8 special_flags' oneThere should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
15 May, 2009
5 commits
-
Add ide_check_ireason() function that handles all ATAPI devices.
Reorganize all unlikely cases in ireason checking further down in the
code path.In addition, add PFX for printks originating from ide-atapi. Finally,
remove ide_cd_check_ireason.Signed-off-by: Borislav Petkov
-
Now after all users of pc->buf have been converted, remove the 64B buffer
embedded in each packet command.There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov
-
This is in preparation of removing ide_atapi_pc. Expose the buffer as an
argument to ide_queue_pc_tail with later replacing it with local buffer
or even kmalloc'ed one if needed due to stack usage constraints.Also, add the possibility of passing a NULL-ptr buffer for cmds which
don't transfer data besides the cdb. While at it, switch to local buffer
in idetape_get_mode_sense_results().There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov
-
This is in preparation for removing ide_atapi_pc.
There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov
-
Now that we have rq->resid_len, use it to account partial completion
amount during the lifetime of an rq, decrementing it on each successful
transfer. As a result, get rid of now unused pc->xferred.While at it, remove noisy debug call in ide_prep_sense.
Signed-off-by: Borislav Petkov