diff options
author | Scott Long <scottl@FreeBSD.org> | 2009-07-10 08:18:08 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2009-07-10 08:18:08 +0000 |
commit | 52c9ce25d8339ad0228be8aaf0e44b45314b38dc (patch) | |
tree | 65347229e3752769c4a701bd5f5308b2c8b4bf03 /sys/dev/aic7xxx | |
parent | f6c09dd6a8f15f3093d0e4eb226ce6ac0ab1c991 (diff) | |
download | src-52c9ce25d8339ad0228be8aaf0e44b45314b38dc.tar.gz src-52c9ce25d8339ad0228be8aaf0e44b45314b38dc.zip |
Separate the parallel scsi knowledge out of the core of the XPT, and
modularize it so that new transports can be created.
Add a transport for SATA
Add a periph+protocol layer for ATA
Add a driver for AHCI-compliant hardware.
Add a maxio field to CAM so that drivers can advertise their max
I/O capability. Modify various drivers so that they are insulated
from the value of MAXPHYS.
The new ATA/SATA code supports AHCI-compliant hardware, and will override
the classic ATA driver if it is loaded as a module at boot time or compiled
into the kernel. The stack now support NCQ (tagged queueing) for increased
performance on modern SATA drives. It also supports port multipliers.
ATA drives are accessed via 'ada' device nodes. ATAPI drives are
accessed via 'cd' device nodes. They can all be enumerated and manipulated
via camcontrol, just like SCSI drives. SCSI commands are not translated to
their ATA equivalents; ATA native commands are used throughout the entire
stack, including camcontrol. See the camcontrol manpage for further
details. Testing this code may require that you update your fstab, and
possibly modify your BIOS to enable AHCI functionality, if available.
This code is very experimental at the moment. The userland ABI/API has
changed, so applications will need to be recompiled. It may change
further in the near future. The 'ada' device name may also change as
more infrastructure is completed in this project. The goal is to
eventually put all CAM busses and devices until newbus, allowing for
interesting topology and management options.
Few functional changes will be seen with existing SCSI/SAS/FC drivers,
though the userland ABI has still changed. In the future, transports
specific modules for SAS and FC may appear in order to better support
the topologies and capabilities of these technologies.
The modularization of CAM and the addition of the ATA/SATA modules is
meant to break CAM out of the mold of being specific to SCSI, letting it
grow to be a framework for arbitrary transports and protocols. It also
allows drivers to be written to support discrete hardware without
jeopardizing the stability of non-related hardware. While only an AHCI
driver is provided now, a Silicon Image driver is also in the works.
Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware
is possible and encouraged. Help with new transports is also encouraged.
Submitted by: scottl, mav
Approved by: re
Notes
Notes:
svn path=/head/; revision=195534
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/aic79xx_osm.h | 6 | ||||
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx_osm.h | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/aic7xxx/aic79xx_osm.h b/sys/dev/aic7xxx/aic79xx_osm.h index 3c97a63d3e0a..b786cec2baf4 100644 --- a/sys/dev/aic7xxx/aic79xx_osm.h +++ b/sys/dev/aic7xxx/aic79xx_osm.h @@ -102,7 +102,8 @@ * The number of dma segments supported. The sequencer can handle any number * of physically contiguous S/G entrys. To reduce the driver's memory * consumption, we limit the number supported to be sufficient to handle - * the largest mapping supported by the kernel, MAXPHYS. Assuming the + * the largest mapping supported by the the legacy kernel MAXPHYS setting of + * 128K. This can be increased once some testing is done. Assuming the * transfer is as fragmented as possible and unaligned, this turns out to * be the number of paged sized transfers in MAXPHYS plus an extra element * to handle any unaligned residual. The sequencer fetches SG elements @@ -110,7 +111,8 @@ * multiple of 16 which should align us on even the largest of cacheline * boundaries. */ -#define AHD_NSEG (roundup(btoc(MAXPHYS) + 1, 16)) +#define AHD_MAXPHYS (128 * 1024) +#define AHD_NSEG (roundup(btoc(AHD_MAXPHYS) + 1, 16)) /* This driver supports target mode */ #ifdef NOT_YET diff --git a/sys/dev/aic7xxx/aic7xxx_osm.h b/sys/dev/aic7xxx/aic7xxx_osm.h index d1059714be0a..388cf9e84fb8 100644 --- a/sys/dev/aic7xxx/aic7xxx_osm.h +++ b/sys/dev/aic7xxx/aic7xxx_osm.h @@ -115,15 +115,16 @@ extern devclass_t ahc_devclass; * The number of dma segments supported. The sequencer can handle any number * of physically contiguous S/G entrys. To reduce the driver's memory * consumption, we limit the number supported to be sufficient to handle - * the largest mapping supported by the kernel, MAXPHYS. Assuming the - * transfer is as fragmented as possible and unaligned, this turns out to + * the largest mapping supported by the the legacy kernel MAXPHYS setting of + * 128K. This can be increased once some testing is done. Assuming the * be the number of paged sized transfers in MAXPHYS plus an extra element * to handle any unaligned residual. The sequencer fetches SG elements * in cacheline sized chucks, so make the number per-transaction an even * multiple of 16 which should align us on even the largest of cacheline * boundaries. */ -#define AHC_NSEG (roundup(btoc(MAXPHYS) + 1, 16)) +#define AHC_MAXPHYS (128 * 1024) +#define AHC_NSEG (roundup(btoc(AHC_MAXPHYS) + 1, 16)) /* This driver supports target mode */ #define AHC_TARGET_MODE 1 |