diff options
author | Marius Strobl <marius@FreeBSD.org> | 2010-04-27 18:41:16 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2010-04-27 18:41:16 +0000 |
commit | 8ba5efbd6fa32d1ca0ca6cfcc6cde9201b3c5c73 (patch) | |
tree | a3ecc08804e75344742bf013975640a81bf86500 /sys/dev/mpt/mpt.h | |
parent | a8217f5c2e29f3e676d274ac99a7982f0dc5c90c (diff) | |
download | src-8ba5efbd6fa32d1ca0ca6cfcc6cde9201b3c5c73.tar.gz src-8ba5efbd6fa32d1ca0ca6cfcc6cde9201b3c5c73.zip |
On sparc64 obtain the initiator ID to be used for SPI HBAs from the
Open Firmware device tree in order to match what the PROM built-in
driver uses. This is especially important when netbooting Fujitsu
Siemens PRIMEPOWER250 as in that case the built-in driver isn't used
and the port facts PortSCSIID defaults to 0, conflicting with the
disk at the same address.
Notes
Notes:
svn path=/head/; revision=207287
Diffstat (limited to 'sys/dev/mpt/mpt.h')
-rw-r--r-- | sys/dev/mpt/mpt.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/mpt/mpt.h b/sys/dev/mpt/mpt.h index 1fa2d1aaded8..ab4cfa6c4ff1 100644 --- a/sys/dev/mpt/mpt.h +++ b/sys/dev/mpt/mpt.h @@ -130,6 +130,11 @@ #include <machine/clock.h> #endif +#ifdef __sparc64__ +#include <dev/ofw/openfirm.h> +#include <machine/ofw_machdep.h> +#endif + #include <sys/rman.h> #if __FreeBSD_version < 500000 @@ -172,6 +177,8 @@ #define MPT_ROLE_BOTH 3 #define MPT_ROLE_DEFAULT MPT_ROLE_INITIATOR +#define MPT_INI_ID_NONE -1 + /**************************** Forward Declarations ****************************/ struct mpt_softc; struct mpt_personality; @@ -637,7 +644,6 @@ struct mpt_softc { * Port Facts */ MSG_PORT_FACTS_REPLY * port_facts; -#define mpt_ini_id port_facts[0].PortSCSIID #define mpt_max_tgtcmds port_facts[0].MaxPostedCmdBuffers /* @@ -650,6 +656,7 @@ struct mpt_softc { CONFIG_PAGE_SCSI_PORT_2 _port_page2; CONFIG_PAGE_SCSI_DEVICE_0 _dev_page0[16]; CONFIG_PAGE_SCSI_DEVICE_1 _dev_page1[16]; + int _ini_id; uint16_t _tag_enable; uint16_t _disc_enable; } spi; @@ -658,6 +665,7 @@ struct mpt_softc { #define mpt_port_page2 cfg.spi._port_page2 #define mpt_dev_page0 cfg.spi._dev_page0 #define mpt_dev_page1 cfg.spi._dev_page1 +#define mpt_ini_id cfg.spi._ini_id #define mpt_tag_enable cfg.spi._tag_enable #define mpt_disc_enable cfg.spi._disc_enable struct mpi_fc_cfg { |