summaryrefslogtreecommitdiffstats
path: root/src/drivers/net
diff options
context:
space:
mode:
authorMichael Brown2006-05-20 14:28:44 +0200
committerMichael Brown2006-05-20 14:28:44 +0200
commit4d0a0f822df719443f426ecce9b37fcf8e9a8e1d (patch)
tree2c961498e116f72d42c652822030452bf2b90065 /src/drivers/net
parentREAD CAPACITY (16) turns out to be an optional command (even though (diff)
downloadipxe-4d0a0f822df719443f426ecce9b37fcf8e9a8e1d.tar.gz
ipxe-4d0a0f822df719443f426ecce9b37fcf8e9a8e1d.tar.xz
ipxe-4d0a0f822df719443f426ecce9b37fcf8e9a8e1d.zip
Use insb/outsb; it's marginally faster.
Diffstat (limited to 'src/drivers/net')
-rw-r--r--src/drivers/net/pnic.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c
index 18f7b93b..efb3c6f4 100644
--- a/src/drivers/net/pnic.c
+++ b/src/drivers/net/pnic.c
@@ -44,7 +44,6 @@ static uint16_t pnic_command_quiet ( struct pnic *pnic, uint16_t command,
void *input, uint16_t input_length,
void *output, uint16_t output_max_length,
uint16_t *output_length ) {
- int i;
uint16_t status;
uint16_t _output_length;
@@ -52,10 +51,7 @@ static uint16_t pnic_command_quiet ( struct pnic *pnic, uint16_t command,
/* Write input length */
outw ( input_length, pnic->ioaddr + PNIC_REG_LEN );
/* Write input data */
- for ( i = 0; i < input_length; i++ ) {
- outb( ((char*)input)[i],
- pnic->ioaddr + PNIC_REG_DATA );
- }
+ outsb ( pnic->ioaddr + PNIC_REG_DATA, input, input_length );
}
/* Write command */
outw ( command, pnic->ioaddr + PNIC_REG_CMD );
@@ -80,10 +76,7 @@ static uint16_t pnic_command_quiet ( struct pnic *pnic, uint16_t command,
_output_length = output_max_length;
}
/* Retrieve output data */
- for ( i = 0; i < _output_length; i++ ) {
- ((char*)output)[i] =
- inb ( pnic->ioaddr + PNIC_REG_DATA );
- }
+ insb ( pnic->ioaddr + PNIC_REG_DATA, output, _output_length );
}
return status;
}