aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_hipd.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2005-11-29 23:08:33 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-13 20:11:39 -0500
commit44f30b0f59d628eb6f57cfa9d8ab06da670e5306 (patch)
tree2d272ce9c67c8b18685eb3828f10734b6a372f7d /drivers/scsi/sym53c8xx_2/sym_hipd.c
parent84e203a279d3de1c8a41a73ab45e55a89bc19345 (diff)
[SCSI] sym2: Remove code to handle DMA_BIDIRECTION requests
The upper layer doesn't send these down since 2.4.x (or 2.6 in practice), so no need to handle it. Inline sym_setup_data_pointers into its only caller so we can fail gracefully in the case we'd get one neverless. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_hipd.c')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index bec644850d3b..b4f0d9a4a55a 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -3654,7 +3654,7 @@ static int sym_evaluate_dp(struct sym_hcb *np, struct sym_ccb *cp, u32 scr, int
3654 * If result is dp_sg = SYM_CONF_MAX_SG, then we are at the 3654 * If result is dp_sg = SYM_CONF_MAX_SG, then we are at the
3655 * end of the data. 3655 * end of the data.
3656 */ 3656 */
3657 tmp = scr_to_cpu(sym_goalp(cp)); 3657 tmp = scr_to_cpu(cp->goalp);
3658 dp_sg = SYM_CONF_MAX_SG; 3658 dp_sg = SYM_CONF_MAX_SG;
3659 if (dp_scr != tmp) 3659 if (dp_scr != tmp)
3660 dp_sg -= (tmp - 8 - (int)dp_scr) / (2*4); 3660 dp_sg -= (tmp - 8 - (int)dp_scr) / (2*4);
@@ -3761,7 +3761,7 @@ static void sym_modify_dp(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb
3761 * And our alchemy:) allows to easily calculate the data 3761 * And our alchemy:) allows to easily calculate the data
3762 * script address we want to return for the next data phase. 3762 * script address we want to return for the next data phase.
3763 */ 3763 */
3764 dp_ret = cpu_to_scr(sym_goalp(cp)); 3764 dp_ret = cpu_to_scr(cp->goalp);
3765 dp_ret = dp_ret - 8 - (SYM_CONF_MAX_SG - dp_sg) * (2*4); 3765 dp_ret = dp_ret - 8 - (SYM_CONF_MAX_SG - dp_sg) * (2*4);
3766 3766
3767 /* 3767 /*
@@ -3857,7 +3857,7 @@ int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp)
3857 * If all data has been transferred, 3857 * If all data has been transferred,
3858 * there is no residual. 3858 * there is no residual.
3859 */ 3859 */
3860 if (cp->phys.head.lastp == sym_goalp(cp)) 3860 if (cp->phys.head.lastp == cp->goalp)
3861 return resid; 3861 return resid;
3862 3862
3863 /* 3863 /*
@@ -5470,7 +5470,7 @@ void sym_complete_ok (struct sym_hcb *np, struct sym_ccb *cp)
5470 * extended error did occur, there is no residual. 5470 * extended error did occur, there is no residual.
5471 */ 5471 */
5472 resid = 0; 5472 resid = 0;
5473 if (cp->phys.head.lastp != sym_goalp(cp)) 5473 if (cp->phys.head.lastp != cp->goalp)
5474 resid = sym_compute_residual(np, cp); 5474 resid = sym_compute_residual(np, cp);
5475 5475
5476 /* 5476 /*