Remove overuse of exclamation marks in kernel printfs, there mere fact a

message has been printed is enough to get someones attention. Also remove the
line number for DPRINTF/DPRINTFN, it already prints the funtion name and a
unique message.
This commit is contained in:
thompsa 2009-11-26 00:43:17 +00:00
parent 62d1f26939
commit 6745662f29
35 changed files with 105 additions and 106 deletions

View File

@ -1192,7 +1192,8 @@ atmegadci_clear_stall_sub(struct atmegadci_softc *sc, uint8_t ep_no,
temp = ATMEGA_READ_1(sc, ATMEGA_UESTA0X);
if (!(temp & ATMEGA_UESTA0X_CFGOK)) {
DPRINTFN(0, "Chip rejected configuration\n");
device_printf(sc->sc_bus.bdev,
"Chip rejected configuration\n");
}
} while (0);
}
@ -1914,7 +1915,8 @@ atmegadci_roothub_exec(struct usb_device *udev,
/* check valid config */
temp = ATMEGA_READ_1(sc, ATMEGA_UESTA0X);
if (!(temp & ATMEGA_UESTA0X_CFGOK)) {
DPRINTFN(0, "Chip rejected EP0 configuration\n");
device_printf(sc->sc_bus.bdev,
"Chip rejected EP0 configuration\n");
}
break;
case UHF_C_PORT_SUSPEND:

View File

@ -1160,7 +1160,7 @@ avr32dci_clear_stall_sub(struct avr32dci_softc *sc, uint8_t ep_no,
temp = AVR32_READ_4(sc, AVR32_EPTCFG(ep_no));
if (!(temp & AVR32_EPTCFG_EPT_MAPD)) {
DPRINTFN(0, "Chip rejected configuration\n");
device_printf(sc->sc_bus.bdev, "Chip rejected configuration\n");
} else {
AVR32_WRITE_4(sc, AVR32_EPTCTLENB(ep_no),
AVR32_EPTCTL_EPT_ENABL);
@ -1840,7 +1840,8 @@ avr32dci_roothub_exec(struct usb_device *udev,
temp = AVR32_READ_4(sc, AVR32_EPTCFG(0));
if (!(temp & AVR32_EPTCFG_EPT_MAPD)) {
DPRINTFN(0, "Chip rejected configuration\n");
device_printf(sc->sc_bus.bdev,
"Chip rejected configuration\n");
} else {
AVR32_WRITE_4(sc, AVR32_EPTCTLENB(0),
AVR32_EPTCTL_EPT_ENABL);

View File

@ -1781,8 +1781,8 @@ musbotg_init(struct musbotg_softc *sc)
dynfifo = (sc->sc_conf_data & MUSB2_MASK_CD_DYNFIFOSZ) ? 1 : 0;
if (dynfifo) {
DPRINTFN(0, "Dynamic FIFO sizing detected! "
"Assuming 16Kbytes of FIFO RAM\n");
device_printf(sc->sc_bus.bdev, "Dynamic FIFO sizing detected, "
"assuming 16Kbytes of FIFO RAM\n");
}
DPRINTFN(2, "HW version: 0x%04x\n",

View File

@ -130,7 +130,7 @@ usb_attach(device_t dev)
DPRINTF("\n");
if (bus == NULL) {
DPRINTFN(0, "USB device has no ivars\n");
device_printf(dev, "USB device has no ivars\n");
return (ENXIO);
}
@ -343,7 +343,7 @@ usb_bus_attach(struct usb_proc_msg *pm)
break;
default:
device_printf(bus->bdev, "Unsupported USB revision!\n");
device_printf(bus->bdev, "Unsupported USB revision\n");
return;
}
@ -530,7 +530,7 @@ usb_bus_mem_alloc_all(struct usb_bus *bus, bus_dma_tag_t dmat,
(bus->devices_max < USB_MIN_DEVICES) ||
(bus->devices == NULL)) {
DPRINTFN(0, "Devices field has not been "
"initialised properly!\n");
"initialised properly\n");
bus->alloc_failed = 1; /* failure */
}
#if USB_HAVE_BUSDMA

View File

@ -926,7 +926,7 @@ ukbd_detach(device_t dev)
DPRINTF("\n");
if (sc->sc_flags & UKBD_FLAG_POLLING) {
panic("cannot detach polled keyboard!\n");
panic("cannot detach polled keyboard\n");
}
sc->sc_flags |= UKBD_FLAG_GONE;

View File

@ -692,7 +692,7 @@ aue_attach(device_t dev)
sc->sc_xfer, aue_config, AUE_N_TRANSFER,
sc, &sc->sc_mtx);
if (error) {
device_printf(dev, "allocating USB transfers failed!\n");
device_printf(dev, "allocating USB transfers failed\n");
goto detach;
}

View File

@ -706,7 +706,7 @@ axe_attach(device_t dev)
error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer,
axe_config, AXE_N_TRANSFER, sc, &sc->sc_mtx);
if (error) {
device_printf(dev, "allocating USB transfers failed!\n");
device_printf(dev, "allocating USB transfers failed\n");
goto detach;
}

View File

@ -489,7 +489,7 @@ cdce_attach(device_t dev)
break;
}
} else {
device_printf(dev, "no data interface found!\n");
device_printf(dev, "no data interface found\n");
goto detach;
}
}
@ -541,7 +541,7 @@ cdce_attach(device_t dev)
if (error || (i == 32)) {
device_printf(dev, "No valid alternate "
"setting found!\n");
"setting found\n");
goto detach;
}

