This patch switches the MINIX3 ethernet driver stack from a port-based

model to an instance-based model. Each ethernet driver instance is now
responsible for exactly one network interface card. The port field in
/etc/inet.conf now acts as an instance field instead.

This patch also updates the data link protocol. This update:
- eliminates the concept of ports entirely;
- eliminates DL_GETNAME entirely;
- standardizes on using m_source for IPC and DL_ENDPT for safecopies;
- removes error codes from TASK/STAT replies, as they were unused;
- removes a number of other old or unused fields;
- names and renames a few other fields.

All ethernet drivers have been changed to:
- conform to the new protocol, and exactly that;
- take on an instance number based on a given "instance" argument;
- skip that number of PCI devices in probe iterations;
- use config tables and environment variables based on that number;
- no longer be limited to a predefined maximum of cards in any way;
- get rid of any leftover non-safecopy support and other ancient junk;
- have a correct banner protocol figure, or none at all.

Other changes:
* Inet.conf is now taken to be line-based, and supports #-comments.
  No existing installations are expected to be affected by this.
* A new, select-based asynchio library replaces the old one.
  Kindly contributed by Kees J. Bot.
* Inet now supports use of select() on IP devices.
  Combined, the last two changes together speed up dhcpd
  considerably in the presence of multiple interfaces.
* A small bug has been fixed in nonamed.
This commit is contained in:
David van Moolenbroek
2010-05-17 22:22:53 +00:00
parent f5bce90216
commit 9ba65d2ea8
55 changed files with 1971 additions and 4794 deletions
+5 -5
View File
@@ -235,7 +235,7 @@ int hermes_init (hermes_t * hw)
}
if (!(reg & HERMES_EV_CMD)) {
printf("hermes @ %x: Timeout waiting for card to reset\n",
printf("hermes @ %lx: Timeout waiting for card to reset\n",
hw->iobase);
return -ETIMEDOUT;
}
@@ -250,7 +250,7 @@ int hermes_init (hermes_t * hw)
/* Was the status, the result of the issued command, ok? */
/* The expression below should be zero. Non-zero means an error */
if (status & HERMES_STATUS_RESULT) {
printf("Hermes:Result of INIT_CMD wrong.error value: 0x%x\n",
printf("Hermes:Result of INIT_CMD wrong.error value: 0x%lx\n",
(status & HERMES_STATUS_RESULT) >> 8);
err = -EIO;
}
@@ -272,7 +272,7 @@ int hermes_docmd_wait (hermes_t * hw, u16_t cmd, u16_t parm0,
err = hermes_issue_cmd (hw, cmd, parm0);
if (err) {
printf("hermes @ %x: Error %d issuing command.\n",
printf("hermes @ %lx: Error %d issuing command.\n",
hw->iobase, err);
return err;
}
@@ -290,7 +290,7 @@ int hermes_docmd_wait (hermes_t * hw, u16_t cmd, u16_t parm0,
/* check for a timeout: has the command still not completed? */
if (!(reg & HERMES_EV_CMD)) {
printf("hermes @ %x: Timeout waiting for command \
printf("hermes @ %lx: Timeout waiting for command \
completion.\n", hw->iobase);
err = -ETIMEDOUT;
return err;
@@ -361,7 +361,7 @@ int hermes_allocate (hermes_t * hw, u16_t size, u16_t * fid) {
/* tired of waiting to complete. Abort. */
if (!(reg & HERMES_EV_ALLOC)) {
printf("hermes @ %x:Timeout waiting for frame allocation\n",
printf("hermes @ %lx:Timeout waiting for frame allocation\n",
hw->iobase);
return -ETIMEDOUT;
}
+141 -621
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -15,7 +15,6 @@
#define LARGE_KEY_LENGTH 13
#define IW_ESSID_MAX_SIZE 32
#define OR_PORT_NR 1
#define IOVEC_NR 16
#define OR_ENVVAR "ORETH"
#define OR_NAME "orinoco#n"