mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
Kernel/Net: Support Intel 82574 adapter
We call it E1000E, because the layout for these cards is somewhat not the same like E1000 supported cards. Also, this card supports advanced features that are not supported on 8254x cards.
This commit is contained in:
parent
2e2201e8e1
commit
c6480a0426
8 changed files with 200 additions and 20 deletions
|
@ -17,11 +17,13 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
class E1000NetworkAdapter final : public NetworkAdapter
|
||||
class E1000NetworkAdapter : public NetworkAdapter
|
||||
, public PCI::Device {
|
||||
public:
|
||||
static RefPtr<E1000NetworkAdapter> try_to_initialize(PCI::Address);
|
||||
|
||||
virtual bool initialize();
|
||||
|
||||
virtual ~E1000NetworkAdapter() override;
|
||||
|
||||
virtual void send_raw(ReadonlyBytes) override;
|
||||
|
@ -29,7 +31,10 @@ public:
|
|||
|
||||
virtual const char* purpose() const override { return class_name(); }
|
||||
|
||||
private:
|
||||
protected:
|
||||
void setup_interrupts();
|
||||
void setup_link();
|
||||
|
||||
E1000NetworkAdapter(PCI::Address, u8 irq);
|
||||
virtual void handle_irq(const RegisterState&) override;
|
||||
virtual const char* class_name() const override { return "E1000NetworkAdapter"; }
|
||||
|
@ -53,8 +58,8 @@ private:
|
|||
volatile uint16_t special { 0 };
|
||||
};
|
||||
|
||||
void detect_eeprom();
|
||||
u32 read_eeprom(u8 address);
|
||||
virtual void detect_eeprom();
|
||||
virtual u32 read_eeprom(u8 address);
|
||||
void read_mac_address();
|
||||
|
||||
void write_command(u16 address, u32);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue