ChangeSet 1.893.2.22, 2003/01/06 10:49:21-08:00, petkan@rakia.hell.org [PATCH] USB rtl8150 update set mac address at dev->open() time; diff -Nru a/drivers/usb/rtl8150.c b/drivers/usb/rtl8150.c --- a/drivers/usb/rtl8150.c Mon Jan 6 11:29:54 2003 +++ b/drivers/usb/rtl8150.c Mon Jan 6 11:29:54 2003 @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -21,7 +20,7 @@ #include /* Version Information */ -#define DRIVER_VERSION "v0.4.2 (2002/09/19)" +#define DRIVER_VERSION "v0.4.3 (2002/12/31)" #define DRIVER_AUTHOR "Petko Manolov " #define DRIVER_DESC "rtl8150 based usb-ethernet driver" @@ -354,7 +353,7 @@ case -ENOENT: return; case -ETIMEDOUT: - warn("reset needed may be?.."); + warn("need a device reset?.."); goto goon; default: warn("Rx status %d", urb->status); @@ -497,7 +496,7 @@ count = (count & 0x3f) ? count : count + 1; memcpy(dev->tx_buff, skb->data, skb->len); FILL_BULK_URB(dev->tx_urb, dev->udev, usb_sndbulkpipe(dev->udev, 2), - dev->tx_buff, RTL8150_MAX_MTU, write_bulk_callback, dev); + dev->tx_buff, count, write_bulk_callback, dev); dev->tx_urb->transfer_buffer_length = count; if ((res = usb_submit_urb(dev->tx_urb))) { @@ -525,6 +524,9 @@ } down(&dev->sem); + + set_registers(dev, IDR, 6, netdev->dev_addr); + FILL_BULK_URB(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), dev->rx_buff, RTL8150_MAX_MTU, read_bulk_callback, dev); if ((res = usb_submit_urb(dev->rx_urb)))