netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: ravinandan.arakali@s2io.com
Cc: "'Francois Romieu'" <romieu@fr.zoreil.com>,
	netdev@oss.sgi.com, leonid.grossman@s2io.com,
	raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com
Subject: Re: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes
Date: Thu, 14 Oct 2004 10:44:21 -0400	[thread overview]
Message-ID: <416E90C5.2090307@pobox.com> (raw)
In-Reply-To: <004201c4b18b$14b2f720$6c10100a@S2IOtech.com>

Ravinandan Arakali wrote:
> Hi,
> Attached is the second patch in this submission. It contains the following
> software bug fixes.
> 
> 1. In free_rx_buffers clearing out RxDs not owned by Xena.
> 
> 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset
> the card rather than stopping Tx queue.
> 
> 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call
> to flush queued tasks. This is not done if the s2io_close itself is called
> from a queued task like s2io_restart_nic.
> 
> 4. read_eeprom function has been changed such that data to be returned is
> sent as an input argument and the return value represents a pass/fail. The
> previous implementation as Randy had pointed out was error prone as on
> failure it returned -1 which can be interpreted as all ff's, so any data
> area which contained ff's in the eeprom was likely to be treated as an
> error.
> 
> 5. Added a flag "task_flag" to track if the call to s2io_close is coming
> from the s2io_restart_nic function or from the ifconfig <I/F> down called by
> user.
> 
> 6. Moved register_netdev call from just after setting entry points to the
> end of the s2io_init_nic function.
> 
> 7. In s2io.h field added a new member into the s2io_nic structure called
> "task_flag".
> 
> 
> Signed-off-by: Raghavendra Koushik <raghavendra.koushik@s2io.com>


Comments:

1) the following code looks wrong:

>                 DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name);
>                 DBG_PRINT(ERR_DBG, "serious error!!\n");
> -               netif_stop_queue(dev);
> +               schedule_work(&nic->rst_timer_task);

Typically you want to stop the queue _and_ schedule_work().  Otherwise, 
the net stack will continually call your ->hard_start_xmit() hook with 
new skbs, _during_ your rst_timer_task.

2) can this 'if' test be removed?  there is no harm in unconditionally 
calling flush_scheduled_work()

> +       /* Flush all scheduled tasks */
> +       if (sp->task_flag == 1) {
> +               DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n",
> +                         dev->name);
> +       } else {
> +               flush_scheduled_work();
> +       }

3) I do not think that s2io_close should be called from anywhere except 
the net stack...

The following code should not be needed, unless I am missing something:
> 
>         nic_t *sp = dev->priv;
>  
> +       sp->task_flag = 1;
>         s2io_close(dev);
> +       sp->task_flag = 0;
>         sp->device_close_flag = TRUE;


4) the following code is correct, but should additional propagate the 
register_netdev() error code back to its caller, upon failure:

>         sp->rx_csum = 1;        /* Rx chksum verify enabled by default */
>  
> +       if (register_netdev(dev)) {
> +               DBG_PRINT(ERR_DBG, "Device registration failed\n");
> +               goto register_failed;
> +       }
> +

  reply	other threads:[~2004-10-14 14:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14  1:13 [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes Ravinandan Arakali
2004-10-14 14:44 ` Jeff Garzik [this message]
2004-10-14 17:35   ` Raghavendra Koushik
2004-10-15 18:52     ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-10-07  1:24 Ravinandan Arakali
2004-10-07  1:23 Ravinandan Arakali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=416E90C5.2090307@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=leonid.grossman@s2io.com \
    --cc=netdev@oss.sgi.com \
    --cc=raghavendra.koushik@s2io.com \
    --cc=rapuru.sriram@s2io.com \
    --cc=ravinandan.arakali@s2io.com \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).