summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/psim
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-12-06 00:10:13 +0000
committermav <mav@FreeBSD.org>2009-12-06 00:10:13 +0000
commit6a3018e7cff16ab166672e276b4b39154ad09739 (patch)
tree8def18d183a8f2ec2847c5ef06fe2fac081d798e /sys/powerpc/psim
parent9bb92ae41af45cc801f28a880e08648aad72e241 (diff)
downloadFreeBSD-src-6a3018e7cff16ab166672e276b4b39154ad09739.zip
FreeBSD-src-6a3018e7cff16ab166672e276b4b39154ad09739.tar.gz
MFp4:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into cam(4) interface modules. When enabled, this options deprecates all ata(4) peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers (ada, cd, ...) and interfaces to be natively used instead. As side effect of this, ata(4) mode setting code was completely rewritten to make controller API more strict and permit above change. While doing this, SATA revision was separated from PATA mode. It allows DMA-incapable SATA devices to operate and makes hw.ata.atapi_dma tunable work again. Also allow ata(4) controller drivers (except some specific or broken ones) to handle larger data transfers. Previous constraint of 64K was artificial and is not really required by PCI ATA BM specification or hardware. Submitted by: nwitehorn (powerpc part)
Diffstat (limited to 'sys/powerpc/psim')
-rw-r--r--sys/powerpc/psim/ata_iobus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/powerpc/psim/ata_iobus.c b/sys/powerpc/psim/ata_iobus.c
index a70d008..149437f 100644
--- a/sys/powerpc/psim/ata_iobus.c
+++ b/sys/powerpc/psim/ata_iobus.c
@@ -210,7 +210,7 @@ ata_iobus_release_resource(device_t dev, device_t child, int type, int rid,
*/
static int ata_iobus_sub_probe(device_t dev);
-static void ata_iobus_sub_setmode(device_t parent, device_t dev);
+static int ata_iobus_sub_setmode(device_t dev, int target, int mode);
static device_method_t ata_iobus_sub_methods[] = {
/* Device interface */
@@ -245,11 +245,9 @@ ata_iobus_sub_probe(device_t dev)
return ata_probe(dev);
}
-static void
-ata_iobus_sub_setmode(device_t parent, device_t dev)
+static int
+ata_iobus_sub_setmode(device_t parent, int target, int mode);
{
- struct ata_device *atadev = device_get_softc(dev);
-
/* Only ever PIO mode here... */
- atadev->mode = ATA_PIO;
+ return (ATA_PIO);
}
OpenPOWER on IntegriCloud