diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-09-28 12:00:11 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-09-28 14:16:49 -0400 |
commit | f62fe77ad26b9c89c2028d96709f0f28793fe6cd (patch) | |
tree | c84a4b8b90219a5385299bd9dcd5b994cd1ff531 /drivers/infiniband/hw/ipath/ipath_eeprom.c | |
parent | 5659416207a9bcf35a646c7b798b290953e4891c (diff) |
IB/ipath: Support multiple simultaneous devices of different types
Prior to this change, the driver was not able to support a HT and PCIE
card simultaneously present in the same machine.
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_eeprom.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_eeprom.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c index 3313356ab93a..c8cfda89cb36 100644 --- a/drivers/infiniband/hw/ipath/ipath_eeprom.c +++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c | |||
@@ -100,9 +100,9 @@ static int i2c_gpio_set(struct ipath_devdata *dd, | |||
100 | gpioval = &dd->ipath_gpio_out; | 100 | gpioval = &dd->ipath_gpio_out; |
101 | read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl); | 101 | read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl); |
102 | if (line == i2c_line_scl) | 102 | if (line == i2c_line_scl) |
103 | mask = ipath_gpio_scl; | 103 | mask = dd->ipath_gpio_scl; |
104 | else | 104 | else |
105 | mask = ipath_gpio_sda; | 105 | mask = dd->ipath_gpio_sda; |
106 | 106 | ||
107 | if (new_line_state == i2c_line_high) | 107 | if (new_line_state == i2c_line_high) |
108 | /* tri-state the output rather than force high */ | 108 | /* tri-state the output rather than force high */ |
@@ -119,12 +119,12 @@ static int i2c_gpio_set(struct ipath_devdata *dd, | |||
119 | write_val = 0x0UL; | 119 | write_val = 0x0UL; |
120 | 120 | ||
121 | if (line == i2c_line_scl) { | 121 | if (line == i2c_line_scl) { |
122 | write_val <<= ipath_gpio_scl_num; | 122 | write_val <<= dd->ipath_gpio_scl_num; |
123 | *gpioval = *gpioval & ~(1UL << ipath_gpio_scl_num); | 123 | *gpioval = *gpioval & ~(1UL << dd->ipath_gpio_scl_num); |
124 | *gpioval |= write_val; | 124 | *gpioval |= write_val; |
125 | } else { | 125 | } else { |
126 | write_val <<= ipath_gpio_sda_num; | 126 | write_val <<= dd->ipath_gpio_sda_num; |
127 | *gpioval = *gpioval & ~(1UL << ipath_gpio_sda_num); | 127 | *gpioval = *gpioval & ~(1UL << dd->ipath_gpio_sda_num); |
128 | *gpioval |= write_val; | 128 | *gpioval |= write_val; |
129 | } | 129 | } |
130 | ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_out, *gpioval); | 130 | ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_out, *gpioval); |
@@ -157,9 +157,9 @@ static int i2c_gpio_get(struct ipath_devdata *dd, | |||
157 | read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl); | 157 | read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extctrl); |
158 | /* config line to be an input */ | 158 | /* config line to be an input */ |
159 | if (line == i2c_line_scl) | 159 | if (line == i2c_line_scl) |
160 | mask = ipath_gpio_scl; | 160 | mask = dd->ipath_gpio_scl; |
161 | else | 161 | else |
162 | mask = ipath_gpio_sda; | 162 | mask = dd->ipath_gpio_sda; |
163 | write_val = read_val & ~mask; | 163 | write_val = read_val & ~mask; |
164 | ipath_write_kreg(dd, dd->ipath_kregs->kr_extctrl, write_val); | 164 | ipath_write_kreg(dd, dd->ipath_kregs->kr_extctrl, write_val); |
165 | read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extstatus); | 165 | read_val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_extstatus); |