Hello,
On Mon, 15 Jan 2001, OKUJI Yoshinori wrote:
[snip]
>
> Your patch is good. Please write ChangeLog entries, and I'll apply
> your patch.
>
Ok, here is the patch complete with the ChangeLog entries. I also a bit
rearanged ifdefs in config.c not to include cards.h twice, as in the
code I sent to Thierry.
> Anyway, I don't think it would be worth to update the network drivers
> (unless you have a card GRUB doesn't support), because I'm planning
> not to use Etherboot drivers. I'll explain my "near future plans"
> soon.
That's interesting, I'm waiting.
Regards,
Eugene
diff -uBbr grub-0.5.96.1/ChangeLog grub-0.5.96.1-smartprobe/ChangeLog
--- grub-0.5.96.1/ChangeLog Fri Oct 20 03:44:35 2000
+++ grub-0.5.96.1-smartprobe/ChangeLog Tue Jan 16 09:57:00 2001
@@ -1,3 +1,11 @@
+2001-01-16 Eugene Doudine <[EMAIL PROTECTED]>
+ * netboot/pci.h (struct pci_device): Added new member 'eth_probe'.
+ * netboot/config.c: Placed include "cards.h" before pci_nic_list
+ and rearranged ifdefs, since pci_nic_list now depends on cards.h
+ (pci_nic_list): Added values for 'eth_probe'.
+ (eth_probe): When found a known pci nic, call the correct probe
+ routine before trying all of them.
+
2000-10-17 OKUJI Yoshinori <[EMAIL PROTECTED]>
* stage2/builtins.c (setkey_func): Clear the all elements of
diff -uBbr grub-0.5.96.1/netboot/config.c grub-0.5.96.1-smartprobe/netboot/config.c
--- grub-0.5.96.1/netboot/config.c Sun Jul 30 03:22:54 2000
+++ grub-0.5.96.1-smartprobe/netboot/config.c Tue Jan 16 09:51:37 2001
@@ -35,120 +35,124 @@
#if defined(ETHERBOOT32) /* only for 32 bit machines */
#define INCLUDE_PCI
#include "pci.h"
+#endif /* ETHERBOOT32 */
+#endif /* INCLUDE_*PCI */
+
+#include "cards.h"
+
+#ifdef INCLUDE_PCI
static unsigned short pci_ioaddrs[16];
static struct pci_device pci_nic_list[] = {
#ifdef INCLUDE_NS8390
{ PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029,
- "Realtek 8029", 0, 0, 0},
+ "Realtek 8029", 0, 0, 0, nepci_probe },
{ PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940,
- "Winbond NE2000-PCI", 0, 0, 0},
+ "Winbond NE2000-PCI", 0, 0, 0, nepci_probe },
{ PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000,
- "Compex ReadyLink 2000", 0, 0, 0},
+ "Compex ReadyLink 2000", 0, 0, 0, nepci_probe },
{ PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2,
- "KTI ET32P2", 0, 0, 0},
+ "KTI ET32P2", 0, 0, 0, nepci_probe },
{ PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC,
- "NetVin NV5000SC", 0, 0, 0},
+ "NetVin NV5000SC", 0, 0, 0, nepci_probe },
#endif
#ifdef INCLUDE_3C90X
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO,
- "3Com900-TPO", 0, 0, 0},
+ "3Com900-TPO", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO,
- "3Com900-Combo", 0, 0, 0},
+ "3Com900-Combo", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905TX,
- "3Com905-TX", 0, 0, 0},
+ "3Com905-TX", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905T4,
- "3Com905-T4", 0, 0, 0},
+ "3Com905-T4", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, 0x9004,
- "3Com900B-TPO", 0, 0, 0},
+ "3Com900B-TPO", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, 0x9005,
- "3Com900B-Combo", 0, 0, 0},
+ "3Com900B-Combo", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, 0x9006,
- "3Com900B-2/T", 0, 0, 0},
+ "3Com900B-2/T", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, 0x900A,
- "3Com900B-FL", 0, 0, 0},
+ "3Com900B-FL", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905B_TX,
- "3Com905B-TX", 0, 0, 0},
+ "3Com905B-TX", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, 0x9056,
- "3Com905B-T4", 0, 0, 0},
+ "3Com905B-T4", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, 0x905A,
- "3Com905B-FL", 0, 0, 0},
+ "3Com905B-FL", 0, 0, 0, a3c90x_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C_TXM,
- "3Com905C-TXM", 0, 0, 0},
+ "3Com905C-TXM", 0, 0, 0, a3c90x_probe },
#endif
#ifdef INCLUDE_3C595
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590,
- "3Com590", 0, 0, 0},
+ "3Com590", 0, 0, 0, t595_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595,
- "3Com595", 0, 0, 0},
+ "3Com595", 0, 0, 0, t595_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1,
- "3Com595", 0, 0, 0},
+ "3Com595", 0, 0, 0, t595_probe },
{ PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2,
- "3Com595", 0, 0, 0},
+ "3Com595", 0, 0, 0, t595_probe },
#endif
#ifdef INCLUDE_EEPRO100
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557,
- "Intel EtherExpressPro100", 0, 0, 0},
+ "Intel EtherExpressPro100", 0, 0, 0, eepro100_probe },
#endif
#ifdef INCLUDE_EPIC100
{ PCI_VENDOR_ID_SMC, PCI_DEVICE_ID_SMC_EPIC100,
- "SMC EtherPowerII", 0, 0, 0},
+ "SMC EtherPowerII", 0, 0, 0, epic100_probe },
#endif
#ifdef INCLUDE_LANCE
{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE,
- "AMD Lance/PCI", 0, 0, 0},
+ "AMD Lance/PCI", 0, 0, 0, lancepci_probe },
#endif
#ifdef INCLUDE_RTL8139
{ PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139,
- "Realtek 8139", 0, 0, 0},
+ "Realtek 8139", 0, 0, 0, rtl8139_probe },
{ PCI_VENDOR_ID_SMC_1211, PCI_DEVICE_ID_SMC_1211,
- "SMC EZ10/100", 0, 0, 0},
+ "SMC EZ10/100", 0, 0, 0, rtl8139_probe },
#endif
#ifdef INCLUDE_OTULIP
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP,
- "Digital Tulip", 0, 0, 0},
+ "Digital Tulip", 0, 0, 0, otulip_probe },
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST,
- "Digital Tulip Fast", 0, 0, 0},
+ "Digital Tulip Fast", 0, 0, 0, otulip_probe },
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS,
- "Digital Tulip+", 0, 0, 0},
+ "Digital Tulip+", 0, 0, 0, otulip_probe },
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142,
- "Digital Tulip 21142", 0, 0, 0},
+ "Digital Tulip 21142", 0, 0, 0, otulip_probe },
#endif
#ifdef INCLUDE_TULIP
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP,
- "Digital Tulip", 0, 0, 0},
+ "Digital Tulip", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST,
- "Digital Tulip Fast", 0, 0, 0},
+ "Digital Tulip Fast", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS,
- "Digital Tulip+", 0, 0, 0},
+ "Digital Tulip+", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142,
- "Digital Tulip 21142", 0, 0, 0},
+ "Digital Tulip 21142", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_MACRONIX, PCI_DEVICE_ID_MX987x5,
- "Macronix MX987x5", 0, 0, 0},
+ "Macronix MX987x5", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LC82C115,
- "LinkSys LNE100TX", 0, 0, 0},
+ "LinkSys LNE100TX", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP,
- "Netgear FA310TX", 0, 0, 0},
+ "Netgear FA310TX", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102,
- "Davicom 9102", 0, 0, 0},
+ "Davicom 9102", 0, 0, 0, tulip_probe },
{ PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985,
- "ADMtek Centaur-P", 0, 0, 0},
+ "ADMtek Centaur-P", 0, 0, 0, tulip_probe },
#endif
#ifdef INCLUDE_VIA_RHINE
{ PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I,
- "VIA 3043", 0, 0, 0},
+ "VIA 3043", 0, 0, 0, rhine_probe },
{ PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_86C100A,
- "VIA 86C100A", 0, 0, 0},
+ "VIA 86C100A", 0, 0, 0, rhine_probe },
#endif
/* other PCI NICs go here */
- {0, 0, NULL, 0, 0, 0}
+ {0, 0, NULL, 0, 0, 0, 0 }
};
-#endif /* ETHERBOOT32 */
-#endif /* INCLUDE_*PCI */
+#endif /* INCLUDE_PCI */
-#include "cards.h"
struct dispatch_table
@@ -350,6 +354,17 @@
}
#endif
printf("Probing...");
+#ifdef INCLUDE_PCI
+ if(p->name && p->eth_probe) {
+ printf("<%s>", p->name);
+ if ((p->eth_probe)(&nic, pci_ioaddrs, p)) {
+#ifdef GRUB
+ probed = 1;
+#endif /* GRUB */
+ return (1);
+ }
+ }
+#endif /* INCLUDE_PCI */
for (t = NIC; t->nic_name != 0; ++t)
{
printf("[%s]", t->nic_name);
diff -uBbr grub-0.5.96.1/netboot/pci.h grub-0.5.96.1-smartprobe/netboot/pci.h
--- grub-0.5.96.1/netboot/pci.h Sun Jul 30 03:22:54 2000
+++ grub-0.5.96.1-smartprobe/netboot/pci.h Tue Jan 16 05:52:38 2001
@@ -149,6 +149,8 @@
unsigned int membase;
unsigned short ioaddr;
unsigned short devfn;
+ struct nic *(*eth_probe)(struct nic *, unsigned short *,
+ struct pci_device *);
};
extern void eth_pci_init(struct pci_device *);
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub