Stefan Hajnoczi wrote:
Looks good. It's nice to see high-end hardware that can be driven in
a clean and simple way.
Thanks. The OS-drivers are not so clean and simple, thanks to LRO, RSS,
TSO, MSI, NAPI, thread safety, virtualization, etc. It felt great to
leave that complexity out.
My only suggestion is that myri10ge_net_close() should not error
outstanding TX. The net device core code already does this in
net/netdevice.c:netdev_tx_flush(). This function is called right
after the driver's close() returns in net/netdevice.c:netdev_close().
Great catch!
Do you mind if I slip in a couple trivial cleanups into my revised
patch? Proposed changes are
attached. If they are OK with you I will generate a myri10ge_v2.patch
after retesting.
Thanks,
--Glenn
diff --git a/src/drivers/net/myri10ge.c b/src/drivers/net/myri10ge.c
index 91a978f..ac2e124 100644
--- a/src/drivers/net/myri10ge.c
+++ b/src/drivers/net/myri10ge.c
@@ -424,7 +424,7 @@ static int mac_address_from_string_specs ( struct
pci_device *pci,
pci_read_config_dword ( pci, VS_DATA, &len );
DBG2 ( "s...@%x,%x\n", addr, len );
- /* Copy in the string specs. Use word reads for performance. */
+ /* Copy in the string specs. Use 32-bit reads for performance. */
if ( len > sizeof ( string_specs ) || ( len & 3 ) ) {
DBG ( "SS too big\n" );
@@ -546,10 +546,6 @@ static int myri10ge_pci_probe ( struct pci_device *pci,
adjust_pci_device ( pci );
DBGP ( "pci " );
- unsigned char cls;
- pci_read_config_byte ( pci, PCI_CACHE_LINE_SIZE, &cls );
- DBGP ( "cache_line=%d\n", ( int ) cls );
-
/* Register the initialized network device. */
rc = register_netdev ( netdev );
@@ -617,17 +613,6 @@ static void myri10ge_net_close ( struct net_device *netdev
)
myri10ge_command ( priv, MXGEFW_CMD_RESET, data );
- /* Free transmits that never completed. */
-
- while ( priv->transmits_done != priv->transmits_posted ) {
- netdev_tx_complete_err
- ( netdev,
- priv->transmit_iob[priv->transmits_done
- & MYRI10GE_TRANSMIT_WRAP],
- ECONNABORTED );
- ++priv->transmits_done;
- }
-
/* Free receive buffers that were never filled. */
while ( priv->receives_done != priv->receives_posted ) {
_______________________________________________
gPXE mailing list
[email protected]
http://etherboot.org/mailman/listinfo/gpxe