Skip to content

Commit

Permalink
beceem: debug message format changes
Browse files Browse the repository at this point in the history
Add more debug messages and make them similar to other drivers

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
  • Loading branch information
Stephen Hemminger committed Nov 1, 2010
1 parent e4d4625 commit 9ec4475
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
12 changes: 6 additions & 6 deletions drivers/staging/bcm/Bcmnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ static INT bcm_open(struct net_device *dev)
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);

if (Adapter->fw_download_done == FALSE) {
pr_notice(DRV_NAME "%s: link up failed (download in progress)\n",
dev->name);
pr_notice(PFX "%s: link up failed (download in progress)\n",
dev->name);
return -EBUSY;
}

if (netif_msg_ifup(Adapter))
pr_info(DRV_NAME "%s: enabling interface\n", dev->name);
pr_info(PFX "%s: enabling interface\n", dev->name);

if (Adapter->LinkUpStatus) {
if (netif_msg_link(Adapter))
pr_info(DRV_NAME "%s: link up\n", dev->name);
pr_info(PFX "%s: link up\n", dev->name);

netif_carrier_on(Adapter->dev);
netif_start_queue(Adapter->dev);
Expand All @@ -40,7 +40,7 @@ static INT bcm_close(struct net_device *dev)
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);

if (netif_msg_ifdown(Adapter))
pr_info(DRV_NAME "%s: disabling interface\n", dev->name);
pr_info(PFX "%s: disabling interface\n", dev->name);

netif_carrier_off(dev);
netif_stop_queue(dev);
Expand Down Expand Up @@ -106,7 +106,7 @@ static netdev_tx_t bcm_transmit(struct sk_buff *skb, struct net_device *dev)

/* Now Enqueue the packet */
if (netif_msg_tx_queued(Adapter))
pr_info(DRV_NAME "%s: enqueueing packet to queue %d\n",
pr_info(PFX "%s: enqueueing packet to queue %d\n",
dev->name, qindex);

spin_lock(&Adapter->PackInfo[qindex].SFQueueLock);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/bcm/CmHost.c
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, /**<Pointer to the Adap
netif_start_queue(Adapter->dev);
Adapter->LinkUpStatus = 1;
if (netif_msg_link(Adapter))
pr_info(DRV_NAME "%s: link up\n", Adapter->dev->name);
pr_info(PFX "%s: link up\n", Adapter->dev->name);
atomic_set(&Adapter->TxPktAvail, 1);
wake_up(&Adapter->tx_packet_wait_queue);
Adapter->liTimeSinceLastNetEntry = get_seconds();
Expand Down
4 changes: 4 additions & 0 deletions drivers/staging/bcm/InterfaceIsr.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)urb->context;
PMINI_ADAPTER Adapter = psIntfAdapter->psAdapter ;

if (netif_msg_intr(Adapter))
pr_info(PFX "%s: interrupt status %d\n",
Adapter->dev->name, status);

if(Adapter->device_removed == TRUE)
{
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Device has Got Removed.");
Expand Down
9 changes: 6 additions & 3 deletions drivers/staging/bcm/InterfaceRx.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ static void read_bulk_callback(struct urb *urb)
PMINI_ADAPTER Adapter = psIntfAdapter->psAdapter;
PLEADER pLeader = urb->transfer_buffer;


if (unlikely(netif_msg_rx_status(Adapter)))
pr_info(PFX "%s: rx urb status %d length %d\n",
Adapter->dev->name, urb->status, urb->actual_length);

if((Adapter->device_removed == TRUE) ||
(TRUE == Adapter->bEndPointHalted) ||
Expand Down Expand Up @@ -83,8 +85,9 @@ static void read_bulk_callback(struct urb *urb)
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Leader Status:0x%hX, Length:0x%hX, VCID:0x%hX", pLeader->Status,pLeader->PLength,pLeader->Vcid);
if(MAX_CNTL_PKT_SIZE < pLeader->PLength)
{
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0, "Corrupted leader length...%d\n",
pLeader->PLength);
if (netif_msg_rx_err(Adapter))
pr_info(PFX "%s: corrupted leader length...%d\n",
Adapter->dev->name, pLeader->PLength);
atomic_inc(&Adapter->RxPacketDroppedCount);
atomic_add(pLeader->PLength, &Adapter->BadRxByteCount);
atomic_dec(&psIntfAdapter->uNumRcbUsed);
Expand Down
4 changes: 4 additions & 0 deletions drivers/staging/bcm/InterfaceTx.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
PMINI_ADAPTER psAdapter = psIntfAdapter->psAdapter ;
BOOLEAN bpowerDownMsg = FALSE ;
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);

if (unlikely(netif_msg_tx_done(Adapter)))
pr_info(PFX "%s: transmit status %d\n", Adapter->dev->name, urb->status);

if(urb->status != STATUS_SUCCESS)
{
if(urb->status == -EPIPE)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/bcm/Misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ void beceem_protocol_reset (PMINI_ADAPTER Adapter)
int i;

if (netif_msg_link(Adapter))
pr_notice(DRV_NAME "%s: protocol reset\n", Adapter->dev->name);
pr_notice(PFX "%s: protocol reset\n", Adapter->dev->name);

netif_carrier_off(Adapter->dev);
netif_stop_queue(Adapter->dev);
Expand Down
7 changes: 5 additions & 2 deletions drivers/staging/bcm/Qos.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,11 @@ VOID PruneQueue(PMINI_ADAPTER Adapter,/**<Pointer to the driver control structur

if(PacketToDrop)
{
if(netstats)
netstats->tx_dropped++;
if (netif_msg_tx_err(Adapter))
pr_info(PFX "%s: tx queue %d overlimit\n",
Adapter->dev->name, iIndex);

netstats->tx_dropped++;
atomic_inc(&Adapter->TxDroppedPacketCount);
DEQUEUEPACKET(Adapter->PackInfo[iIndex].FirstTxQueue,
Adapter->PackInfo[iIndex].LastTxQueue);
Expand Down

0 comments on commit 9ec4475

Please sign in to comment.