@@ -1346,38 +1346,42 @@ static const int *__devinit piix_init_sata_map(struct pci_dev *pdev,
const int *map;
int i, invalid_map = 0;
u8 map_value;
+ char maps[50] = {0};
+ int len = 0;
pci_read_config_byte(pdev, ICH5_PMR, &map_value);
map = map_db->map[map_value & map_db->mask];
- dev_info(&pdev->dev, "MAP [");
for (i = 0; i < 4; i++) {
switch (map[i]) {
case RV:
invalid_map = 1;
- pr_cont(" XX");
+ len += snprintf(maps + len, sizeof(maps) - len, " XX");
break;
case NA:
- pr_cont(" --");
+ len += snprintf(maps + len, sizeof(maps) - len, " --");
break;
case IDE:
WARN_ON((i & 1) || map[i + 1] != IDE);
pinfo[i / 2] = piix_port_info[ich_pata_100];
i++;
- pr_cont(" IDE IDE");
+ len += snprintf(maps + len, sizeof(maps) - len,
+ " IDE IDE");
break;
default:
- pr_cont(" P%d", map[i]);
+ len += snprintf(maps + len, sizeof(maps) - len,
+ " P%d", map[i]);
if (i & 1)
pinfo[i / 2].flags |= ATA_FLAG_SLAVE_POSS;
break;
}
}
- pr_cont(" ]\n");
+
+ dev_info(&pdev->dev, "MAP [%s ]\n", maps);
if (invalid_map)
dev_err(&pdev->dev, "invalid MAP value %u\n", map_value);
@@ -296,41 +296,36 @@ static void redrat3_issue_async(struct redrat3_dev *rr3)
static void redrat3_dump_fw_error(struct redrat3_dev *rr3, int code)
{
- if (!rr3->transmitting && (code != 0x40))
- dev_info(rr3->dev, "fw error code 0x%02x: ", code);
+ const char *msg = "";
switch (code) {
case 0x00:
- pr_cont("No Error\n");
+ msg = "No Error";
break;
/* Codes 0x20 through 0x2f are IR Firmware Errors */
case 0x20:
- pr_cont("Initial signal pulse not long enough "
- "to measure carrier frequency\n");
+ msg = "Initial signal pulse not long enough to measure carrier frequency";
break;
case 0x21:
- pr_cont("Not enough length values allocated for signal\n");
+ msg = "Not enough length values allocated for signal";
break;
case 0x22:
- pr_cont("Not enough memory allocated for signal data\n");
+ msg = "Not enough memory allocated for signal data";
break;
case 0x23:
- pr_cont("Too many signal repeats\n");
+ msg = "Too many signal repeats";
break;
case 0x28:
- pr_cont("Insufficient memory available for IR signal "
- "data memory allocation\n");
+ msg = "Insufficient memory available for IR signal data memory allocation";
break;
case 0x29:
- pr_cont("Insufficient memory available "
- "for IrDa signal data memory allocation\n");
+ msg = "Insufficient memory available for IrDa signal data memory allocation";
break;
/* Codes 0x30 through 0x3f are USB Firmware Errors */
case 0x30:
- pr_cont("Insufficient memory available for bulk "
- "transfer structure\n");
+ msg = "Insufficient memory available for bulk transfer structure";
break;
/*
@@ -339,20 +334,23 @@ static void redrat3_dump_fw_error(struct redrat3_dev *rr3, int code)
*/
case 0x40:
if (!rr3->transmitting)
- pr_cont("Signal capture has been terminated\n");
+ msg = "Signal capture has been terminated";
break;
case 0x41:
- pr_cont("Attempt to set/get and unknown signal I/O "
- "algorithm parameter\n");
+ msg = "Attempt to set/get and unknown signal I/O algorithm parameter";
break;
case 0x42:
- pr_cont("Signal capture already started\n");
+ msg = "Signal capture already started";
break;
default:
- pr_cont("Unknown Error\n");
+ msg = "Unknown Error";
break;
}
+
+ if (!rr3->transmitting && (code != 0x40))
+ dev_info(rr3->dev, "fw error code 0x%02x: %s\n", code, msg);
+
}
static u32 redrat3_val_to_mod_freq(struct redrat3_signal_header *ph)
@@ -987,24 +987,28 @@ static void
bnx2_report_link(struct bnx2 *bp)
{
if (bp->link_up) {
+ const char *fc_type = "";
+ const char *fc_on = "";
netif_carrier_on(bp->dev);
- netdev_info(bp->dev, "NIC %s Link is Up, %d Mbps %s duplex",
- bnx2_xceiver_str(bp),
- bp->line_speed,
- bp->duplex == DUPLEX_FULL ? "full" : "half");
if (bp->flow_ctrl) {
if (bp->flow_ctrl & FLOW_CTRL_RX) {
- pr_cont(", receive ");
if (bp->flow_ctrl & FLOW_CTRL_TX)
- pr_cont("& transmit ");
- }
- else {
- pr_cont(", transmit ");
+ fc_type = ", receive & transmit";
+ else
+ fc_type = ", receive";
+
+ } else {
+ fc_type = ", transmit";
}
- pr_cont("flow control ON");
+ fc_on = " flow control ON";
}
- pr_cont("\n");
+ netdev_info(bp->dev, "NIC %s Link is Up, %d Mbps %s duplex%s%s\n",
+ bnx2_xceiver_str(bp),
+ bp->line_speed,
+ bp->duplex == DUPLEX_FULL ? "full" : "half",
+ fc_type, fc_on);
+
} else {
netif_carrier_off(bp->dev);
netdev_err(bp->dev, "NIC %s Link is Down\n",