aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata/ata-disk.c
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>2004-09-26 11:48:43 +0000
committerSøren Schmidt <sos@FreeBSD.org>2004-09-26 11:48:43 +0000
commitb5dee91f5f69a1c5cb8c4790fc6e6f4454253401 (patch)
tree393a1ea390b8be41431e342451dfd10db1b6df33 /sys/dev/ata/ata-disk.c
parentc5b2c44ce8acf8207444809c4e943a09ac7ce7e1 (diff)
downloadsrc-b5dee91f5f69a1c5cb8c4790fc6e6f4454253401.tar.gz
src-b5dee91f5f69a1c5cb8c4790fc6e6f4454253401.zip
Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead. This closes the last (known) race issues in ATA which should fix the various hangs etc seen on heavy loaded systems. Change from using timeout functions to using callout functions in the timeout code. This together with above closes the race that could happen if timeout and device interrupt occured simultaniously. Also fix the possible recursion in ata_reinit() on very dodgy devices that could take us down in the probe.
Notes
Notes: svn path=/head/; revision=135819
Diffstat (limited to 'sys/dev/ata/ata-disk.c')
-rw-r--r--sys/dev/ata/ata-disk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 05f7307d43bb..9bbacd2927b8 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -354,7 +354,8 @@ addump(void *arg, void *virtual, vm_offset_t physical,
request.flags = ATA_R_CONTROL;
}
- if (request.device->channel->hw.transaction(&request) == ATA_OP_CONTINUES) {
+ if (request.device->channel->
+ hw.begin_transaction(&request) == ATA_OP_CONTINUES) {
while (request.device->channel->running == &request &&
!(request.status & ATA_S_ERROR)) {
DELAY(20);