An error occurred fetching the project authors.
- 12 Oct, 2007 31 commits
-
-
Tejun Heo authored
Make a number of functions from libata-core.c and libata-eh.c global to libata (drivers/ata/libata.h). These will be used by PMP. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Consider newly found class code while revalidating. PMP resetting always results in valid class code and issuing PMP commands to ATA/ATAPI device isn't very attractive. Add @new_class to ata_dev_revalidate() and check class code for revalidation. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Update AN support in preparation of PMP support. * s/ata_id_has_AN/ata_id_has_atapi_AN/ * add AN enabled reporting during configuration * add err_mask to AN configuration failure reporting * update LOCKING comment for ata_scsi_media_change_notify() * check whether ATA dev is attached to SCSI dev ata_scsi_media_change_notify() * set ATA_FLAG_AN in ahci and sata_sil24 Signed-off-by:
Tejun Heo <htejun@gmail.com> Cc: Kriten Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Jeff Garzik authored
Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Certain device which reports diagnostic failure also reports invalid device signature. Assume ATA_DEV_ATA on diagnostic failure if reset indicates device presence. This is fix for bugzilla bug 8784. http://bugzilla.kernel.org/show_bug.cgi?id=8784Signed-off-by:
Tejun Heo <htejun@gmail.com> Acked-by:
Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Edward Amsden <amsden_linux@earthlink.net> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Make ata_dev_try_classify() take a pointer to ata_device instead of ata_port/port_number combination for consistency and add @present argument. @present indicates whether the device seems present during reset. It's the result of TF access during softreset and link onlineness during hardreset. @present will be used to improve diagnostic failure handling. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
This patch reimplement ata_hpa_resize() such that... * All HPA related decisions are made inside ata_hpa_resize() proper. ata_hpa_resize() returns 0 if configuration can proceed, -errno if device needs to be reset and reconfigured. * All errors are handled properly. If HPA unlocking isn't requested, HPA handling is disabled automatically to avoid unnecessary device detection failure. * Messages are trimmed. HPA detection message is printed only during initial configuration. HPA unlocked message is printed only during initial configuration or unlocking results in different size. * Instead of using sectors returned in TF of SET_MAX, re-read IDENTIFY data as that's the value the device is going to use. * It's called early during ata_dev_configure() as IDENTIFY data might change after resizing. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Merge ata_read_native_max_addres_ext() into ata_read_native_max_address() and combine ata_set_native_max_address_ext() and ata_set_native_max_address() into ata_set_max_sectors(). * reduce duplicate code * return 0 or -errno depending on error conditions * report if command fails * use ATA_LBA instead of 0x40 This is in preparation of ata_hpa_resize() update. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Move ata_id_n_sectors() upward right below ata_id_c_string(). This is to accomodate later changes. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Jeff Garzik authored
Support the use of '*' in model_num and model_rev entries in ata_device_blacklist[]. Based largely on David Milburn's "libata-core: support wildcard matching in ata_blacklist_entry" patch. Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Currently, port configuration reporting has the following problems. * iomapped address is reported instead of raw address * report contains irrelevant fields or lacks necessary fields for non-SFF controllers. * host->irq/irq2 are there just for reporting and hacky. This patch implements and uses ata_port_desc() and ata_port_pbar_desc(). ata_port_desc() is almost identical to ata_ehi_push_desc() except that it takes @ap instead of @ehi, has no locking requirement, can only be used during host initialization and " " is used as separator instead of ", ". ata_port_pbar_desc() is a helper to ease reporting of a PCI BAR or an offsetted address into it. LLD pushes whatever description it wants using the above two functions. The accumulated description is printed on host registration after "[S/P]ATA max MAX_XFERMODE ". SFF init helpers and ata_host_activate() automatically add descriptions for addresses and irq respectively, so only LLDs which isn't standard SFF need to add custom descriptions. In many cases, such controllers need to report different things anyway. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Alan Cox authored
If we have a PATA cable with a SATA drive on it then we've found a bridge and we can flip the cable type. This fixes some cable detect problems with SATA bridges on chipsets and misdetected cable types. In theory cable detection and mode limiting is needed if you put a SATA/PATA bridge on a 40 wire cable, but I see no way to deal with that other than to point out its not a good idea anyway. Signed-off-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Jeff Garzik authored
It was always set to ata_port_disable(). Removed the hook, and replaced the very few ap->ops->port_disable() callsites with direct calls to ata_port_disable(). Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Jeff Garzik authored
* ->irq_ack() is redundant to what the irq handler already performs... chk-status + irq-clear. Furthermore, it is only called in one place, when screaming-irq-debugging is enabled, so we don't want to bother with a hook just for that. * ata_dummy_irq_on() is only ever used in drivers that have no callpath reaching ->irq_on(). Remove .irq_on hook from those drivers, and the now-unused ata_dummy_irq_on() Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Kristen Carlson Accardi authored
Check to see if an ATAPI device supports Asynchronous Notification. If so, enable it, if the host controller supports AN. Signed-off-by:
Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Alan Cox authored
Remembered this while doing auditing and code review versus the specs Signed-off-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Alan Cox authored
Signed-off-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Mark Lord authored
Add support for issuing ATA_16 passthru commands to ATAPI devices managed by libata. It requires the previous CDB length fix patch. A boot/module parameter, "atapi_passthru16=0" can be used to globally disable this feature, if ever desired. tj: restructured __ata_scsi_queuecmd() according to Jeff's suggestion. Signed-off-by:
Mark Lord <liml@rtr.ca> Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Albert Lee authored
Move ata_altstatus() out from ata_hsm_move() to the pio data xfer functions like ata_pio_sectors() and atapi_pio_bytes() where it makes more sense. Signed-off-by:
Albert Lee <albertcc@tw.ibm.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Alan Cox authored
Debugging a report of a problem with an ancient solid state disk showed up some problems in the IORDY handling 1. We check the wrong bit to see if the device has IORDY 2. Even then some ancient creaking piles of crap don't support SETXFER at all. The cases it fixes are obscure and the risk of side effects is slight but possible. This also moves us slightly closer to supporting original MFM/RLL disks with libata. Signed-off-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Update Power Management to consider PMP links. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Update hotplug to handle PMP links. When PMP is attached, the PMP number corresponds to C of SCSI H:C:I:L. While at it, change argument to ata_find_dev() to @devno from @id to avoid confusion with SCSI device ID. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Add link->pmp, ap->nr_pmp_links, ap->pmp_link[], and implement/update link helpers. printk helpers are updated such that port and link are identifed as 'ataP:' if no PMP is attached, while device is identified as 'ataP.DD:'. If PMP is attached, they become 'ataP:', 'ataP.LL:' and 'ataP.LL' - ie. link and device are identified their PMP number. If PPM is attached (ap->nr_pmp_links != 0), ata_for_each_link() iterates over PMP links, while __ata_for_each_link() iterates over the host link + PMP links. If PMP is not attached (ap->nr_pmp_links == 0), both iterate over only the host link. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Implement ata_link_abort(). Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Separate out link initialization into ata_link_init() and ata_link_init_sata_spd(). Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
HRST_TO_RESUME and SKIP_D2H_BSY are link attributes. Move them to ata_link->flags. This will allow host and PMP links to have different attributes. ata_port_info->link_flags is added and used by LLDs to specify these flags during initialization. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Make the following functions deal with ata_link instead of ata_port. * ata_set_mode() * ata_eh_autopsy() and related functions * ata_eh_report() and related functions * suspend/resume related functions * ata_eh_recover() and related functions Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Make reset methods and related functions deal with ata_link instead of ata_port. * ata_do_reset() * ata_eh_reset() * all prereset/reset/postreset methods and related functions This patch introduces no behavior change. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Make the following PHY-related functions to deal with ata_link instead of ata_port. * sata_print_link_status() * sata_down_spd_limit() * ata_set_sata_spd_limit() and friends * sata_link_debounce/resume() * sata_scr_valid/read/write/write_flush() * ata_link_on/offline() This patch introduces no behavior change. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Multiple links and different number of devices per link should be considered to iterate over links and devices. This patch implements and uses link and device iterators - ata_port_for_each_link() and ata_link_for_each_dev() - and ata_link_max_devices(). This change makes a lot of functions iterate over only possible devices instead of from dev 0 to dev ATA_MAX_DEVICES. All such changes have been examined and nothing should be broken. While at it, add a separating comment before device helpers to distinguish them better from link helpers and others. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
Introduce ata_link. It abstracts PHY and sits between ata_port and ata_device. This new level of abstraction is necessary to support SATA Port Multiplier, which basically adds a bunch of links (PHYs) to a ATA host port. Fields related to command execution, spd_limit and EH are per-link and thus moved to ata_link. This patch only defines the host link. Multiple link handling will be added later. Also, a lot of ap->link derefences are added but many of them will be removed as each part is converted to deal directly with ata_link instead of ata_port. This patch introduces no behavior change. Signed-off-by:
Tejun Heo <htejun@gmail.com> Cc: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
- 20 Sep, 2007 1 commit
-
-
Alan Cox authored
Signed-off-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
- 11 Sep, 2007 1 commit
-
-
Tejun Heo authored
dev->horkage should be cleared over device hotunplug/plug. Clear it in ata_dev_init(). Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
- 31 Aug, 2007 2 commits
-
-
Tejun Heo authored
Some drives choke on READ_NATIVE_MAX_ADDRESS[_EXT]. Implement ATA_HORKAGE_BROKEN_HPA and apply it to affected drives. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Alan Cox authored
On some early drives (pre ATA1) this feature is not supported. If it fails then we know the drive geometry is the hardware geometry and the one we tried to set anyway so just carry on. Signed-off-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
- 23 Aug, 2007 2 commits
-
-
Tejun Heo authored
If the initial configuration fails early, n_sectors is left at zero. Checking against it during revalidation makes retried configuration fail due to n_sectors mismatch. Ignore zero n_sectors during revalidation. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
Tejun Heo authored
If revalidation fails because device has different n_sectors after configuration the original n_sectors should be restored before failing revalidation. Without this fix, n_sectors difference will incorrectly and silently pass revalidation when revalidation is retried. Signed-off-by:
Tejun Heo <htejun@gmail.com> Acked-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
- 15 Aug, 2007 1 commit
-
-
Ryan Power authored
Adjust libata to ignore errors after spinup This patch is to ignore errors from the spinup attempt if the drive is in the "standby id" state. Signed-off-by:
Ryan Power <rpower@sysreset.com> Acked-by:
Mark Lord <liml@rtr.ca> Cc: Jeff Garzik <jeff@garzik.org> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
- 01 Aug, 2007 1 commit
-
-
Tejun Heo authored
SAMSUNG HD401LJ / ZZ100-15 does spurious completion of NCQ commands. Disable NCQ. Reported by Ulrich in bugzilla #8805. Signed-off-by:
Tejun Heo <htejun@gmail.com> Cc: Ulrich <stellplatz-nr.13a@datenparkplatz.de> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-
- 20 Jul, 2007 1 commit
-
-
Tejun Heo authored
In most cases, when EH is scheduled, all in-flight commands are aborted causing EH to kick in immediately. However, in some cases (especially with PMP), it's unclear which commands are affected by the error condition and although aborting all in-flight commands work, it isn't optimal and may cause unnecessary disruption. On the other hand, waiting for in-flight commands to drain themselves can take up to 30seconds. This patch implements EH fast drain to handle such situations. It gives in-flight commands some time to finish up but doesn't wait for too long. After EH is scheduled, fast drain timer is started and if no other completion occurs in ATA_EH_FASTDRAIN_INTERVAL all in-flight commands are aborted. If any completion occurred in the interval, the port is given another interval to finish up itself. Currently ATA_EH_FASTDRAIN_INTERVAL is 3 secs which should be enough for finishing up most commands. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jeff Garzik <jeff@garzik.org>
-