# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/linux/hotfix-kern-cont-aic79xx.patch # Copyright (C) 2024 - 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- linux-6.10/drivers/scsi/aic7xxx/aic79xx_core.c.vanilla 2024-07-28 12:58:54.650961501 +0200 +++ linux-6.10/drivers/scsi/aic7xxx/aic79xx_core.c 2024-07-28 13:34:23.932935792 +0200 @@ -9589,12 +9589,12 @@ u_int printed_mask; if (cur_column != NULL && *cur_column >= wrap_point) { - printk("\n"); + printk(KERN_CONT "\n"); *cur_column = 0; } - printed = printk("%s[0x%x]", name, value); + printed = printk(KERN_CONT "%s[0x%x]", name, value); if (table == NULL) { - printed += printk(" "); + printed += printk(KERN_CONT " "); *cur_column += printed; return (printed); } @@ -9609,7 +9609,7 @@ == table[entry].mask)) continue; - printed += printk("%s%s", + printed += printk(KERN_CONT "%s%s", printed_mask == 0 ? ":(" : "|", table[entry].name); printed_mask |= table[entry].mask; @@ -9620,9 +9620,9 @@ break; } if (printed_mask != 0) - printed += printk(") "); + printed += printk(KERN_CONT ") "); else - printed += printk(" "); + printed += printk(KERN_CONT " "); if (cur_column != NULL) *cur_column += printed; return (printed); @@ -9700,8 +9700,8 @@ ahd_lqostat0_print(ahd_inb(ahd, LQOSTAT0), &cur_col, 50); ahd_lqostat1_print(ahd_inb(ahd, LQOSTAT1), &cur_col, 50); ahd_lqostat2_print(ahd_inb(ahd, LQOSTAT2), &cur_col, 50); - printk("\n"); - printk("\nSCB Count = %d CMDS_PENDING = %d LASTSCB 0x%x " + printk(KERN_CONT "\n"); + printk(KERN_CONT "\nSCB Count = %d CMDS_PENDING = %d LASTSCB 0x%x " "CURRSCB 0x%x NEXTSCB 0x%x\n", ahd->scb_data.numscbs, ahd_inw(ahd, CMDS_PENDING), ahd_inw(ahd, LASTSCB), ahd_inw(ahd, CURRSCB), @@ -9717,7 +9717,7 @@ LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) { if (i++ > AHD_SCB_MAX) break; - cur_col = printk("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb), + cur_col = printk(KERN_CONT "\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb), ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT)); ahd_set_scbptr(ahd, SCB_GET_TAG(scb)); ahd_scb_control_print(ahd_inb_scbram(ahd, SCB_CONTROL), @@ -9725,7 +9725,7 @@ ahd_scb_scsiid_print(ahd_inb_scbram(ahd, SCB_SCSIID), &cur_col, 60); } - printk("\nTotal %d\n", i); + printk(KERN_CONT "\nTotal %d\n", i); printk("Kernel Free SCB list: "); i = 0; @@ -9734,7 +9734,7 @@ list_scb = scb; do { - printk("%d ", SCB_GET_TAG(list_scb)); + printk(KERN_CONT "%d ", SCB_GET_TAG(list_scb)); list_scb = LIST_NEXT(list_scb, collision_links); } while (list_scb && i++ < AHD_SCB_MAX); } @@ -9742,48 +9742,48 @@ LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) { if (i++ > AHD_SCB_MAX) break; - printk("%d ", SCB_GET_TAG(scb)); + printk(KERN_CONT "%d ", SCB_GET_TAG(scb)); } - printk("\n"); + printk(KERN_CONT "\n"); printk("Sequencer Complete DMA-inprog list: "); scb_index = ahd_inw(ahd, COMPLETE_SCB_DMAINPROG_HEAD); i = 0; while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) { ahd_set_scbptr(ahd, scb_index); - printk("%d ", scb_index); + printk(KERN_CONT "%d ", scb_index); scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE); } - printk("\n"); + printk(KERN_CONT "\n"); printk("Sequencer Complete list: "); scb_index = ahd_inw(ahd, COMPLETE_SCB_HEAD); i = 0; while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) { ahd_set_scbptr(ahd, scb_index); - printk("%d ", scb_index); + printk(KERN_CONT "%d ", scb_index); scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE); } - printk("\n"); + printk(KERN_CONT "\n"); printk("Sequencer DMA-Up and Complete list: "); scb_index = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD); i = 0; while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) { ahd_set_scbptr(ahd, scb_index); - printk("%d ", scb_index); + printk(KERN_CONT "%d ", scb_index); scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE); } - printk("\n"); + printk(KERN_CONT "\n"); printk("Sequencer On QFreeze and Complete list: "); scb_index = ahd_inw(ahd, COMPLETE_ON_QFREEZE_HEAD); i = 0; while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) { ahd_set_scbptr(ahd, scb_index); - printk("%d ", scb_index); + printk(KERN_CONT "%d ", scb_index); scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE); } - printk("\n"); + printk(KERN_CONT "\n"); ahd_set_scbptr(ahd, saved_scb_index); dffstat = ahd_inb(ahd, DFFSTAT); for (i = 0; i < 2; i++) { @@ -9810,7 +9810,7 @@ ahd_soffcnt_print(ahd_inb(ahd, SOFFCNT), &cur_col, 50); ahd_mdffstat_print(ahd_inb(ahd, MDFFSTAT), &cur_col, 50); if (cur_col > 50) { - printk("\n"); + printk(KERN_CONT "\n"); cur_col = 0; } cur_col += printk("SHADDR = 0x%x%x, SHCNT = 0x%x ", @@ -9820,7 +9820,7 @@ | (ahd_inb(ahd, SHCNT + 1) << 8) | (ahd_inb(ahd, SHCNT + 2) << 16))); if (cur_col > 50) { - printk("\n"); + printk(KERN_CONT "\n"); cur_col = 0; } cur_col += printk("HADDR = 0x%x%x, HCNT = 0x%x ", @@ -9838,10 +9838,10 @@ } #endif } - printk("\nLQIN: "); + printk(KERN_CONT "\nLQIN: "); for (i = 0; i < 20; i++) - printk("0x%x ", ahd_inb(ahd, LQIN + i)); - printk("\n"); + printk(KERN_CONT "0x%x ", ahd_inb(ahd, LQIN + i)); + printk(KERN_CONT "\n"); ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG); printk("%s: LQISTATE = 0x%x, LQOSTATE = 0x%x, OPTIONMODE = 0x%x\n", ahd_name(ahd), ahd_inb(ahd, LQISTATE), ahd_inb(ahd, LQOSTATE), @@ -9853,11 +9853,11 @@ ahd_name(ahd), ahd_inb(ahd, SAVED_SCSIID), ahd_inb(ahd, SAVED_LUN)); ahd_simode0_print(ahd_inb(ahd, SIMODE0), &cur_col, 50); - printk("\n"); + printk(KERN_CONT "\n"); ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN); cur_col = 0; ahd_ccscbctl_print(ahd_inb(ahd, CCSCBCTL), &cur_col, 50); - printk("\n"); + printk(KERN_CONT "\n"); ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode); printk("%s: REG0 == 0x%x, SINDEX = 0x%x, DINDEX = 0x%x\n", ahd_name(ahd), ahd_inw(ahd, REG0), ahd_inw(ahd, SINDEX), @@ -9877,13 +9877,13 @@ for (i = 0; i < ahd->stack_size; i++) { ahd->saved_stack[i] = ahd_inb(ahd, STACK)|(ahd_inb(ahd, STACK) << 8); - printk(" 0x%x", ahd->saved_stack[i]); + printk(KERN_CONT " 0x%x", ahd->saved_stack[i]); } for (i = ahd->stack_size-1; i >= 0; i--) { ahd_outb(ahd, STACK, ahd->saved_stack[i] & 0xFF); ahd_outb(ahd, STACK, (ahd->saved_stack[i] >> 8) & 0xFF); } - printk("\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n"); + printk(KERN_CONT "\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n"); ahd_restore_modes(ahd, saved_modes); if (paused == 0) ahd_unpause(ahd); --- linux-6.10/drivers/scsi/aic7xxx/aic7xxx_core.c.vanilla 2024-07-28 12:58:54.653961501 +0200 +++ linux-6.10/drivers/scsi/aic7xxx/aic7xxx_core.c 2024-07-28 13:21:21.767945236 +0200 @@ -7058,12 +7058,12 @@ u_int printed_mask; if (cur_column != NULL && *cur_column >= wrap_point) { - printk("\n"); + printk(KERN_CONT "\n"); *cur_column = 0; } - printed = printk("%s[0x%x]", name, value); + printed = printk(KERN_CONT "%s[0x%x]", name, value); if (table == NULL) { - printed += printk(" "); + printed += printk(KERN_CONT " "); *cur_column += printed; return (printed); } @@ -7078,7 +7078,7 @@ == table[entry].mask)) continue; - printed += printk("%s%s", + printed += printk(KERN_CONT "%s%s", printed_mask == 0 ? ":(" : "|", table[entry].name); printed_mask |= table[entry].mask; @@ -7088,9 +7088,9 @@ break; } if (printed_mask != 0) - printed += printk(") "); + printed += printk(KERN_CONT ") "); else - printed += printk(" "); + printed += printk(KERN_CONT " "); if (cur_column != NULL) *cur_column += printed; return (printed); @@ -7155,11 +7155,11 @@ ahc_dfcntrl_print(ahc_inb(ahc, DFCNTRL), &cur_col, 50); ahc_dfstatus_print(ahc_inb(ahc, DFSTATUS), &cur_col, 50); if (cur_col != 0) - printk("\n"); + printk(KERN_CONT "\n"); printk("STACK:"); for (i = 0; i < STACK_SIZE; i++) - printk(" 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8)); - printk("\nSCB count = %d\n", ahc->scb_data->numscbs); + printk(KERN_CONT " 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8)); + printk(KERN_CONT "\nSCB count = %d\n", ahc->scb_data->numscbs); printk("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag); printk("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB)); /* QINFIFO */ @@ -7171,40 +7171,40 @@ qinpos = ahc_inb(ahc, QINPOS); qintail = ahc->qinfifonext; while (qinpos != qintail) { - printk("%d ", ahc->qinfifo[qinpos]); + printk(KERN_CONT "%d ", ahc->qinfifo[qinpos]); qinpos++; } - printk("\n"); + printk(KERN_CONT "\n"); printk("Waiting Queue entries: "); scb_index = ahc_inb(ahc, WAITING_SCBH); i = 0; while (scb_index != SCB_LIST_NULL && i++ < 256) { ahc_outb(ahc, SCBPTR, scb_index); - printk("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); + printk(KERN_CONT "%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); scb_index = ahc_inb(ahc, SCB_NEXT); } - printk("\n"); + printk(KERN_CONT "\n"); printk("Disconnected Queue entries: "); scb_index = ahc_inb(ahc, DISCONNECTED_SCBH); i = 0; while (scb_index != SCB_LIST_NULL && i++ < 256) { ahc_outb(ahc, SCBPTR, scb_index); - printk("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); + printk(KERN_CONT "%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); scb_index = ahc_inb(ahc, SCB_NEXT); } - printk("\n"); + printk(KERN_CONT "\n"); ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD); printk("QOUTFIFO entries: "); qoutpos = ahc->qoutfifonext; i = 0; while (ahc->qoutfifo[qoutpos] != SCB_LIST_NULL && i++ < 256) { - printk("%d ", ahc->qoutfifo[qoutpos]); + printk(KERN_CONT "%d ", ahc->qoutfifo[qoutpos]); qoutpos++; } - printk("\n"); + printk(KERN_CONT "\n"); printk("Sequencer Free SCB List: "); scb_index = ahc_inb(ahc, FREE_SCBH); @@ -7233,17 +7233,17 @@ LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) { if (i++ > 256) break; - cur_col = printk("\n%3d ", scb->hscb->tag); + cur_col = printk(KERN_CONT "\n%3d ", scb->hscb->tag); ahc_scb_control_print(scb->hscb->control, &cur_col, 60); ahc_scb_scsiid_print(scb->hscb->scsiid, &cur_col, 60); ahc_scb_lun_print(scb->hscb->lun, &cur_col, 60); if ((ahc->flags & AHC_PAGESCBS) == 0) { ahc_outb(ahc, SCBPTR, scb->hscb->tag); - printk("("); + printk(KERN_CONT "("); ahc_scb_control_print(ahc_inb(ahc, SCB_CONTROL), &cur_col, 60); ahc_scb_tag_print(ahc_inb(ahc, SCB_TAG), &cur_col, 60); - printk(")"); + printk(KERN_CONT ")"); } } printk("\n"); @@ -7262,12 +7262,12 @@ untagged_q = &ahc->untagged_queues[target]; if (TAILQ_FIRST(untagged_q) == NULL) continue; - printk("Untagged Q(%d): ", target); + printk(KERN_CONT "Untagged Q(%d): ", target); i = 0; TAILQ_FOREACH(scb, untagged_q, links.tqe) { if (i++ > 256) break; - printk("%d ", scb->hscb->tag); + printk(KERN_CONT "%d ", scb->hscb->tag); } printk("\n"); }