View File

@ -404,7 +404,7 @@ cue_attach(device_t dev)
error = usbd_transfer_setup(uaa->device, &iface_index,
sc->sc_xfer, cue_config, CUE_N_TRANSFER, sc, &sc->sc_mtx);
if (error) {
device_printf(dev, "allocating USB transfers failed!\n");
device_printf(dev, "allocating USB transfers failed\n");
goto detach;
}

View File

@ -480,14 +480,14 @@ kue_attach(device_t dev)
error = usbd_transfer_setup(uaa->device, &iface_index,
sc->sc_xfer, kue_config, KUE_N_TRANSFER, sc, &sc->sc_mtx);
if (error) {
device_printf(dev, "allocating USB transfers failed!\n");
device_printf(dev, "allocating USB transfers failed\n");
goto detach;
}
sc->sc_mcfilters = malloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN,
M_USBDEV, M_WAITOK);
if (sc->sc_mcfilters == NULL) {
device_printf(dev, "failed allocating USB memory!\n");
device_printf(dev, "failed allocating USB memory\n");
goto detach;
}

View File

@ -535,7 +535,7 @@ rue_reset(struct rue_softc *sc)
break;
}
if (i == RUE_TIMEOUT)
device_printf(sc->sc_ue.ue_dev, "reset never completed!\n");
device_printf(sc->sc_ue.ue_dev, "reset never completed\n");
uether_pause(&sc->sc_ue, hz / 100);
}
@ -591,7 +591,7 @@ rue_attach(device_t dev)
sc->sc_xfer, rue_config, RUE_N_TRANSFER,
sc, &sc->sc_mtx);
if (error) {
device_printf(dev, "allocating USB transfers failed!\n");
device_printf(dev, "allocating USB transfers failed\n");
goto detach;
}

View File

@ -254,7 +254,7 @@ udav_attach(device_t dev)
error = usbd_transfer_setup(uaa->device, &iface_index,
sc->sc_xfer, udav_config, UDAV_N_TRANSFER, sc, &sc->sc_mtx);
if (error) {
device_printf(dev, "allocating USB transfers failed!\n");
device_printf(dev, "allocating USB transfers failed\n");
goto detach;
}

View File

@ -250,8 +250,6 @@ u3g_sierra_init(struct usb_device *udev)
{
struct usb_device_request req;
DPRINTFN(0, "\n");
req.bmRequestType = UT_VENDOR;
req.bRequest = UR_SET_INTERFACE;
USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP);
@ -270,8 +268,6 @@ u3g_huawei_init(struct usb_device *udev)
{
struct usb_device_request req;
DPRINTFN(0, "\n");
req.bmRequestType = UT_WRITE_DEVICE;
req.bRequest = UR_SET_FEATURE;
USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP);

View File

@ -211,7 +211,7 @@ uark_attach(device_t dev)
if (error) {
device_printf(dev, "allocating control USB "
"transfers failed!\n");
"transfers failed\n");
goto detach;
}
/* clear stall at first run */

View File

@ -282,7 +282,7 @@ ubser_attach(device_t dev)
sc->sc_tx_size = usbd_xfer_max_len(sc->sc_xfer[UBSER_BULK_DT_WR]);
if (sc->sc_tx_size == 0) {
DPRINTFN(0, "invalid tx_size!\n");
DPRINTFN(0, "invalid tx_size\n");
goto detach;
}
/* initialize port numbers */

