====== Differences ====== This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
soc:2008:mdeck:journal:weeka [2008/07/30 06:48] mdeck created |
soc:2008:mdeck:journal:weeka [2008/08/01 07:58] (current) mdeck |
||
---|---|---|---|
Line 18: | Line 18: | ||
I have a few **3c905**-based NICs to work with here. There is an existing Etherboot driver for these cards, but mdc said that driver is no good. He gave the go-ahead to convert the Linux driver for these cards, so that is next on my plate. | I have a few **3c905**-based NICs to work with here. There is an existing Etherboot driver for these cards, but mdc said that driver is no good. He gave the go-ahead to convert the Linux driver for these cards, so that is next on my plate. | ||
+ | |||
+ | === 31 July === | ||
+ | |||
+ | The **3c905** is under development. Two commits have been made. The Linux driver was added: | ||
+ | * [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commit;h=45b653bf7fc31207e7755d8ed0cc029c7ff5ba45|[Drivers-3c59x] 3c59x Linux driver added]] | ||
+ | Transition from Linux to gPXE API is in-progress: | ||
+ | * [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commit;h=02ce4088910dc2fef14752eca305c6791d15318c|[Drivers-3c59x] linux -> gPXE API changes]] | ||
+ | This is a sizable driver, and progress is slow and steady. I've already converted a Linux driver twice before, so I have a list of changes to follow. I posted these in a //soc-mentors// email, but I'll post them here for others to reference: | ||
+ | <file> | ||
+ | The following functions were replaced with nothing: | ||
+ | pci_unmap_addr_set | ||
+ | pci_unmap_len_set | ||
+ | pci_unmap_single | ||
+ | pci_unmap_page | ||
+ | pci_dma_sync_single_for_cpu | ||
+ | pci_dma_sync_single_for_device | ||
+ | netif_tx_lock_bh | ||
+ | netif_tx_unlock_bh | ||
+ | skb_padto(skb,ETH_ZLEN) (io_buffer already pads) | ||
+ | netif_stop_queue | ||
+ | netif_msg_X | ||
+ | netif_wake_queue | ||
+ | netif_queue_stopped | ||
+ | __netif_rx_complete | ||
+ | spin_lock_irqsave | ||
+ | spin_unlock_irqrestore | ||
+ | netif_napi_add | ||
+ | spin_lock_bh | ||
+ | spin_unlock_bh | ||
+ | napi_enable (after open() will enable polling) | ||
+ | spin_lock_irq | ||
+ | spin_unlock_irq | ||
+ | pci_release_regions | ||
+ | pci_disable_device | ||
+ | |||
+ | The following features were considered unneeded and relevant code was omitted: | ||
+ | wol | ||
+ | ethtool | ||
+ | tx/rx checksum offload | ||
+ | jumbo frames | ||
+ | skb fragments | ||
+ | power management | ||
+ | |||
+ | The following function replacements were made: | ||
+ | pci_alloc_consistent | ||
+ | malloc_dma, virt_to_phys, memset | ||
+ | pci_free_consistent | ||
+ | free_dma | ||
+ | pci_map_single | ||
+ | virt_to_phys | ||
+ | smp_wmb | ||
+ | wmb | ||
+ | netif_running | ||
+ | mostly nothing, a few netdev_link_ok | ||
+ | netif_receive_skb | ||
+ | netdev_rx | ||
+ | netif_carrier_off | ||
+ | netdev_link_down | ||
+ | skb_copy_from_linear_data | ||
+ | memcpy | ||
+ | netdev_alloc_skb | ||
+ | alloc_iob, memset | ||
+ | kcalloc | ||
+ | malloc_dma, memset | ||
+ | dev_kfree_skb | ||
+ | free_iob | ||
+ | kzalloc | ||
+ | malloc_dma, memset | ||
+ | </file> | ||
+ | |||
+ | This is not an all-inclusive list, as I have already made some replacements that I haven't added here. I will update the list as I have time to review the code. | ||
+ | |||
+ | Also, the **skge** driver was updated. Linux performs a memory clear during ''pci_alloc_consistent'' and ''netdev_alloc_skb'', which I hadn't duplicated. | ||
+ | * [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commitdiff;h=9d20ad0a66c1303e16cb2d9c88a9a330c76d0750|[Drivers-skge] Added memory clearing following allocations]] | ||
+ | * [[http://git.etherboot.org/?p=people/mdeck/gpxe.git;a=commitdiff;h=0c25964551adf15c9e541efaee967038a7e4315a|[Drivers-skge] Fix previous commit]] | ||
+ | |||
+ | My next goal is to get the **3c59x** running. This shouldn't be more than a few days of hard work if no problems are encountered. |