boot: driver chatter goes to the log; the console clears its margins
ACPI, DMI, SMP, xHCI, USB, I2C, NVMe, r8169 and ramdisk progress lines are kinfo now: in dmesg and on a verbose boot, off the screen of a working machine. Failures stay cprintf. vt_repaint also paints the strip right of the last column and below the last row, which kept the bottom of the X desktop after Ctrl+Alt+F-key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
parent
f6c4b6377f
commit
c65bfa3fa3
16 changed files with 57 additions and 42 deletions
|
|
@ -341,7 +341,7 @@ usb_attach(struct usb_dev *dev)
|
|||
break;
|
||||
}
|
||||
|
||||
cprintf("usb: interface %d: class %d.%d protocol %d, %d endpoint%s%s%s%s\n",
|
||||
kinfo("usb: interface %d: class %d.%d protocol %d, %d endpoint%s%s%s%s\n",
|
||||
d->iface.bInterfaceNumber,
|
||||
d->iface.bInterfaceClass, d->iface.bInterfaceSubClass,
|
||||
d->iface.bInterfaceProtocol, d->iface.bNumEndpoints,
|
||||
|
|
@ -353,7 +353,7 @@ usb_attach(struct usb_dev *dev)
|
|||
usb_bind_all(d);
|
||||
|
||||
if(d->driver == 0){
|
||||
cprintf("usb: no driver for this interface\n");
|
||||
kinfo("usb: no driver for this interface\n");
|
||||
if(n > 0)
|
||||
d->in_use = 0; // nothing will ever use it; give it back
|
||||
}
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ hid_attach(const uchar *desc, int n, const char *what)
|
|||
h->proto = !h->x.ok ? USB_HID_PROTO_KEYBOARD :
|
||||
h->x.rel ? USB_HID_PROTO_MOUSE : USB_HID_PROTO_TABLET;
|
||||
h->in_use = 1;
|
||||
cprintf("%s: %s%s\n", what,
|
||||
kinfo("%s: %s%s\n", what,
|
||||
h->proto == USB_HID_PROTO_KEYBOARD ? "keyboard" :
|
||||
h->proto == USB_HID_PROTO_MOUSE ? "pointer" : "absolute pointer",
|
||||
h->rkbd && h->x.ok ? " and keyboard" : "");
|
||||
|
|
@ -853,7 +853,7 @@ hid_probe(struct usb_dev *dev)
|
|||
} else {
|
||||
// A consumer-control interface (volume keys), a game pad, a UPS: HID,
|
||||
// and not something this driver has a use for.
|
||||
cprintf("usb-hid: interface %d is neither a keyboard nor a pointer\n",
|
||||
kinfo("usb-hid: interface %d is neither a keyboard nor a pointer\n",
|
||||
dev->iface.bInterfaceNumber);
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -878,7 +878,7 @@ hid_probe(struct usb_dev *dev)
|
|||
return -1;
|
||||
}
|
||||
|
||||
cprintf("usb-hid: %s%s on slot %d, endpoint 0x%x every %d ms\n",
|
||||
kinfo("usb-hid: %s%s on slot %d, endpoint 0x%x every %d ms\n",
|
||||
h->proto == USB_HID_PROTO_KEYBOARD ? "keyboard" :
|
||||
h->proto == USB_HID_PROTO_MOUSE ? "mouse" : "absolute pointer",
|
||||
h->proto == USB_HID_PROTO_KEYBOARD ?
|
||||
|
|
@ -906,7 +906,7 @@ hid_disconnect(struct usb_dev *dev)
|
|||
krep.c = 0;
|
||||
release(&kqlock);
|
||||
}
|
||||
cprintf("usb-hid: %s on slot %d unplugged\n",
|
||||
kinfo("usb-hid: %s on slot %d unplugged\n",
|
||||
h->proto == USB_HID_PROTO_KEYBOARD ? "keyboard" : "pointer",
|
||||
dev->slot);
|
||||
h->in_use = 0;
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ hub_probe(struct usb_dev *dev)
|
|||
}
|
||||
mtt = (hd->wHubCharacteristics & HUB_CHAR_TT_MASK) != 0;
|
||||
|
||||
cprintf("usb-hub: %d ports on slot %d\n", nports, dev->slot);
|
||||
kinfo("usb-hub: %d ports on slot %d\n", nports, dev->slot);
|
||||
|
||||
// Tell the controller *before* powering anything on. Addressing a device
|
||||
// behind a slot the controller does not know is a hub fails, and it fails
|
||||
|
|
@ -291,7 +291,7 @@ usb_hub_poll(void)
|
|||
h->dev->ops->detach(h->dev, port);
|
||||
if(st & PORTSTAT_CONNECTION){
|
||||
microdelay(100000); // debounce, as on a root port
|
||||
cprintf("usb-hub: slot %d port %d: plugged in\n", h->dev->slot, port);
|
||||
kinfo("usb-hub: slot %d port %d: plugged in\n", h->dev->slot, port);
|
||||
hub_port(h->dev, port, h->scratch);
|
||||
}
|
||||
// The hub may have been unplugged by what was just done; stop if so.
|
||||
|
|
|
|||
|
|
@ -349,12 +349,12 @@ usb_storage_dump(void)
|
|||
return;
|
||||
}
|
||||
|
||||
cprintf("usb-storage: %d sectors of %d bytes\n", u->nsectors,
|
||||
kinfo("usb-storage: %d sectors of %d bytes\n", u->nsectors,
|
||||
u->sector_size);
|
||||
|
||||
b = bread(USBDISK_DEV, 1);
|
||||
sb = (struct superblock*)b->data;
|
||||
cprintf("usb-storage: block 1 magic %x size %d nblocks %d ninodes %d\n",
|
||||
kinfo("usb-storage: block 1 magic %x size %d nblocks %d ninodes %d\n",
|
||||
sb->magic, sb->size, sb->nblocks, sb->ninodes);
|
||||
brelse(b);
|
||||
}
|
||||
|
|
@ -480,7 +480,7 @@ storage_probe(struct usb_dev *dev)
|
|||
}
|
||||
|
||||
u->present = 1;
|
||||
cprintf("usb-storage: %s: %s %s, %d sectors (%d MB)\n", u->name,
|
||||
kinfo("usb-storage: %s: %s %s, %d sectors (%d MB)\n", u->name,
|
||||
vendor, product, u->nsectors,
|
||||
(int)((uint64)u->nsectors * SECTOR_SIZE / (1024 * 1024)));
|
||||
u->blkdev = blkdev_register(u->name, &ums_blk_ops, u, u->nsectors,
|
||||
|
|
@ -517,7 +517,7 @@ storage_disconnect(struct usb_dev *dev)
|
|||
u->gone = 1;
|
||||
releasesleep(&u->lock);
|
||||
|
||||
cprintf("usb-storage: %s unplugged\n", u->name);
|
||||
kinfo("usb-storage: %s unplugged\n", u->name);
|
||||
if(u->blkdev >= 0)
|
||||
blkdev_unregister(u->blkdev);
|
||||
// USBDISK_DEV may have been this stick; nothing it cached is true now.
|
||||
|
|
|
|||
Loading…
Reference in a new issue