View File

@ -266,7 +266,7 @@ ucycom_attach(device_t dev)
sc, &sc->sc_mtx);
if (error) {
device_printf(dev, "allocating USB "
"transfers failed!\n");
"transfers failed\n");
goto detach;
}
error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
@ -555,7 +555,7 @@ ucycom_intr_read_callback(struct usb_xfer *xfer, usb_error_t error)
break;
default:
DPRINTFN(0, "unsupported model number!\n");
DPRINTFN(0, "unsupported model number\n");
goto tr_setup;
}

View File

@ -401,7 +401,7 @@ ufoma_attach(device_t dev)
if (error) {
device_printf(dev, "allocating control USB "
"transfers failed!\n");
"transfers failed\n");
goto detach;
}
mad = ufoma_get_intconf(cd, id, UDESC_VS_INTERFACE, UDESCSUB_MCPC_ACM);
@ -1060,7 +1060,7 @@ ufoma_modem_setup(device_t dev, struct ufoma_softc *sc,
break;
}
} else {
device_printf(dev, "no data interface!\n");
device_printf(dev, "no data interface\n");
return (EINVAL);
}
}
@ -1071,7 +1071,7 @@ ufoma_modem_setup(device_t dev, struct ufoma_softc *sc,
if (error) {
device_printf(dev, "allocating BULK USB "
"transfers failed!\n");
"transfers failed\n");
return (EINVAL);
}
return (0);

View File

@ -307,7 +307,7 @@ uftdi_attach(device_t dev)
if (error) {
device_printf(dev, "allocating USB "
"transfers failed!\n");
"transfers failed\n");
goto detach;
}
sc->sc_ucom.sc_portno = FTDI_PIT_SIOA + uaa->info.bIfaceNum;

View File

@ -210,7 +210,7 @@ ugensa_attach(device_t dev)
}
if (cnt == 0) {
device_printf(dev, "No interfaces!\n");
device_printf(dev, "No interfaces\n");
goto detach;
}
for (x = 0; x < cnt; x++) {
@ -229,7 +229,7 @@ ugensa_attach(device_t dev)
if (error) {
device_printf(dev, "allocating USB "
"transfers failed!\n");
"transfers failed\n");
goto detach;
}
/* clear stall at first run */

View File

@ -263,7 +263,7 @@ umct_attach(device_t dev)
if (error) {
device_printf(dev, "allocating USB "
"transfers failed!\n");
"transfers failed\n");
goto detach;
}

View File

@ -311,7 +311,7 @@ umodem_attach(device_t dev)
0 - 1, UDESCSUB_CDC_UNION, 0 - 1);
if ((cud == NULL) || (cud->bLength < sizeof(*cud))) {
device_printf(dev, "no CM or union descriptor!\n");
device_printf(dev, "no CM or union descriptor\n");
goto detach;
}
@ -344,7 +344,7 @@ umodem_attach(device_t dev)
break;
}
} else {
device_printf(dev, "no data interface!\n");
device_printf(dev, "no data interface\n");
goto detach;
}
}

View File

@ -377,7 +377,7 @@ uplcom_attach(device_t dev)
if (iface) {
id = usbd_get_interface_descriptor(iface);
if (id == NULL) {
device_printf(dev, "no interface descriptor (2)!\n");
device_printf(dev, "no interface descriptor (2)\n");
goto detach;
}
sc->sc_data_iface_no = id->bInterfaceNumber;
@ -420,7 +420,7 @@ uplcom_attach(device_t dev)
*/
if (sc->sc_chiptype == TYPE_PL2303X) {
if (uplcom_pl2303x_init(uaa->device)) {
device_printf(dev, "init failed!\n");
device_printf(dev, "init failed\n");
goto detach;
}
}

View File

@ -2847,7 +2847,7 @@ umass_cam_detach_sim(struct umass_softc *sc)
sc->sc_sim->softc = UMASS_GONE;
cam_sim_free(sc->sc_sim, /* free_devq */ TRUE);
} else {
panic("%s: CAM layer is busy!\n",
panic("%s: CAM layer is busy\n",
sc->sc_name);
}
sc->sc_sim = NULL;

View File

@ -727,7 +727,7 @@ usb_hw_ep_get_needs(struct usb_hw_ep_scratch *ues,
if ((pf->max_in_frame_size < wMaxPacketSize) ||
(pf->max_out_frame_size < wMaxPacketSize)) {
DPRINTFN(0, "Endpoint profile %u "
"has too small buffer!\n", ep_no);
"has too small buffer\n", ep_no);
return (1);
}
} else if (ed->bEndpointAddress & UE_DIR_IN) {
@ -735,7 +735,7 @@ usb_hw_ep_get_needs(struct usb_hw_ep_scratch *ues,
(1 << (ep_no % 8));
if (pf->max_in_frame_size < wMaxPacketSize) {
DPRINTFN(0, "Endpoint profile %u "
"has too small buffer!\n", ep_no);
"has too small buffer\n", ep_no);
return (1);
}
} else {
@ -743,7 +743,7 @@ usb_hw_ep_get_needs(struct usb_hw_ep_scratch *ues,
(1 << (ep_no % 8));
if (pf->max_out_frame_size < wMaxPacketSize) {
DPRINTFN(0, "Endpoint profile %u "
"has too small buffer!\n", ep_no);
"has too small buffer\n", ep_no);
return (1);
}
}

