uint16_t rcr;
int rc;
+ /* Reapply device configuration to avoid transaction errors */
+ if ( ( rc = usb_set_configuration ( axge->usb, axge->config ) ) != 0 ) {
+ DBGC ( axge, "AXGE %p could not set configuration: %s\n",
+ axge, strerror ( rc ) );
+ goto err_set_configuration;
+ }
+
/* Open USB network device */
if ( ( rc = usbnet_open ( &axge->usbnet ) ) != 0 ) {
DBGC ( axge, "AXGE %p could not open: %s\n",
err_write_mac:
usbnet_close ( &axge->usbnet );
err_open:
+ err_set_configuration:
return rc;
}
axge->usb = usb;
axge->bus = usb->port->hub->bus;
axge->netdev = netdev;
+ axge->config = config->config;
usbnet_init ( &axge->usbnet, func, &axge_intr_operations,
&axge_in_operations, &axge_out_operations );
usb_refill_init ( &axge->usbnet.intr, 0, 0, AXGE_INTR_MAX_FILL );
struct net_device *netdev;
/** USB network device */
struct usbnet_device usbnet;
+ /** Device configuration */
+ unsigned int config;
/** Link state has changed */
int check_link;
};