Changeset 2950


Ignore:
Timestamp:
Apr 25, 2012, 1:26:40 AM (2 years ago)
Author:
wmb
Message:

ASIX USB-LAN driver - power off the PHY when closing the device, thus eliminating excess power consumption during S3 selftest in manufacturing. The disadvantage is that subsequent opens take longer. Test case: ok select net unselect alarm-in-3 strp

Location:
dev/usb2/device/net
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dev/usb2/device/net/ax8817x.fth

    r1715 r2950  
    180180; 
    181181 
     182: ax-stop-phy  ( -- ) 
     183   ax88772?  if 
     184      h# 40 ax-sw-reset    \ Power off internal PHY, reset external one (08 == 0) 
     185   then 
     186; 
    182187: select-phy  ( -- ) 
    183188   ax88772?  if 
     
    317322   ['] ax-start-mac to start-mac 
    318323   ['] ax-start-phy to start-phy 
     324   ['] ax-stop-phy  to stop-phy 
    319325   ['] ax-stop-mac  to stop-mac 
    320326   ['] ax-get-mac-address to get-mac-address 
  • dev/usb2/device/net/common.fth

    r1675 r2950  
    2424defer link-up?         ( -- up? )               ' true to link-up? 
    2525defer start-phy        ( -- )                   ' noop to start-phy 
     26defer stop-phy         ( -- )                   ' noop to stop-phy 
    2627defer start-mac        ( -- )                   ' noop to start-mac 
    2728defer stop-mac         ( -- )                   ' noop to stop-mac 
  • dev/usb2/device/net/ethernet.fth

    r2208 r2950  
    3232   end-bulk-in 
    3333   free-buf 
     34   stop-phy 
    3435; 
    3536 
     
    4243: copy-packet  ( adr len -- len' ) 
    4344   dup multi-packet?  if  4 +  then   ( adr len len' ) 
    44    /outbuf >  if  ." USB Ethernet write packet too long" cr  stop-mac abort  then  ( adr len ) 
     45   /outbuf >  if  ." USB Ethernet write packet too long" cr  stop-net abort  then  ( adr len ) 
    4546 
    4647   multi-packet?  if       ( adr len ) 
     
    7273\  length.leword  ~length.leword  data  [ pad-to-even ] 
    7374: extract-packet  ( -- data-adr len ) 
    74    residue 4 <  if  ." Short residue from USB Ethernet" cr stop-mac  abort  then 
     75   residue 4 <  if  ." Short residue from USB Ethernet" cr stop-net  abort  then 
    7576 
    7677   pkt-adr dup 4 +  swap >r 
     
    131132   then                                 ( adr ihandle|0 ) 
    132133 
    133    dup  0=  if  ." Can't open obp-tftp support package" stop-mac abort  then 
     134   dup  0=  if  ." Can't open obp-tftp support package" stop-net abort  then 
    134135                                        ( adr ihandle ) 
    135136 
     
    186187   link-up? 0=  if 
    187188      ." Network not connected." cr 
     189      stop-phy 
    188190      true exit 
    189191   then 
Note: See TracChangeset for help on using the changeset viewer.