summaryrefslogtreecommitdiffstats
path: root/sys/dev/mpt/mpt.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2012-02-11 12:03:44 +0000
committermarius <marius@FreeBSD.org>2012-02-11 12:03:44 +0000
commita986d587bd4ceace64bd00b8ad1e19474ad02cec (patch)
treef7bc89190c9895aaa4aa5f073c1ef597eda7019f /sys/dev/mpt/mpt.c
parent790a771dba50db70470910177bff9607f056af64 (diff)
downloadFreeBSD-src-a986d587bd4ceace64bd00b8ad1e19474ad02cec.zip
FreeBSD-src-a986d587bd4ceace64bd00b8ad1e19474ad02cec.tar.gz
Flesh out support for SAS1078 and SAS1078DE (which are said to actually
be the same chip): - The I/O port resource may not be available with these. However, given that we actually only need this resource for some controllers that require their firmware to be up- and downloaded (which excludes the SAS1078{,DE}) just handle failure to allocate this resource gracefully when possible. While at it, generally put non-fatal resource allocation failures under bootverbose. - SAS1078{,DE} use a different hard reset protocol. - Add workarounds for the 36GB physical address limitation of scatter/ gather elements of these controllers. Tested by: Slawa Olhovchenkov PR: 149220 (remaining part)
Diffstat (limited to 'sys/dev/mpt/mpt.c')
-rw-r--r--sys/dev/mpt/mpt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/mpt/mpt.c b/sys/dev/mpt/mpt.c
index 7c36061..a95c742 100644
--- a/sys/dev/mpt/mpt.c
+++ b/sys/dev/mpt/mpt.c
@@ -1053,6 +1053,12 @@ mpt_hard_reset(struct mpt_softc *mpt)
mpt_lprt(mpt, MPT_PRT_DEBUG, "hard reset\n");
+ if (mpt->is_1078) {
+ mpt_write(mpt, MPT_OFFSET_RESET_1078, 0x07);
+ DELAY(1000);
+ return;
+ }
+
error = mpt_enable_diag_mode(mpt);
if (error) {
mpt_prt(mpt, "WARNING - Could not enter diagnostic mode !\n");
@@ -2450,6 +2456,11 @@ mpt_download_fw(struct mpt_softc *mpt)
uint32_t ext_offset;
uint32_t data;
+ if (mpt->pci_pio_reg == NULL) {
+ mpt_prt(mpt, "No PIO resource!\n");
+ return (ENXIO);
+ }
+
mpt_prt(mpt, "Downloading Firmware - Image Size %d\n",
mpt->fw_image_size);
OpenPOWER on IntegriCloud