[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cdi-devel] [PATCH] Make e1000 work in VirtualBox



Hi Matt,

On Wed, Aug 11, 2010 at 03:31:38PM +1000, Matthew Iselin wrote:
> Bump, requesting for this to be committed. The mentioned VMWare stuff
> may depend on this patch.

back then we had discussed some points that we wanted to improve before
committing this. Actually I was just about to commit it anyway and send
an cleanup patch on top, but it fails to compile for me:

e1000/device.c: In function ‘e1000_write_flush’:
e1000/device.c:63: error: unused variable ‘temp’


> On Sat, Mar 13, 2010 at 7:33 PM, Matthew Iselin <matthew@xxxxxxxxxxxxxx> wrote:
> > Hi,
> >
> > This patch makes the e1000 driver work in VirtualBox. I'm working towards
> > getting the driver working in VMWare as well, but VMWare emulates a
> > different chip (82545 rather than 82540). Those fixes and adjustments
> > will come in a different patch, at a later date.
> >
> > The biggest change here is that the driver now supports the microwire
> > interface for reading from the EEPROM as well as the EERD.
> >
> > Cheers,
> >
> > Matt
> >
> > Signed-off-by: Matthew Iselin <matthew@xxxxxxxxxxxxxx>
> > ---
> >  e1000/device.c    |  224 +++++++++++++++++++++++++++++++++++++++++++++++++----
> >  e1000/device.h    |   22 +++++-
> >  3 files changed, 232 insertions(+), 18 deletions(-)
> >
> > diff --git a/e1000/device.c b/e1000/device.c
> > index 1b31987..f1caa1f 100644
> > --- a/e1000/device.c
> > +++ b/e1000/device.c
> > @@ -48,14 +48,210 @@
> >  static void e1000_handle_interrupt(struct cdi_device* device);
> >  static uint64_t get_mac_address(struct e1000_device* device);
> >
> > -static uint16_t e1000_eeprom_read(struct e1000_device* device, uint16_t offset)
> > +static uint32_t e1000_reg_read(struct e1000_device *device, uint16_t offset)
> > +{
> > +    return reg_inl(device, offset);
> > +}
> > +
> > +static void e1000_reg_write(struct e1000_device *device, uint16_t offset, uint32_t value)
> > +{
> > +    reg_outl(device, offset, value);
> > +}

I think we intended to drop e1000_reg_read/write and replace it by
direct calls to reg_inl/outl.

And while your at it, git reported some whitespace errors. Maybe you
want to fix them as well (though I have git am remove them automagically
anyway)

Kevin