Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63137
b: refs/heads/master
c: 0f82cb9
h: refs/heads/master
i:
  63135: a57a968
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jul 27, 2007
1 parent e8481a8 commit e96d29c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 281afe1947d855661754850de29d7530b2ff18dc
refs/heads/master: 0f82cb9211f800f77636af11f0670e5fc6de6256
23 changes: 13 additions & 10 deletions trunk/drivers/scsi/aic7xxx/aic79xx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2284,9 +2284,12 @@ static void ahd_linux_set_period(struct scsi_target *starget, int period)
if (period < 8)
period = 8;
if (period < 10) {
ppr_options |= MSG_EXT_PPR_DT_REQ;
if (period == 8)
ppr_options |= MSG_EXT_PPR_IU_REQ;
if (spi_max_width(starget)) {
ppr_options |= MSG_EXT_PPR_DT_REQ;
if (period == 8)
ppr_options |= MSG_EXT_PPR_IU_REQ;
} else
period = 10;
}

dt = ppr_options & MSG_EXT_PPR_DT_REQ;
Expand Down Expand Up @@ -2365,7 +2368,7 @@ static void ahd_linux_set_dt(struct scsi_target *starget, int dt)
printf("%s: %s DT\n", ahd_name(ahd),
dt ? "enabling" : "disabling");
#endif
if (dt) {
if (dt && spi_max_width(starget)) {
ppr_options |= MSG_EXT_PPR_DT_REQ;
if (!width)
ahd_linux_set_width(starget, 1);
Expand Down Expand Up @@ -2447,7 +2450,7 @@ static void ahd_linux_set_iu(struct scsi_target *starget, int iu)
iu ? "enabling" : "disabling");
#endif

if (iu) {
if (iu && spi_max_width(starget)) {
ppr_options |= MSG_EXT_PPR_IU_REQ;
ppr_options |= MSG_EXT_PPR_DT_REQ; /* IU requires DT */
}
Expand Down Expand Up @@ -2487,7 +2490,7 @@ static void ahd_linux_set_rd_strm(struct scsi_target *starget, int rdstrm)
rdstrm ? "enabling" : "disabling");
#endif

if (rdstrm)
if (rdstrm && spi_max_width(starget))
ppr_options |= MSG_EXT_PPR_RD_STRM;

ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
Expand Down Expand Up @@ -2523,7 +2526,7 @@ static void ahd_linux_set_wr_flow(struct scsi_target *starget, int wrflow)
wrflow ? "enabling" : "disabling");
#endif

if (wrflow)
if (wrflow && spi_max_width(starget))
ppr_options |= MSG_EXT_PPR_WR_FLOW;

ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
Expand Down Expand Up @@ -2567,7 +2570,7 @@ static void ahd_linux_set_rti(struct scsi_target *starget, int rti)
rti ? "enabling" : "disabling");
#endif

if (rti)
if (rti && spi_max_width(starget))
ppr_options |= MSG_EXT_PPR_RTI;

ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
Expand Down Expand Up @@ -2603,7 +2606,7 @@ static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp)
pcomp ? "Enable" : "Disable");
#endif

if (pcomp) {
if (pcomp && spi_max_width(starget)) {
uint8_t precomp;

if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) {
Expand Down Expand Up @@ -2647,7 +2650,7 @@ static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold)
unsigned int dt = ppr_options & MSG_EXT_PPR_DT_REQ;
unsigned long flags;

if (hold)
if (hold && spi_max_width(starget))
ppr_options |= MSG_EXT_PPR_HOLD_MCS;

ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2317,8 +2317,13 @@ static void ahc_linux_set_period(struct scsi_target *starget, int period)

if (period < 9)
period = 9; /* 12.5ns is our minimum */
if (period == 9)
ppr_options |= MSG_EXT_PPR_DT_REQ;
if (period == 9) {
if (spi_max_width(starget))
ppr_options |= MSG_EXT_PPR_DT_REQ;
else
/* need wide for DT and need DT for 12.5 ns */
period = 10;
}

ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
starget->channel + 'A', ROLE_INITIATOR);
Expand Down Expand Up @@ -2381,7 +2386,7 @@ static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
unsigned long flags;
struct ahc_syncrate *syncrate;

if (dt) {
if (dt && spi_max_width(starget)) {
ppr_options |= MSG_EXT_PPR_DT_REQ;
if (!width)
ahc_linux_set_width(starget, 1);
Expand Down

0 comments on commit e96d29c

Please sign in to comment.