Deleted Added
full compact
aac.c (177611) aac.c (177619)
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/aac/aac.c 177611 2008-03-25 18:34:04Z emaste $");
31__FBSDID("$FreeBSD: head/sys/dev/aac/aac.c 177619 2008-03-25 21:39:06Z emaste $");
32
33/*
34 * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters.
35 */
36#define AAC_DRIVER_VERSION 0x02000000
37#define AAC_DRIVERNAME "aac"
38
39#include "opt_aac.h"

--- 332 unchanged lines hidden (view full) ---

372 * Request information of container #cid
373 */
374static struct aac_mntinforesp *
375aac_get_container_info(struct aac_softc *sc, struct aac_fib *fib, int cid)
376{
377 struct aac_mntinfo *mi;
378
379 mi = (struct aac_mntinfo *)&fib->data[0];
32
33/*
34 * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters.
35 */
36#define AAC_DRIVER_VERSION 0x02000000
37#define AAC_DRIVERNAME "aac"
38
39#include "opt_aac.h"

--- 332 unchanged lines hidden (view full) ---

372 * Request information of container #cid
373 */
374static struct aac_mntinforesp *
375aac_get_container_info(struct aac_softc *sc, struct aac_fib *fib, int cid)
376{
377 struct aac_mntinfo *mi;
378
379 mi = (struct aac_mntinfo *)&fib->data[0];
380 mi->Command = VM_NameServe;
380 /* use 64-bit LBA if enabled */
381 mi->Command = (sc->flags & AAC_FLAGS_LBA_64BIT) ?
382 VM_NameServe64 : VM_NameServe;
381 mi->MntType = FT_FILESYS;
382 mi->MntCount = cid;
383
384 if (aac_sync_fib(sc, ContainerCommand, 0, fib,
385 sizeof(struct aac_mntinfo))) {
386 printf("error probing container %d", cid);
387 return (NULL);
388 }

--- 1408 unchanged lines hidden (view full) ---

1797 if (sc->aac_max_fib_size > PAGE_SIZE)
1798 sc->aac_max_fib_size = PAGE_SIZE;
1799 sc->aac_max_fibs_alloc = PAGE_SIZE / sc->aac_max_fib_size;
1800
1801 if (sc->aac_max_fib_size > sizeof(struct aac_fib)) {
1802 sc->flags |= AAC_FLAGS_RAW_IO;
1803 device_printf(sc->aac_dev, "Enable Raw I/O\n");
1804 }
383 mi->MntType = FT_FILESYS;
384 mi->MntCount = cid;
385
386 if (aac_sync_fib(sc, ContainerCommand, 0, fib,
387 sizeof(struct aac_mntinfo))) {
388 printf("error probing container %d", cid);
389 return (NULL);
390 }

--- 1408 unchanged lines hidden (view full) ---

1799 if (sc->aac_max_fib_size > PAGE_SIZE)
1800 sc->aac_max_fib_size = PAGE_SIZE;
1801 sc->aac_max_fibs_alloc = PAGE_SIZE / sc->aac_max_fib_size;
1802
1803 if (sc->aac_max_fib_size > sizeof(struct aac_fib)) {
1804 sc->flags |= AAC_FLAGS_RAW_IO;
1805 device_printf(sc->aac_dev, "Enable Raw I/O\n");
1806 }
1807 if ((sc->flags & AAC_FLAGS_RAW_IO) &&
1808 (sc->flags & AAC_FLAGS_ARRAY_64BIT)) {
1809 sc->flags |= AAC_FLAGS_LBA_64BIT;
1810 device_printf(sc->aac_dev, "Enable 64-bit array\n");
1811 }
1805
1806 return (0);
1807}
1808
1809static int
1810aac_init(struct aac_softc *sc)
1811{
1812 struct aac_adapter_init *ip;

--- 1834 unchanged lines hidden ---
1812
1813 return (0);
1814}
1815
1816static int
1817aac_init(struct aac_softc *sc)
1818{
1819 struct aac_adapter_init *ip;

--- 1834 unchanged lines hidden ---