View File

@ -445,7 +445,7 @@ usb_pc_common_mem_cb(void *arg, bus_dma_segment_t *segs,
/*
* This check verifies that the physical address is correct:
*/
DPRINTFN(0, "Page offset was not preserved!\n");
DPRINTFN(0, "Page offset was not preserved\n");
error = 1;
goto done;
}
@ -764,8 +764,8 @@ usb_dma_tag_find(struct usb_dma_parent_tag *udpt,
struct usb_dma_tag *udt;
uint8_t nudt;
USB_ASSERT(align > 0, ("Invalid parameter align = 0!\n"));
USB_ASSERT(size > 0, ("Invalid parameter size = 0!\n"));
USB_ASSERT(align > 0, ("Invalid parameter align = 0\n"));
USB_ASSERT(size > 0, ("Invalid parameter size = 0\n"));
udt = udpt->utag_first;
nudt = udpt->utag_max;

View File

@ -37,8 +37,8 @@ extern int usb_debug;
#if (USB_DEBUG != 0)
#define DPRINTFN(n,fmt,...) do { \
if ((USB_DEBUG_VAR) >= (n)) { \
printf("%s:%u: " fmt, \
__FUNCTION__, __LINE__,## __VA_ARGS__); \
printf("%s: " fmt, \
__FUNCTION__,## __VA_ARGS__); \
} \
} while (0)
#define DPRINTF(...) DPRINTFN(1, __VA_ARGS__)

View File

@ -575,7 +575,7 @@ usb_fifo_free(struct usb_fifo *f)
(f->udev->fifo[f->fifo_index] == f)) {
f->udev->fifo[f->fifo_index] = NULL;
} else {
DPRINTFN(0, "USB FIFO %p has not been linked!\n", f);
DPRINTFN(0, "USB FIFO %p has not been linked\n", f);
}
/* decrease refcount */
@ -952,7 +952,7 @@ usb_dev_init_post(void *arg)
usb_dev = make_dev(&usb_static_devsw, 0, UID_ROOT, GID_OPERATOR,
0644, USB_DEVICE_NAME);
if (usb_dev == NULL) {
DPRINTFN(0, "Could not create usb bus device!\n");
DPRINTFN(0, "Could not create usb bus device\n");
}
}

View File

