Week -2: Implement JMicron driver

Apr. 28th to May 1st

Day 1

Start to write JMicron Driver.

  • Helper functions
    • jme_reload_eeprom(): Which cause the MAC processor to place MAC Address to register.
    • j{read,write}32(): Register reading/writing wrapper.
  • Basic layout.
    • pci_probe:
      • private data allocation
      • Getting ioport
      • Interface registration
      • Initialize hardware
      • Reading MAC Address
    • pci_remove
      • Interface un-registration
      • Free private data
      • Reset hardware
Day 2
  • Implement link status check routines.
    • ifstat can show correct cable link status.
  • It'll freeze if IRQ generated on native driver.
  • netdev→link_rc was initiallized in:
    • alloc_etherdev() → alloc_netdev() → netdev→link_rc = -EUNKNOWN_LINK_STATUS;
Day 3
  • Implement receive functions
  • Fount out that we have very small memory poll(128K). Due to receive buffer allocation error. The original design tried to allocate 1024*MTU received buffers.
Day 4
  • Implement transmit functions
  • netdev_tx_complete{_err}() called free_iob(). So we shouldn't do free_iob() both on successfully transmited or failed to deliver.

QR Code
QR Code soc:2010:cooldavid:journal:weekb2 (generated for current page)