pegasus 91 drivers/input/tablet/pegasus_notetaker.c static int pegasus_control_msg(struct pegasus *pegasus, u8 *data, int len) pegasus 106 drivers/input/tablet/pegasus_notetaker.c result = usb_control_msg(pegasus->usbdev, pegasus 107 drivers/input/tablet/pegasus_notetaker.c usb_sndctrlpipe(pegasus->usbdev, 0), pegasus 117 drivers/input/tablet/pegasus_notetaker.c dev_err(&pegasus->usbdev->dev, "control msg error: %d\n", pegasus 125 drivers/input/tablet/pegasus_notetaker.c static int pegasus_set_mode(struct pegasus *pegasus, u8 mode, u8 led) pegasus 129 drivers/input/tablet/pegasus_notetaker.c return pegasus_control_msg(pegasus, cmd, sizeof(cmd)); pegasus 132 drivers/input/tablet/pegasus_notetaker.c static void pegasus_parse_packet(struct pegasus *pegasus) pegasus 134 drivers/input/tablet/pegasus_notetaker.c unsigned char *data = pegasus->data; pegasus 135 drivers/input/tablet/pegasus_notetaker.c struct input_dev *dev = pegasus->dev; pegasus 142 drivers/input/tablet/pegasus_notetaker.c schedule_work(&pegasus->init); pegasus 170 drivers/input/tablet/pegasus_notetaker.c dev_warn_once(&pegasus->usbdev->dev, pegasus 177 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = urb->context; pegasus 178 drivers/input/tablet/pegasus_notetaker.c struct usb_device *dev = pegasus->usbdev; pegasus 183 drivers/input/tablet/pegasus_notetaker.c pegasus_parse_packet(pegasus); pegasus 184 drivers/input/tablet/pegasus_notetaker.c usb_mark_last_busy(pegasus->usbdev); pegasus 208 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = container_of(work, struct pegasus, init); pegasus 211 drivers/input/tablet/pegasus_notetaker.c error = pegasus_set_mode(pegasus, PEN_MODE_XY, NOTETAKER_LED_MOUSE); pegasus 213 drivers/input/tablet/pegasus_notetaker.c dev_err(&pegasus->usbdev->dev, "pegasus_set_mode error: %d\n", pegasus 219 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = input_get_drvdata(dev); pegasus 222 drivers/input/tablet/pegasus_notetaker.c error = usb_autopm_get_interface(pegasus->intf); pegasus 226 drivers/input/tablet/pegasus_notetaker.c mutex_lock(&pegasus->pm_mutex); pegasus 227 drivers/input/tablet/pegasus_notetaker.c pegasus->irq->dev = pegasus->usbdev; pegasus 228 drivers/input/tablet/pegasus_notetaker.c if (usb_submit_urb(pegasus->irq, GFP_KERNEL)) { pegasus 233 drivers/input/tablet/pegasus_notetaker.c error = pegasus_set_mode(pegasus, PEN_MODE_XY, NOTETAKER_LED_MOUSE); pegasus 237 drivers/input/tablet/pegasus_notetaker.c pegasus->is_open = true; pegasus 238 drivers/input/tablet/pegasus_notetaker.c mutex_unlock(&pegasus->pm_mutex); pegasus 242 drivers/input/tablet/pegasus_notetaker.c usb_kill_urb(pegasus->irq); pegasus 243 drivers/input/tablet/pegasus_notetaker.c cancel_work_sync(&pegasus->init); pegasus 245 drivers/input/tablet/pegasus_notetaker.c mutex_unlock(&pegasus->pm_mutex); pegasus 246 drivers/input/tablet/pegasus_notetaker.c usb_autopm_put_interface(pegasus->intf); pegasus 252 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = input_get_drvdata(dev); pegasus 254 drivers/input/tablet/pegasus_notetaker.c mutex_lock(&pegasus->pm_mutex); pegasus 255 drivers/input/tablet/pegasus_notetaker.c usb_kill_urb(pegasus->irq); pegasus 256 drivers/input/tablet/pegasus_notetaker.c cancel_work_sync(&pegasus->init); pegasus 257 drivers/input/tablet/pegasus_notetaker.c pegasus->is_open = false; pegasus 258 drivers/input/tablet/pegasus_notetaker.c mutex_unlock(&pegasus->pm_mutex); pegasus 260 drivers/input/tablet/pegasus_notetaker.c usb_autopm_put_interface(pegasus->intf); pegasus 268 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus; pegasus 285 drivers/input/tablet/pegasus_notetaker.c pegasus = kzalloc(sizeof(*pegasus), GFP_KERNEL); pegasus 287 drivers/input/tablet/pegasus_notetaker.c if (!pegasus || !input_dev) { pegasus 292 drivers/input/tablet/pegasus_notetaker.c mutex_init(&pegasus->pm_mutex); pegasus 294 drivers/input/tablet/pegasus_notetaker.c pegasus->usbdev = dev; pegasus 295 drivers/input/tablet/pegasus_notetaker.c pegasus->dev = input_dev; pegasus 296 drivers/input/tablet/pegasus_notetaker.c pegasus->intf = intf; pegasus 299 drivers/input/tablet/pegasus_notetaker.c pegasus->data_len = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); pegasus 301 drivers/input/tablet/pegasus_notetaker.c pegasus->data = usb_alloc_coherent(dev, pegasus->data_len, GFP_KERNEL, pegasus 302 drivers/input/tablet/pegasus_notetaker.c &pegasus->data_dma); pegasus 303 drivers/input/tablet/pegasus_notetaker.c if (!pegasus->data) { pegasus 308 drivers/input/tablet/pegasus_notetaker.c pegasus->irq = usb_alloc_urb(0, GFP_KERNEL); pegasus 309 drivers/input/tablet/pegasus_notetaker.c if (!pegasus->irq) { pegasus 314 drivers/input/tablet/pegasus_notetaker.c usb_fill_int_urb(pegasus->irq, dev, pipe, pegasus 315 drivers/input/tablet/pegasus_notetaker.c pegasus->data, pegasus->data_len, pegasus 316 drivers/input/tablet/pegasus_notetaker.c pegasus_irq, pegasus, endpoint->bInterval); pegasus 318 drivers/input/tablet/pegasus_notetaker.c pegasus->irq->transfer_dma = pegasus->data_dma; pegasus 319 drivers/input/tablet/pegasus_notetaker.c pegasus->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; pegasus 322 drivers/input/tablet/pegasus_notetaker.c strlcpy(pegasus->name, dev->manufacturer, pegasus 323 drivers/input/tablet/pegasus_notetaker.c sizeof(pegasus->name)); pegasus 327 drivers/input/tablet/pegasus_notetaker.c strlcat(pegasus->name, " ", sizeof(pegasus->name)); pegasus 328 drivers/input/tablet/pegasus_notetaker.c strlcat(pegasus->name, dev->product, sizeof(pegasus->name)); pegasus 331 drivers/input/tablet/pegasus_notetaker.c if (!strlen(pegasus->name)) pegasus 332 drivers/input/tablet/pegasus_notetaker.c snprintf(pegasus->name, sizeof(pegasus->name), pegasus 337 drivers/input/tablet/pegasus_notetaker.c usb_make_path(dev, pegasus->phys, sizeof(pegasus->phys)); pegasus 338 drivers/input/tablet/pegasus_notetaker.c strlcat(pegasus->phys, "/input0", sizeof(pegasus->phys)); pegasus 340 drivers/input/tablet/pegasus_notetaker.c INIT_WORK(&pegasus->init, pegasus_init); pegasus 342 drivers/input/tablet/pegasus_notetaker.c usb_set_intfdata(intf, pegasus); pegasus 344 drivers/input/tablet/pegasus_notetaker.c input_dev->name = pegasus->name; pegasus 345 drivers/input/tablet/pegasus_notetaker.c input_dev->phys = pegasus->phys; pegasus 349 drivers/input/tablet/pegasus_notetaker.c input_set_drvdata(input_dev, pegasus); pegasus 370 drivers/input/tablet/pegasus_notetaker.c error = input_register_device(pegasus->dev); pegasus 377 drivers/input/tablet/pegasus_notetaker.c usb_free_urb(pegasus->irq); pegasus 379 drivers/input/tablet/pegasus_notetaker.c usb_free_coherent(dev, pegasus->data_len, pegasus 380 drivers/input/tablet/pegasus_notetaker.c pegasus->data, pegasus->data_dma); pegasus 383 drivers/input/tablet/pegasus_notetaker.c kfree(pegasus); pegasus 391 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = usb_get_intfdata(intf); pegasus 393 drivers/input/tablet/pegasus_notetaker.c input_unregister_device(pegasus->dev); pegasus 395 drivers/input/tablet/pegasus_notetaker.c usb_free_urb(pegasus->irq); pegasus 397 drivers/input/tablet/pegasus_notetaker.c pegasus->data_len, pegasus->data, pegasus 398 drivers/input/tablet/pegasus_notetaker.c pegasus->data_dma); pegasus 400 drivers/input/tablet/pegasus_notetaker.c kfree(pegasus); pegasus 406 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = usb_get_intfdata(intf); pegasus 408 drivers/input/tablet/pegasus_notetaker.c mutex_lock(&pegasus->pm_mutex); pegasus 409 drivers/input/tablet/pegasus_notetaker.c usb_kill_urb(pegasus->irq); pegasus 410 drivers/input/tablet/pegasus_notetaker.c cancel_work_sync(&pegasus->init); pegasus 411 drivers/input/tablet/pegasus_notetaker.c mutex_unlock(&pegasus->pm_mutex); pegasus 418 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = usb_get_intfdata(intf); pegasus 421 drivers/input/tablet/pegasus_notetaker.c mutex_lock(&pegasus->pm_mutex); pegasus 422 drivers/input/tablet/pegasus_notetaker.c if (pegasus->is_open && usb_submit_urb(pegasus->irq, GFP_NOIO) < 0) pegasus 424 drivers/input/tablet/pegasus_notetaker.c mutex_unlock(&pegasus->pm_mutex); pegasus 431 drivers/input/tablet/pegasus_notetaker.c struct pegasus *pegasus = usb_get_intfdata(intf); pegasus 434 drivers/input/tablet/pegasus_notetaker.c mutex_lock(&pegasus->pm_mutex); pegasus 435 drivers/input/tablet/pegasus_notetaker.c if (pegasus->is_open) { pegasus 436 drivers/input/tablet/pegasus_notetaker.c retval = pegasus_set_mode(pegasus, PEN_MODE_XY, pegasus 438 drivers/input/tablet/pegasus_notetaker.c if (!retval && usb_submit_urb(pegasus->irq, GFP_NOIO) < 0) pegasus 441 drivers/input/tablet/pegasus_notetaker.c mutex_unlock(&pegasus->pm_mutex); pegasus 124 drivers/net/usb/pegasus.c static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data) pegasus 133 drivers/net/usb/pegasus.c ret = usb_control_msg(pegasus->usb, usb_rcvctrlpipe(pegasus->usb, 0), pegasus 137 drivers/net/usb/pegasus.c netif_dbg(pegasus, drv, pegasus->net, pegasus 145 drivers/net/usb/pegasus.c static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, pegasus 155 drivers/net/usb/pegasus.c ret = usb_control_msg(pegasus->usb, usb_sndctrlpipe(pegasus->usb, 0), pegasus 159 drivers/net/usb/pegasus.c netif_dbg(pegasus, drv, pegasus->net, pegasus 165 drivers/net/usb/pegasus.c static int set_register(pegasus_t *pegasus, __u16 indx, __u8 data) pegasus 174 drivers/net/usb/pegasus.c ret = usb_control_msg(pegasus->usb, usb_sndctrlpipe(pegasus->usb, 0), pegasus 178 drivers/net/usb/pegasus.c netif_dbg(pegasus, drv, pegasus->net, pegasus 184 drivers/net/usb/pegasus.c static int update_eth_regs_async(pegasus_t *pegasus) pegasus 205 drivers/net/usb/pegasus.c usb_fill_control_urb(async_urb, pegasus->usb, pegasus 206 drivers/net/usb/pegasus.c usb_sndctrlpipe(pegasus->usb, 0), (void *)req, pegasus 207 drivers/net/usb/pegasus.c pegasus->eth_regs, 3, async_ctrl_callback, req); pegasus 212 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 213 drivers/net/usb/pegasus.c netif_err(pegasus, drv, pegasus->net, pegasus 254 drivers/net/usb/pegasus.c static int read_mii_word(pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd) pegasus 256 drivers/net/usb/pegasus.c return __mii_op(pegasus, phy, indx, regd, PHY_READ); pegasus 260 drivers/net/usb/pegasus.c static int write_mii_word(pegasus_t *pegasus, __u8 phy, __u8 indx, __u16 *regd) pegasus 262 drivers/net/usb/pegasus.c return __mii_op(pegasus, phy, indx, regd, PHY_WRITE); pegasus 267 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 270 drivers/net/usb/pegasus.c read_mii_word(pegasus, phy_id, loc, &res); pegasus 276 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 279 drivers/net/usb/pegasus.c write_mii_word(pegasus, phy_id, loc, &data); pegasus 282 drivers/net/usb/pegasus.c static int read_eprom_word(pegasus_t *pegasus, __u8 index, __u16 *retdata) pegasus 289 drivers/net/usb/pegasus.c set_register(pegasus, EpromCtrl, 0); pegasus 290 drivers/net/usb/pegasus.c set_register(pegasus, EpromOffset, index); pegasus 291 drivers/net/usb/pegasus.c set_register(pegasus, EpromCtrl, EPROM_READ); pegasus 294 drivers/net/usb/pegasus.c ret = get_registers(pegasus, EpromCtrl, 1, &tmp); pegasus 303 drivers/net/usb/pegasus.c ret = get_registers(pegasus, EpromData, 2, &retdatai); pegasus 308 drivers/net/usb/pegasus.c netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); pegasus 313 drivers/net/usb/pegasus.c static inline void enable_eprom_write(pegasus_t *pegasus) pegasus 317 drivers/net/usb/pegasus.c get_registers(pegasus, EthCtrl2, 1, &tmp); pegasus 318 drivers/net/usb/pegasus.c set_register(pegasus, EthCtrl2, tmp | EPROM_WR_ENABLE); pegasus 321 drivers/net/usb/pegasus.c static inline void disable_eprom_write(pegasus_t *pegasus) pegasus 325 drivers/net/usb/pegasus.c get_registers(pegasus, EthCtrl2, 1, &tmp); pegasus 326 drivers/net/usb/pegasus.c set_register(pegasus, EpromCtrl, 0); pegasus 327 drivers/net/usb/pegasus.c set_register(pegasus, EthCtrl2, tmp & ~EPROM_WR_ENABLE); pegasus 330 drivers/net/usb/pegasus.c static int write_eprom_word(pegasus_t *pegasus, __u8 index, __u16 data) pegasus 337 drivers/net/usb/pegasus.c set_registers(pegasus, EpromOffset, 4, d); pegasus 338 drivers/net/usb/pegasus.c enable_eprom_write(pegasus); pegasus 339 drivers/net/usb/pegasus.c set_register(pegasus, EpromOffset, index); pegasus 340 drivers/net/usb/pegasus.c set_registers(pegasus, EpromData, 2, &le_data); pegasus 341 drivers/net/usb/pegasus.c set_register(pegasus, EpromCtrl, EPROM_WRITE); pegasus 344 drivers/net/usb/pegasus.c ret = get_registers(pegasus, EpromCtrl, 1, &tmp); pegasus 350 drivers/net/usb/pegasus.c disable_eprom_write(pegasus); pegasus 357 drivers/net/usb/pegasus.c netif_warn(pegasus, drv, pegasus->net, "%s failed\n", __func__); pegasus 362 drivers/net/usb/pegasus.c static inline void get_node_id(pegasus_t *pegasus, __u8 *id) pegasus 368 drivers/net/usb/pegasus.c read_eprom_word(pegasus, i, &w16); pegasus 373 drivers/net/usb/pegasus.c static void set_ethernet_addr(pegasus_t *pegasus) pegasus 377 drivers/net/usb/pegasus.c if (pegasus->features & PEGASUS_II) { pegasus 378 drivers/net/usb/pegasus.c get_registers(pegasus, 0x10, sizeof(node_id), node_id); pegasus 380 drivers/net/usb/pegasus.c get_node_id(pegasus, node_id); pegasus 381 drivers/net/usb/pegasus.c set_registers(pegasus, EthID, sizeof(node_id), node_id); pegasus 383 drivers/net/usb/pegasus.c memcpy(pegasus->net->dev_addr, node_id, sizeof(node_id)); pegasus 386 drivers/net/usb/pegasus.c static inline int reset_mac(pegasus_t *pegasus) pegasus 391 drivers/net/usb/pegasus.c set_register(pegasus, EthCtrl1, data); pegasus 393 drivers/net/usb/pegasus.c get_registers(pegasus, EthCtrl1, 1, &data); pegasus 397 drivers/net/usb/pegasus.c if (mii_mode && (pegasus->features & HAS_HOME_PNA)) pegasus 398 drivers/net/usb/pegasus.c set_register(pegasus, Gpio1, 0x34); pegasus 400 drivers/net/usb/pegasus.c set_register(pegasus, Gpio1, 0x26); pegasus 401 drivers/net/usb/pegasus.c set_register(pegasus, Gpio0, pegasus->features); pegasus 402 drivers/net/usb/pegasus.c set_register(pegasus, Gpio0, DEFAULT_GPIO_SET); pegasus 409 drivers/net/usb/pegasus.c if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS || pegasus 410 drivers/net/usb/pegasus.c usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) { pegasus 411 drivers/net/usb/pegasus.c set_register(pegasus, Gpio0, 0x24); pegasus 412 drivers/net/usb/pegasus.c set_register(pegasus, Gpio0, 0x26); pegasus 414 drivers/net/usb/pegasus.c if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_ELCON) { pegasus 416 drivers/net/usb/pegasus.c read_mii_word(pegasus, 3, 0x1b, &auxmode); pegasus 418 drivers/net/usb/pegasus.c write_mii_word(pegasus, 3, 0x1b, &auxmode); pegasus 428 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 431 drivers/net/usb/pegasus.c read_mii_word(pegasus, pegasus->phy, MII_LPA, &linkpart); pegasus 442 drivers/net/usb/pegasus.c memcpy(pegasus->eth_regs, data, sizeof(data)); pegasus 443 drivers/net/usb/pegasus.c ret = set_registers(pegasus, EthCtrl0, 3, data); pegasus 445 drivers/net/usb/pegasus.c if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS || pegasus 446 drivers/net/usb/pegasus.c usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS2 || pegasus 447 drivers/net/usb/pegasus.c usb_dev_id[pegasus->dev_index].vendor == VENDOR_DLINK) { pegasus 449 drivers/net/usb/pegasus.c read_mii_word(pegasus, 0, 0x1b, &auxmode); pegasus 451 drivers/net/usb/pegasus.c write_mii_word(pegasus, 0, 0x1b, &auxmode); pegasus 459 drivers/net/usb/pegasus.c pegasus_t *pegasus = urb->context; pegasus 466 drivers/net/usb/pegasus.c if (!pegasus) pegasus 469 drivers/net/usb/pegasus.c net = pegasus->net; pegasus 477 drivers/net/usb/pegasus.c netif_dbg(pegasus, rx_err, net, "reset MAC\n"); pegasus 478 drivers/net/usb/pegasus.c pegasus->flags &= ~PEGASUS_RX_BUSY; pegasus 482 drivers/net/usb/pegasus.c netif_warn(pegasus, rx_err, net, "no rx stall recovery\n"); pegasus 487 drivers/net/usb/pegasus.c netif_dbg(pegasus, ifdown, net, "rx unlink, %d\n", status); pegasus 490 drivers/net/usb/pegasus.c netif_dbg(pegasus, rx_err, net, "RX status %d\n", status); pegasus 499 drivers/net/usb/pegasus.c netif_dbg(pegasus, rx_err, net, pegasus 510 drivers/net/usb/pegasus.c if (pegasus->chip == 0x8513) { pegasus 513 drivers/net/usb/pegasus.c pegasus->rx_skb->data += 2; pegasus 532 drivers/net/usb/pegasus.c skb_put(pegasus->rx_skb, pkt_len); pegasus 533 drivers/net/usb/pegasus.c pegasus->rx_skb->protocol = eth_type_trans(pegasus->rx_skb, net); pegasus 534 drivers/net/usb/pegasus.c netif_rx(pegasus->rx_skb); pegasus 538 drivers/net/usb/pegasus.c if (pegasus->flags & PEGASUS_UNPLUG) pegasus 541 drivers/net/usb/pegasus.c pegasus->rx_skb = __netdev_alloc_skb_ip_align(pegasus->net, PEGASUS_MTU, pegasus 544 drivers/net/usb/pegasus.c if (pegasus->rx_skb == NULL) pegasus 547 drivers/net/usb/pegasus.c usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb, pegasus 548 drivers/net/usb/pegasus.c usb_rcvbulkpipe(pegasus->usb, 1), pegasus 549 drivers/net/usb/pegasus.c pegasus->rx_skb->data, PEGASUS_MTU, pegasus 550 drivers/net/usb/pegasus.c read_bulk_callback, pegasus); pegasus 551 drivers/net/usb/pegasus.c rx_status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC); pegasus 553 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 555 drivers/net/usb/pegasus.c pegasus->flags |= PEGASUS_RX_URB_FAIL; pegasus 558 drivers/net/usb/pegasus.c pegasus->flags &= ~PEGASUS_RX_URB_FAIL; pegasus 564 drivers/net/usb/pegasus.c tasklet_schedule(&pegasus->rx_tl); pegasus 569 drivers/net/usb/pegasus.c pegasus_t *pegasus; pegasus 572 drivers/net/usb/pegasus.c pegasus = (pegasus_t *) data; pegasus 573 drivers/net/usb/pegasus.c if (pegasus->flags & PEGASUS_UNPLUG) pegasus 576 drivers/net/usb/pegasus.c if (pegasus->flags & PEGASUS_RX_URB_FAIL) pegasus 577 drivers/net/usb/pegasus.c if (pegasus->rx_skb) pegasus 579 drivers/net/usb/pegasus.c if (pegasus->rx_skb == NULL) pegasus 580 drivers/net/usb/pegasus.c pegasus->rx_skb = __netdev_alloc_skb_ip_align(pegasus->net, pegasus 583 drivers/net/usb/pegasus.c if (pegasus->rx_skb == NULL) { pegasus 584 drivers/net/usb/pegasus.c netif_warn(pegasus, rx_err, pegasus->net, "low on memory\n"); pegasus 585 drivers/net/usb/pegasus.c tasklet_schedule(&pegasus->rx_tl); pegasus 588 drivers/net/usb/pegasus.c usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb, pegasus 589 drivers/net/usb/pegasus.c usb_rcvbulkpipe(pegasus->usb, 1), pegasus 590 drivers/net/usb/pegasus.c pegasus->rx_skb->data, PEGASUS_MTU, pegasus 591 drivers/net/usb/pegasus.c read_bulk_callback, pegasus); pegasus 593 drivers/net/usb/pegasus.c status = usb_submit_urb(pegasus->rx_urb, GFP_ATOMIC); pegasus 595 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 597 drivers/net/usb/pegasus.c pegasus->flags |= PEGASUS_RX_URB_FAIL; pegasus 598 drivers/net/usb/pegasus.c tasklet_schedule(&pegasus->rx_tl); pegasus 600 drivers/net/usb/pegasus.c pegasus->flags &= ~PEGASUS_RX_URB_FAIL; pegasus 606 drivers/net/usb/pegasus.c pegasus_t *pegasus = urb->context; pegasus 610 drivers/net/usb/pegasus.c if (!pegasus) pegasus 613 drivers/net/usb/pegasus.c net = pegasus->net; pegasus 622 drivers/net/usb/pegasus.c netif_warn(pegasus, tx_err, net, "no tx stall recovery\n"); pegasus 627 drivers/net/usb/pegasus.c netif_dbg(pegasus, ifdown, net, "tx unlink, %d\n", status); pegasus 630 drivers/net/usb/pegasus.c netif_info(pegasus, tx_err, net, "TX status %d\n", status); pegasus 642 drivers/net/usb/pegasus.c pegasus_t *pegasus = urb->context; pegasus 646 drivers/net/usb/pegasus.c if (!pegasus) pegasus 648 drivers/net/usb/pegasus.c net = pegasus->net; pegasus 661 drivers/net/usb/pegasus.c netif_dbg(pegasus, timer, net, "intr status %d\n", status); pegasus 690 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 692 drivers/net/usb/pegasus.c netif_err(pegasus, timer, net, pegasus 698 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(net); pegasus 699 drivers/net/usb/pegasus.c netif_warn(pegasus, timer, net, "tx timeout\n"); pegasus 700 drivers/net/usb/pegasus.c usb_unlink_urb(pegasus->tx_urb); pegasus 707 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(net); pegasus 714 drivers/net/usb/pegasus.c ((__le16 *) pegasus->tx_buff)[0] = cpu_to_le16(l16); pegasus 715 drivers/net/usb/pegasus.c skb_copy_from_linear_data(skb, pegasus->tx_buff + 2, skb->len); pegasus 716 drivers/net/usb/pegasus.c usb_fill_bulk_urb(pegasus->tx_urb, pegasus->usb, pegasus 717 drivers/net/usb/pegasus.c usb_sndbulkpipe(pegasus->usb, 2), pegasus 718 drivers/net/usb/pegasus.c pegasus->tx_buff, count, pegasus 719 drivers/net/usb/pegasus.c write_bulk_callback, pegasus); pegasus 720 drivers/net/usb/pegasus.c if ((res = usb_submit_urb(pegasus->tx_urb, GFP_ATOMIC))) { pegasus 721 drivers/net/usb/pegasus.c netif_warn(pegasus, tx_err, net, "fail tx, %d\n", res); pegasus 728 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 743 drivers/net/usb/pegasus.c static inline void disable_net_traffic(pegasus_t *pegasus) pegasus 747 drivers/net/usb/pegasus.c set_registers(pegasus, EthCtrl0, sizeof(tmp), &tmp); pegasus 750 drivers/net/usb/pegasus.c static inline void get_interrupt_interval(pegasus_t *pegasus) pegasus 755 drivers/net/usb/pegasus.c read_eprom_word(pegasus, 4, &data); pegasus 757 drivers/net/usb/pegasus.c if (pegasus->usb->speed != USB_SPEED_HIGH) { pegasus 759 drivers/net/usb/pegasus.c netif_info(pegasus, timer, pegasus->net, pegasus 765 drivers/net/usb/pegasus.c write_eprom_word(pegasus, 4, data); pegasus 769 drivers/net/usb/pegasus.c pegasus->intr_interval = interval; pegasus 774 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(net); pegasus 777 drivers/net/usb/pegasus.c if (read_mii_word(pegasus, pegasus->phy, MII_BMSR, &tmp)) pegasus 786 drivers/net/usb/pegasus.c static void free_all_urbs(pegasus_t *pegasus) pegasus 788 drivers/net/usb/pegasus.c usb_free_urb(pegasus->intr_urb); pegasus 789 drivers/net/usb/pegasus.c usb_free_urb(pegasus->tx_urb); pegasus 790 drivers/net/usb/pegasus.c usb_free_urb(pegasus->rx_urb); pegasus 793 drivers/net/usb/pegasus.c static void unlink_all_urbs(pegasus_t *pegasus) pegasus 795 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->intr_urb); pegasus 796 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->tx_urb); pegasus 797 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->rx_urb); pegasus 800 drivers/net/usb/pegasus.c static int alloc_urbs(pegasus_t *pegasus) pegasus 804 drivers/net/usb/pegasus.c pegasus->rx_urb = usb_alloc_urb(0, GFP_KERNEL); pegasus 805 drivers/net/usb/pegasus.c if (!pegasus->rx_urb) { pegasus 808 drivers/net/usb/pegasus.c pegasus->tx_urb = usb_alloc_urb(0, GFP_KERNEL); pegasus 809 drivers/net/usb/pegasus.c if (!pegasus->tx_urb) { pegasus 810 drivers/net/usb/pegasus.c usb_free_urb(pegasus->rx_urb); pegasus 813 drivers/net/usb/pegasus.c pegasus->intr_urb = usb_alloc_urb(0, GFP_KERNEL); pegasus 814 drivers/net/usb/pegasus.c if (!pegasus->intr_urb) { pegasus 815 drivers/net/usb/pegasus.c usb_free_urb(pegasus->tx_urb); pegasus 816 drivers/net/usb/pegasus.c usb_free_urb(pegasus->rx_urb); pegasus 825 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(net); pegasus 828 drivers/net/usb/pegasus.c if (pegasus->rx_skb == NULL) pegasus 829 drivers/net/usb/pegasus.c pegasus->rx_skb = __netdev_alloc_skb_ip_align(pegasus->net, pegasus 832 drivers/net/usb/pegasus.c if (!pegasus->rx_skb) pegasus 835 drivers/net/usb/pegasus.c res = set_registers(pegasus, EthID, 6, net->dev_addr); pegasus 837 drivers/net/usb/pegasus.c usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb, pegasus 838 drivers/net/usb/pegasus.c usb_rcvbulkpipe(pegasus->usb, 1), pegasus 839 drivers/net/usb/pegasus.c pegasus->rx_skb->data, PEGASUS_MTU, pegasus 840 drivers/net/usb/pegasus.c read_bulk_callback, pegasus); pegasus 841 drivers/net/usb/pegasus.c if ((res = usb_submit_urb(pegasus->rx_urb, GFP_KERNEL))) { pegasus 843 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 844 drivers/net/usb/pegasus.c netif_dbg(pegasus, ifup, net, "failed rx_urb, %d\n", res); pegasus 848 drivers/net/usb/pegasus.c usb_fill_int_urb(pegasus->intr_urb, pegasus->usb, pegasus 849 drivers/net/usb/pegasus.c usb_rcvintpipe(pegasus->usb, 3), pegasus 850 drivers/net/usb/pegasus.c pegasus->intr_buff, sizeof(pegasus->intr_buff), pegasus 851 drivers/net/usb/pegasus.c intr_callback, pegasus, pegasus->intr_interval); pegasus 852 drivers/net/usb/pegasus.c if ((res = usb_submit_urb(pegasus->intr_urb, GFP_KERNEL))) { pegasus 854 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 855 drivers/net/usb/pegasus.c netif_dbg(pegasus, ifup, net, "failed intr_urb, %d\n", res); pegasus 856 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->rx_urb); pegasus 859 drivers/net/usb/pegasus.c res = enable_net_traffic(net, pegasus->usb); pegasus 861 drivers/net/usb/pegasus.c netif_dbg(pegasus, ifup, net, pegasus 864 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->rx_urb); pegasus 865 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->intr_urb); pegasus 870 drivers/net/usb/pegasus.c netif_dbg(pegasus, ifup, net, "open\n"); pegasus 878 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(net); pegasus 881 drivers/net/usb/pegasus.c if (!(pegasus->flags & PEGASUS_UNPLUG)) pegasus 882 drivers/net/usb/pegasus.c disable_net_traffic(pegasus); pegasus 883 drivers/net/usb/pegasus.c tasklet_kill(&pegasus->rx_tl); pegasus 884 drivers/net/usb/pegasus.c unlink_all_urbs(pegasus); pegasus 892 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 896 drivers/net/usb/pegasus.c usb_make_path(pegasus->usb, info->bus_info, sizeof(info->bus_info)); pegasus 905 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 908 drivers/net/usb/pegasus.c wol->wolopts = pegasus->wolopts; pegasus 914 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 927 drivers/net/usb/pegasus.c pegasus->eth_regs[0] |= 0x10; pegasus 929 drivers/net/usb/pegasus.c pegasus->eth_regs[0] &= ~0x10; pegasus 930 drivers/net/usb/pegasus.c pegasus->wolopts = wol->wolopts; pegasus 932 drivers/net/usb/pegasus.c ret = set_register(pegasus, WakeupControl, reg78); pegasus 934 drivers/net/usb/pegasus.c ret = device_set_wakeup_enable(&pegasus->usb->dev, pegasus 951 drivers/net/usb/pegasus.c pegasus_t *pegasus; pegasus 953 drivers/net/usb/pegasus.c pegasus = netdev_priv(dev); pegasus 954 drivers/net/usb/pegasus.c mii_ethtool_get_link_ksettings(&pegasus->mii, ecmd); pegasus 962 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 963 drivers/net/usb/pegasus.c return mii_ethtool_set_link_ksettings(&pegasus->mii, ecmd); pegasus 968 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 969 drivers/net/usb/pegasus.c return mii_nway_restart(&pegasus->mii); pegasus 974 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 975 drivers/net/usb/pegasus.c return mii_link_ok(&pegasus->mii); pegasus 980 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 981 drivers/net/usb/pegasus.c return pegasus->msg_enable; pegasus 986 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(dev); pegasus 987 drivers/net/usb/pegasus.c pegasus->msg_enable = v; pegasus 1005 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(net); pegasus 1010 drivers/net/usb/pegasus.c data[0] = pegasus->phy; pegasus 1013 drivers/net/usb/pegasus.c read_mii_word(pegasus, data[0], data[1] & 0x1f, &data[3]); pegasus 1019 drivers/net/usb/pegasus.c write_mii_word(pegasus, pegasus->phy, data[1] & 0x1f, &data[2]); pegasus 1030 drivers/net/usb/pegasus.c pegasus_t *pegasus = netdev_priv(net); pegasus 1033 drivers/net/usb/pegasus.c pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; pegasus 1034 drivers/net/usb/pegasus.c netif_info(pegasus, link, net, "Promiscuous mode enabled\n"); pegasus 1036 drivers/net/usb/pegasus.c pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; pegasus 1037 drivers/net/usb/pegasus.c pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; pegasus 1038 drivers/net/usb/pegasus.c netif_dbg(pegasus, link, net, "set allmulti\n"); pegasus 1040 drivers/net/usb/pegasus.c pegasus->eth_regs[EthCtrl0] &= ~RX_MULTICAST; pegasus 1041 drivers/net/usb/pegasus.c pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; pegasus 1043 drivers/net/usb/pegasus.c update_eth_regs_async(pegasus); pegasus 1046 drivers/net/usb/pegasus.c static __u8 mii_phy_probe(pegasus_t *pegasus) pegasus 1052 drivers/net/usb/pegasus.c read_mii_word(pegasus, i, MII_BMSR, &tmp); pegasus 1062 drivers/net/usb/pegasus.c static inline void setup_pegasus_II(pegasus_t *pegasus) pegasus 1066 drivers/net/usb/pegasus.c set_register(pegasus, Reg1d, 0); pegasus 1067 drivers/net/usb/pegasus.c set_register(pegasus, Reg7b, 1); pegasus 1069 drivers/net/usb/pegasus.c if ((pegasus->features & HAS_HOME_PNA) && mii_mode) pegasus 1070 drivers/net/usb/pegasus.c set_register(pegasus, Reg7b, 0); pegasus 1072 drivers/net/usb/pegasus.c set_register(pegasus, Reg7b, 2); pegasus 1074 drivers/net/usb/pegasus.c set_register(pegasus, 0x83, data); pegasus 1075 drivers/net/usb/pegasus.c get_registers(pegasus, 0x83, 1, &data); pegasus 1078 drivers/net/usb/pegasus.c pegasus->chip = 0x8513; pegasus 1080 drivers/net/usb/pegasus.c pegasus->chip = 0; pegasus 1082 drivers/net/usb/pegasus.c set_register(pegasus, 0x80, 0xc0); pegasus 1083 drivers/net/usb/pegasus.c set_register(pegasus, 0x83, 0xff); pegasus 1084 drivers/net/usb/pegasus.c set_register(pegasus, 0x84, 0x01); pegasus 1086 drivers/net/usb/pegasus.c if (pegasus->features & HAS_HOME_PNA && mii_mode) pegasus 1087 drivers/net/usb/pegasus.c set_register(pegasus, Reg81, 6); pegasus 1089 drivers/net/usb/pegasus.c set_register(pegasus, Reg81, 2); pegasus 1099 drivers/net/usb/pegasus.c pegasus_t *pegasus = container_of(work, pegasus_t, carrier_check.work); pegasus 1100 drivers/net/usb/pegasus.c set_carrier(pegasus->net); pegasus 1101 drivers/net/usb/pegasus.c if (!(pegasus->flags & PEGASUS_UNPLUG)) { pegasus 1102 drivers/net/usb/pegasus.c queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check, pegasus 1140 drivers/net/usb/pegasus.c pegasus_t *pegasus; pegasus 1155 drivers/net/usb/pegasus.c net = alloc_etherdev(sizeof(struct pegasus)); pegasus 1159 drivers/net/usb/pegasus.c pegasus = netdev_priv(net); pegasus 1160 drivers/net/usb/pegasus.c pegasus->dev_index = dev_index; pegasus 1162 drivers/net/usb/pegasus.c res = alloc_urbs(pegasus); pegasus 1168 drivers/net/usb/pegasus.c tasklet_init(&pegasus->rx_tl, rx_fixup, (unsigned long) pegasus); pegasus 1170 drivers/net/usb/pegasus.c INIT_DELAYED_WORK(&pegasus->carrier_check, check_carrier); pegasus 1172 drivers/net/usb/pegasus.c pegasus->intf = intf; pegasus 1173 drivers/net/usb/pegasus.c pegasus->usb = dev; pegasus 1174 drivers/net/usb/pegasus.c pegasus->net = net; pegasus 1180 drivers/net/usb/pegasus.c pegasus->mii.dev = net; pegasus 1181 drivers/net/usb/pegasus.c pegasus->mii.mdio_read = mdio_read; pegasus 1182 drivers/net/usb/pegasus.c pegasus->mii.mdio_write = mdio_write; pegasus 1183 drivers/net/usb/pegasus.c pegasus->mii.phy_id_mask = 0x1f; pegasus 1184 drivers/net/usb/pegasus.c pegasus->mii.reg_num_mask = 0x1f; pegasus 1185 drivers/net/usb/pegasus.c pegasus->msg_enable = netif_msg_init(msg_level, NETIF_MSG_DRV pegasus 1188 drivers/net/usb/pegasus.c pegasus->features = usb_dev_id[dev_index].private; pegasus 1189 drivers/net/usb/pegasus.c get_interrupt_interval(pegasus); pegasus 1190 drivers/net/usb/pegasus.c if (reset_mac(pegasus)) { pegasus 1195 drivers/net/usb/pegasus.c set_ethernet_addr(pegasus); pegasus 1196 drivers/net/usb/pegasus.c if (pegasus->features & PEGASUS_II) { pegasus 1198 drivers/net/usb/pegasus.c setup_pegasus_II(pegasus); pegasus 1200 drivers/net/usb/pegasus.c pegasus->phy = mii_phy_probe(pegasus); pegasus 1201 drivers/net/usb/pegasus.c if (pegasus->phy == 0xff) { pegasus 1203 drivers/net/usb/pegasus.c pegasus->phy = 1; pegasus 1205 drivers/net/usb/pegasus.c pegasus->mii.phy_id = pegasus->phy; pegasus 1206 drivers/net/usb/pegasus.c usb_set_intfdata(intf, pegasus); pegasus 1212 drivers/net/usb/pegasus.c queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check, pegasus 1221 drivers/net/usb/pegasus.c free_all_urbs(pegasus); pegasus 1231 drivers/net/usb/pegasus.c struct pegasus *pegasus = usb_get_intfdata(intf); pegasus 1234 drivers/net/usb/pegasus.c if (!pegasus) { pegasus 1239 drivers/net/usb/pegasus.c pegasus->flags |= PEGASUS_UNPLUG; pegasus 1240 drivers/net/usb/pegasus.c cancel_delayed_work(&pegasus->carrier_check); pegasus 1241 drivers/net/usb/pegasus.c unregister_netdev(pegasus->net); pegasus 1242 drivers/net/usb/pegasus.c unlink_all_urbs(pegasus); pegasus 1243 drivers/net/usb/pegasus.c free_all_urbs(pegasus); pegasus 1244 drivers/net/usb/pegasus.c if (pegasus->rx_skb != NULL) { pegasus 1245 drivers/net/usb/pegasus.c dev_kfree_skb(pegasus->rx_skb); pegasus 1246 drivers/net/usb/pegasus.c pegasus->rx_skb = NULL; pegasus 1248 drivers/net/usb/pegasus.c free_netdev(pegasus->net); pegasus 1254 drivers/net/usb/pegasus.c struct pegasus *pegasus = usb_get_intfdata(intf); pegasus 1256 drivers/net/usb/pegasus.c netif_device_detach(pegasus->net); pegasus 1257 drivers/net/usb/pegasus.c cancel_delayed_work(&pegasus->carrier_check); pegasus 1258 drivers/net/usb/pegasus.c if (netif_running(pegasus->net)) { pegasus 1259 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->rx_urb); pegasus 1260 drivers/net/usb/pegasus.c usb_kill_urb(pegasus->intr_urb); pegasus 1267 drivers/net/usb/pegasus.c struct pegasus *pegasus = usb_get_intfdata(intf); pegasus 1269 drivers/net/usb/pegasus.c netif_device_attach(pegasus->net); pegasus 1270 drivers/net/usb/pegasus.c if (netif_running(pegasus->net)) { pegasus 1271 drivers/net/usb/pegasus.c pegasus->rx_urb->status = 0; pegasus 1272 drivers/net/usb/pegasus.c pegasus->rx_urb->actual_length = 0; pegasus 1273 drivers/net/usb/pegasus.c read_bulk_callback(pegasus->rx_urb); pegasus 1275 drivers/net/usb/pegasus.c pegasus->intr_urb->status = 0; pegasus 1276 drivers/net/usb/pegasus.c pegasus->intr_urb->actual_length = 0; pegasus 1277 drivers/net/usb/pegasus.c intr_callback(pegasus->intr_urb); pegasus 1279 drivers/net/usb/pegasus.c queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check,