@ -1023,7 +1023,7 @@ usb_detach_device_sub(struct usb_device *udev, device_t *ppdev,
if (udev->flags.peer_suspended) {
err = DEVICE_RESUME(dev);
if (err) {
device_printf(dev, "Resume failed!\n");
device_printf(dev, "Resume failed\n");
}
}
if (device_detach(dev)) {
@ -1038,7 +1038,7 @@ usb_detach_device_sub(struct usb_device *udev, device_t *ppdev,
error:
/* Detach is not allowed to fail in the USB world */
panic("An USB driver would not detach!\n");
panic("A USB driver would not detach\n");
}
/*------------------------------------------------------------------------*
@ -1131,7 +1131,7 @@ usb_probe_and_attach_sub(struct usb_device *udev,
* to device_detach(). USB devices should
* never fail on detach!
*/
panic("device_delete_child() failed!\n");
panic("device_delete_child() failed\n");
}
}
if (uaa->temp_dev == NULL) {
@ -1140,7 +1140,7 @@ usb_probe_and_attach_sub(struct usb_device *udev,
uaa->temp_dev = device_add_child(udev->parent_dev, NULL, -1);
if (uaa->temp_dev == NULL) {
device_printf(udev->parent_dev,
"Device creation failed!\n");
"Device creation failed\n");
return (1); /* failure */
}
device_set_ivars(uaa->temp_dev, uaa);
@ -1320,7 +1320,7 @@ usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index)
/* remove the last created child; it is unused */
if (device_delete_child(udev->parent_dev, uaa.temp_dev)) {
DPRINTFN(0, "device delete child failed!\n");
DPRINTFN(0, "device delete child failed\n");
}
}
done:
@ -1353,7 +1353,7 @@ usb_suspend_resume_sub(struct usb_device *udev, device_t dev, uint8_t do_suspend
err = DEVICE_RESUME(dev);
}
if (err) {
device_printf(dev, "%s failed!\n",
device_printf(dev, "%s failed\n",
do_suspend ? "Suspend" : "Resume");
}
}
@ -1473,13 +1473,13 @@ usb_alloc_device(device_t parent_dev, struct usb_bus *bus,
if (device_index == bus->devices_max) {
device_printf(bus->bdev,
"No free USB device index for new device!\n");
"No free USB device index for new device\n");
return (NULL);
}
if (depth > 0x10) {
device_printf(bus->bdev,
"Invalid device depth!\n");
"Invalid device depth\n");
return (NULL);
}
udev = malloc(sizeof(*udev), M_USB, M_WAITOK | M_ZERO);
@ -1631,7 +1631,7 @@ usb_alloc_device(device_t parent_dev, struct usb_bus *bus,
USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0);
if (err) {
DPRINTFN(0, "getting device descriptor "
"at addr %d failed, %s!\n", udev->address,
"at addr %d failed, %s\n", udev->address,
usbd_errstr(err));
/* XXX try to re-enumerate the device */
err = usbd_req_re_enumerate(udev, NULL);
@ -1797,7 +1797,7 @@ usb_alloc_device(device_t parent_dev, struct usb_bus *bus,
(usbd_get_no_descriptors(udev->cdesc,
UDESC_ENDPOINT) == 0)) {
DPRINTFN(0, "Found no endpoints "
"(trying next config)!\n");
"(trying next config)\n");
config_index++;
goto repeat_set_config;
}
@ -1814,7 +1814,7 @@ usb_alloc_device(device_t parent_dev, struct usb_bus *bus,
}
}
} else if (usb_test_huawei_autoinst_p(udev, &uaa) == 0) {
DPRINTFN(0, "Found Huawei auto-install disk!\n");
DPRINTFN(0, "Found Huawei auto-install disk\n");
/* leave device unconfigured */
usb_unconfigure(udev, 0);
}

View File

@ -450,7 +450,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c = &s->cur[s->pushlevel];
} else {
DPRINTFN(0, "Cannot push "
"item @ %d!\n", s->pushlevel);
"item @ %d\n", s->pushlevel);
}
break;
case 11: /* Pop */
@ -468,7 +468,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c->loc.count = 0;
} else {
DPRINTFN(0, "Cannot pop "
"item @ %d!\n", s->pushlevel);
"item @ %d\n", s->pushlevel);
}
break;
default:
@ -490,7 +490,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
s->usages_max[s->nusage] = dval;
s->nusage ++;
} else {
DPRINTFN(0, "max usage reached!\n");
DPRINTFN(0, "max usage reached\n");
}
/* clear any pending usage sets */
@ -525,7 +525,7 @@ hid_get_item(struct hid_data *s, struct hid_item *h)
c->usage_maximum;
s->nusage ++;
} else {
DPRINTFN(0, "Usage set dropped!\n");
DPRINTFN(0, "Usage set dropped\n");
}
s->susage = 0;
break;

View File

