1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/linux/hotfix-aic7xxx-kern-cont.patch
3 # Copyright (C) 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- linux-6.10/drivers/scsi/aic7xxx/aic79xx_core.c.vanilla 2024-07-28 12:58:54.650961501 +0200
15 +++ linux-6.10/drivers/scsi/aic7xxx/aic79xx_core.c 2024-07-28 13:34:23.932935792 +0200
16 @@ -9589,12 +9589,12 @@
19 if (cur_column != NULL && *cur_column >= wrap_point) {
21 + printk(KERN_CONT "\n");
24 - printed = printk("%s[0x%x]", name, value);
25 + printed = printk(KERN_CONT "%s[0x%x]", name, value);
27 - printed += printk(" ");
28 + printed += printk(KERN_CONT " ");
29 *cur_column += printed;
33 == table[entry].mask))
36 - printed += printk("%s%s",
37 + printed += printk(KERN_CONT "%s%s",
38 printed_mask == 0 ? ":(" : "|",
40 printed_mask |= table[entry].mask;
44 if (printed_mask != 0)
45 - printed += printk(") ");
46 + printed += printk(KERN_CONT ") ");
48 - printed += printk(" ");
49 + printed += printk(KERN_CONT " ");
50 if (cur_column != NULL)
51 *cur_column += printed;
54 ahd_lqostat0_print(ahd_inb(ahd, LQOSTAT0), &cur_col, 50);
55 ahd_lqostat1_print(ahd_inb(ahd, LQOSTAT1), &cur_col, 50);
56 ahd_lqostat2_print(ahd_inb(ahd, LQOSTAT2), &cur_col, 50);
58 - printk("\nSCB Count = %d CMDS_PENDING = %d LASTSCB 0x%x "
59 + printk(KERN_CONT "\n");
60 + printk(KERN_CONT "\nSCB Count = %d CMDS_PENDING = %d LASTSCB 0x%x "
61 "CURRSCB 0x%x NEXTSCB 0x%x\n",
62 ahd->scb_data.numscbs, ahd_inw(ahd, CMDS_PENDING),
63 ahd_inw(ahd, LASTSCB), ahd_inw(ahd, CURRSCB),
65 LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) {
66 if (i++ > AHD_SCB_MAX)
68 - cur_col = printk("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb),
69 + cur_col = printk(KERN_CONT "\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb),
70 ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT));
71 ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
72 ahd_scb_control_print(ahd_inb_scbram(ahd, SCB_CONTROL),
74 ahd_scb_scsiid_print(ahd_inb_scbram(ahd, SCB_SCSIID),
77 - printk("\nTotal %d\n", i);
78 + printk(KERN_CONT "\nTotal %d\n", i);
80 printk("Kernel Free SCB list: ");
86 - printk("%d ", SCB_GET_TAG(list_scb));
87 + printk(KERN_CONT "%d ", SCB_GET_TAG(list_scb));
88 list_scb = LIST_NEXT(list_scb, collision_links);
89 } while (list_scb && i++ < AHD_SCB_MAX);
91 @@ -9742,48 +9742,48 @@
92 LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) {
93 if (i++ > AHD_SCB_MAX)
95 - printk("%d ", SCB_GET_TAG(scb));
96 + printk(KERN_CONT "%d ", SCB_GET_TAG(scb));
99 + printk(KERN_CONT "\n");
101 printk("Sequencer Complete DMA-inprog list: ");
102 scb_index = ahd_inw(ahd, COMPLETE_SCB_DMAINPROG_HEAD);
104 while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) {
105 ahd_set_scbptr(ahd, scb_index);
106 - printk("%d ", scb_index);
107 + printk(KERN_CONT "%d ", scb_index);
108 scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
111 + printk(KERN_CONT "\n");
113 printk("Sequencer Complete list: ");
114 scb_index = ahd_inw(ahd, COMPLETE_SCB_HEAD);
116 while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) {
117 ahd_set_scbptr(ahd, scb_index);
118 - printk("%d ", scb_index);
119 + printk(KERN_CONT "%d ", scb_index);
120 scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
123 + printk(KERN_CONT "\n");
125 printk("Sequencer DMA-Up and Complete list: ");
126 scb_index = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD);
128 while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) {
129 ahd_set_scbptr(ahd, scb_index);
130 - printk("%d ", scb_index);
131 + printk(KERN_CONT "%d ", scb_index);
132 scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
135 + printk(KERN_CONT "\n");
136 printk("Sequencer On QFreeze and Complete list: ");
137 scb_index = ahd_inw(ahd, COMPLETE_ON_QFREEZE_HEAD);
139 while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) {
140 ahd_set_scbptr(ahd, scb_index);
141 - printk("%d ", scb_index);
142 + printk(KERN_CONT "%d ", scb_index);
143 scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
146 + printk(KERN_CONT "\n");
147 ahd_set_scbptr(ahd, saved_scb_index);
148 dffstat = ahd_inb(ahd, DFFSTAT);
149 for (i = 0; i < 2; i++) {
150 @@ -9810,7 +9810,7 @@
151 ahd_soffcnt_print(ahd_inb(ahd, SOFFCNT), &cur_col, 50);
152 ahd_mdffstat_print(ahd_inb(ahd, MDFFSTAT), &cur_col, 50);
155 + printk(KERN_CONT "\n");
158 cur_col += printk("SHADDR = 0x%x%x, SHCNT = 0x%x ",
159 @@ -9820,7 +9820,7 @@
160 | (ahd_inb(ahd, SHCNT + 1) << 8)
161 | (ahd_inb(ahd, SHCNT + 2) << 16)));
164 + printk(KERN_CONT "\n");
167 cur_col += printk("HADDR = 0x%x%x, HCNT = 0x%x ",
168 @@ -9838,10 +9838,10 @@
172 - printk("\nLQIN: ");
173 + printk(KERN_CONT "\nLQIN: ");
174 for (i = 0; i < 20; i++)
175 - printk("0x%x ", ahd_inb(ahd, LQIN + i));
177 + printk(KERN_CONT "0x%x ", ahd_inb(ahd, LQIN + i));
178 + printk(KERN_CONT "\n");
179 ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
180 printk("%s: LQISTATE = 0x%x, LQOSTATE = 0x%x, OPTIONMODE = 0x%x\n",
181 ahd_name(ahd), ahd_inb(ahd, LQISTATE), ahd_inb(ahd, LQOSTATE),
182 @@ -9853,11 +9853,11 @@
183 ahd_name(ahd), ahd_inb(ahd, SAVED_SCSIID),
184 ahd_inb(ahd, SAVED_LUN));
185 ahd_simode0_print(ahd_inb(ahd, SIMODE0), &cur_col, 50);
187 + printk(KERN_CONT "\n");
188 ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
190 ahd_ccscbctl_print(ahd_inb(ahd, CCSCBCTL), &cur_col, 50);
192 + printk(KERN_CONT "\n");
193 ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode);
194 printk("%s: REG0 == 0x%x, SINDEX = 0x%x, DINDEX = 0x%x\n",
195 ahd_name(ahd), ahd_inw(ahd, REG0), ahd_inw(ahd, SINDEX),
196 @@ -9877,13 +9877,13 @@
197 for (i = 0; i < ahd->stack_size; i++) {
198 ahd->saved_stack[i] =
199 ahd_inb(ahd, STACK)|(ahd_inb(ahd, STACK) << 8);
200 - printk(" 0x%x", ahd->saved_stack[i]);
201 + printk(KERN_CONT " 0x%x", ahd->saved_stack[i]);
203 for (i = ahd->stack_size-1; i >= 0; i--) {
204 ahd_outb(ahd, STACK, ahd->saved_stack[i] & 0xFF);
205 ahd_outb(ahd, STACK, (ahd->saved_stack[i] >> 8) & 0xFF);
207 - printk("\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n");
208 + printk(KERN_CONT "\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n");
209 ahd_restore_modes(ahd, saved_modes);
212 --- linux-6.10/drivers/scsi/aic7xxx/aic7xxx_core.c.vanilla 2024-07-28 12:58:54.653961501 +0200
213 +++ linux-6.10/drivers/scsi/aic7xxx/aic7xxx_core.c 2024-07-28 13:21:21.767945236 +0200
214 @@ -7058,12 +7058,12 @@
217 if (cur_column != NULL && *cur_column >= wrap_point) {
219 + printk(KERN_CONT "\n");
222 - printed = printk("%s[0x%x]", name, value);
223 + printed = printk(KERN_CONT "%s[0x%x]", name, value);
225 - printed += printk(" ");
226 + printed += printk(KERN_CONT " ");
227 *cur_column += printed;
230 @@ -7078,7 +7078,7 @@
231 == table[entry].mask))
234 - printed += printk("%s%s",
235 + printed += printk(KERN_CONT "%s%s",
236 printed_mask == 0 ? ":(" : "|",
238 printed_mask |= table[entry].mask;
239 @@ -7088,9 +7088,9 @@
242 if (printed_mask != 0)
243 - printed += printk(") ");
244 + printed += printk(KERN_CONT ") ");
246 - printed += printk(" ");
247 + printed += printk(KERN_CONT " ");
248 if (cur_column != NULL)
249 *cur_column += printed;
251 @@ -7155,11 +7155,11 @@
252 ahc_dfcntrl_print(ahc_inb(ahc, DFCNTRL), &cur_col, 50);
253 ahc_dfstatus_print(ahc_inb(ahc, DFSTATUS), &cur_col, 50);
256 + printk(KERN_CONT "\n");
258 for (i = 0; i < STACK_SIZE; i++)
259 - printk(" 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8));
260 - printk("\nSCB count = %d\n", ahc->scb_data->numscbs);
261 + printk(KERN_CONT " 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8));
262 + printk(KERN_CONT "\nSCB count = %d\n", ahc->scb_data->numscbs);
263 printk("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag);
264 printk("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB));
266 @@ -7171,40 +7171,40 @@
267 qinpos = ahc_inb(ahc, QINPOS);
268 qintail = ahc->qinfifonext;
269 while (qinpos != qintail) {
270 - printk("%d ", ahc->qinfifo[qinpos]);
271 + printk(KERN_CONT "%d ", ahc->qinfifo[qinpos]);
275 + printk(KERN_CONT "\n");
277 printk("Waiting Queue entries: ");
278 scb_index = ahc_inb(ahc, WAITING_SCBH);
280 while (scb_index != SCB_LIST_NULL && i++ < 256) {
281 ahc_outb(ahc, SCBPTR, scb_index);
282 - printk("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG));
283 + printk(KERN_CONT "%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG));
284 scb_index = ahc_inb(ahc, SCB_NEXT);
287 + printk(KERN_CONT "\n");
289 printk("Disconnected Queue entries: ");
290 scb_index = ahc_inb(ahc, DISCONNECTED_SCBH);
292 while (scb_index != SCB_LIST_NULL && i++ < 256) {
293 ahc_outb(ahc, SCBPTR, scb_index);
294 - printk("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG));
295 + printk(KERN_CONT "%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG));
296 scb_index = ahc_inb(ahc, SCB_NEXT);
299 + printk(KERN_CONT "\n");
301 ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD);
302 printk("QOUTFIFO entries: ");
303 qoutpos = ahc->qoutfifonext;
305 while (ahc->qoutfifo[qoutpos] != SCB_LIST_NULL && i++ < 256) {
306 - printk("%d ", ahc->qoutfifo[qoutpos]);
307 + printk(KERN_CONT "%d ", ahc->qoutfifo[qoutpos]);
311 + printk(KERN_CONT "\n");
313 printk("Sequencer Free SCB List: ");
314 scb_index = ahc_inb(ahc, FREE_SCBH);
315 @@ -7233,17 +7233,17 @@
316 LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
319 - cur_col = printk("\n%3d ", scb->hscb->tag);
320 + cur_col = printk(KERN_CONT "\n%3d ", scb->hscb->tag);
321 ahc_scb_control_print(scb->hscb->control, &cur_col, 60);
322 ahc_scb_scsiid_print(scb->hscb->scsiid, &cur_col, 60);
323 ahc_scb_lun_print(scb->hscb->lun, &cur_col, 60);
324 if ((ahc->flags & AHC_PAGESCBS) == 0) {
325 ahc_outb(ahc, SCBPTR, scb->hscb->tag);
327 + printk(KERN_CONT "(");
328 ahc_scb_control_print(ahc_inb(ahc, SCB_CONTROL),
330 ahc_scb_tag_print(ahc_inb(ahc, SCB_TAG), &cur_col, 60);
332 + printk(KERN_CONT ")");
336 @@ -7262,12 +7262,12 @@
337 untagged_q = &ahc->untagged_queues[target];
338 if (TAILQ_FIRST(untagged_q) == NULL)
340 - printk("Untagged Q(%d): ", target);
341 + printk(KERN_CONT "Untagged Q(%d): ", target);
343 TAILQ_FOREACH(scb, untagged_q, links.tqe) {
346 - printk("%d ", scb->hscb->tag);
347 + printk(KERN_CONT "%d ", scb->hscb->tag);