@@ -218,7 +218,7 @@ lcs_setup_read_ccws(struct lcs_card *card)
218218 * we do not need to do set_normalized_cda.
219219 */
220220 card -> read .ccws [cnt ].cda =
221- ( __u32 ) virt_to_phys (card -> read .iob [cnt ].data );
221+ virt_to_dma32 (card -> read .iob [cnt ].data );
222222 ((struct lcs_header * )
223223 card -> read .iob [cnt ].data )-> offset = LCS_ILLEGAL_OFFSET ;
224224 card -> read .iob [cnt ].callback = lcs_get_frames_cb ;
@@ -230,8 +230,7 @@ lcs_setup_read_ccws(struct lcs_card *card)
230230 card -> read .ccws [LCS_NUM_BUFFS - 1 ].flags |= CCW_FLAG_SUSPEND ;
231231 /* Last ccw is a tic (transfer in channel). */
232232 card -> read .ccws [LCS_NUM_BUFFS ].cmd_code = LCS_CCW_TRANSFER ;
233- card -> read .ccws [LCS_NUM_BUFFS ].cda =
234- (__u32 )virt_to_phys (card -> read .ccws );
233+ card -> read .ccws [LCS_NUM_BUFFS ].cda = virt_to_dma32 (card -> read .ccws );
235234 /* Setg initial state of the read channel. */
236235 card -> read .state = LCS_CH_STATE_INIT ;
237236
@@ -273,12 +272,11 @@ lcs_setup_write_ccws(struct lcs_card *card)
273272 * we do not need to do set_normalized_cda.
274273 */
275274 card -> write .ccws [cnt ].cda =
276- ( __u32 ) virt_to_phys (card -> write .iob [cnt ].data );
275+ virt_to_dma32 (card -> write .iob [cnt ].data );
277276 }
278277 /* Last ccw is a tic (transfer in channel). */
279278 card -> write .ccws [LCS_NUM_BUFFS ].cmd_code = LCS_CCW_TRANSFER ;
280- card -> write .ccws [LCS_NUM_BUFFS ].cda =
281- (__u32 )virt_to_phys (card -> write .ccws );
279+ card -> write .ccws [LCS_NUM_BUFFS ].cda = virt_to_dma32 (card -> write .ccws );
282280 /* Set initial state of the write channel. */
283281 card -> read .state = LCS_CH_STATE_INIT ;
284282
@@ -1399,7 +1397,7 @@ lcs_irq(struct ccw_device *cdev, unsigned long intparm, struct irb *irb)
13991397 if ((channel -> state != LCS_CH_STATE_INIT ) &&
14001398 (irb -> scsw .cmd .fctl & SCSW_FCTL_START_FUNC ) &&
14011399 (irb -> scsw .cmd .cpa != 0 )) {
1402- index = (struct ccw1 * ) __va (( addr_t ) irb -> scsw .cmd .cpa )
1400+ index = (struct ccw1 * )dma32_to_virt ( irb -> scsw .cmd .cpa )
14031401 - channel -> ccws ;
14041402 if ((irb -> scsw .cmd .actl & SCSW_ACTL_SUSPENDED ) ||
14051403 (irb -> scsw .cmd .cstat & SCHN_STAT_PCI ))
0 commit comments