@ -385,7 +385,7 @@ uhub_reattach_port(struct uhub_softc *sc, uint8_t portno)
(!(sc->sc_st.port_status & UPS_CURRENT_CONNECT_STATUS))) {
if (timeout) {
DPRINTFN(0, "giving up port reset "
"- device vanished!\n");
"- device vanished\n");
goto error;
}
timeout = 1;
@ -435,7 +435,7 @@ uhub_reattach_port(struct uhub_softc *sc, uint8_t portno)
child = usb_alloc_device(sc->sc_dev, udev->bus, udev,
udev->depth + 1, portno - 1, portno, speed, mode);
if (child == NULL) {
DPRINTFN(0, "could not allocate new device!\n");
DPRINTFN(0, "could not allocate new device\n");
goto error;
}
return (0); /* success */
@ -711,14 +711,14 @@ uhub_attach(device_t dev)
parent_hub->flags.self_powered : 0);
if (udev->depth > USB_HUB_MAX_DEPTH) {
DPRINTFN(0, "hub depth, %d, exceeded. HUB ignored!\n",
DPRINTFN(0, "hub depth, %d, exceeded. HUB ignored\n",
USB_HUB_MAX_DEPTH);
goto error;
}
if (!udev->flags.self_powered && parent_hub &&
(!parent_hub->flags.self_powered)) {
DPRINTFN(0, "bus powered HUB connected to "
"bus powered HUB. HUB ignored!\n");
"bus powered HUB. HUB ignored\n");
goto error;
}
/* get HUB descriptor */
@ -740,11 +740,11 @@ uhub_attach(device_t dev)
goto error;
}
if (hubdesc.bNbrPorts != nports) {
DPRINTFN(0, "number of ports changed!\n");
DPRINTFN(0, "number of ports changed\n");
goto error;
}
if (nports == 0) {
DPRINTFN(0, "portless HUB!\n");
DPRINTFN(0, "portless HUB\n");
goto error;
}
hub = malloc(sizeof(hub[0]) + (sizeof(hub->ports[0]) * nports),
@ -784,7 +784,7 @@ uhub_attach(device_t dev)
}
if (err) {
DPRINTFN(0, "cannot setup interrupt transfer, "
"errstr=%s!\n", usbd_errstr(err));
"errstr=%s\n", usbd_errstr(err));
goto error;
}
/* wait with power off for a while */
@ -1924,7 +1924,7 @@ usb_dev_resume_peer(struct usb_device *udev)
err = usbd_req_clear_port_feature(udev->parent_hub,
NULL, udev->port_no, UHF_PORT_SUSPEND);
if (err) {
DPRINTFN(0, "Resuming port failed!\n");
DPRINTFN(0, "Resuming port failed\n");
return;
}
/* resume settle time */
@ -1972,7 +1972,7 @@ usb_dev_resume_peer(struct usb_device *udev)
NULL, UF_DEVICE_REMOTE_WAKEUP);
if (err) {
DPRINTFN(0, "Clearing device "
"remote wakeup failed: %s!\n",
"remote wakeup failed: %s\n",
usbd_errstr(err));
}
}
@ -2042,7 +2042,7 @@ usb_dev_suspend_peer(struct usb_device *udev)
NULL, UF_DEVICE_REMOTE_WAKEUP);
if (err) {
DPRINTFN(0, "Setting device "
"remote wakeup failed!\n");
"remote wakeup failed\n");
}
}
USB_BUS_LOCK(udev->bus);

View File

@ -284,7 +284,7 @@ bbb_command_callback(struct usb_xfer *xfer, usb_error_t error)
sc->cbw.bCDBLength = sc->cmd_len;
if (sc->cbw.bCDBLength > sizeof(sc->cbw.CBWCDB)) {
sc->cbw.bCDBLength = sizeof(sc->cbw.CBWCDB);
DPRINTFN(0, "Truncating long command!\n");
DPRINTFN(0, "Truncating long command\n");
}
usbd_xfer_set_frame_data(xfer, 0, &sc->cbw, sizeof(sc->cbw));
usbd_transfer_submit(xfer);

View File

@ -444,7 +444,7 @@ usb_proc_drain(struct usb_process *up)
if (cold) {
USB_THREAD_SUSPEND(up->up_ptr);
printf("WARNING: A USB process has "
"been left suspended!\n");
"been left suspended\n");
break;
}
cv_wait(&up->up_cv, up->up_mtx);

View File

@ -1549,7 +1549,7 @@ usbd_req_re_enumerate(struct usb_device *udev, struct mtx *mtx)
USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0);
if (err) {
DPRINTFN(0, "getting device descriptor "
"at addr %d failed, %s!\n", udev->address,
"at addr %d failed, %s\n", udev->address,
usbd_errstr(err));
goto done;
}
@ -1557,7 +1557,7 @@ usbd_req_re_enumerate(struct usb_device *udev, struct mtx *mtx)
err = usbd_req_get_device_desc(udev, mtx, &udev->ddesc);
if (err) {
DPRINTFN(0, "addr=%d, getting device "
"descriptor failed, %s!\n", old_addr,
"descriptor failed, %s\n", old_addr,
usbd_errstr(err));
goto done;
}

View File

