aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_pci.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 11:49:07 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-10 11:49:07 -0400
commitb2d8bfe18578c4e50e8ba52011c9b260a1b51dac (patch)
treeab949e11e1e6d4e46ccb2bd5f8c9401cf46052a7 /drivers/scsi/aic7xxx/aic7xxx_pci.c
parentb9f051eb6cc013b90cb6062a1e2502e9c0adf0f4 (diff)
[SCSI] aic7xxx: expose the bus setting to sysfs
Read the transciever register and display in the host transport properties. I'm still not entirely sure what this does for multiple transciever adapters (like some 160 ones) however, I suspect it displays the transciever state of the switchable bus segment. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_pci.c')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_pci.c81
1 files changed, 74 insertions, 7 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c
index b1156fbd4a1a..02fed4a02eb3 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c
@@ -144,16 +144,22 @@ static ahc_device_setup_t ahc_aic785X_setup;
144static ahc_device_setup_t ahc_aic7860_setup; 144static ahc_device_setup_t ahc_aic7860_setup;
145static ahc_device_setup_t ahc_apa1480_setup; 145static ahc_device_setup_t ahc_apa1480_setup;
146static ahc_device_setup_t ahc_aic7870_setup; 146static ahc_device_setup_t ahc_aic7870_setup;
147static ahc_device_setup_t ahc_aic7870h_setup;
147static ahc_device_setup_t ahc_aha394X_setup; 148static ahc_device_setup_t ahc_aha394X_setup;
149static ahc_device_setup_t ahc_aha394Xh_setup;
148static ahc_device_setup_t ahc_aha494X_setup; 150static ahc_device_setup_t ahc_aha494X_setup;
151static ahc_device_setup_t ahc_aha494Xh_setup;
149static ahc_device_setup_t ahc_aha398X_setup; 152static ahc_device_setup_t ahc_aha398X_setup;
150static ahc_device_setup_t ahc_aic7880_setup; 153static ahc_device_setup_t ahc_aic7880_setup;
154static ahc_device_setup_t ahc_aic7880h_setup;
151static ahc_device_setup_t ahc_aha2940Pro_setup; 155static ahc_device_setup_t ahc_aha2940Pro_setup;
152static ahc_device_setup_t ahc_aha394XU_setup; 156static ahc_device_setup_t ahc_aha394XU_setup;
157static ahc_device_setup_t ahc_aha394XUh_setup;
153static ahc_device_setup_t ahc_aha398XU_setup; 158static ahc_device_setup_t ahc_aha398XU_setup;
154static ahc_device_setup_t ahc_aic7890_setup; 159static ahc_device_setup_t ahc_aic7890_setup;
155static ahc_device_setup_t ahc_aic7892_setup; 160static ahc_device_setup_t ahc_aic7892_setup;
156static ahc_device_setup_t ahc_aic7895_setup; 161static ahc_device_setup_t ahc_aic7895_setup;
162static ahc_device_setup_t ahc_aic7895h_setup;
157static ahc_device_setup_t ahc_aic7896_setup; 163static ahc_device_setup_t ahc_aic7896_setup;
158static ahc_device_setup_t ahc_aic7899_setup; 164static ahc_device_setup_t ahc_aic7899_setup;
159static ahc_device_setup_t ahc_aha29160C_setup; 165static ahc_device_setup_t ahc_aha29160C_setup;
@@ -225,19 +231,19 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
225 ID_AHA_2944, 231 ID_AHA_2944,
226 ID_ALL_MASK, 232 ID_ALL_MASK,
227 "Adaptec 2944 SCSI adapter", 233 "Adaptec 2944 SCSI adapter",
228 ahc_aic7870_setup 234 ahc_aic7870h_setup
229 }, 235 },
230 { 236 {
231 ID_AHA_3944, 237 ID_AHA_3944,
232 ID_ALL_MASK, 238 ID_ALL_MASK,
233 "Adaptec 3944 SCSI adapter", 239 "Adaptec 3944 SCSI adapter",
234 ahc_aha394X_setup 240 ahc_aha394Xh_setup
235 }, 241 },
236 { 242 {
237 ID_AHA_4944, 243 ID_AHA_4944,
238 ID_ALL_MASK, 244 ID_ALL_MASK,
239 "Adaptec 4944 SCSI adapter", 245 "Adaptec 4944 SCSI adapter",
240 ahc_aha494X_setup 246 ahc_aha494Xh_setup
241 }, 247 },
242 /* aic7880 based controllers */ 248 /* aic7880 based controllers */
243 { 249 {
@@ -256,13 +262,13 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
256 ID_AHA_2944U & ID_DEV_VENDOR_MASK, 262 ID_AHA_2944U & ID_DEV_VENDOR_MASK,
257 ID_DEV_VENDOR_MASK, 263 ID_DEV_VENDOR_MASK,
258 "Adaptec 2944 Ultra SCSI adapter", 264 "Adaptec 2944 Ultra SCSI adapter",
259 ahc_aic7880_setup 265 ahc_aic7880h_setup
260 }, 266 },
261 { 267 {
262 ID_AHA_3944U & ID_DEV_VENDOR_MASK, 268 ID_AHA_3944U & ID_DEV_VENDOR_MASK,
263 ID_DEV_VENDOR_MASK, 269 ID_DEV_VENDOR_MASK,
264 "Adaptec 3944 Ultra SCSI adapter", 270 "Adaptec 3944 Ultra SCSI adapter",
265 ahc_aha394XU_setup 271 ahc_aha394XUh_setup
266 }, 272 },
267 { 273 {
268 ID_AHA_398XU & ID_DEV_VENDOR_MASK, 274 ID_AHA_398XU & ID_DEV_VENDOR_MASK,
@@ -278,7 +284,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
278 ID_AHA_4944U & ID_DEV_VENDOR_MASK, 284 ID_AHA_4944U & ID_DEV_VENDOR_MASK,
279 ID_DEV_VENDOR_MASK, 285 ID_DEV_VENDOR_MASK,
280 "Adaptec 4944 Ultra SCSI adapter", 286 "Adaptec 4944 Ultra SCSI adapter",
281 ahc_aic7880_setup 287 ahc_aic7880h_setup
282 }, 288 },
283 { 289 {
284 ID_AHA_2930U & ID_DEV_VENDOR_MASK, 290 ID_AHA_2930U & ID_DEV_VENDOR_MASK,
@@ -414,7 +420,7 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
414 ID_AHA_3944AU, 420 ID_AHA_3944AU,
415 ID_ALL_MASK, 421 ID_ALL_MASK,
416 "Adaptec 3944A Ultra SCSI adapter", 422 "Adaptec 3944A Ultra SCSI adapter",
417 ahc_aic7895_setup 423 ahc_aic7895h_setup
418 }, 424 },
419 { 425 {
420 ID_AIC7895_ARO, 426 ID_AIC7895_ARO,
@@ -2121,6 +2127,16 @@ ahc_aic7870_setup(struct ahc_softc *ahc)
2121} 2127}
2122 2128
2123static int 2129static int
2130ahc_aic7870h_setup(struct ahc_softc *ahc)
2131{
2132 int error = ahc_aic7870_setup(ahc);
2133
2134 ahc->features |= AHC_HVD;
2135
2136 return error;
2137}
2138
2139static int
2124ahc_aha394X_setup(struct ahc_softc *ahc) 2140ahc_aha394X_setup(struct ahc_softc *ahc)
2125{ 2141{
2126 int error; 2142 int error;
@@ -2132,6 +2148,16 @@ ahc_aha394X_setup(struct ahc_softc *ahc)
2132} 2148}
2133 2149
2134static int 2150static int
2151ahc_aha394Xh_setup(struct ahc_softc *ahc)
2152{
2153 int error = ahc_aha394X_setup(ahc);
2154
2155 ahc->features |= AHC_HVD;
2156
2157 return error;
2158}
2159
2160static int
2135ahc_aha398X_setup(struct ahc_softc *ahc) 2161ahc_aha398X_setup(struct ahc_softc *ahc)
2136{ 2162{
2137 int error; 2163 int error;
@@ -2154,6 +2180,16 @@ ahc_aha494X_setup(struct ahc_softc *ahc)
2154} 2180}
2155 2181
2156static int 2182static int
2183ahc_aha494Xh_setup(struct ahc_softc *ahc)
2184{
2185 int error = ahc_aha494X_setup(ahc);
2186
2187 ahc->features |= AHC_HVD;
2188
2189 return error;
2190}
2191
2192static int
2157ahc_aic7880_setup(struct ahc_softc *ahc) 2193ahc_aic7880_setup(struct ahc_softc *ahc)
2158{ 2194{
2159 ahc_dev_softc_t pci; 2195 ahc_dev_softc_t pci;
@@ -2175,6 +2211,17 @@ ahc_aic7880_setup(struct ahc_softc *ahc)
2175} 2211}
2176 2212
2177static int 2213static int
2214ahc_aic7880h_setup(struct ahc_softc *ahc)
2215{
2216 int error = ahc_aic7880_setup(ahc);
2217
2218 ahc->features |= AHC_HVD;
2219
2220 return error;
2221}
2222
2223
2224static int
2178ahc_aha2940Pro_setup(struct ahc_softc *ahc) 2225ahc_aha2940Pro_setup(struct ahc_softc *ahc)
2179{ 2226{
2180 2227
@@ -2194,6 +2241,16 @@ ahc_aha394XU_setup(struct ahc_softc *ahc)
2194} 2241}
2195 2242
2196static int 2243static int
2244ahc_aha394XUh_setup(struct ahc_softc *ahc)
2245{
2246 int error = ahc_aha394XU_setup(ahc);
2247
2248 ahc->features |= AHC_HVD;
2249
2250 return error;
2251}
2252
2253static int
2197ahc_aha398XU_setup(struct ahc_softc *ahc) 2254ahc_aha398XU_setup(struct ahc_softc *ahc)
2198{ 2255{
2199 int error; 2256 int error;
@@ -2292,6 +2349,16 @@ ahc_aic7895_setup(struct ahc_softc *ahc)
2292} 2349}
2293 2350
2294static int 2351static int
2352ahc_aic7895h_setup(struct ahc_softc *ahc)
2353{
2354 int error = ahc_aic7895_setup(ahc);
2355
2356 ahc->features |= AHC_HVD;
2357
2358 return error;
2359}
2360
2361static int
2295ahc_aic7896_setup(struct ahc_softc *ahc) 2362ahc_aic7896_setup(struct ahc_softc *ahc)
2296{ 2363{
2297 ahc_dev_softc_t pci; 2364 ahc_dev_softc_t pci;