diff options
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_glue.c')
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index c1d9f6989664..55012970912b 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c | |||
@@ -1265,31 +1265,6 @@ static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev) | |||
1265 | } | 1265 | } |
1266 | 1266 | ||
1267 | /* | 1267 | /* |
1268 | * Ask/tell the system about DMA addressing. | ||
1269 | */ | ||
1270 | static int sym_setup_bus_dma_mask(struct sym_hcb *np) | ||
1271 | { | ||
1272 | #if SYM_CONF_DMA_ADDRESSING_MODE > 0 | ||
1273 | #if SYM_CONF_DMA_ADDRESSING_MODE == 1 | ||
1274 | #define DMA_DAC_MASK DMA_40BIT_MASK | ||
1275 | #elif SYM_CONF_DMA_ADDRESSING_MODE == 2 | ||
1276 | #define DMA_DAC_MASK DMA_64BIT_MASK | ||
1277 | #endif | ||
1278 | if ((np->features & FE_DAC) && | ||
1279 | !pci_set_dma_mask(np->s.device, DMA_DAC_MASK)) { | ||
1280 | np->use_dac = 1; | ||
1281 | return 0; | ||
1282 | } | ||
1283 | #endif | ||
1284 | |||
1285 | if (!pci_set_dma_mask(np->s.device, DMA_32BIT_MASK)) | ||
1286 | return 0; | ||
1287 | |||
1288 | printf_warning("%s: No suitable DMA available\n", sym_name(np)); | ||
1289 | return -1; | ||
1290 | } | ||
1291 | |||
1292 | /* | ||
1293 | * Host attach and initialisations. | 1268 | * Host attach and initialisations. |
1294 | * | 1269 | * |
1295 | * Allocate host data and ncb structure. | 1270 | * Allocate host data and ncb structure. |
@@ -1362,8 +1337,13 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt, | |||
1362 | strlcpy(np->s.chip_name, dev->chip.name, sizeof(np->s.chip_name)); | 1337 | strlcpy(np->s.chip_name, dev->chip.name, sizeof(np->s.chip_name)); |
1363 | sprintf(np->s.inst_name, "sym%d", np->s.unit); | 1338 | sprintf(np->s.inst_name, "sym%d", np->s.unit); |
1364 | 1339 | ||
1365 | if (sym_setup_bus_dma_mask(np)) | 1340 | if ((SYM_CONF_DMA_ADDRESSING_MODE > 0) && (np->features & FE_DAC) && |
1341 | !pci_set_dma_mask(np->s.device, DMA_DAC_MASK)) { | ||
1342 | set_dac(np); | ||
1343 | } else if (pci_set_dma_mask(np->s.device, DMA_32BIT_MASK)) { | ||
1344 | printf_warning("%s: No suitable DMA available\n", sym_name(np)); | ||
1366 | goto attach_failed; | 1345 | goto attach_failed; |
1346 | } | ||
1367 | 1347 | ||
1368 | /* | 1348 | /* |
1369 | * Try to map the controller chip to | 1349 | * Try to map the controller chip to |