ugen1.4: <TP-LINK USB 10/100 LAN> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA)
bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x0000 <Probed by interface class>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x2357
idProduct = 0x0602
bcdDevice = 0x2000
iManufacturer = 0x0001 <TP-LINK>
iProduct = 0x0002 <USB 10/100 LAN>
iSerialNumber = 0x0003 <503EAAACB692>
bNumConfigurations = 0x0002
set_config 1
.notify 100 {
match "system" "USB";
match "subsystem" "DEVICE";
match "type" "ATTACH";
match "vendor" "0x2357";
match "product" "0x0602";
action "usbconfig -d $cdev set_config 1";
};
The attaching is done during boot, and the setting is fairly specific to this USB device, so that should be the best place for it.but it only works when attaching, not when the device is already attached and I reboot the server.
#action for Lenovo Thinkpad USB LAN adapter
notify 100 {
match "system" "USB";
match "subsystem" "DEVICE";
match "type" "ATTACH";
match "vendor" "0x17ef";
match "product" "0x7205";
action "/usr/sbin/usbconfig -d $ugen set_config 1";
};