s2io: Generate complete messages using single line DBG_PRINTs

Single line log messages should be emitted by a single call
where possible.

Converted multiple calls to DBG_PRINT to single call form.
Removed "s2io:" preface from DBG_PRINTs.

The DBG_PRINT macro now emits a log level and is surrounded by
a do {...} while (0)

All s2io log output is now prefaced with KBUILD_MODNAME ": "
via pr_fmt.

The DBG_PRINT macro should probably be converted to use the
dev_<level> form eventually.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joe Perches 2009-08-25 08:52:00 +00:00 коммит произвёл David S. Miller
Родитель 82c2d02356
Коммит 9e39f7c5b3
2 изменённых файлов: 165 добавлений и 161 удалений

Просмотреть файл

@ -652,9 +652,9 @@ static int init_shared_mem(struct s2io_nic *nic)
size += tx_cfg->fifo_len; size += tx_cfg->fifo_len;
} }
if (size > MAX_AVAILABLE_TXDS) { if (size > MAX_AVAILABLE_TXDS) {
DBG_PRINT(ERR_DBG, "s2io: Requested TxDs too high, "); DBG_PRINT(ERR_DBG,
DBG_PRINT(ERR_DBG, "Requested: %d, max supported: 8192\n", "Too many TxDs requested: %d, max supported: %d\n",
size); size, MAX_AVAILABLE_TXDS);
return -EINVAL; return -EINVAL;
} }
@ -667,10 +667,9 @@ static int init_shared_mem(struct s2io_nic *nic)
* Legal values are from 2 to 8192 * Legal values are from 2 to 8192
*/ */
if (size < 2) { if (size < 2) {
DBG_PRINT(ERR_DBG, "s2io: Invalid fifo len (%d)", size); DBG_PRINT(ERR_DBG, "Fifo %d: Invalid length (%d) - "
DBG_PRINT(ERR_DBG, "for fifo %d\n", i); "Valid lengths are 2 through 8192\n",
DBG_PRINT(ERR_DBG, "s2io: Legal values for fifo len" i, size);
"are 2 to 8192\n");
return -EINVAL; return -EINVAL;
} }
} }
@ -713,8 +712,8 @@ static int init_shared_mem(struct s2io_nic *nic)
tmp_v = pci_alloc_consistent(nic->pdev, tmp_v = pci_alloc_consistent(nic->pdev,
PAGE_SIZE, &tmp_p); PAGE_SIZE, &tmp_p);
if (!tmp_v) { if (!tmp_v) {
DBG_PRINT(INFO_DBG, "pci_alloc_consistent "); DBG_PRINT(INFO_DBG,
DBG_PRINT(INFO_DBG, "failed for TxDL\n"); "pci_alloc_consistent failed for TxDL\n");
return -ENOMEM; return -ENOMEM;
} }
/* If we got a zero DMA address(can happen on /* If we got a zero DMA address(can happen on
@ -725,17 +724,14 @@ static int init_shared_mem(struct s2io_nic *nic)
if (!tmp_p) { if (!tmp_p) {
mac_control->zerodma_virt_addr = tmp_v; mac_control->zerodma_virt_addr = tmp_v;
DBG_PRINT(INIT_DBG, DBG_PRINT(INIT_DBG,
"%s: Zero DMA address for TxDL. ", "%s: Zero DMA address for TxDL. "
dev->name); "Virtual address %p\n",
DBG_PRINT(INIT_DBG, dev->name, tmp_v);
"Virtual address %p\n", tmp_v);
tmp_v = pci_alloc_consistent(nic->pdev, tmp_v = pci_alloc_consistent(nic->pdev,
PAGE_SIZE, &tmp_p); PAGE_SIZE, &tmp_p);
if (!tmp_v) { if (!tmp_v) {
DBG_PRINT(INFO_DBG, DBG_PRINT(INFO_DBG,
"pci_alloc_consistent "); "pci_alloc_consistent failed for TxDL\n");
DBG_PRINT(INFO_DBG,
"failed for TxDL\n");
return -ENOMEM; return -ENOMEM;
} }
mem_allocated += PAGE_SIZE; mem_allocated += PAGE_SIZE;
@ -771,9 +767,9 @@ static int init_shared_mem(struct s2io_nic *nic)
struct ring_info *ring = &mac_control->rings[i]; struct ring_info *ring = &mac_control->rings[i];
if (rx_cfg->num_rxd % (rxd_count[nic->rxd_mode] + 1)) { if (rx_cfg->num_rxd % (rxd_count[nic->rxd_mode] + 1)) {
DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name); DBG_PRINT(ERR_DBG, "%s: Ring%d RxD count is not a "
DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ", i); "multiple of RxDs per Block\n",
DBG_PRINT(ERR_DBG, "RxDs per Block"); dev->name, i);
return FAILURE; return FAILURE;
} }
size += rx_cfg->num_rxd; size += rx_cfg->num_rxd;
@ -994,10 +990,9 @@ static void free_shared_mem(struct s2io_nic *nic)
mac_control->zerodma_virt_addr, mac_control->zerodma_virt_addr,
(dma_addr_t)0); (dma_addr_t)0);
DBG_PRINT(INIT_DBG, DBG_PRINT(INIT_DBG,
"%s: Freeing TxDL with zero DMA addr. ", "%s: Freeing TxDL with zero DMA address. "
dev->name); "Virtual address %p\n",
DBG_PRINT(INIT_DBG, "Virtual address %p\n", dev->name, mac_control->zerodma_virt_addr);
mac_control->zerodma_virt_addr);
swstats->mem_freed += PAGE_SIZE; swstats->mem_freed += PAGE_SIZE;
} }
kfree(fifo->list_info); kfree(fifo->list_info);
@ -1120,6 +1115,7 @@ static int s2io_print_pci_mode(struct s2io_nic *nic)
register u64 val64 = 0; register u64 val64 = 0;
int mode; int mode;
struct config_param *config = &nic->config; struct config_param *config = &nic->config;
const char *pcimode;
val64 = readq(&bar0->pci_mode); val64 = readq(&bar0->pci_mode);
mode = (u8)GET_PCI_MODE(val64); mode = (u8)GET_PCI_MODE(val64);
@ -1135,38 +1131,39 @@ static int s2io_print_pci_mode(struct s2io_nic *nic)
return mode; return mode;
} }
DBG_PRINT(ERR_DBG, "%s: Device is on %d bit ",
nic->dev->name, val64 & PCI_MODE_32_BITS ? 32 : 64);
switch (mode) { switch (mode) {
case PCI_MODE_PCI_33: case PCI_MODE_PCI_33:
DBG_PRINT(ERR_DBG, "33MHz PCI bus\n"); pcimode = "33MHz PCI bus";
break; break;
case PCI_MODE_PCI_66: case PCI_MODE_PCI_66:
DBG_PRINT(ERR_DBG, "66MHz PCI bus\n"); pcimode = "66MHz PCI bus";
break; break;
case PCI_MODE_PCIX_M1_66: case PCI_MODE_PCIX_M1_66:
DBG_PRINT(ERR_DBG, "66MHz PCIX(M1) bus\n"); pcimode = "66MHz PCIX(M1) bus";
break; break;
case PCI_MODE_PCIX_M1_100: case PCI_MODE_PCIX_M1_100:
DBG_PRINT(ERR_DBG, "100MHz PCIX(M1) bus\n"); pcimode = "100MHz PCIX(M1) bus";
break; break;
case PCI_MODE_PCIX_M1_133: case PCI_MODE_PCIX_M1_133:
DBG_PRINT(ERR_DBG, "133MHz PCIX(M1) bus\n"); pcimode = "133MHz PCIX(M1) bus";
break; break;
case PCI_MODE_PCIX_M2_66: case PCI_MODE_PCIX_M2_66:
DBG_PRINT(ERR_DBG, "133MHz PCIX(M2) bus\n"); pcimode = "133MHz PCIX(M2) bus";
break; break;
case PCI_MODE_PCIX_M2_100: case PCI_MODE_PCIX_M2_100:
DBG_PRINT(ERR_DBG, "200MHz PCIX(M2) bus\n"); pcimode = "200MHz PCIX(M2) bus";
break; break;
case PCI_MODE_PCIX_M2_133: case PCI_MODE_PCIX_M2_133:
DBG_PRINT(ERR_DBG, "266MHz PCIX(M2) bus\n"); pcimode = "266MHz PCIX(M2) bus";
break; break;
default: default:
return -1; /* Unsupported bus speed */ pcimode = "unsupported bus!";
mode = -1;
} }
DBG_PRINT(ERR_DBG, "%s: Device is on %d bit %s\n",
nic->dev->name, val64 & PCI_MODE_32_BITS ? 32 : 64, pcimode);
return mode; return mode;
} }
@ -1704,9 +1701,9 @@ static int init_nic(struct s2io_nic *nic)
/* Disable differentiated services steering logic */ /* Disable differentiated services steering logic */
for (i = 0; i < 64; i++) { for (i = 0; i < 64; i++) {
if (rts_ds_steer(nic, i, 0) == FAILURE) { if (rts_ds_steer(nic, i, 0) == FAILURE) {
DBG_PRINT(ERR_DBG, "%s: failed rts ds steering", DBG_PRINT(ERR_DBG,
dev->name); "%s: rts_ds_steer failed on codepoint %d\n",
DBG_PRINT(ERR_DBG, "set on codepoint %d\n", i); dev->name, i);
return -ENODEV; return -ENODEV;
} }
} }
@ -1783,7 +1780,7 @@ static int init_nic(struct s2io_nic *nic)
break; break;
if (time > 10) { if (time > 10) {
DBG_PRINT(ERR_DBG, "%s: RTI init Failed\n", DBG_PRINT(ERR_DBG, "%s: RTI init failed\n",
dev->name); dev->name);
return -ENODEV; return -ENODEV;
} }
@ -2189,35 +2186,35 @@ static int verify_xena_quiescence(struct s2io_nic *sp)
mode = s2io_verify_pci_mode(sp); mode = s2io_verify_pci_mode(sp);
if (!(val64 & ADAPTER_STATUS_TDMA_READY)) { if (!(val64 & ADAPTER_STATUS_TDMA_READY)) {
DBG_PRINT(ERR_DBG, "%s", "TDMA is not ready!"); DBG_PRINT(ERR_DBG, "TDMA is not ready!\n");
return 0; return 0;
} }
if (!(val64 & ADAPTER_STATUS_RDMA_READY)) { if (!(val64 & ADAPTER_STATUS_RDMA_READY)) {
DBG_PRINT(ERR_DBG, "%s", "RDMA is not ready!"); DBG_PRINT(ERR_DBG, "RDMA is not ready!\n");
return 0; return 0;
} }
if (!(val64 & ADAPTER_STATUS_PFC_READY)) { if (!(val64 & ADAPTER_STATUS_PFC_READY)) {
DBG_PRINT(ERR_DBG, "%s", "PFC is not ready!"); DBG_PRINT(ERR_DBG, "PFC is not ready!\n");
return 0; return 0;
} }
if (!(val64 & ADAPTER_STATUS_TMAC_BUF_EMPTY)) { if (!(val64 & ADAPTER_STATUS_TMAC_BUF_EMPTY)) {
DBG_PRINT(ERR_DBG, "%s", "TMAC BUF is not empty!"); DBG_PRINT(ERR_DBG, "TMAC BUF is not empty!\n");
return 0; return 0;
} }
if (!(val64 & ADAPTER_STATUS_PIC_QUIESCENT)) { if (!(val64 & ADAPTER_STATUS_PIC_QUIESCENT)) {
DBG_PRINT(ERR_DBG, "%s", "PIC is not QUIESCENT!"); DBG_PRINT(ERR_DBG, "PIC is not QUIESCENT!\n");
return 0; return 0;
} }
if (!(val64 & ADAPTER_STATUS_MC_DRAM_READY)) { if (!(val64 & ADAPTER_STATUS_MC_DRAM_READY)) {
DBG_PRINT(ERR_DBG, "%s", "MC_DRAM is not ready!"); DBG_PRINT(ERR_DBG, "MC_DRAM is not ready!\n");
return 0; return 0;
} }
if (!(val64 & ADAPTER_STATUS_MC_QUEUES_READY)) { if (!(val64 & ADAPTER_STATUS_MC_QUEUES_READY)) {
DBG_PRINT(ERR_DBG, "%s", "MC_QUEUES is not ready!"); DBG_PRINT(ERR_DBG, "MC_QUEUES is not ready!\n");
return 0; return 0;
} }
if (!(val64 & ADAPTER_STATUS_M_PLL_LOCK)) { if (!(val64 & ADAPTER_STATUS_M_PLL_LOCK)) {
DBG_PRINT(ERR_DBG, "%s", "M_PLL is not locked!"); DBG_PRINT(ERR_DBG, "M_PLL is not locked!\n");
return 0; return 0;
} }
@ -2229,12 +2226,12 @@ static int verify_xena_quiescence(struct s2io_nic *sp)
if (!(val64 & ADAPTER_STATUS_P_PLL_LOCK) && if (!(val64 & ADAPTER_STATUS_P_PLL_LOCK) &&
sp->device_type == XFRAME_II_DEVICE && sp->device_type == XFRAME_II_DEVICE &&
mode != PCI_MODE_PCI_33) { mode != PCI_MODE_PCI_33) {
DBG_PRINT(ERR_DBG, "%s", "P_PLL is not locked!"); DBG_PRINT(ERR_DBG, "P_PLL is not locked!\n");
return 0; return 0;
} }
if (!((val64 & ADAPTER_STATUS_RC_PRC_QUIESCENT) == if (!((val64 & ADAPTER_STATUS_RC_PRC_QUIESCENT) ==
ADAPTER_STATUS_RC_PRC_QUIESCENT)) { ADAPTER_STATUS_RC_PRC_QUIESCENT)) {
DBG_PRINT(ERR_DBG, "%s", "RC_PRC is not QUIESCENT!"); DBG_PRINT(ERR_DBG, "RC_PRC is not QUIESCENT!\n");
return 0; return 0;
} }
return 1; return 1;
@ -2339,9 +2336,9 @@ static int start_nic(struct s2io_nic *nic)
*/ */
val64 = readq(&bar0->adapter_status); val64 = readq(&bar0->adapter_status);
if (!verify_xena_quiescence(nic)) { if (!verify_xena_quiescence(nic)) {
DBG_PRINT(ERR_DBG, "%s: device is not ready, ", dev->name); DBG_PRINT(ERR_DBG, "%s: device is not ready, "
DBG_PRINT(ERR_DBG, "Adapter status reads: 0x%llx\n", "Adapter status reads: 0x%llx\n",
(unsigned long long)val64); dev->name, (unsigned long long)val64);
return FAILURE; return FAILURE;
} }
@ -2547,8 +2544,8 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring,
if ((block_no == block_no1) && if ((block_no == block_no1) &&
(off == ring->rx_curr_get_info.offset) && (off == ring->rx_curr_get_info.offset) &&
(rxdp->Host_Control)) { (rxdp->Host_Control)) {
DBG_PRINT(INTR_DBG, "%s: Get and Put", ring->dev->name); DBG_PRINT(INTR_DBG, "%s: Get and Put info equated\n",
DBG_PRINT(INTR_DBG, " info equated\n"); ring->dev->name);
goto end; goto end;
} }
if (off && (off == ring->rxd_count)) { if (off && (off == ring->rxd_count)) {
@ -2583,8 +2580,8 @@ static int fill_rx_buffers(struct s2io_nic *nic, struct ring_info *ring,
/* allocate skb */ /* allocate skb */
skb = dev_alloc_skb(size); skb = dev_alloc_skb(size);
if (!skb) { if (!skb) {
DBG_PRINT(INFO_DBG, "%s: Out of ", ring->dev->name); DBG_PRINT(INFO_DBG, "%s: Could not allocate skb\n",
DBG_PRINT(INFO_DBG, "memory to allocate SKBs\n"); ring->dev->name);
if (first_rxdp) { if (first_rxdp) {
wmb(); wmb();
first_rxdp->Control_1 |= RXD_OWN_XENA; first_rxdp->Control_1 |= RXD_OWN_XENA;
@ -2814,8 +2811,8 @@ static void free_rx_buffers(struct s2io_nic *sp)
static int s2io_chk_rx_buffers(struct s2io_nic *nic, struct ring_info *ring) static int s2io_chk_rx_buffers(struct s2io_nic *nic, struct ring_info *ring)
{ {
if (fill_rx_buffers(nic, ring, 0) == -ENOMEM) { if (fill_rx_buffers(nic, ring, 0) == -ENOMEM) {
DBG_PRINT(INFO_DBG, "%s:Out of memory", ring->dev->name); DBG_PRINT(INFO_DBG, "%s: Out of memory in Rx Intr!!\n",
DBG_PRINT(INFO_DBG, " in Rx Intr!!\n"); ring->dev->name);
} }
return 0; return 0;
} }
@ -2938,8 +2935,9 @@ static void s2io_netpoll(struct net_device *dev)
struct ring_info *ring = &mac_control->rings[i]; struct ring_info *ring = &mac_control->rings[i];
if (fill_rx_buffers(nic, ring, 0) == -ENOMEM) { if (fill_rx_buffers(nic, ring, 0) == -ENOMEM) {
DBG_PRINT(INFO_DBG, "%s:Out of memory", dev->name); DBG_PRINT(INFO_DBG,
DBG_PRINT(INFO_DBG, " in Rx Netpoll!!\n"); "%s: Out of memory in Rx Netpoll!!\n",
dev->name);
break; break;
} }
} }
@ -2991,9 +2989,8 @@ static int rx_intr_handler(struct ring_info *ring_data, int budget)
} }
skb = (struct sk_buff *)((unsigned long)rxdp->Host_Control); skb = (struct sk_buff *)((unsigned long)rxdp->Host_Control);
if (skb == NULL) { if (skb == NULL) {
DBG_PRINT(ERR_DBG, "%s: The skb is ", DBG_PRINT(ERR_DBG, "%s: NULL skb in Rx Intr\n",
ring_data->dev->name); ring_data->dev->name);
DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");
return 0; return 0;
} }
if (ring_data->rxd_mode == RXD_MODE_1) { if (ring_data->rxd_mode == RXD_MODE_1) {
@ -3126,8 +3123,8 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
skb = s2io_txdl_getskb(fifo_data, txdlp, get_info.offset); skb = s2io_txdl_getskb(fifo_data, txdlp, get_info.offset);
if (skb == NULL) { if (skb == NULL) {
spin_unlock_irqrestore(&fifo_data->tx_lock, flags); spin_unlock_irqrestore(&fifo_data->tx_lock, flags);
DBG_PRINT(ERR_DBG, "%s: Null skb ", __func__); DBG_PRINT(ERR_DBG, "%s: NULL skb in Tx Free Intr\n",
DBG_PRINT(ERR_DBG, "in Tx Free Intr\n"); __func__);
return; return;
} }
pkt_cnt++; pkt_cnt++;
@ -3266,22 +3263,22 @@ static void s2io_chk_xpak_counter(u64 *counter, u64 * regs_stat, u32 index,
if (val64 == 3) { if (val64 == 3) {
switch (type) { switch (type) {
case 1: case 1:
DBG_PRINT(ERR_DBG, "Take Xframe NIC out of " DBG_PRINT(ERR_DBG,
"service. Excessive temperatures may " "Take Xframe NIC out of service.\n");
"result in premature transceiver " DBG_PRINT(ERR_DBG,
"failure \n"); "Excessive temperatures may result in premature transceiver failure.\n");
break; break;
case 2: case 2:
DBG_PRINT(ERR_DBG, "Take Xframe NIC out of " DBG_PRINT(ERR_DBG,
"service Excessive bias currents may " "Take Xframe NIC out of service.\n");
"indicate imminent laser diode " DBG_PRINT(ERR_DBG,
"failure \n"); "Excessive bias currents may indicate imminent laser diode failure.\n");
break; break;
case 3: case 3:
DBG_PRINT(ERR_DBG, "Take Xframe NIC out of " DBG_PRINT(ERR_DBG,
"service Excessive laser output " "Take Xframe NIC out of service.\n");
"power may saturate far-end " DBG_PRINT(ERR_DBG,
"receiver\n"); "Excessive laser output power may saturate far-end receiver.\n");
break; break;
default: default:
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
@ -3321,15 +3318,16 @@ static void s2io_updt_xpak_counter(struct net_device *dev)
val64 = 0x0; val64 = 0x0;
val64 = s2io_mdio_read(MDIO_MMD_PMAPMD, addr, dev); val64 = s2io_mdio_read(MDIO_MMD_PMAPMD, addr, dev);
if ((val64 == 0xFFFF) || (val64 == 0x0000)) { if ((val64 == 0xFFFF) || (val64 == 0x0000)) {
DBG_PRINT(ERR_DBG, "ERR: MDIO slave access failed - " DBG_PRINT(ERR_DBG,
"Returned %llx\n", (unsigned long long)val64); "ERR: MDIO slave access failed - Returned %llx\n",
(unsigned long long)val64);
return; return;
} }
/* Check for the expected value of control reg 1 */ /* Check for the expected value of control reg 1 */
if (val64 != MDIO_CTRL1_SPEED10G) { if (val64 != MDIO_CTRL1_SPEED10G) {
DBG_PRINT(ERR_DBG, "Incorrect value at PMA address 0x0000 - "); DBG_PRINT(ERR_DBG, "Incorrect value at PMA address 0x0000 - "
DBG_PRINT(ERR_DBG, "Returned: %llx- Expected: 0x%x\n", "Returned: %llx- Expected: 0x%x\n",
(unsigned long long)val64, MDIO_CTRL1_SPEED10G); (unsigned long long)val64, MDIO_CTRL1_SPEED10G);
return; return;
} }
@ -3481,7 +3479,7 @@ static void s2io_reset(struct s2io_nic *sp)
struct stat_block *stats; struct stat_block *stats;
struct swStat *swstats; struct swStat *swstats;
DBG_PRINT(INIT_DBG, "%s - Resetting XFrame card %s\n", DBG_PRINT(INIT_DBG, "%s: Resetting XFrame card %s\n",
__func__, sp->dev->name); __func__, sp->dev->name);
/* Back up the PCI-X CMD reg, dont want to lose MMRBC, OST settings */ /* Back up the PCI-X CMD reg, dont want to lose MMRBC, OST settings */
@ -3618,10 +3616,9 @@ static int s2io_set_swapper(struct s2io_nic *sp)
i++; i++;
} }
if (i == 4) { if (i == 4) {
DBG_PRINT(ERR_DBG, "%s: Endian settings are wrong, ", DBG_PRINT(ERR_DBG, "%s: Endian settings are wrong, "
dev->name); "feedback read %llx\n",
DBG_PRINT(ERR_DBG, "feedback read %llx\n", dev->name, (unsigned long long)val64);
(unsigned long long)val64);
return FAILURE; return FAILURE;
} }
valr = value[i]; valr = value[i];
@ -3650,8 +3647,8 @@ static int s2io_set_swapper(struct s2io_nic *sp)
} }
if (i == 4) { if (i == 4) {
unsigned long long x = val64; unsigned long long x = val64;
DBG_PRINT(ERR_DBG, "Write failed, Xmsi_addr "); DBG_PRINT(ERR_DBG,
DBG_PRINT(ERR_DBG, "reads:0x%llx\n", x); "Write failed, Xmsi_addr reads:0x%llx\n", x);
return FAILURE; return FAILURE;
} }
} }
@ -3711,10 +3708,9 @@ static int s2io_set_swapper(struct s2io_nic *sp)
val64 = readq(&bar0->pif_rd_swapper_fb); val64 = readq(&bar0->pif_rd_swapper_fb);
if (val64 != 0x0123456789ABCDEFULL) { if (val64 != 0x0123456789ABCDEFULL) {
/* Endian settings are incorrect, calls for another dekko. */ /* Endian settings are incorrect, calls for another dekko. */
DBG_PRINT(ERR_DBG, "%s: Endian settings are wrong, ", DBG_PRINT(ERR_DBG,
dev->name); "%s: Endian settings are wrong, feedback read %llx\n",
DBG_PRINT(ERR_DBG, "feedback read %llx\n", dev->name, (unsigned long long)val64);
(unsigned long long)val64);
return FAILURE; return FAILURE;
} }
@ -3758,7 +3754,8 @@ static void restore_xmsi_data(struct s2io_nic *nic)
val64 = (s2BIT(7) | s2BIT(15) | vBIT(msix_index, 26, 6)); val64 = (s2BIT(7) | s2BIT(15) | vBIT(msix_index, 26, 6));
writeq(val64, &bar0->xmsi_access); writeq(val64, &bar0->xmsi_access);
if (wait_for_msix_trans(nic, msix_index)) { if (wait_for_msix_trans(nic, msix_index)) {
DBG_PRINT(ERR_DBG, "failed in %s\n", __func__); DBG_PRINT(ERR_DBG, "%s: index: %d failed\n",
__func__, msix_index);
continue; continue;
} }
} }
@ -3779,7 +3776,8 @@ static void store_xmsi_data(struct s2io_nic *nic)
val64 = (s2BIT(15) | vBIT(msix_index, 26, 6)); val64 = (s2BIT(15) | vBIT(msix_index, 26, 6));
writeq(val64, &bar0->xmsi_access); writeq(val64, &bar0->xmsi_access);
if (wait_for_msix_trans(nic, msix_index)) { if (wait_for_msix_trans(nic, msix_index)) {
DBG_PRINT(ERR_DBG, "failed in %s\n", __func__); DBG_PRINT(ERR_DBG, "%s: index: %d failed\n",
__func__, msix_index);
continue; continue;
} }
addr = readq(&bar0->xmsi_address); addr = readq(&bar0->xmsi_address);
@ -3851,7 +3849,7 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
ret = pci_enable_msix(nic->pdev, nic->entries, nic->num_entries); ret = pci_enable_msix(nic->pdev, nic->entries, nic->num_entries);
/* We fail init if error or we get less vectors than min required */ /* We fail init if error or we get less vectors than min required */
if (ret) { if (ret) {
DBG_PRINT(ERR_DBG, "s2io: Enabling MSI-X failed\n"); DBG_PRINT(ERR_DBG, "Enabling MSI-X failed\n");
kfree(nic->entries); kfree(nic->entries);
swstats->mem_freed += nic->num_entries * swstats->mem_freed += nic->num_entries *
sizeof(struct msix_entry); sizeof(struct msix_entry);
@ -3915,8 +3913,8 @@ static int s2io_test_msi(struct s2io_nic *sp)
if (!sp->msi_detected) { if (!sp->msi_detected) {
/* MSI(X) test failed, go back to INTx mode */ /* MSI(X) test failed, go back to INTx mode */
DBG_PRINT(ERR_DBG, "%s: PCI %s: No interrupt was generated " DBG_PRINT(ERR_DBG, "%s: PCI %s: No interrupt was generated "
"using MSI(X) during test\n", sp->dev->name, "using MSI(X) during test\n",
pci_name(pdev)); sp->dev->name, pci_name(pdev));
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
} }
@ -5052,18 +5050,17 @@ static void s2io_set_multicast(struct net_device *dev)
val64 = readq(&bar0->mac_cfg); val64 = readq(&bar0->mac_cfg);
sp->promisc_flg = 0; sp->promisc_flg = 0;
DBG_PRINT(INFO_DBG, "%s: left promiscuous mode\n", DBG_PRINT(INFO_DBG, "%s: left promiscuous mode\n", dev->name);
dev->name);
} }
/* Update individual M_CAST address list */ /* Update individual M_CAST address list */
if ((!sp->m_cast_flg) && dev->mc_count) { if ((!sp->m_cast_flg) && dev->mc_count) {
if (dev->mc_count > if (dev->mc_count >
(config->max_mc_addr - config->max_mac_addr)) { (config->max_mc_addr - config->max_mac_addr)) {
DBG_PRINT(ERR_DBG, "%s: No more Rx filters ", DBG_PRINT(ERR_DBG,
"%s: No more Rx filters can be added - "
"please enable ALL_MULTI instead\n",
dev->name); dev->name);
DBG_PRINT(ERR_DBG, "can be added, please enable ");
DBG_PRINT(ERR_DBG, "ALL_MULTI instead\n");
return; return;
} }
@ -5086,8 +5083,9 @@ static void s2io_set_multicast(struct net_device *dev)
if (wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, if (wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem,
RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING, RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING,
S2IO_BIT_RESET)) { S2IO_BIT_RESET)) {
DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG,
DBG_PRINT(ERR_DBG, "Multicasts failed\n"); "%s: Adding Multicasts failed\n",
dev->name);
return; return;
} }
} }
@ -5117,8 +5115,9 @@ static void s2io_set_multicast(struct net_device *dev)
if (wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem, if (wait_for_cmd_complete(&bar0->rmac_addr_cmd_mem,
RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING, RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING,
S2IO_BIT_RESET)) { S2IO_BIT_RESET)) {
DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG,
DBG_PRINT(ERR_DBG, "Multicasts failed\n"); "%s: Adding Multicasts failed\n",
dev->name);
return; return;
} }
} }
@ -5552,7 +5551,7 @@ static void s2io_ethtool_gringparam(struct net_device *dev,
for (i = 0 ; i < sp->config.tx_fifo_num ; i++) for (i = 0 ; i < sp->config.tx_fifo_num ; i++)
tx_desc_count += sp->config.tx_cfg[i].fifo_len; tx_desc_count += sp->config.tx_cfg[i].fifo_len;
DBG_PRINT(INFO_DBG, "\nmax txds : %d\n", sp->config.max_txds); DBG_PRINT(INFO_DBG, "max txds: %d\n", sp->config.max_txds);
ering->tx_pending = tx_desc_count; ering->tx_pending = tx_desc_count;
rx_desc_count = 0; rx_desc_count = 0;
for (i = 0 ; i < sp->config.rx_ring_num ; i++) for (i = 0 ; i < sp->config.rx_ring_num ; i++)
@ -5886,8 +5885,10 @@ static int s2io_ethtool_seeprom(struct net_device *dev,
if (eeprom->magic != (sp->pdev->vendor | (sp->pdev->device << 16))) { if (eeprom->magic != (sp->pdev->vendor | (sp->pdev->device << 16))) {
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"ETHTOOL_WRITE_EEPROM Err: Magic value "); "ETHTOOL_WRITE_EEPROM Err: "
DBG_PRINT(ERR_DBG, "is wrong, Its not 0x%x\n", eeprom->magic); "Magic value is wrong, it is 0x%x should be 0x%x\n",
(sp->pdev->vendor | (sp->pdev->device << 16)),
eeprom->magic);
return -EFAULT; return -EFAULT;
} }
@ -5900,9 +5901,8 @@ static int s2io_ethtool_seeprom(struct net_device *dev,
if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) { if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) {
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"ETHTOOL_WRITE_EEPROM Err: Cannot "); "ETHTOOL_WRITE_EEPROM Err: "
DBG_PRINT(ERR_DBG, "Cannot write into the specified offset\n");
"write into the specified offset\n");
return -EFAULT; return -EFAULT;
} }
cnt++; cnt++;
@ -5934,13 +5934,13 @@ static int s2io_register_test(struct s2io_nic *sp, uint64_t *data)
val64 = readq(&bar0->pif_rd_swapper_fb); val64 = readq(&bar0->pif_rd_swapper_fb);
if (val64 != 0x123456789abcdefULL) { if (val64 != 0x123456789abcdefULL) {
fail = 1; fail = 1;
DBG_PRINT(INFO_DBG, "Read Test level 1 fails\n"); DBG_PRINT(INFO_DBG, "Read Test level %d fails\n", 1);
} }
val64 = readq(&bar0->rmac_pause_cfg); val64 = readq(&bar0->rmac_pause_cfg);
if (val64 != 0xc000ffff00000000ULL) { if (val64 != 0xc000ffff00000000ULL) {
fail = 1; fail = 1;
DBG_PRINT(INFO_DBG, "Read Test level 2 fails\n"); DBG_PRINT(INFO_DBG, "Read Test level %d fails\n", 2);
} }
val64 = readq(&bar0->rx_queue_cfg); val64 = readq(&bar0->rx_queue_cfg);
@ -5950,13 +5950,13 @@ static int s2io_register_test(struct s2io_nic *sp, uint64_t *data)
exp_val = 0x0808080808080808ULL; exp_val = 0x0808080808080808ULL;
if (val64 != exp_val) { if (val64 != exp_val) {
fail = 1; fail = 1;
DBG_PRINT(INFO_DBG, "Read Test level 3 fails\n"); DBG_PRINT(INFO_DBG, "Read Test level %d fails\n", 3);
} }
val64 = readq(&bar0->xgxs_efifo_cfg); val64 = readq(&bar0->xgxs_efifo_cfg);
if (val64 != 0x000000001923141EULL) { if (val64 != 0x000000001923141EULL) {
fail = 1; fail = 1;
DBG_PRINT(INFO_DBG, "Read Test level 4 fails\n"); DBG_PRINT(INFO_DBG, "Read Test level %d fails\n", 4);
} }
val64 = 0x5A5A5A5A5A5A5A5AULL; val64 = 0x5A5A5A5A5A5A5A5AULL;
@ -5964,7 +5964,7 @@ static int s2io_register_test(struct s2io_nic *sp, uint64_t *data)
val64 = readq(&bar0->xmsi_data); val64 = readq(&bar0->xmsi_data);
if (val64 != 0x5A5A5A5A5A5A5A5AULL) { if (val64 != 0x5A5A5A5A5A5A5A5AULL) {
fail = 1; fail = 1;
DBG_PRINT(ERR_DBG, "Write Test level 1 fails\n"); DBG_PRINT(ERR_DBG, "Write Test level %d fails\n", 1);
} }
val64 = 0xA5A5A5A5A5A5A5A5ULL; val64 = 0xA5A5A5A5A5A5A5A5ULL;
@ -5972,7 +5972,7 @@ static int s2io_register_test(struct s2io_nic *sp, uint64_t *data)
val64 = readq(&bar0->xmsi_data); val64 = readq(&bar0->xmsi_data);
if (val64 != 0xA5A5A5A5A5A5A5A5ULL) { if (val64 != 0xA5A5A5A5A5A5A5A5ULL) {
fail = 1; fail = 1;
DBG_PRINT(ERR_DBG, "Write Test level 2 fails\n"); DBG_PRINT(ERR_DBG, "Write Test level %d fails\n", 2);
} }
*data = fail; *data = fail;
@ -6825,8 +6825,9 @@ static void s2io_set_link(struct work_struct *work)
} }
nic->device_enabled_once = true; nic->device_enabled_once = true;
} else { } else {
DBG_PRINT(ERR_DBG, "%s: Error: ", dev->name); DBG_PRINT(ERR_DBG,
DBG_PRINT(ERR_DBG, "device is not Quiescent\n"); "%s: Error: device is not Quiescent\n",
dev->name);
s2io_stop_all_tx_queue(nic); s2io_stop_all_tx_queue(nic);
} }
} }
@ -6876,9 +6877,9 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, struct RxD_t *rxdp,
} else { } else {
*skb = dev_alloc_skb(size); *skb = dev_alloc_skb(size);
if (!(*skb)) { if (!(*skb)) {
DBG_PRINT(INFO_DBG, "%s: Out of ", dev->name); DBG_PRINT(INFO_DBG,
DBG_PRINT(INFO_DBG, "memory to allocate "); "%s: Out of memory to allocate %s\n",
DBG_PRINT(INFO_DBG, "1 buf mode SKBs\n"); dev->name, "1 buf mode SKBs");
stats->mem_alloc_fail_cnt++; stats->mem_alloc_fail_cnt++;
return -ENOMEM ; return -ENOMEM ;
} }
@ -6905,9 +6906,10 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, struct RxD_t *rxdp,
} else { } else {
*skb = dev_alloc_skb(size); *skb = dev_alloc_skb(size);
if (!(*skb)) { if (!(*skb)) {
DBG_PRINT(INFO_DBG, "%s: Out of ", dev->name); DBG_PRINT(INFO_DBG,
DBG_PRINT(INFO_DBG, "memory to allocate "); "%s: Out of memory to allocate %s\n",
DBG_PRINT(INFO_DBG, "2 buf mode SKBs\n"); dev->name,
"2 buf mode SKBs");
stats->mem_alloc_fail_cnt++; stats->mem_alloc_fail_cnt++;
return -ENOMEM; return -ENOMEM;
} }
@ -7095,8 +7097,8 @@ static int s2io_add_isr(struct s2io_nic *sp)
} }
if (!err) { if (!err) {
pr_info("MSI-X-RX %d entries enabled\n", --msix_rx_cnt); pr_info("MSI-X-RX %d entries enabled\n", --msix_rx_cnt);
DBG_PRINT(INFO_DBG, "MSI-X-TX entries enabled" DBG_PRINT(INFO_DBG,
" through alarm vector\n"); "MSI-X-TX entries enabled through alarm vector\n");
} }
} }
if (sp->config.intr_type == INTA) { if (sp->config.intr_type == INTA) {
@ -7176,8 +7178,8 @@ static void do_s2io_card_down(struct s2io_nic *sp, int do_io)
msleep(50); msleep(50);
cnt++; cnt++;
if (cnt == 10) { if (cnt == 10) {
DBG_PRINT(ERR_DBG, "s2io_close:Device not Quiescent "); DBG_PRINT(ERR_DBG, "Device not Quiescent - "
DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n", "adapter status reads 0x%llx\n",
(unsigned long long)val64); (unsigned long long)val64);
break; break;
} }
@ -7628,7 +7630,7 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
u8 *dev_multiq) u8 *dev_multiq)
{ {
if ((tx_fifo_num > MAX_TX_FIFOS) || (tx_fifo_num < 1)) { if ((tx_fifo_num > MAX_TX_FIFOS) || (tx_fifo_num < 1)) {
DBG_PRINT(ERR_DBG, "s2io: Requested number of tx fifos " DBG_PRINT(ERR_DBG, "Requested number of tx fifos "
"(%d) not supported\n", tx_fifo_num); "(%d) not supported\n", tx_fifo_num);
if (tx_fifo_num < 1) if (tx_fifo_num < 1)
@ -7636,8 +7638,7 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
else else
tx_fifo_num = MAX_TX_FIFOS; tx_fifo_num = MAX_TX_FIFOS;
DBG_PRINT(ERR_DBG, "s2io: Default to %d ", tx_fifo_num); DBG_PRINT(ERR_DBG, "Default to %d tx fifos\n", tx_fifo_num);
DBG_PRINT(ERR_DBG, "tx fifos\n");
} }
if (multiq) if (multiq)
@ -7646,7 +7647,7 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
if (tx_steering_type && (1 == tx_fifo_num)) { if (tx_steering_type && (1 == tx_fifo_num)) {
if (tx_steering_type != TX_DEFAULT_STEERING) if (tx_steering_type != TX_DEFAULT_STEERING)
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"s2io: Tx steering is not supported with " "Tx steering is not supported with "
"one fifo. Disabling Tx steering.\n"); "one fifo. Disabling Tx steering.\n");
tx_steering_type = NO_STEERING; tx_steering_type = NO_STEERING;
} }
@ -7654,21 +7655,21 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
if ((tx_steering_type < NO_STEERING) || if ((tx_steering_type < NO_STEERING) ||
(tx_steering_type > TX_DEFAULT_STEERING)) { (tx_steering_type > TX_DEFAULT_STEERING)) {
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"s2io: Requested transmit steering not supported\n"); "Requested transmit steering not supported\n");
DBG_PRINT(ERR_DBG, "s2io: Disabling transmit steering\n"); DBG_PRINT(ERR_DBG, "Disabling transmit steering\n");
tx_steering_type = NO_STEERING; tx_steering_type = NO_STEERING;
} }
if (rx_ring_num > MAX_RX_RINGS) { if (rx_ring_num > MAX_RX_RINGS) {
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"s2io: Requested number of rx rings not supported\n"); "Requested number of rx rings not supported\n");
DBG_PRINT(ERR_DBG, "s2io: Default to %d rx rings\n", DBG_PRINT(ERR_DBG, "Default to %d rx rings\n",
MAX_RX_RINGS); MAX_RX_RINGS);
rx_ring_num = MAX_RX_RINGS; rx_ring_num = MAX_RX_RINGS;
} }
if ((*dev_intr_type != INTA) && (*dev_intr_type != MSI_X)) { if ((*dev_intr_type != INTA) && (*dev_intr_type != MSI_X)) {
DBG_PRINT(ERR_DBG, "s2io: Wrong intr_type requested. " DBG_PRINT(ERR_DBG, "Wrong intr_type requested. "
"Defaulting to INTA\n"); "Defaulting to INTA\n");
*dev_intr_type = INTA; *dev_intr_type = INTA;
} }
@ -7676,14 +7677,14 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
if ((*dev_intr_type == MSI_X) && if ((*dev_intr_type == MSI_X) &&
((pdev->device != PCI_DEVICE_ID_HERC_WIN) && ((pdev->device != PCI_DEVICE_ID_HERC_WIN) &&
(pdev->device != PCI_DEVICE_ID_HERC_UNI))) { (pdev->device != PCI_DEVICE_ID_HERC_UNI))) {
DBG_PRINT(ERR_DBG, "s2io: Xframe I does not support MSI_X. " DBG_PRINT(ERR_DBG, "Xframe I does not support MSI_X. "
"Defaulting to INTA\n"); "Defaulting to INTA\n");
*dev_intr_type = INTA; *dev_intr_type = INTA;
} }
if ((rx_ring_mode != 1) && (rx_ring_mode != 2)) { if ((rx_ring_mode != 1) && (rx_ring_mode != 2)) {
DBG_PRINT(ERR_DBG, "s2io: Requested ring mode not supported\n"); DBG_PRINT(ERR_DBG, "Requested ring mode not supported\n");
DBG_PRINT(ERR_DBG, "s2io: Defaulting to 1-buffer mode\n"); DBG_PRINT(ERR_DBG, "Defaulting to 1-buffer mode\n");
rx_ring_mode = 1; rx_ring_mode = 1;
} }
return SUCCESS; return SUCCESS;
@ -7776,12 +7777,12 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
ret = pci_enable_device(pdev); ret = pci_enable_device(pdev);
if (ret) { if (ret) {
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"s2io_init_nic: pci_enable_device failed\n"); "%s: pci_enable_device failed\n", __func__);
return ret; return ret;
} }
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); DBG_PRINT(INIT_DBG, "%s: Using 64bit DMA\n", __func__);
dma_flag = true; dma_flag = true;
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
@ -7791,7 +7792,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
return -ENOMEM; return -ENOMEM;
} }
} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 32bit DMA\n"); DBG_PRINT(INIT_DBG, "%s: Using 32bit DMA\n", __func__);
} else { } else {
pci_disable_device(pdev); pci_disable_device(pdev);
return -ENOMEM; return -ENOMEM;
@ -8002,8 +8003,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
if (sp->device_type & XFRAME_II_DEVICE) { if (sp->device_type & XFRAME_II_DEVICE) {
mode = s2io_verify_pci_mode(sp); mode = s2io_verify_pci_mode(sp);
if (mode < 0) { if (mode < 0) {
DBG_PRINT(ERR_DBG, "%s: ", __func__); DBG_PRINT(ERR_DBG, "%s: Unsupported PCI bus mode\n",
DBG_PRINT(ERR_DBG, " Unsupported PCI bus mode\n"); __func__);
ret = -EBADSLT; ret = -EBADSLT;
goto set_swap_failed; goto set_swap_failed;
} }
@ -8021,7 +8022,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
if (ret) { if (ret) {
DBG_PRINT(ERR_DBG, DBG_PRINT(ERR_DBG,
"s2io: MSI-X requested but failed to enable\n"); "MSI-X requested but failed to enable\n");
sp->config.intr_type = INTA; sp->config.intr_type = INTA;
} }
} }
@ -8137,12 +8138,11 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
sp->product_name, pdev->revision); sp->product_name, pdev->revision);
DBG_PRINT(ERR_DBG, "%s: Driver version %s\n", dev->name, DBG_PRINT(ERR_DBG, "%s: Driver version %s\n", dev->name,
s2io_driver_version); s2io_driver_version);
DBG_PRINT(ERR_DBG, "%s: MAC ADDR: %pM\n", dev->name, dev->dev_addr); DBG_PRINT(ERR_DBG, "%s: MAC Address: %pM\n", dev->name, dev->dev_addr);
DBG_PRINT(ERR_DBG, "SERIAL NUMBER: %s\n", sp->serial_num); DBG_PRINT(ERR_DBG, "Serial number: %s\n", sp->serial_num);
if (sp->device_type & XFRAME_II_DEVICE) { if (sp->device_type & XFRAME_II_DEVICE) {
mode = s2io_print_pci_mode(sp); mode = s2io_print_pci_mode(sp);
if (mode < 0) { if (mode < 0) {
DBG_PRINT(ERR_DBG, " Unsupported PCI bus mode\n");
ret = -EBADSLT; ret = -EBADSLT;
unregister_netdev(dev); unregister_netdev(dev);
goto set_swap_failed; goto set_swap_failed;
@ -8532,8 +8532,9 @@ static int s2io_club_tcp_session(struct ring_info *ring_data, u8 *buffer,
*lro = l_lro; *lro = l_lro;
if ((*lro)->tcp_next_seq != ntohl(tcph->seq)) { if ((*lro)->tcp_next_seq != ntohl(tcph->seq)) {
DBG_PRINT(INFO_DBG, "%s:Out of order. expected " DBG_PRINT(INFO_DBG, "%s: Out of sequence. "
"0x%x, actual 0x%x\n", __func__, "expected 0x%x, actual 0x%x\n",
__func__,
(*lro)->tcp_next_seq, (*lro)->tcp_next_seq,
ntohl(tcph->seq)); ntohl(tcph->seq));
@ -8593,7 +8594,7 @@ static int s2io_club_tcp_session(struct ring_info *ring_data, u8 *buffer,
} }
break; break;
default: default:
DBG_PRINT(ERR_DBG, "%s:Dont know, can't say!!\n", __func__); DBG_PRINT(ERR_DBG, "%s: Don't know, can't say!!\n", __func__);
break; break;
} }

Просмотреть файл

@ -64,7 +64,10 @@ enum {
static int debug_level = ERR_DBG; static int debug_level = ERR_DBG;
/* DEBUG message print. */ /* DEBUG message print. */
#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) #define DBG_PRINT(dbg_level, fmt, args...) do { \
if (dbg_level >= debug_level) \
pr_info(fmt, ##args); \
} while (0)
/* Protocol assist features of the NIC */ /* Protocol assist features of the NIC */
#define L3_CKSUM_OK 0xFFFF #define L3_CKSUM_OK 0xFFFF