@ -201,9 +201,9 @@ usbd_transfer_setup_sub_malloc(struct usb_setup_params *parm,
usb_size_t r;
usb_size_t z;
USB_ASSERT(align > 1, ("Invalid alignment, 0x%08x!\n",
USB_ASSERT(align > 1, ("Invalid alignment, 0x%08x\n",
align));
USB_ASSERT(size > 0, ("Invalid size = 0!\n"));
USB_ASSERT(size > 0, ("Invalid size = 0\n"));
if (count == 0) {
return (0); /* nothing to allocate */
@ -1200,7 +1200,7 @@ usbd_transfer_unsetup(struct usb_xfer **pxfer, uint16_t n_setup)
USB_BUS_LOCK(info->bus);
USB_ASSERT(info->setup_refcount != 0, ("Invalid setup "
"reference count!\n"));
"reference count\n"));
info->setup_refcount--;
@ -1353,7 +1353,7 @@ usbd_setup_ctrl_transfer(struct usb_xfer *xfer)
if (len > xfer->flags_int.control_rem) {
DPRINTFN(0, "Length (%d) greater than "
"remaining length (%d)!\n", len,
"remaining length (%d)\n", len,
xfer->flags_int.control_rem);
goto error;
}
@ -1366,7 +1366,7 @@ usbd_setup_ctrl_transfer(struct usb_xfer *xfer)
(len != xfer->flags_int.control_rem) &&
(xfer->nframes != 1)) {
DPRINTFN(0, "Short control transfer without "
"force_short_xfer set!\n");
"force_short_xfer set\n");
goto error;
}
xfer->flags_int.control_rem -= len;
@ -1927,7 +1927,7 @@ usbd_xfer_set_frame_offset(struct usb_xfer *xfer, usb_frlength_t offset,
usb_frcount_t frindex)
{
KASSERT(!xfer->flags.ext_buffer, ("Cannot offset data frame "
"when the USB buffer is external!\n"));
"when the USB buffer is external\n"));
KASSERT(frindex < xfer->max_frame_count, ("frame index overflow"));
/* set virtual address to load */
@ -2437,7 +2437,7 @@ usbd_pipe_start(struct usb_xfer_queue *pq)
&udev->cs_msg[0], &udev->cs_msg[1]);
} else {
/* should not happen */
DPRINTFN(0, "No stall handler!\n");
DPRINTFN(0, "No stall handler\n");
}
/*
* Check if we should stall. Some USB hardware
@ -2580,7 +2580,7 @@ usbd_callback_wrapper_sub(struct usb_xfer *xfer)
if (xfer->aframes > xfer->nframes) {
if (xfer->error == 0) {
panic("%s: actual number of frames, %d, is "
"greater than initial number of frames, %d!\n",
"greater than initial number of frames, %d\n",
__FUNCTION__, xfer->aframes, xfer->nframes);
} else {
/* just set some valid value */
@ -2607,7 +2607,7 @@ usbd_callback_wrapper_sub(struct usb_xfer *xfer)
if (xfer->actlen > xfer->sumlen) {
if (xfer->error == 0) {
panic("%s: actual length, %d, is greater than "
"initial length, %d!\n",
"initial length, %d\n",
__FUNCTION__, xfer->actlen, xfer->sumlen);
} else {
/* just set some valid value */
@ -2809,7 +2809,7 @@ usbd_default_transfer_setup(struct usb_device *udev)
udev->default_xfer, usb_control_ep_cfg, USB_DEFAULT_XFER_MAX, NULL,
udev->default_mtx)) {
DPRINTFN(0, "could not setup default "
"USB transfer!\n");
"USB transfer\n");
} else {
goto repeat;
}

View File

