From fc73dcd7ac540be11e1f482710d2902899b65e8a Mon Sep 17 00:00:00 2001 From: okuji Date: Wed, 17 May 2000 13:55:18 +0000 Subject: [PATCH] update the network support to etherboot-4.6.1. --- ChangeLog | 13 +++++++++++++ NEWS | 2 +- docs/grub-install.8 | 2 +- docs/grub.8 | 2 +- docs/mbchk.1 | 2 +- netboot/config.c | 2 ++ netboot/epic100.c | 4 ++-- netboot/etherboot.h | 2 +- netboot/main.c | 2 +- netboot/pci.h | 2 ++ netboot/tulip.c | 7 +++++++ 11 files changed, 32 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d70da567..a6e39f7a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2000-05-17 OKUJI Yoshinori + + Update the network support to Etherboot-4.6.1. + + * netboot/config.c (pci_nic_list) [INCLUDE_TULIP]: Added an + entry for Davicom 9102. + * netboot/epic100.c: Just copied. + * netboot/pci.h: Likewise. + * netboot/tulip.c: Likewise. + * netboot/etherboot.h (tftp): Change the type of the first + argument to const char * from char *. + * netboot/main.c (tftp): Likewise. + 2000-05-13 OKUJI Yoshinori * util/grub-install.in: If the program `cp' fails, exit with the diff --git a/NEWS b/NEWS index 9b1a23d21..561b0d0c9 100644 --- a/NEWS +++ b/NEWS @@ -21,7 +21,7 @@ New in 0.5.95 - XXXX-XX-XX: "grub-install" has the same effect as to the command "install". * The configure script doesn't accept the option `--disable-lba-support-bitmap-check' any longer. Use the option above. -* The network support is updated to Etherboot-4.6.0. So now we have +* The network support is updated to Etherboot-4.6.1. So now we have 3Com59x and DEPCA drivers. * Now you can omit the configuration file argument to the command "password". If you omit it, then GRUB will just unlock privileged diff --git a/docs/grub-install.8 b/docs/grub-install.8 index 598392c4f..507f7069b 100644 --- a/docs/grub-install.8 +++ b/docs/grub-install.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. -.TH GRUB-INSTALL "8" "April 2000" "grub-install (GNU GRUB 0.5.95)" FSF +.TH GRUB-INSTALL "8" "May 2000" "grub-install (GNU GRUB 0.5.95)" FSF .SH NAME grub-install \- install GRUB on your drive .SH SYNOPSIS diff --git a/docs/grub.8 b/docs/grub.8 index a97ac6096..63f6b2f0b 100644 --- a/docs/grub.8 +++ b/docs/grub.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. -.TH GRUB "8" "April 2000" "GNU GRUB 0.5.95" FSF +.TH GRUB "8" "May 2000" "GNU GRUB 0.5.95" FSF .SH NAME GRUB \- the grub shell .SH SYNOPSIS diff --git a/docs/mbchk.1 b/docs/mbchk.1 index a0ab48ce1..b035384e9 100644 --- a/docs/mbchk.1 +++ b/docs/mbchk.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.020. -.TH MBCHK "1" "April 2000" "mbchk (GNU GRUB 0.5.95)" FSF +.TH MBCHK "1" "May 2000" "mbchk (GNU GRUB 0.5.95)" FSF .SH NAME mbchk \- check the format of a Multiboot kernel .SH SYNOPSIS diff --git a/netboot/config.c b/netboot/config.c index 25a2fb56e..e6f0df1a8 100644 --- a/netboot/config.c +++ b/netboot/config.c @@ -121,6 +121,8 @@ static struct pci_device pci_nic_list[] = { "LinkSys LNE100TX", 0, 0, 0}, { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP, "Netgear FA310TX", 0, 0, 0}, + { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, + "Davicom 9102", 0, 0, 0}, #endif #ifdef INCLUDE_VIA_RHINE { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, diff --git a/netboot/epic100.c b/netboot/epic100.c index f365ddc36..fd66abc47 100644 --- a/netboot/epic100.c +++ b/netboot/epic100.c @@ -10,8 +10,8 @@ #undef virt_to_bus #define virt_to_bus(x) ((unsigned long)x) -#define TX_RING_SIZE 1 /* enough for now */ -#define RX_RING_SIZE 1 +#define TX_RING_SIZE 2 /* use at least 2 buffers for TX */ +#define RX_RING_SIZE 2 #define PKT_BUF_SZ 1536 /* Size of each temporary Tx/Rx buffer.*/ diff --git a/netboot/etherboot.h b/netboot/etherboot.h index ae2bfc113..846662dfd 100644 --- a/netboot/etherboot.h +++ b/netboot/etherboot.h @@ -465,7 +465,7 @@ extern void load P((void)); extern int load_linux P((int root_mount_port,int swap_mount_port, int root_nfs_port,char *kernel_handle)); extern int downloadkernel P((unsigned char *, int, int, int)); -extern int tftp P((char *name, int (*)(unsigned char *, int, int, int))); +extern int tftp P((const char *name, int (*)(unsigned char *, int, int, int))); extern void rpc_init(void); extern int nfs P((const char *name, int (*)(unsigned char *, int, int, int))); extern void nfs_umountall P((int)); diff --git a/netboot/main.c b/netboot/main.c index e2833b476..1667c36ec 100644 --- a/netboot/main.c +++ b/netboot/main.c @@ -288,7 +288,7 @@ udp_transmit (unsigned long destip, unsigned int srcsock, TFTP - Download extended BOOTP data, or kernel image **************************************************************************/ static int -tftp (char *name, int (*fnc) (unsigned char *, int, int, int)) +tftp (const char *name, int (*fnc) (unsigned char *, int, int, int)) { int retry = 0; static unsigned short iport = 2000; diff --git a/netboot/pci.h b/netboot/pci.h index b2121236e..0278c7c61 100644 --- a/netboot/pci.h +++ b/netboot/pci.h @@ -134,6 +134,8 @@ __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") #define PCI_VENDOR_ID_VIATEC 0x1106 #define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 #define PCI_DEVICE_ID_VIA_86C100A 0x6100 +#define PCI_VENDOR_ID_DAVICOM 0x1282 +#define PCI_DEVICE_ID_DM9102 0x9102 struct pci_device { unsigned short vendor, dev_id; diff --git a/netboot/tulip.c b/netboot/tulip.c index 16a289cff..30ecf438c 100644 --- a/netboot/tulip.c +++ b/netboot/tulip.c @@ -12,6 +12,7 @@ model FA310X, based on the LC82C168 chip is supported. The TRENDnet TE100-PCIA NIC which uses a genuine Intel 21143-PD chipset is supported. + Also, Davicom DM9102's. Documentation and source code used: Source for Etherboot driver at @@ -39,6 +40,7 @@ /*********************************************************************/ /* + 27 Apr 2000 njl ? 29 Feb 2000 mdc 0.75b7 Increased reset delay to 3 seconds because Macronix cards seem to need more reset time before card comes back to a usable state. @@ -506,6 +508,11 @@ static void tulip_reset(struct nic *nic) csr6 |= (DEC_21142_CSR6_HBD | DEC_21142_CSR6_PS); csr6 &= ~(DEC_21142_CSR6_TTM); } + } else if (vendor == PCI_VENDOR_ID_DAVICOM && dev_id == PCI_DEVICE_ID_DM9102){ + /* setup CR12 */ + outl(0x180, ioaddr + CSR12); /* Let bit 7 output port */ + outl(0x80, ioaddr + CSR12); /* RESET DM9102 phyxcer */ + outl(0x0, ioaddr + CSR12); /* Clear RESET signal */ } /* set the chip's operating mode */