diff options
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 00d48a0fb7e1..0fbd1ec58340 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -481,6 +481,7 @@ ahd_linux_target_alloc(struct scsi_target *starget) | |||
481 | { | 481 | { |
482 | struct ahd_softc *ahd = | 482 | struct ahd_softc *ahd = |
483 | *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); | 483 | *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); |
484 | struct seeprom_config *sc = ahd->seep_config; | ||
484 | unsigned long flags; | 485 | unsigned long flags; |
485 | struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget); | 486 | struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget); |
486 | struct ahd_linux_target *targ = scsi_transport_target_data(starget); | 487 | struct ahd_linux_target *targ = scsi_transport_target_data(starget); |
@@ -496,18 +497,38 @@ ahd_linux_target_alloc(struct scsi_target *starget) | |||
496 | *ahd_targp = starget; | 497 | *ahd_targp = starget; |
497 | memset(targ, 0, sizeof(*targ)); | 498 | memset(targ, 0, sizeof(*targ)); |
498 | 499 | ||
500 | if (sc) { | ||
501 | int flags = sc->device_flags[starget->id]; | ||
502 | |||
503 | tinfo = ahd_fetch_transinfo(ahd, 'A', ahd->our_id, | ||
504 | starget->id, &tstate); | ||
505 | |||
506 | if ((flags & CFPACKETIZED) == 0) { | ||
507 | /* Do not negotiate packetized transfers */ | ||
508 | spi_rd_strm(starget) = 0; | ||
509 | spi_pcomp_en(starget) = 0; | ||
510 | spi_rti(starget) = 0; | ||
511 | spi_wr_flow(starget) = 0; | ||
512 | spi_hold_mcs(starget) = 0; | ||
513 | } else { | ||
514 | if ((ahd->features & AHD_RTI) == 0) | ||
515 | spi_rti(starget) = 0; | ||
516 | } | ||
517 | |||
518 | if ((flags & CFQAS) == 0) | ||
519 | spi_qas(starget) = 0; | ||
520 | |||
521 | /* Transinfo values have been set to BIOS settings */ | ||
522 | spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0; | ||
523 | spi_min_period(starget) = tinfo->user.period; | ||
524 | spi_max_offset(starget) = tinfo->user.offset; | ||
525 | } | ||
526 | |||
499 | tinfo = ahd_fetch_transinfo(ahd, channel, ahd->our_id, | 527 | tinfo = ahd_fetch_transinfo(ahd, channel, ahd->our_id, |
500 | starget->id, &tstate); | 528 | starget->id, &tstate); |
501 | ahd_compile_devinfo(&devinfo, ahd->our_id, starget->id, | 529 | ahd_compile_devinfo(&devinfo, ahd->our_id, starget->id, |
502 | CAM_LUN_WILDCARD, channel, | 530 | CAM_LUN_WILDCARD, channel, |
503 | ROLE_INITIATOR); | 531 | ROLE_INITIATOR); |
504 | spi_min_period(starget) = AHD_SYNCRATE_MAX; /* We can do U320 */ | ||
505 | if ((ahd->bugs & AHD_PACED_NEGTABLE_BUG) != 0) | ||
506 | spi_max_offset(starget) = MAX_OFFSET_PACED_BUG; | ||
507 | else | ||
508 | spi_max_offset(starget) = MAX_OFFSET_PACED; | ||
509 | spi_max_width(starget) = ahd->features & AHD_WIDE; | ||
510 | |||
511 | ahd_set_syncrate(ahd, &devinfo, 0, 0, 0, | 532 | ahd_set_syncrate(ahd, &devinfo, 0, 0, 0, |
512 | AHD_TRANS_GOAL, /*paused*/FALSE); | 533 | AHD_TRANS_GOAL, /*paused*/FALSE); |
513 | ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, | 534 | ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, |