usbnet.c (b74b953b998bcc2db91b694446f3a2619ec32de6) | usbnet.c (b0786b430c982dffbb44d8030e6b6088671ce745) |
---|---|
1/* 2 * USB Network driver infrastructure 3 * Copyright (C) 2000-2005 by David Brownell 4 * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 31 unchanged lines hidden (view full) --- 40#include <linux/ctype.h> 41#include <linux/ethtool.h> 42#include <linux/workqueue.h> 43#include <linux/mii.h> 44#include <linux/usb.h> 45#include <linux/usb/usbnet.h> 46#include <linux/slab.h> 47#include <linux/kernel.h> | 1/* 2 * USB Network driver infrastructure 3 * Copyright (C) 2000-2005 by David Brownell 4 * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 31 unchanged lines hidden (view full) --- 40#include <linux/ctype.h> 41#include <linux/ethtool.h> 42#include <linux/workqueue.h> 43#include <linux/mii.h> 44#include <linux/usb.h> 45#include <linux/usb/usbnet.h> 46#include <linux/slab.h> 47#include <linux/kernel.h> |
48#include <linux/pm_runtime.h> |
|
48 49#define DRIVER_VERSION "22-Aug-2005" 50 51 52/*-------------------------------------------------------------------------*/ 53 54/* 55 * Nineteen USB 1.1 max size bulk transactions per frame (ms), max. --- 1212 unchanged lines hidden (view full) --- 1268{ 1269 struct usbnet *dev; 1270 struct net_device *net; 1271 struct usb_host_interface *interface; 1272 struct driver_info *info; 1273 struct usb_device *xdev; 1274 int status; 1275 const char *name; | 49 50#define DRIVER_VERSION "22-Aug-2005" 51 52 53/*-------------------------------------------------------------------------*/ 54 55/* 56 * Nineteen USB 1.1 max size bulk transactions per frame (ms), max. --- 1212 unchanged lines hidden (view full) --- 1269{ 1270 struct usbnet *dev; 1271 struct net_device *net; 1272 struct usb_host_interface *interface; 1273 struct driver_info *info; 1274 struct usb_device *xdev; 1275 int status; 1276 const char *name; |
1277 struct usb_driver *driver = to_usb_driver(udev->dev.driver); |
|
1276 | 1278 |
1279 /* usbnet already took usb runtime pm, so have to enable the feature 1280 * for usb interface, otherwise usb_autopm_get_interface may return 1281 * failure if USB_SUSPEND(RUNTIME_PM) is enabled. 1282 */ 1283 if (!driver->supports_autosuspend) { 1284 driver->supports_autosuspend = 1; 1285 pm_runtime_enable(&udev->dev); 1286 } 1287 |
|
1277 name = udev->dev.driver->name; 1278 info = (struct driver_info *) prod->driver_info; 1279 if (!info) { 1280 dev_dbg (&udev->dev, "blacklisted by %s\n", name); 1281 return -ENODEV; 1282 } 1283 xdev = interface_to_usbdev (udev); 1284 interface = udev->cur_altsetting; --- 230 unchanged lines hidden --- | 1288 name = udev->dev.driver->name; 1289 info = (struct driver_info *) prod->driver_info; 1290 if (!info) { 1291 dev_dbg (&udev->dev, "blacklisted by %s\n", name); 1292 return -ENODEV; 1293 } 1294 xdev = interface_to_usbdev (udev); 1295 interface = udev->cur_altsetting; --- 230 unchanged lines hidden --- |