aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* [PATCH] libata-eh-fw: implement freeze/thawTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | Freezing is performed atomic w.r.t. host_set->lock and once frozen LLDD is not allowed to access the port or any qc on it. Also, libata makes sure that no new qc gets issued to a frozen port. A frozen port is thawed after a reset operation completes successfully, so reset methods must do its job while the port is frozen. During initialization all ports get frozen before requesting IRQ, so reset methods are always invoked on a frozen port. Optional ->freeze and ->thaw operations notify LLDD that the port is being frozen and thawed, respectively. LLDD can disable/enable hardware interrupt in these callbacks if the controller's IRQ mask can be changed dynamically. If the controller doesn't allow such operation, LLDD can check for frozen state in the interrupt handler and ack/clear interrupts unconditionally while frozen. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-eh-fw: implement ata_port_schedule_eh() and ata_port_abort()Tejun Heo2006-05-15
| | | | | | | | | | | | | | | | ata_port_schedule_eh() directly schedules EH for @ap without associated qc. Once EH scheduled, no further qc is allowed and EH kicks in as soon as all currently active qc's are drained. ata_port_abort() schedules all currently active commands for EH by qc_completing them with ATA_QCFLAG_FAILED set. If ata_port_abort() doesn't find any qc to abort, it directly schedule EH using ata_port_schedule_eh(). These two functions provide ways to invoke EH for conditions which aren't directly related to any specfic qc. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-eh-fw: implement new EH scheduling via error completionTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | There are several ways a qc can get schedule for EH in new EH. This patch implements one of them - completing a qc with ATA_QCFLAG_FAILED set or with non-zero qc->err_mask. ALL such qc's are examined by EH. New EH schedules a qc for EH from completion iff ->error_handler is implemented, qc is marked as failed or qc->err_mask is non-zero and the command is not an internal command (internal cmd is handled via ->post_internal_cmd). The EH scheduling itself is performed by asking SCSI midlayer to schedule EH for the specified scmd. For drivers implementing old-EH, nothing changes. As this change makes ata_qc_complete() rather large, it's not inlined anymore and __ata_qc_complete() is exported to other parts of libata for later use. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-eh-fw: update ata_qc_from_tag() to enforce normal/EH qc ownershipTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | | | | New EH framework has clear distinction about who owns a qc. Every qc starts owned by normal execution path - PIO, interrupt or whatever. When an exception condition occurs which affects the qc, the qc gets scheduled for EH. Note that some events (say, link lost and regained, command timeout) may schedule qc's which are not directly related but could have been affected for EH too. Scheduling for EH is atomic w.r.t. ap->host_set->lock and once schedule for EH, normal execution path is not allowed to access the qc in whatever way. (PIO synchronization acts a bit different and will be dealt with later) This patch make ata_qc_from_tag() check whether a qc is active and owned by normal path before returning it. If conditions don't match, NULL is returned and thus access to the qc is denied. __ata_qc_from_tag() is the original ata_qc_from_tag() and is used by libata core/EH layers to access inactive/failed qc's. This change is applied only if the associated LLDD implements new EH as indicated by non-NULL ->error_handler Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-eh-fw: use special reserved tag and qc for internal commandsTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | New EH may issue internal commands to recover from error while failed qc's are still hanging around. To allow such usage, reserve tag ATA_MAX_QUEUE-1 for internal command. This also makes it easy to tell whether a qc is for internal command or not. ata_tag_internal() test implements this test. To avoid breaking existing drivers, ata_exec_internal() uses ATA_TAG_INTERNAL only for drivers which implement ->error_handler. For drivers using old EH, tag 0 is used. Note that this makes ata_tag_internal() test valid only when ->error_handler is implemented. This is okay as drivers on old EH should not and does not have any reason to use ata_tag_internal(). Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata-eh-fw: clear SError in ata_std_postreset()Tejun Heo2006-05-15
| | | | | | | Clear SError in ata_std_postreset(). This is to clear SError bits which get set during reset. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: use ATA printk helpersTejun Heo2006-05-15
| | | | | | Use ATA printk helpers. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: use dev->apTejun Heo2006-05-15
| | | | | | | Use dev->ap where possible and eliminate superflous @ap from functions and structures. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: add dev->apTejun Heo2006-05-15
| | | | | | | | | Add dev->ap which points back to the port the device belongs to. This makes it unnecessary to pass @ap for silly reasons (e.g. printks). Also, this change is necessary to accomodate later PM support which will introduce ATA link inbetween port and device. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: use new SCR and on/offline functionsTejun Heo2006-05-15
| | | | | | | | Use new SCR and on/offline functions. Note that for LLDD which know it implements SCR callbacks, SCR functions are guaranteed to succeed and ata_port_online() == !ata_port_offline(). Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: implement new SCR handling and port on/offline functionsTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | Implement ata_scr_{valid|read|write|write_flush}() and ata_port_{online|offline}(). These functions replace scr_{read|write}() and sata_dev_present(). Major difference between between the new SCR functions and the old ones is that the new ones have a way to signal error to the caller. This makes handling SCR-available and SCR-unavailable cases in the same path easier. Also, it eases later PM implementation where SCR access can fail due to various reasons. ata_port_{online|offline}() functions return 1 only when they are affirmitive of the condition. e.g. if SCR is unaccessible or presence cannot be determined for other reasons, these functions return 0. So, ata_port_online() != !ata_port_offline(). This distinction is useful in many exception handling cases. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: init ap->cbl to ATA_CBL_SATA earlyTejun Heo2006-05-15
| | | | | | | | Init ap->cbl to ATA_CBL_SATA in ata_host_init(). This is necessary for soon-to-follow SCR handling function changes. LLDDs are free to change ap->cbl during probing. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] sata_sil24: update TF image only when necessaryTejun Heo2006-05-15
| | | | | | Update TF image (pp->tf) only when necessary. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: implement qc->result_tfTejun Heo2006-05-15
| | | | | | | | | | | Add qc->result_tf and ATA_QCFLAG_RESULT_TF. This moves the responsibility of loading result TF from post-compltion path to qc execution path. qc->result_tf is loaded if explicitly requested or the qc failsa. This allows more efficient completion implementation and correct handling of result TF for controllers which don't have global TF representation such as sil3124/32. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: remove postreset handling from ata_do_reset()Tejun Heo2006-05-15
| | | | | | | | Make ata_do_reset() deal only with reset. postreset is now the responsibility of the caller. This is simpler and eases later prereset addition. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: move ->set_mode() handling into ata_set_mode()Tejun Heo2006-05-15
| | | | | | Move ->set_mode() handlng into ata_set_mode(). Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: use preallocated buffersTejun Heo2006-05-15
| | | | | | | | | | It's not a very good idea to allocate memory during EH. Use statically allocated buffer for dev->id[] and add 512byte buffer ap->sector_buf. This buffer is owned by EH (or probing) and to be used as temporary buffer for various purposes (IDENTIFY, NCQ log page 10h, PM GSCR block). Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: hold host_set lock while finishing internal qcTejun Heo2006-05-15
| | | | | | Hold host_set lock while finishing internal qc. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: clear ap->active_tag atomically w.r.t. command completionTejun Heo2006-05-15
| | | | | | | | | ap->active_tag was cleared in ata_qc_free(). This left ap->active_tag dangling after ata_qc_complete(). Spurious interrupts inbetween could incorrectly access the qc. Clear active_tag in ata_qc_complete(). This change is necessary for later EH changes. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: fix ->phy_reset class code handling in ata_bus_probe()Tejun Heo2006-05-15
| | | | | | | | ata_bus_probe() doesn't clear dev->class after ->phy_reset(). This can result in falsely enabled devices if probing fails. Clear dev->class to ATA_DEV_UNKNOWN after fetching it. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: unexport ata_scsi_error()Tejun Heo2006-05-15
| | | | | | | While moving ata_scsi_error() from LLDD sht to libata transportt, EXPORT_SYMBOL_GPL() entry was left out. Kill it. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] ahci: hardreset classification fixTejun Heo2006-05-15
| | | | | | | AHCI calls ata_dev_classify() even when no device is attached which results in false class code. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: rename ata_down_sata_spd_limit() and friendsTejun Heo2006-05-15
| | | | | | | Rename ata_down_sata_spd_limit() and friends to sata_down_spd_limit() and likewise for simplicity & consistency. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] libata: silly fix in ata_scsi_start_stop_xlat()Tejun Heo2006-05-15
| | | | | | Don't directly access &qc->tf when tf == &qc->tf. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] SCSI: implement shost->host_eh_scheduledTejun Heo2006-05-15
| | | | | | | | | | | | | | | | | | | | | libata needs to invoke EH without scmd. This patch adds shost->host_eh_scheduled to implement such behavior. Currently the only user of this feature is libata and no general interface is defined. This patch simply adds handling for host_eh_scheduled where needed and exports scsi_eh_wakeup() to modules. The rest is upto libata. This is the result of the following discussion. http://thread.gmane.org/gmane.linux.scsi/23853/focus=9760 In short, SCSI host is not supposed to know about exceptions unrelated to specific device or command. Such exceptions should be handled by transport layer proper. However, the distinction is not essential to ATA and libata is planning to depart from SCSI, so, for the time being, libata will be using SCSI EH to handle such exceptions. Signed-off-by: Tejun Heo <htejun@gmail.com>
* [PATCH] SCSI: Introduce scsi_req_abort_cmd (REPOST)Luben Tuikov2006-05-15
| | | | | | | | | | | | | | | | Introduce scsi_req_abort_cmd(struct scsi_cmnd *). This function requests that SCSI Core start recovery for the command by deleting the timer and adding the command to the eh queue. It can be called by either LLDDs or SCSI Core. LLDDs who implement their own error recovery MAY ignore the timeout event if they generated scsi_req_abort_cmd. First post: http://marc.theaimsgroup.com/?l=linux-scsi&m=113833937421677&w=2 Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Tejun Heo <htejun@gmail.com>
* Merge branch 'master' into upstreamJeff Garzik2006-04-27
|\
| * Merge master.kernel.org:/home/rmk/linux-2.6-mmcLinus Torvalds2006-04-26
| |\ | | | | | | | | | | | | * master.kernel.org:/home/rmk/linux-2.6-mmc: [MMC] pxamci: fix data timeout calculation
| | * [MMC] pxamci: fix data timeout calculationRussell King2006-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MMC layer gives us two parts for the timeout calculation - a fixed timeout in nanoseconds, and a card clock-speed dependent part. The PXA MMC hardware allows for a timeout based on the fixed host clock speed only. This resulted in some cards being given a short timeout, and therefore failing to work. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | [PATCH] Remove __devinit and __cpuinit from notifier_call definitionsChandra Seetharaman2006-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Few of the notifier_chain_register() callers use __init in the definition of notifier_call. It is incorrect as the function definition should be available after the initializations (they do not unregister them during initializations). This patch fixes all such usages to _not_ have the notifier_call __init section. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] fix leak in activate_ep_files()Al Viro2006-04-26
| | | | | | | | | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2006-04-26
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block: [PATCH] splice: add ->splice_write support for /dev/null [PATCH] splice: rearrange moving to/from pipe helpers [PATCH] Add support for the sys_vmsplice syscall [PATCH] splice: fix offset problems [PATCH] splice: fix min() warning
| | * | [PATCH] splice: add ->splice_write support for /dev/nullJens Axboe2006-04-26
| | |/ | | | | | | | | | | | | | | | Useful for testing. Signed-off-by: Jens Axboe <axboe@suse.de>
| * | [PATCH] forcedeth: fix initializationAyaz Abdulla2006-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the nic initialization. If the nic was in low power mode, it brings it back to normal power. Also, it utilizes a new hardware reset during the init. I am resending based on feedback, I corrected the register size mapping and delay after posted write. Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | [PATCH] sky2: version 1.2Stephen Hemminger2006-04-26
| | | | | | | | | | | | | | | | | | | | | Update to version 1.2 Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | [PATCH] sky2: reset function can be devinitStephen Hemminger2006-04-26
| | | | | | | | | | | | | | | | | | | | | | | | The sky2_reset function only called from sky2_probe. Maybe the compiler was smart enough to figure this out already. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | [PATCH] sky2: use ALIGN() macroStephen Hemminger2006-04-26
| | | | | | | | | | | | | | | | | | | | | | | | The ALIGN() macro in kernel.h does the same math that the sky2 driver was using for padding. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | [PATCH] sky2: add fake idle irq timerStephen Hemminger2006-04-26
| | | | | | | | | | | | | | | | | | | | | | | | Add an fake NAPI schedule once a second. This is an attempt to work around for broken configurations with edge-triggered interrupts. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | [PATCH] sky2: reschedule if irq still pendingStephen Hemminger2006-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround for the case edge-triggered irq's. Several users seem to have broken configurations sharing edge-triggered irq's. To avoid losing IRQ's, reshedule if more work arrives. The changes to netdevice.h are to extract the part that puts device back in list into separate inline. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | Merge branch 'upstream-fixes' of ↵Jeff Garzik2006-04-26
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
| | * | [PATCH] bcm43xx: make PIO mode usableMichael Buesch2006-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes PIO mode on the softmac bcm43xx driver. (A dscape patch will follow). It mainly fixes endianess issues. This patch is tested on PowerPC32 and i386. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * | [PATCH] Fix crash on big-endian systems during scanPavel Roskin2006-04-24
| | |/ | | | | | | | | | | | | | | | | | | | | | The original code was doing arithmetics on a little-endian value. Reported by Stelios Koroneos <stelios@stelioscellar.com> Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | Merge branch 'skb_truesize' of ↵Jeff Garzik2006-04-26
| |\ \ | | | | | | | | | | | | git://lost.foo-projects.org/~ahkok/git/linux-2.6 into upstream-fixes
| | * | e1000: Update truesize with the length of the packet for packet splitAuke Kok2006-04-26
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Update skb with the real packet size. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
| * | Merge branch 'master' into upstream-fixesJeff Garzik2006-04-26
| |\|
| | * Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6Linus Torvalds2006-04-23
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: [PARISC] MAINTAINERS [PARISC] Make ioremap default to _nocache [PARISC] Add new entries to the syscall table [PARISC] Further work for multiple page sizes [PARISC] Fix up hil_kbd.c mismerge [PARISC] defconfig updates [PARISC] Document that we tolerate "Relaxed Ordering" [PARISC] Misc. janitorial work [PARISC] EISA regions must be mapped NO_CACHE [PARISC] OSS ad1889: Match register names with ALSA driver
| | | * [PARISC] Fix up hil_kbd.c mismergeMatthew Wilcox2006-04-21
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| | | * [PARISC] Document that we tolerate "Relaxed Ordering"Grant Grundler2006-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means "DMA Read returns" can bypass "MMIO Writes". Violating the PCI specs in this case improves outbound DMA "flows" and is currently not required by any drivers. This is NOT a new behavior. Previous chipsets did this already and I believe ZX1 PDC was already setting this for hpux. I just want to further document the behavior. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| | | * [PARISC] Misc. janitorial workHelge Deller2006-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a spelling mistake, add a KERN_INFO flag, and fix some whitespace uglies. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| | * | Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6Linus Torvalds2006-04-23
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6: [PATCH] pcmcia/pcmcia_resource.c: fix crash when using Cardbus cards [PATCH] vrc4171: update config [PATCH] pcmcia: fix oops in static mapping case [PATCH] pcmcia: remove unneeded forward declarations [PATCH] pcmcia: do not set dev_node to NULL too early [PATCH] pcmcia: fix comment for pcmcia_load_firmware [PATCH] pcmcia: unload second device first [PATCH] pcmcia: add new ID to pcnet_cs