usbatm cxacru.c,1.4,1.5
kagan at infradead.org
kagan at infradead.org
Thu Jan 20 13:30:39 EST 2005
- Previous message: speedtch cxacru2.c, NONE, 1.1 cxacru2.h, NONE, 1.1 speedtch2.c, NONE,
1.1 speedtch2.h, NONE, 1.1 usbatm2.c, NONE, 1.1 Makefile, 1.8,
1.9 usbatm.c, 1.1, NONE
- Next message: speedtch cxacru2.c,1.1,1.2 speedtch2.c,1.1,1.2 usbatm2.c,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/usbatm
In directory phoenix.infradead.org:/tmp/cvs-serv16073
Modified Files:
cxacru.c
Log Message:
- cxacru_usb_ioctl:
removed; ADSL is started immediately upon modem initialisation
- cxacru_adsl_start:
removed microoptimisation checking if the driver is fully initialised: now it
never is on entry to cxacru_adsl_start
Index: cxacru.c
===================================================================
RCS file: /home/cvs/usbatm/cxacru.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cxacru.c 17 Jan 2005 00:33:41 -0000 1.4
+++ cxacru.c 20 Jan 2005 18:30:36 -0000 1.5
@@ -365,54 +365,51 @@
static void cxacru_adsl_start(struct cxacru_instance_data *instance)
{
int ret;
+ u8 esi[sizeof(instance->u.atm_dev->esi)] = {};
dbg("cxacru_adsl_start");
down(&instance->start_serialize);
- if (!instance->u.atm_dev) { /* ! fully initialised */
- u8 esi[sizeof(instance->u.atm_dev->esi)] = {};
-
- ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);
- if (ret < 0) { /* firmware not loaded */
- dbg("cxacru_adsl_start: CARD_GET_STATUS returned %d", ret);
+ ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);
+ if (ret < 0) { /* firmware not loaded */
+ dbg("cxacru_adsl_start: CARD_GET_STATUS returned %d", ret);
#ifdef USE_FW_LOADER
- if (!instance->firmware_start_run) {
- instance->firmware_start_run = 1;
- cxacru_firmware_start(instance);
- }
-#endif /* USE_FW_LOADER */
- goto out;
- }
-
- /* Read MAC address */
- ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_MAC_ADDRESS, NULL, 0,
- esi, sizeof(esi));
- if (ret < 0) {
- err("cxacru_adsl_start: CARD_GET_MAC_ADDRESS returned %d", ret);
- goto out;
+ if (!instance->firmware_start_run) {
+ instance->firmware_start_run = 1;
+ cxacru_firmware_start(instance);
}
+#endif /* USE_FW_LOADER */
+ goto out;
+ }
- /* FIXME: remove dev from args; should have been set in probe */
- ret = udsl_instance_setup(instance->u.usb_dev, &instance->u);
- if (ret)
- goto out;
- memcpy(instance->u.atm_dev->esi, esi, sizeof(esi));
- /* FIXME: remove */
- instance->u.status = UDSL_LOADED_FIRMWARE;
-
- dev_info(&instance->u.usb_dev->dev, "cxacru: MAC = %02x", esi[0]);
- for (ret = 1; ret < sizeof(esi); ret++)
- printk(":%02x", esi[ret]);
- printk("\n");
+ /* Read MAC address */
+ ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_MAC_ADDRESS, NULL, 0,
+ esi, sizeof(esi));
+ if (ret < 0) {
+ err("cxacru_adsl_start: CARD_GET_MAC_ADDRESS returned %d", ret);
+ goto out;
}
+ /* FIXME: remove dev from args; should have been set in probe */
+ ret = udsl_instance_setup(instance->u.usb_dev, &instance->u);
+ if (ret)
+ goto out;
+ memcpy(instance->u.atm_dev->esi, esi, sizeof(esi));
+ /* FIXME: remove */
+ instance->u.status = UDSL_LOADED_FIRMWARE;
+
+ dev_info(&instance->u.usb_dev->dev, "cxacru: MAC = %02x", esi[0]);
+ for (ret = 1; ret < sizeof(esi); ret++)
+ printk(":%02x", esi[ret]);
+ printk("\n");
+
/* start ADSL */
ret = cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_START, NULL, 0, NULL, 0);
if (ret < 0) {
err("cxacru_adst_start: CHIP_ADSL_LINE_START returned %d", ret);
goto out;
}
-
+
/* Start status polling */
cxacru_do_timer_poll(instance);
@@ -710,31 +707,6 @@
}
#endif /* USE_FW_LOADER */
-static int cxacru_usb_ioctl(struct usb_interface *intf, unsigned int code,
- void *user_data)
-{
- struct cxacru_instance_data *instance = usb_get_intfdata(intf);
-
- dbg("cxacru_usb_ioctl entered");
-
- if (!instance) {
- dbg("cxacru_usb_ioctl: NULL instance!");
- return -ENODEV;
- }
-
- switch (code) {
- case UDSL_IOCTL_LINE_UP:
- cxacru_adsl_start(instance);
- return (instance->u.status == UDSL_LOADED_FIRMWARE) ? 0 : -EIO;
- case UDSL_IOCTL_LINE_DOWN:
- cxacru_cm(instance, CM_REQUEST_CHIP_ADSL_LINE_STOP, NULL, 0, NULL, 0);
- cxacru_do_timer_poll(instance);
- return 0;
- default:
- return -ENOTTY;
- }
-}
-
static int cxacru_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
@@ -876,7 +848,6 @@
.name = cxacru_driver_name,
.probe = cxacru_usb_probe,
.disconnect = cxacru_usb_disconnect,
- .ioctl = cxacru_usb_ioctl,
.id_table = cxacru_usb_ids,
};
- Previous message: speedtch cxacru2.c, NONE, 1.1 cxacru2.h, NONE, 1.1 speedtch2.c, NONE,
1.1 speedtch2.h, NONE, 1.1 usbatm2.c, NONE, 1.1 Makefile, 1.8,
1.9 usbatm.c, 1.1, NONE
- Next message: speedtch cxacru2.c,1.1,1.2 speedtch2.c,1.1,1.2 usbatm2.c,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Usbatm-commits
mailing list