Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/net: sort out physical vs virtual pointers usage

Fix virtual vs physical address confusion (which currently are the same).

Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Alexander Gordeev and committed by
Jakub Kicinski
1bb7e8df ab847d03

+5 -5
+4 -4
drivers/s390/net/lcs.c
··· 223 223 * we do not need to do set_normalized_cda. 224 224 */ 225 225 card->read.ccws[cnt].cda = 226 - (__u32) __pa(card->read.iob[cnt].data); 226 + (__u32)virt_to_phys(card->read.iob[cnt].data); 227 227 ((struct lcs_header *) 228 228 card->read.iob[cnt].data)->offset = LCS_ILLEGAL_OFFSET; 229 229 card->read.iob[cnt].callback = lcs_get_frames_cb; ··· 236 236 /* Last ccw is a tic (transfer in channel). */ 237 237 card->read.ccws[LCS_NUM_BUFFS].cmd_code = LCS_CCW_TRANSFER; 238 238 card->read.ccws[LCS_NUM_BUFFS].cda = 239 - (__u32) __pa(card->read.ccws); 239 + (__u32)virt_to_phys(card->read.ccws); 240 240 /* Setg initial state of the read channel. */ 241 241 card->read.state = LCS_CH_STATE_INIT; 242 242 ··· 278 278 * we do not need to do set_normalized_cda. 279 279 */ 280 280 card->write.ccws[cnt].cda = 281 - (__u32) __pa(card->write.iob[cnt].data); 281 + (__u32)virt_to_phys(card->write.iob[cnt].data); 282 282 } 283 283 /* Last ccw is a tic (transfer in channel). */ 284 284 card->write.ccws[LCS_NUM_BUFFS].cmd_code = LCS_CCW_TRANSFER; 285 285 card->write.ccws[LCS_NUM_BUFFS].cda = 286 - (__u32) __pa(card->write.ccws); 286 + (__u32)virt_to_phys(card->write.ccws); 287 287 /* Set initial state of the write channel. */ 288 288 card->read.state = LCS_CH_STATE_INIT; 289 289
+1 -1
drivers/s390/net/qeth_core_main.c
··· 426 426 ccw->cmd_code = cmd_code; 427 427 ccw->flags = flags | CCW_FLAG_SLI; 428 428 ccw->count = len; 429 - ccw->cda = (__u32) __pa(data); 429 + ccw->cda = (__u32)virt_to_phys(data); 430 430 } 431 431 432 432 static int __qeth_issue_next_read(struct qeth_card *card)