From: Auke Kok <auke-jan.h.kok@intel.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linux-mips@linux-mips.org, linux-net@vger.kernel.org
Subject: Re: [PATCH] Fix RTL8019AS init for Toshiba RBTX49xx boards
Date: Mon, 08 May 2006 13:55:09 -0700 [thread overview]
Message-ID: <445FB02D.3020905@intel.com> (raw)
In-Reply-To: <445FA36E.3080500@ru.mvista.com>
Hi,
this won't work - first of all patches need to go to netdev and second jeff
Garzik is offline for another week. Stephan Hemminger is covering for the net
tree.
Please repost and add these people.
Auke
Sergei Shtylyov wrote:
> Ensure that 8-bit mode is selected for the on-board Realtek RTL8019AS
> chip on Toshiba RBHMA4x00, get rid of the duplicate #ifdef's when setting
> ei_status.word16.
> The chip's datasheet says that the PSTOP register shouldn't exceed
> 0x60 in
> 8-bit mode -- ensure this too.
>
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
>
> ------------------------------------------------------------------------
>
> Index: linus/drivers/net/ne.c
> ===================================================================
> --- linus.orig/drivers/net/ne.c
> +++ linus/drivers/net/ne.c
> @@ -139,8 +139,9 @@ bad_clone_list[] __initdata = {
>
> #if defined(CONFIG_PLAT_MAPPI)
> # define DCR_VAL 0x4b
> -#elif defined(CONFIG_PLAT_OAKS32R)
> -# define DCR_VAL 0x48
> +#elif defined(CONFIG_PLAT_OAKS32R) || \
> + defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938)
> +# define DCR_VAL 0x48 /* 8-bit mode */
> #else
> # define DCR_VAL 0x49
> #endif
> @@ -396,10 +397,22 @@ static int __init ne_probe1(struct net_d
> /* We must set the 8390 for word mode. */
> outb_p(DCR_VAL, ioaddr + EN0_DCFG);
> start_page = NESM_START_PG;
> - stop_page = NESM_STOP_PG;
> +
> + /*
> + * Realtek RTL8019AS datasheet says that the PSTOP register
> + * shouldn't exceed 0x60 in 8-bit mode.
> + * This chip can be identified by reading the signature from
> + * the remote byte count registers (otherwise write-only)...
> + */
> + if ((DCR_VAL & 0x01) == 0 && /* 8-bit mode */
> + inb(ioaddr + EN0_RCNTLO) == 0x50 &&
> + inb(ioaddr + EN0_RCNTHI) == 0x70)
> + stop_page = 0x60;
> + else
> + stop_page = NESM_STOP_PG;
> } else {
> start_page = NE1SM_START_PG;
> - stop_page = NE1SM_STOP_PG;
> + stop_page = NE1SM_STOP_PG;
> }
>
> #if defined(CONFIG_PLAT_MAPPI) || defined(CONFIG_PLAT_OAKS32R)
> @@ -509,15 +522,9 @@ static int __init ne_probe1(struct net_d
> ei_status.name = name;
> ei_status.tx_start_page = start_page;
> ei_status.stop_page = stop_page;
> -#if defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938)
> - wordlength = 1;
> -#endif
>
> -#ifdef CONFIG_PLAT_OAKS32R
> - ei_status.word16 = 0;
> -#else
> - ei_status.word16 = (wordlength == 2);
> -#endif
> + /* Use 16-bit mode only if this wasn't overridden by DCR_VAL */
> + ei_status.word16 = (wordlength == 2 && (DCR_VAL & 0x01));
>
> ei_status.rx_start_page = start_page + TX_PAGES;
> #ifdef PACKETBUF_MEMSIZE
>
>
next prev parent reply other threads:[~2006-05-08 20:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 15:38 tx49 Ether problems Geoff Levand
2006-04-14 16:05 ` Atsushi Nemoto
2006-04-14 23:39 ` Geoff Levand
2006-04-15 20:52 ` Sergei Shtylyov
2006-04-16 18:50 ` Sergei Shtylyov
2006-04-17 2:09 ` Atsushi Nemoto
2006-04-17 13:06 ` Sergei Shtylyov
2006-04-17 15:09 ` Atsushi Nemoto
2006-04-17 16:07 ` Sergei Shtylyov
2006-04-17 16:12 ` Sergei Shtylyov
2006-05-08 20:00 ` [PATCH] Fix RTL8019AS init for Toshiba RBTX49xx boards Sergei Shtylyov
2006-05-08 20:55 ` Auke Kok [this message]
2006-05-08 20:58 ` Sergei Shtylyov
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=445FB02D.3020905@intel.com \
--to=auke-jan.h.kok@intel.com \
--cc=jgarzik@pobox.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-net@vger.kernel.org \
--cc=sshtylyov@ru.mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.