diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2005-08-03 16:59:04 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-03 17:22:20 -0400 |
commit | 88ff29a4a5a8c4e0ecf375f783be071d1e7e264d (patch) | |
tree | d290f846932594341702baeb7b30ae73c86daa71 /drivers/scsi/aic7xxx | |
parent | d872ebe4549576e7aab60ed7c746193196381dd0 (diff) |
[SCSI] aic79xx: add hold_mcs to the transport parameters
since this card can support the setting, add it to the parameter list.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 10a2570ca387..982a74a145f7 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -1628,7 +1628,8 @@ ahd_send_async(struct ahd_softc *ahd, char channel, | |||
1628 | + (spi_rd_strm(starget) ? MSG_EXT_PPR_RD_STRM : 0) | 1628 | + (spi_rd_strm(starget) ? MSG_EXT_PPR_RD_STRM : 0) |
1629 | + (spi_pcomp_en(starget) ? MSG_EXT_PPR_PCOMP_EN : 0) | 1629 | + (spi_pcomp_en(starget) ? MSG_EXT_PPR_PCOMP_EN : 0) |
1630 | + (spi_rti(starget) ? MSG_EXT_PPR_RTI : 0) | 1630 | + (spi_rti(starget) ? MSG_EXT_PPR_RTI : 0) |
1631 | + (spi_wr_flow(starget) ? MSG_EXT_PPR_WR_FLOW : 0); | 1631 | + (spi_wr_flow(starget) ? MSG_EXT_PPR_WR_FLOW : 0) |
1632 | + (spi_hold_mcs(starget) ? MSG_EXT_PPR_HOLD_MCS : 0); | ||
1632 | 1633 | ||
1633 | if (tinfo->curr.period == spi_period(starget) | 1634 | if (tinfo->curr.period == spi_period(starget) |
1634 | && tinfo->curr.width == spi_width(starget) | 1635 | && tinfo->curr.width == spi_width(starget) |
@@ -1647,6 +1648,7 @@ ahd_send_async(struct ahd_softc *ahd, char channel, | |||
1647 | spi_pcomp_en(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_PCOMP_EN ? 1 : 0; | 1648 | spi_pcomp_en(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_PCOMP_EN ? 1 : 0; |
1648 | spi_rti(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RTI ? 1 : 0; | 1649 | spi_rti(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RTI ? 1 : 0; |
1649 | spi_wr_flow(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_WR_FLOW ? 1 : 0; | 1650 | spi_wr_flow(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_WR_FLOW ? 1 : 0; |
1651 | spi_hold_mcs(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_HOLD_MCS ? 1 : 0; | ||
1650 | spi_display_xfer_agreement(starget); | 1652 | spi_display_xfer_agreement(starget); |
1651 | break; | 1653 | break; |
1652 | } | 1654 | } |
@@ -2697,6 +2699,38 @@ static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp) | |||
2697 | ahd_unlock(ahd, &flags); | 2699 | ahd_unlock(ahd, &flags); |
2698 | } | 2700 | } |
2699 | 2701 | ||
2702 | static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold) | ||
2703 | { | ||
2704 | struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); | ||
2705 | struct ahd_softc *ahd = *((struct ahd_softc **)shost->hostdata); | ||
2706 | struct ahd_tmode_tstate *tstate; | ||
2707 | struct ahd_initiator_tinfo *tinfo | ||
2708 | = ahd_fetch_transinfo(ahd, | ||
2709 | starget->channel + 'A', | ||
2710 | shost->this_id, starget->id, &tstate); | ||
2711 | struct ahd_devinfo devinfo; | ||
2712 | unsigned int ppr_options = tinfo->goal.ppr_options | ||
2713 | & ~MSG_EXT_PPR_HOLD_MCS; | ||
2714 | unsigned int period = tinfo->goal.period; | ||
2715 | unsigned int dt = ppr_options & MSG_EXT_PPR_DT_REQ; | ||
2716 | unsigned long flags; | ||
2717 | |||
2718 | if (hold) | ||
2719 | ppr_options |= MSG_EXT_PPR_HOLD_MCS; | ||
2720 | |||
2721 | ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, | ||
2722 | starget->channel + 'A', ROLE_INITIATOR); | ||
2723 | ahd_find_syncrate(ahd, &period, &ppr_options, | ||
2724 | dt ? AHD_SYNCRATE_MAX : AHD_SYNCRATE_ULTRA2); | ||
2725 | |||
2726 | ahd_lock(ahd, &flags); | ||
2727 | ahd_set_syncrate(ahd, &devinfo, period, tinfo->goal.offset, | ||
2728 | ppr_options, AHD_TRANS_GOAL, FALSE); | ||
2729 | ahd_unlock(ahd, &flags); | ||
2730 | } | ||
2731 | |||
2732 | |||
2733 | |||
2700 | static struct spi_function_template ahd_linux_transport_functions = { | 2734 | static struct spi_function_template ahd_linux_transport_functions = { |
2701 | .set_offset = ahd_linux_set_offset, | 2735 | .set_offset = ahd_linux_set_offset, |
2702 | .show_offset = 1, | 2736 | .show_offset = 1, |
@@ -2718,6 +2752,8 @@ static struct spi_function_template ahd_linux_transport_functions = { | |||
2718 | .show_rti = 1, | 2752 | .show_rti = 1, |
2719 | .set_pcomp_en = ahd_linux_set_pcomp_en, | 2753 | .set_pcomp_en = ahd_linux_set_pcomp_en, |
2720 | .show_pcomp_en = 1, | 2754 | .show_pcomp_en = 1, |
2755 | .set_hold_mcs = ahd_linux_set_hold_mcs, | ||
2756 | .show_hold_mcs = 1, | ||
2721 | }; | 2757 | }; |
2722 | 2758 | ||
2723 | 2759 | ||