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...
This commit is contained in:
parent
b5a8f767a6
commit
11de413756
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -28,7 +28,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include "pci.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/ata.h>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user