lkml.org 
[lkml]   [2010]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[41/98] dm9601: fix phy/eeprom write routine
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Peter Korsgaard <jacmet@sunsite.dk>

    commit e9162ab1610531d6ea6c1833daeb2613e44275e8 upstream.

    Use correct bit positions in DM_SHARED_CTRL register for writes.

    Michael Planes recently encountered a 'KY-RS9600 USB-LAN converter', which
    came with a driver CD containing a Linux driver. This driver turns out to
    be a copy of dm9601.c with symbols renamed and my copyright stripped.
    That aside, it did contain 1 functional change in dm_write_shared_word(),
    and after checking the datasheet the original value was indeed wrong
    (read versus write bits).

    On Michaels HW, this change bumps receive speed from ~30KB/s to ~900KB/s.
    On other devices the difference is less spectacular, but still significant
    (~30%).

    Reported-by: Michael Planes <michael.planes@free.fr>
    Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/net/usb/dm9601.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/net/usb/dm9601.c
    +++ b/drivers/net/usb/dm9601.c
    @@ -238,7 +238,7 @@ static int dm_write_shared_word(struct u
    goto out;

    dm_write_reg(dev, DM_SHARED_ADDR, phy ? (reg | 0x40) : reg);
    - dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1c : 0x14);
    + dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1a : 0x12);

    for (i = 0; i < DM_TIMEOUT; i++) {
    u8 tmp;



    \
     
     \ /
      Last update: 2010-05-12 10:15    [W:4.063 / U:0.544 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site