@ -292,7 +292,7 @@ upgt_attach(device_t dev)
/* Calculate device memory space. */
if (sc->sc_memaddr_frame_start == 0 || sc->sc_memaddr_frame_end == 0) {
device_printf(dev,
"could not find memory space addresses on FW!\n");
"could not find memory space addresses on FW\n");
error = EIO;
goto fail5;
}
@ -732,7 +732,7 @@ upgt_set_macfilter(struct upgt_softc *sc, uint8_t state)
break;
default:
device_printf(sc->sc_dev,
"MAC filter does not know that state!\n");
"MAC filter does not know that state\n");
break;
}
@ -1181,7 +1181,7 @@ upgt_eeprom_parse(struct upgt_softc *sc)
break;
case UPGT_EEPROM_TYPE_OFF:
DPRINTF(sc, UPGT_DEBUG_FW,
"%s: EEPROM off without end option!\n", __func__);
"%s: EEPROM off without end option\n", __func__);
return (EIO);
default:
DPRINTF(sc, UPGT_DEBUG_FW,
@ -1356,7 +1356,7 @@ upgt_eeprom_read(struct upgt_softc *sc)
error = mtx_sleep(sc, &sc->sc_mtx, 0, "eeprom_request", hz);
if (error != 0) {
device_printf(sc->sc_dev,
"timeout while waiting for EEPROM data!\n");
"timeout while waiting for EEPROM data\n");
UPGT_UNLOCK(sc);
return (EIO);
}
@ -1490,7 +1490,7 @@ upgt_rx(struct upgt_softc *sc, uint8_t *data, int pkglen, int *rssi)
("A current mbuf storage is small (%d)", pkglen + ETHER_ALIGN));
m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
device_printf(sc->sc_dev, "could not create RX mbuf!\n");
device_printf(sc->sc_dev, "could not create RX mbuf\n");
return (NULL);
}
m_adj(m, ETHER_ALIGN);
@ -1587,7 +1587,7 @@ upgt_mem_free(struct upgt_softc *sc, uint32_t addr)
}
device_printf(sc->sc_dev,
"could not free memory address 0x%08x!\n", addr);
"could not free memory address 0x%08x\n", addr);
}
static int
@ -1602,7 +1602,7 @@ upgt_fw_load(struct upgt_softc *sc)
fw = firmware_get(upgt_fwname);
if (fw == NULL) {
device_printf(sc->sc_dev, "could not read microcode %s!\n",
device_printf(sc->sc_dev, "could not read microcode %s\n",
upgt_fwname);
return (EIO);
}
@ -1676,7 +1676,7 @@ upgt_fw_load(struct upgt_softc *sc)
usbd_transfer_start(sc->sc_xfer[UPGT_BULK_RX]);
error = mtx_sleep(sc, &sc->sc_mtx, 0, "upgtfw", 2 * hz);
if (error != 0) {
device_printf(sc->sc_dev, "firmware load failed!\n");
device_printf(sc->sc_dev, "firmware load failed\n");
error = EIO;
}
@ -1782,7 +1782,7 @@ upgt_fw_verify(struct upgt_softc *sc)
fw = firmware_get(upgt_fwname);
if (fw == NULL) {
device_printf(sc->sc_dev, "could not read microcode %s!\n",
device_printf(sc->sc_dev, "could not read microcode %s\n",
upgt_fwname);
return EIO;
}
@ -1802,7 +1802,7 @@ upgt_fw_verify(struct upgt_softc *sc)
}
if (offset == fw->datasize) {
device_printf(sc->sc_dev,
"firmware Boot Record Area not found!\n");
"firmware Boot Record Area not found\n");
error = EIO;
goto fail;
}
@ -1827,7 +1827,7 @@ upgt_fw_verify(struct upgt_softc *sc)
if (bra_option_len != UPGT_BRA_FWTYPE_SIZE) {
device_printf(sc->sc_dev,
"wrong UPGT_BRA_TYPE_FW len!\n");
"wrong UPGT_BRA_TYPE_FW len\n");
error = EIO;
goto fail;
}
@ -1842,7 +1842,7 @@ upgt_fw_verify(struct upgt_softc *sc)
break;
}
device_printf(sc->sc_dev,
"unsupported firmware type!\n");
"unsupported firmware type\n");
error = EIO;
goto fail;
case UPGT_BRA_TYPE_VERSION:
@ -1946,7 +1946,7 @@ upgt_alloc_tx(struct upgt_softc *sc)
data->buf = malloc(MCLBYTES, M_USBDEV, M_NOWAIT | M_ZERO);
if (data->buf == NULL) {
device_printf(sc->sc_dev,
"could not allocate TX buffer!\n");
"could not allocate TX buffer\n");
return (ENOMEM);
}
STAILQ_INSERT_TAIL(&sc->sc_tx_inactive, data, next);
@ -1970,7 +1970,7 @@ upgt_alloc_rx(struct upgt_softc *sc)
data->buf = malloc(MCLBYTES, M_USBDEV, M_NOWAIT | M_ZERO);
if (data->buf == NULL) {
device_printf(sc->sc_dev,
"could not allocate RX buffer!\n");
"could not allocate RX buffer\n");
return (ENOMEM);
}
STAILQ_INSERT_TAIL(&sc->sc_rx_inactive, data, next);