Commit 0ec3c7e8 authored by Duncan Sands's avatar Duncan Sands Committed by Greg Kroah-Hartman

[PATCH] USBATM: trivial modifications

Formatting, changes to variable names, comments, log level changes,
printk rate limiting.
Signed-off-by: default avatarDuncan Sands <baldrick@free.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7ce08c93
......@@ -352,7 +352,6 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
struct atm_dev *atm_dev)
{
struct cxacru_data *instance = usbatm_instance->driver_data;
struct device *dev = &usbatm_instance->usb_intf->dev;
/*
struct atm_dev *atm_dev = usbatm_instance->atm_dev;
*/
......@@ -364,14 +363,14 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_MAC_ADDRESS, NULL, 0,
atm_dev->esi, sizeof(atm_dev->esi));
if (ret < 0) {
dev_err(dev, "cxacru_atm_start: CARD_GET_MAC_ADDRESS returned %d\n", ret);
atm_err(usbatm_instance, "cxacru_atm_start: CARD_GET_MAC_ADDRESS returned %d\n", ret);
return ret;
}
/* start ADSL */
ret = cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_START, NULL, 0, NULL, 0);
if (ret < 0) {
dev_err(dev, "cxacru_atm_start: CHIP_ADSL_LINE_START returned %d\n", ret);
atm_err(usbatm_instance, "cxacru_atm_start: CHIP_ADSL_LINE_START returned %d\n", ret);
return ret;
}
......@@ -383,13 +382,13 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance,
static void cxacru_poll_status(struct cxacru_data *instance)
{
u32 buf[CXINF_MAX] = {};
struct device *dev = &instance->usbatm->usb_intf->dev;
struct atm_dev *atm_dev = instance->usbatm->atm_dev;
struct usbatm_data *usbatm = instance->usbatm;
struct atm_dev *atm_dev = usbatm->atm_dev;
int ret;
ret = cxacru_cm_get_array(instance, CM_REQUEST_CARD_INFO_GET, buf, CXINF_MAX);
if (ret < 0) {
dev_warn(dev, "poll status: error %d\n", ret);
atm_warn(usbatm, "poll status: error %d\n", ret);
goto reschedule;
}
......@@ -400,50 +399,50 @@ static void cxacru_poll_status(struct cxacru_data *instance)
switch (instance->line_status) {
case 0:
atm_dev->signal = ATM_PHY_SIG_LOST;
dev_info(dev, "ADSL line: down\n");
atm_info(usbatm, "ADSL line: down\n");
break;
case 1:
atm_dev->signal = ATM_PHY_SIG_LOST;
dev_info(dev, "ADSL line: attemtping to activate\n");
atm_info(usbatm, "ADSL line: attempting to activate\n");
break;
case 2:
atm_dev->signal = ATM_PHY_SIG_LOST;
dev_info(dev, "ADSL line: training\n");
atm_info(usbatm, "ADSL line: training\n");
break;
case 3:
atm_dev->signal = ATM_PHY_SIG_LOST;
dev_info(dev, "ADSL line: channel analysis\n");
atm_info(usbatm, "ADSL line: channel analysis\n");
break;
case 4:
atm_dev->signal = ATM_PHY_SIG_LOST;
dev_info(dev, "ADSL line: exchange\n");
atm_info(usbatm, "ADSL line: exchange\n");
break;
case 5:
atm_dev->link_rate = buf[CXINF_DOWNSTREAM_RATE] * 1000 / 424;
atm_dev->signal = ATM_PHY_SIG_FOUND;
dev_info(dev, "ADSL line: up (%d kb/s down | %d kb/s up)\n",
atm_info(usbatm, "ADSL line: up (%d kb/s down | %d kb/s up)\n",
buf[CXINF_DOWNSTREAM_RATE], buf[CXINF_UPSTREAM_RATE]);
break;
case 6:
atm_dev->signal = ATM_PHY_SIG_LOST;
dev_info(dev, "ADSL line: waiting\n");
atm_info(usbatm, "ADSL line: waiting\n");
break;
case 7:
atm_dev->signal = ATM_PHY_SIG_LOST;
dev_info(dev, "ADSL line: initializing\n");
atm_info(usbatm, "ADSL line: initializing\n");
break;
default:
atm_dev->signal = ATM_PHY_SIG_UNKNOWN;
dev_info(dev, "Unknown line state %02x\n", instance->line_status);
atm_info(usbatm, "Unknown line state %02x\n", instance->line_status);
break;
}
reschedule:
......@@ -504,8 +503,8 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
{
int ret;
int off;
struct usb_device *usb_dev = instance->usbatm->usb_dev;
struct device *dev = &instance->usbatm->usb_intf->dev;
struct usbatm_data *usbatm = instance->usbatm;
struct usb_device *usb_dev = usbatm->usb_dev;
u16 signature[] = { usb_dev->descriptor.idVendor, usb_dev->descriptor.idProduct };
u32 val;
......@@ -515,7 +514,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
val = cpu_to_le32(instance->modem_type->pll_f_clk);
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLFCLK_ADDR, (u8 *) &val, 4);
if (ret) {
dev_err(dev, "FirmwarePllFClkValue failed: %d\n", ret);
usb_err(usbatm, "FirmwarePllFClkValue failed: %d\n", ret);
return;
}
......@@ -523,7 +522,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
val = cpu_to_le32(instance->modem_type->pll_b_clk);
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLBCLK_ADDR, (u8 *) &val, 4);
if (ret) {
dev_err(dev, "FirmwarePllBClkValue failed: %d\n", ret);
usb_err(usbatm, "FirmwarePllBClkValue failed: %d\n", ret);
return;
}
......@@ -531,14 +530,14 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
val = cpu_to_le32(SDRAM_ENA);
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SDRAMEN_ADDR, (u8 *) &val, 4);
if (ret) {
dev_err(dev, "Enable SDRAM failed: %d\n", ret);
usb_err(usbatm, "Enable SDRAM failed: %d\n", ret);
return;
}
/* Firmware */
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, FW_ADDR, fw->data, fw->size);
if (ret) {
dev_err(dev, "Firmware upload failed: %d\n", ret);
usb_err(usbatm, "Firmware upload failed: %d\n", ret);
return;
}
......@@ -546,7 +545,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
if (instance->modem_type->boot_rom_patch) {
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_ADDR, bp->data, bp->size);
if (ret) {
dev_err(dev, "Boot ROM patching failed: %d\n", ret);
usb_err(usbatm, "Boot ROM patching failed: %d\n", ret);
return;
}
}
......@@ -554,7 +553,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
/* Signature */
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SIG_ADDR, (u8 *) signature, 4);
if (ret) {
dev_err(dev, "Signature storing failed: %d\n", ret);
usb_err(usbatm, "Signature storing failed: %d\n", ret);
return;
}
......@@ -566,7 +565,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
ret = cxacru_fw(usb_dev, FW_GOTO_MEM, 0x0, 0x0, FW_ADDR, NULL, 0);
}
if (ret) {
dev_err(dev, "Passing control to firmware failed: %d\n", ret);
usb_err(usbatm, "Passing control to firmware failed: %d\n", ret);
return;
}
......@@ -580,7 +579,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);
if (ret < 0) {
dev_err(dev, "modem failed to initialize: %d\n", ret);
usb_err(usbatm, "modem failed to initialize: %d\n", ret);
return;
}
......@@ -597,7 +596,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
ret = cxacru_cm(instance, CM_REQUEST_CARD_DATA_SET,
(u8 *) buf, len, NULL, 0);
if (ret < 0) {
dev_err(dev, "load config data failed: %d\n", ret);
usb_err(usbatm, "load config data failed: %d\n", ret);
return;
}
}
......@@ -608,18 +607,19 @@ static void cxacru_upload_firmware(struct cxacru_data *instance,
static int cxacru_find_firmware(struct cxacru_data *instance,
char* phase, const struct firmware **fw_p)
{
struct device *dev = &instance->usbatm->usb_intf->dev;
struct usbatm_data *usbatm = instance->usbatm;
struct device *dev = &usbatm->usb_intf->dev;
char buf[16];
sprintf(buf, "cxacru-%s.bin", phase);
dbg("cxacru_find_firmware: looking for %s", buf);
if (request_firmware(fw_p, buf, dev)) {
dev_dbg(dev, "no stage %s firmware found\n", phase);
usb_dbg(usbatm, "no stage %s firmware found\n", phase);
return -ENOENT;
}
dev_info(dev, "found firmware %s\n", buf);
usb_info(usbatm, "found firmware %s\n", buf);
return 0;
}
......@@ -627,20 +627,19 @@ static int cxacru_find_firmware(struct cxacru_data *instance,
static int cxacru_heavy_init(struct usbatm_data *usbatm_instance,
struct usb_interface *usb_intf)
{
struct device *dev = &usbatm_instance->usb_intf->dev;
const struct firmware *fw, *bp, *cf;
struct cxacru_data *instance = usbatm_instance->driver_data;
int ret = cxacru_find_firmware(instance, "fw", &fw);
if (ret) {
dev_warn(dev, "firmware (cxacru-fw.bin) unavailable (hotplug misconfiguration?)\n");
usb_warn(usbatm_instance, "firmware (cxacru-fw.bin) unavailable (system misconfigured?)\n");
return ret;
}
if (instance->modem_type->boot_rom_patch) {
ret = cxacru_find_firmware(instance, "bp", &bp);
if (ret) {
dev_warn(dev, "boot ROM patch (cxacru-bp.bin) unavailable (hotplug misconfiguration?)\n");
usb_warn(usbatm_instance, "boot ROM patch (cxacru-bp.bin) unavailable (system misconfigured?)\n");
release_firmware(fw);
return ret;
}
......@@ -787,12 +786,12 @@ static const struct usb_device_id cxacru_usb_ids[] = {
{ /* V = Conexant P = ADSL modem (Hasbani project) */
USB_DEVICE(0x0572, 0xcb00), .driver_info = (unsigned long) &cxacru_cb00
},
{ /* V = Conexant P = ADSL modem (Well PTI-800 */
USB_DEVICE(0x0572, 0xcb02), .driver_info = (unsigned long) &cxacru_cb00
},
{ /* V = Conexant P = ADSL modem */
USB_DEVICE(0x0572, 0xcb01), .driver_info = (unsigned long) &cxacru_cb00
},
{ /* V = Conexant P = ADSL modem (Well PTI-800) */
USB_DEVICE(0x0572, 0xcb02), .driver_info = (unsigned long) &cxacru_cb00
},
{ /* V = Conexant P = ADSL modem */
USB_DEVICE(0x0572, 0xcb06), .driver_info = (unsigned long) &cxacru_cb00
},
......
......@@ -205,7 +205,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
buffer, 0x200, &actual_length, 2000);
if (ret < 0 && ret != -ETIMEDOUT)
usb_dbg(usbatm, "%s: read BLOCK0 from modem failed (%d)!\n", __func__, ret);
usb_warn(usbatm, "%s: read BLOCK0 from modem failed (%d)!\n", __func__, ret);
else
usb_dbg(usbatm, "%s: BLOCK0 downloaded (%d bytes)\n", __func__, ret);
}
......@@ -219,7 +219,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
buffer, thislen, &actual_length, DATA_TIMEOUT);
if (ret < 0) {
usb_dbg(usbatm, "%s: write BLOCK1 to modem failed (%d)!\n", __func__, ret);
usb_err(usbatm, "%s: write BLOCK1 to modem failed (%d)!\n", __func__, ret);
goto out_free;
}
usb_dbg(usbatm, "%s: BLOCK1 uploaded (%zu bytes)\n", __func__, fw1->size);
......@@ -232,7 +232,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
buffer, 0x200, &actual_length, DATA_TIMEOUT);
if (ret < 0) {
usb_dbg(usbatm, "%s: read BLOCK2 from modem failed (%d)!\n", __func__, ret);
usb_err(usbatm, "%s: read BLOCK2 from modem failed (%d)!\n", __func__, ret);
goto out_free;
}
usb_dbg(usbatm, "%s: BLOCK2 downloaded (%d bytes)\n", __func__, actual_length);
......@@ -246,7 +246,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
buffer, thislen, &actual_length, DATA_TIMEOUT);
if (ret < 0) {
usb_dbg(usbatm, "%s: write BLOCK3 to modem failed (%d)!\n", __func__, ret);
usb_err(usbatm, "%s: write BLOCK3 to modem failed (%d)!\n", __func__, ret);
goto out_free;
}
}
......@@ -259,7 +259,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
buffer, 0x200, &actual_length, DATA_TIMEOUT);
if (ret < 0) {
usb_dbg(usbatm, "%s: read BLOCK4 from modem failed (%d)!\n", __func__, ret);
usb_err(usbatm, "%s: read BLOCK4 from modem failed (%d)!\n", __func__, ret);
goto out_free;
}
......@@ -285,8 +285,8 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
return ret;
}
static int speedtch_find_firmware(struct usb_interface *intf, int phase,
const struct firmware **fw_p)
static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf,
int phase, const struct firmware **fw_p)
{
struct device *dev = &intf->dev;
const u16 bcdDevice = le16_to_cpu(interface_to_usbdev(intf)->descriptor.bcdDevice);
......@@ -295,24 +295,24 @@ static int speedtch_find_firmware(struct usb_interface *intf, int phase,
char buf[24];
sprintf(buf, "speedtch-%d.bin.%x.%02x", phase, major_revision, minor_revision);
dev_dbg(dev, "%s: looking for %s\n", __func__, buf);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
if (request_firmware(fw_p, buf, dev)) {
sprintf(buf, "speedtch-%d.bin.%x", phase, major_revision);
dev_dbg(dev, "%s: looking for %s\n", __func__, buf);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
if (request_firmware(fw_p, buf, dev)) {
sprintf(buf, "speedtch-%d.bin", phase);
dev_dbg(dev, "%s: looking for %s\n", __func__, buf);
usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf);
if (request_firmware(fw_p, buf, dev)) {
dev_warn(dev, "no stage %d firmware found!\n", phase);
usb_err(usbatm, "%s: no stage %d firmware found!\n", __func__, phase);
return -ENOENT;
}
}
}
dev_info(dev, "found stage %d firmware %s\n", phase, buf);
usb_info(usbatm, "found stage %d firmware %s\n", phase, buf);
return 0;
}
......@@ -323,15 +323,16 @@ static int speedtch_heavy_init(struct usbatm_data *usbatm, struct usb_interface
struct speedtch_instance_data *instance = usbatm->driver_data;
int ret;
if ((ret = speedtch_find_firmware(intf, 1, &fw1)) < 0)
return ret;
if ((ret = speedtch_find_firmware(usbatm, intf, 1, &fw1)) < 0)
return ret;
if ((ret = speedtch_find_firmware(intf, 2, &fw2)) < 0) {
if ((ret = speedtch_find_firmware(usbatm, intf, 2, &fw2)) < 0) {
release_firmware(fw1);
return ret;
}
ret = speedtch_upload_firmware(instance, fw1, fw2);
if ((ret = speedtch_upload_firmware(instance, fw1, fw2)) < 0)
usb_err(usbatm, "%s: firmware upload failed (%d)!\n", __func__, ret);
release_firmware(fw2);
release_firmware(fw1);
......@@ -428,7 +429,9 @@ static void speedtch_check_status(struct speedtch_instance_data *instance)
int down_speed, up_speed, ret;
unsigned char status;
#ifdef VERBOSE_DEBUG
atm_dbg(usbatm, "%s entered\n", __func__);
#endif
ret = speedtch_read_status(instance);
if (ret < 0) {
......@@ -441,9 +444,9 @@ static void speedtch_check_status(struct speedtch_instance_data *instance)
status = buf[OFFSET_7];
atm_dbg(usbatm, "%s: line state %02x\n", __func__, status);
if ((status != instance->last_status) || !status) {
atm_dbg(usbatm, "%s: line state 0x%02x\n", __func__, status);
switch (status) {
case 0:
atm_dev->signal = ATM_PHY_SIG_LOST;
......@@ -484,7 +487,7 @@ static void speedtch_check_status(struct speedtch_instance_data *instance)
default:
atm_dev->signal = ATM_PHY_SIG_UNKNOWN;
atm_info(usbatm, "Unknown line state %02x\n", status);
atm_info(usbatm, "unknown line state %02x\n", status);
break;
}
......@@ -690,8 +693,10 @@ static int speedtch_bind(struct usbatm_data *usbatm,
usb_dbg(usbatm, "%s entered\n", __func__);
/* sanity checks */
if (usb_dev->descriptor.bDeviceClass != USB_CLASS_VENDOR_SPEC) {
usb_dbg(usbatm, "%s: wrong device class %d\n", __func__, usb_dev->descriptor.bDeviceClass);
usb_err(usbatm, "%s: wrong device class %d\n", __func__, usb_dev->descriptor.bDeviceClass);
return -ENODEV;
}
......@@ -704,7 +709,7 @@ static int speedtch_bind(struct usbatm_data *usbatm,
ret = usb_driver_claim_interface(&speedtch_usb_driver, cur_intf, usbatm);
if (ret < 0) {
usb_dbg(usbatm, "%s: failed to claim interface %d (%d)\n", __func__, i, ret);
usb_err(usbatm, "%s: failed to claim interface %2d (%d)!\n", __func__, i, ret);
speedtch_release_interfaces(usb_dev, i);
return ret;
}
......@@ -714,7 +719,7 @@ static int speedtch_bind(struct usbatm_data *usbatm,
instance = kmalloc(sizeof(*instance), GFP_KERNEL);
if (!instance) {
usb_dbg(usbatm, "%s: no memory for instance data!\n", __func__);
usb_err(usbatm, "%s: no memory for instance data!\n", __func__);
ret = -ENOMEM;
goto fail_release;
}
......@@ -754,8 +759,10 @@ static int speedtch_bind(struct usbatm_data *usbatm,
usb_dbg(usbatm, "%s: firmware %s loaded\n", __func__, need_heavy_init ? "not" : "already");
if (*need_heavy_init)
if ((ret = usb_reset_device(usb_dev)) < 0)
if ((ret = usb_reset_device(usb_dev)) < 0) {
usb_err(usbatm, "%s: device reset failed (%d)!\n", __func__, ret);
goto fail_free;
}
usbatm->driver_data = instance;
......
This diff is collapsed.
......@@ -24,22 +24,21 @@
#ifndef _USBATM_H_
#define _USBATM_H_
#include <linux/config.h>
/*
#define VERBOSE_DEBUG
*/
#include <asm/semaphore.h>
#include <linux/atm.h>
#include <linux/atmdev.h>
#include <linux/completion.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/stringify.h>
#include <linux/usb.h>
/*
#define VERBOSE_DEBUG
*/
#ifdef DEBUG
#define UDSL_ASSERT(x) BUG_ON(!(x))
#else
......@@ -52,8 +51,13 @@
dev_info(&(instance)->usb_intf->dev , format , ## arg)
#define usb_warn(instance, format, arg...) \
dev_warn(&(instance)->usb_intf->dev , format , ## arg)
#ifdef DEBUG
#define usb_dbg(instance, format, arg...) \
dev_printk(KERN_DEBUG , &(instance)->usb_intf->dev , format , ## arg)
#else
#define usb_dbg(instance, format, arg...) \
dev_dbg(&(instance)->usb_intf->dev , format , ## arg)
do {} while (0)
#endif
/* FIXME: move to dev_* once ATM is driver model aware */
#define atm_printk(level, instance, format, arg...) \
......@@ -69,9 +73,14 @@
#ifdef DEBUG
#define atm_dbg(instance, format, arg...) \
atm_printk(KERN_DEBUG, instance , format , ## arg)
#define atm_rldbg(instance, format, arg...) \
if (printk_ratelimit()) \
atm_printk(KERN_DEBUG, instance , format , ## arg)
#else
#define atm_dbg(instance, format, arg...) \
do {} while (0)
#define atm_rldbg(instance, format, arg...) \
do {} while (0)
#endif
......@@ -171,7 +180,7 @@ struct usbatm_data {
struct usbatm_channel tx_channel;
struct sk_buff_head sndqueue;
struct sk_buff *current_skb; /* being emptied */
struct sk_buff *current_skb; /* being emptied */
struct urb *urbs[0];
};
......
......@@ -61,7 +61,7 @@ static int usb_intf_has_ep(const struct usb_interface *intf, u8 ep)
return 0;
}
static int xusbatm_bind(struct usbatm_data *usbatm_instance,
static int xusbatm_bind(struct usbatm_data *usbatm,
struct usb_interface *intf, const struct usb_device_id *id,
int *need_heavy_init)
{
......@@ -72,14 +72,14 @@ static int xusbatm_bind(struct usbatm_data *usbatm_instance,
u8 searched_ep = rx_ep_present ? tx_endpoint[drv_ix] : rx_endpoint[drv_ix];
int i, ret;
usb_dbg(usbatm_instance, "%s: binding driver %d: vendor %#x product %#x"
" rx: ep %#x padd %d tx: ep %#x padd %d\n",
usb_dbg(usbatm, "%s: binding driver %d: vendor %04x product %04x"
" rx: ep %02x padd %d tx: ep %02x padd %d\n",
__func__, drv_ix, vendor[drv_ix], product[drv_ix],
rx_endpoint[drv_ix], rx_padding[drv_ix],
tx_endpoint[drv_ix], tx_padding[drv_ix]);
if (!rx_ep_present && !tx_ep_present) {
usb_dbg(usbatm_instance, "%s: intf #%d has neither rx (%#x) nor tx (%#x) endpoint\n",
usb_dbg(usbatm, "%s: intf #%d has neither rx (%#x) nor tx (%#x) endpoint\n",
__func__, intf->altsetting->desc.bInterfaceNumber,
rx_endpoint[drv_ix], tx_endpoint[drv_ix]);
return -ENODEV;
......@@ -93,25 +93,26 @@ static int xusbatm_bind(struct usbatm_data *usbatm_instance,
if (cur_if != intf && usb_intf_has_ep(cur_if, searched_ep)) {
ret = usb_driver_claim_interface(&xusbatm_usb_driver,
cur_if, usbatm_instance);
cur_if, usbatm);
if (!ret)
usb_err(usbatm_instance, "%s: failed to claim interface #%d (%d)\n",
usb_err(usbatm, "%s: failed to claim interface #%d (%d)\n",
__func__, cur_if->altsetting->desc.bInterfaceNumber, ret);
return ret;
}
}
usb_err(usbatm_instance, "%s: no interface has endpoint %#x\n",
usb_err(usbatm, "%s: no interface has endpoint %#x\n",
__func__, searched_ep);
return -ENODEV;
}
static void xusbatm_unbind(struct usbatm_data *usbatm_instance,
static void xusbatm_unbind(struct usbatm_data *usbatm,
struct usb_interface *intf)
{
struct usb_device *usb_dev = interface_to_usbdev(intf);
int i;
usb_dbg(usbatm_instance, "%s entered\n", __func__);
usb_dbg(usbatm, "%s entered\n", __func__);
for(i = 0; i < usb_dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *cur_if = usb_dev->actconfig->interface[i];
......@@ -120,10 +121,10 @@ static void xusbatm_unbind(struct usbatm_data *usbatm_instance,
}
}
static int xusbatm_atm_start(struct usbatm_data *usbatm_instance,
static int xusbatm_atm_start(struct usbatm_data *usbatm,
struct atm_dev *atm_dev)
{
atm_dbg(usbatm_instance, "%s entered\n", __func__);
atm_dbg(usbatm, "%s entered\n", __func__);
/* use random MAC as we've no way to get it from the device */
random_ether_addr(atm_dev->esi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment