summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2002-03-05 09:24:19 +0000
committersos <sos@FreeBSD.org>2002-03-05 09:24:19 +0000
commit9efc11065b8c97c4d238abf06c92522301113cf3 (patch)
treec9f73969b3cb1de8b9bddf4aa0aa76b7276fdaa0 /sys
parent92361f6aadf0c42e4292208de34b080d7479303c (diff)
downloadFreeBSD-src-9efc11065b8c97c4d238abf06c92522301113cf3.zip
FreeBSD-src-9efc11065b8c97c4d238abf06c92522301113cf3.tar.gz
Misc little cleanups:
Link if only ATAPI device in kernel config Remove unused #includes Rearrange a bit in ata-raid to make diff against -stable smaller Enable wc as default again, dunne how this happend...
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata-all.c4
-rw-r--r--sys/dev/ata/ata-disk.c2
-rw-r--r--sys/dev/ata/ata-dma.c1
-rw-r--r--sys/dev/ata/ata-raid.c18
4 files changed, 12 insertions, 13 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index cddcbee..359bfd3 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -28,7 +28,6 @@
* $FreeBSD$
*/
-#include "pci.h"
#include "opt_ata.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -311,9 +310,10 @@ ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
splx(s);
return error;
+#ifdef DEV_ATADISK
case ATAREBUILD:
return ata_raid_rebuild(iocmd->channel);
-
+#endif
case ATAGMODE:
if (!device || !(ch = device_get_softc(device)))
return ENXIO;
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 88e5bae..4bbce23 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -86,7 +86,7 @@ static int ad_version(u_int16_t);
/* internal vars */
static u_int32_t adp_lun_map = 0;
static int ata_dma = 1;
-static int ata_wc = 0;
+static int ata_wc = 1;
static int ata_tags = 0;
TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
TUNABLE_INT("hw.ata.wc", &ata_wc);
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c
index 3f2abc5..fbcbf70 100644
--- a/sys/dev/ata/ata-dma.c
+++ b/sys/dev/ata/ata-dma.c
@@ -28,7 +28,6 @@
* $FreeBSD$
*/
-#include "pci.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ata.h>
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index 2a3f89f..11789bb 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -388,6 +388,15 @@ arstrategy(struct bio *bp)
biodone(bp);
return;
}
+ if (bp->bio_cmd == BIO_READ) {
+ if ((buf1->bp.bio_pblkno <
+ (rdp->disks[buf1->drive].last_lba - AR_PROXIMITY) ||
+ buf1->bp.bio_pblkno >
+ (rdp->disks[buf1->drive].last_lba + AR_PROXIMITY) ||
+ !(rdp->disks[buf1->drive].flags & AR_DF_ONLINE)) &&
+ (rdp->disks[buf1->drive+rdp->width].flags & AR_DF_ONLINE))
+ buf1->drive = buf1->drive + rdp->width;
+ }
if (bp->bio_cmd == BIO_WRITE) {
if (rdp->disks[buf1->drive + rdp->width].flags & AR_DF_ONLINE) {
if (rdp->disks[buf1->drive].flags & AR_DF_ONLINE) {
@@ -406,15 +415,6 @@ arstrategy(struct bio *bp)
buf1->drive = buf1->drive + rdp->width;
}
}
- if (bp->bio_cmd == BIO_READ) {
- if ((buf1->bp.bio_pblkno <
- (rdp->disks[buf1->drive].last_lba - AR_PROXIMITY) ||
- buf1->bp.bio_pblkno >
- (rdp->disks[buf1->drive].last_lba + AR_PROXIMITY) ||
- !(rdp->disks[buf1->drive].flags & AR_DF_ONLINE)) &&
- (rdp->disks[buf1->drive+rdp->width].flags & AR_DF_ONLINE))
- buf1->drive = buf1->drive + rdp->width;
- }
buf1->bp.bio_dev = AD_SOFTC(rdp->disks[buf1->drive])->dev;
buf1->bp.bio_dev->AD_STRATEGY((struct bio *)buf1);
rdp->disks[buf1->drive].last_lba = buf1->bp.bio_pblkno + chunk;
OpenPOWER on IntegriCloud