diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/mpt.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/mpt.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/mpt_openbsd.c | 29 | ||||
-rw-r--r-- | sys/dev/ic/mpt_openbsd.h | 3 |
4 files changed, 33 insertions, 7 deletions
diff --git a/sys/dev/ic/mpt.c b/sys/dev/ic/mpt.c index 0bc7f3a2595..36a5e5a6496 100644 --- a/sys/dev/ic/mpt.c +++ b/sys/dev/ic/mpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpt.c,v 1.7 2004/06/22 18:57:18 marco Exp $ */ +/* $OpenBSD: mpt.c,v 1.8 2004/07/12 23:57:14 marco Exp $ */ /* $NetBSD: mpt.c,v 1.4 2003/11/02 11:07:45 wiz Exp $ */ /* @@ -601,9 +601,6 @@ mpt_send_ioc_init(mpt_softc_t *mpt, u_int32_t who) */ int -mpt_read_cfg_header(mpt_softc_t *, int, int, int, fCONFIG_PAGE_HEADER *); - -int mpt_read_cfg_header(mpt_softc_t *mpt, int PageType, int PageNumber, int PageAddress, fCONFIG_PAGE_HEADER *rslt) { diff --git a/sys/dev/ic/mpt.h b/sys/dev/ic/mpt.h index 73a6aa5bf03..37caceaa152 100644 --- a/sys/dev/ic/mpt.h +++ b/sys/dev/ic/mpt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpt.h,v 1.3 2004/03/20 03:54:16 krw Exp $ */ +/* $OpenBSD: mpt.h,v 1.4 2004/07/12 23:57:14 marco Exp $ */ /* $NetBSD: mpt.h,v 1.2 2003/07/08 10:06:31 itojun Exp $ */ /* @@ -178,6 +178,7 @@ void mpt_check_doorbell(mpt_softc_t *); int mpt_read_cfg_page(mpt_softc_t *, int, fCONFIG_PAGE_HEADER *); int mpt_write_cfg_page(mpt_softc_t *, int, fCONFIG_PAGE_HEADER *); +int mpt_read_cfg_header(mpt_softc_t *, int, int, int, fCONFIG_PAGE_HEADER *); /* FW Download Boot */ int mpt_downloadboot(mpt_softc_t *); diff --git a/sys/dev/ic/mpt_openbsd.c b/sys/dev/ic/mpt_openbsd.c index 1aa1d006084..35937147e8a 100644 --- a/sys/dev/ic/mpt_openbsd.c +++ b/sys/dev/ic/mpt_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpt_openbsd.c,v 1.13 2004/06/30 00:45:04 krw Exp $ */ +/* $OpenBSD: mpt_openbsd.c,v 1.14 2004/07/12 23:57:14 marco Exp $ */ /* $NetBSD: mpt_netbsd.c,v 1.7 2003/07/14 15:47:11 lukem Exp $ */ /* @@ -398,6 +398,8 @@ void mpt_attach(mpt_softc_t *mpt) { struct scsi_link *lptr = &mpt->sc_link; + struct _CONFIG_PAGE_IOC_2 iocp2; + int rv; mpt->bus = 0; /* XXX ?? */ @@ -424,6 +426,31 @@ mpt_attach(mpt_softc_t *mpt) #ifdef MPT_DEBUG mpt->verbose = 2; #endif + + /* Read IOC page 2 to figure out if we have IM */ + rv = mpt_read_cfg_header(mpt, MPI_CONFIG_PAGETYPE_IOC, 2, + 0, &iocp2.Header); + if (rv) { + mpt_prt(mpt, "Could not retrieve IOC PAGE 2 to determine" + "RAID capabilities."); + } + else { + mpt->im_support = iocp2.CapabilitiesFlags & + (MPI_IOCPAGE2_CAP_FLAGS_IS_SUPPORT | + MPI_IOCPAGE2_CAP_FLAGS_IME_SUPPORT | + MPI_IOCPAGE2_CAP_FLAGS_IM_SUPPORT); + + if (mpt->verbose > 1) { + mpt_prt(mpt, "IOC Page 2: %x %x %x %x %x", + iocp2.CapabilitiesFlags, + iocp2.NumActiveVolumes, + iocp2.MaxVolumes, + iocp2.NumActivePhysDisks, + iocp2.MaxPhysDisks); + mpt_prt(mpt, "IM support: %x", mpt->im_support); + } + } + (void) config_found(&mpt->mpt_dev, lptr, scsiprint); /* done attaching now walk targets and PPR them */ diff --git a/sys/dev/ic/mpt_openbsd.h b/sys/dev/ic/mpt_openbsd.h index 0cdc9ad9338..de95ec82a56 100644 --- a/sys/dev/ic/mpt_openbsd.h +++ b/sys/dev/ic/mpt_openbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpt_openbsd.h,v 1.6 2004/03/20 03:54:16 krw Exp $ */ +/* $OpenBSD: mpt_openbsd.h,v 1.7 2004/07/12 23:57:14 marco Exp $ */ /* $NetBSD: mpt_netbsd.h,v 1.2 2003/04/16 23:02:14 thorpej Exp $ */ /* @@ -204,6 +204,7 @@ typedef struct mpt_softc { uint8_t mpt_max_buses; uint8_t fw_download_boot; uint32_t fw_image_size; + uint32_t im_support; /* Port facts */ uint16_t mpt_ini_id; |