summaryrefslogtreecommitdiffstats
path: root/.mailmap
AgeCommit message (Expand)Author
2017-05-12Merge tag 'for-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/...Linus Torvalds
2017-05-05Merge tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...Linus Torvalds
2017-05-01mailmap: add Sebastian ReichelSebastian Reichel
2017-04-13mailmap: add Martin Kepplinger's emailMartin Kepplinger
2017-04-10Merge 4.11-rc6 into staging-nextGreg Kroah-Hartman
2017-04-08mailmap: update Yakir Yang email addressJeffy Chen
2017-03-06Merge tag 'iio-for-4.12a' of git://git.kernel.org/pub/scm/linux/kernel/git/ji...Greg Kroah-Hartman
2017-02-04mailmap: Change email to new Konsulko emailMatt Ranostay
2017-01-10mailmap: add codeaurora.org names for nameless email commitsStephen Boyd
2016-10-15Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds
2016-10-07mailmap: add Johan HovoldJohan Hovold
2016-10-05Merge tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/...Linus Torvalds
2016-10-05mailmap: Canonicalize to Qais' current email address.Ralf Baechle
2016-09-30MAINTAINERS: Switch to kernel.org email address for Javi MerinoJavi Merino
2016-09-14Merge tag 'iio-for-4.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic...Greg Kroah-Hartman
2016-09-08Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...Linus Torvalds
2016-09-01MAINTAINERS: Vladimir has movedVladimir Davydov
2016-08-29mailmap: update Vlad Dogaru email addressVlad Dogaru
2016-08-17MAINTAINERS: Switch to kernel.org account for Krzysztof KozlowskiKrzysztof Kozlowski
2016-08-06Merge tag 'media/v4.8-6' of git://git.kernel.org/pub/scm/linux/kernel/git/mch...Linus Torvalds
2016-08-04.mailmap: Correct entries for Mauro Carvalho Chehab and Shuah KhanJoe Perches
2016-08-02mailmap: add Linus LüssingLinus Lüssing
2016-07-04Merge 4.7-rc6 into staging-nextGreg Kroah-Hartman
2016-06-29Merge tag 'iio-for-4.8b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic...Greg Kroah-Hartman
2016-06-24mailmap: add Boris Brezillon's emailAntoine Tenart
2016-06-24mailmap: add Antoine Tenart's emailAntoine Tenart
2016-06-15Update email addresses in MAINTAINERS and .mailmapShuah Khan
2016-06-15Update my main e-mails at the Kernel treeMauro Carvalho Chehab
2016-06-11mailmap: update Matt Ranostay email addressMatt Ranostay
2016-06-11mailmap: update Adriana Reus email addressAdriana Reus
2016-05-05mailmap: add John Paul Adrian GlaubitzLinus Torvalds
2016-04-28.mailmap: add Frank RowandFrank Rowand
2016-04-28mailmap: fix Krzysztof Kozlowski's misspelled nameKrzysztof Kozlowski
2016-04-01.mailmap: add Christophe RicardChristophe Ricard
2016-01-27mailmap: redirect inactive address <ao2@amarulasolutions.com>Antonio Ospite
2015-10-23mailmap: update Javier Martinez Canillas' emailJavier Martinez Canillas
2015-08-14.mailmap: Andrey Ryabinin has movedAndrey Ryabinin
2015-07-17mailmap: update Sudeep Holla's email idSudeep Holla
2015-07-17Update Viresh Kumar's email addressViresh Kumar
2015-06-25mailmap: add rdunlap email auto-correctionKees Cook
2015-06-25Mohit Kumar has movedPratyush Anand
2015-06-25Pratyush Anand has movedPratyush Anand
2015-04-15.mailmap: add Ricardo RibaldaRicardo Ribalda Delgado
2015-02-05.mailmap: update Konstantin Khlebnikov's email addressKim Phillips
2015-01-08MAINTAINERS: update rydberg's addressesHenrik Rydberg
2014-12-18.mailmap: Santosh Shilimkar has movedSantosh Shilimkar
2014-12-18.mailmap: update akpm@osdl.orgAndrew Morton
2014-07-30Josh has movedJosh Triplett
2014-04-18Shiraz has movedViresh Kumar
2012-06-20Viresh has movedViresh Kumar
d='n359' href='#n359'>359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858
/*
 *  Amiga Linux/m68k Ariadne Ethernet Driver
 *
 *  © Copyright 1995-2003 by Geert Uytterhoeven (geert@linux-m68k.org)
 *			     Peter De Schrijver (p2@mind.be)
 *
 *  ---------------------------------------------------------------------------
 *
 *  This program is based on
 *
 *	lance.c:	An AMD LANCE ethernet driver for linux.
 *			Written 1993-94 by Donald Becker.
 *
 *	Am79C960:	PCnet(tm)-ISA Single-Chip Ethernet Controller
 *			Advanced Micro Devices
 *			Publication #16907, Rev. B, Amendment/0, May 1994
 *
 *	MC68230:	Parallel Interface/Timer (PI/T)
 *			Motorola Semiconductors, December, 1983
 *
 *  ---------------------------------------------------------------------------
 *
 *  This file is subject to the terms and conditions of the GNU General Public
 *  License.  See the file COPYING in the main directory of the Linux
 *  distribution for more details.
 *
 *  ---------------------------------------------------------------------------
 *
 *  The Ariadne is a Zorro-II board made by Village Tronic. It contains:
 *
 *	- an Am79C960 PCnet-ISA Single-Chip Ethernet Controller with both
 *	  10BASE-2 (thin coax) and 10BASE-T (UTP) connectors
 *
 *	- an MC68230 Parallel Interface/Timer configured as 2 parallel ports
 */

#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/interrupt.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/zorro.h>
#include <linux/bitops.h>

#include <asm/amigaints.h>
#include <asm/amigahw.h>
#include <asm/irq.h>

#include "ariadne.h"


#ifdef ARIADNE_DEBUG
int ariadne_debug = ARIADNE_DEBUG;
#else
int ariadne_debug = 1;
#endif


    /*
     *	Macros to Fix Endianness problems
     */

				/* Swap the Bytes in a WORD */
#define swapw(x)	(((x>>8)&0x00ff)|((x<<8)&0xff00))
				/* Get the Low BYTE in a WORD */
#define lowb(x)		(x&0xff)
				/* Get the Swapped High WORD in a LONG */
#define swhighw(x)	((((x)>>8)&0xff00)|(((x)>>24)&0x00ff))
				/* Get the Swapped Low WORD in a LONG */
#define swloww(x)	((((x)<<8)&0xff00)|(((x)>>8)&0x00ff))


    /*
     *	Transmit/Receive Ring Definitions
     */

#define TX_RING_SIZE	5
#define RX_RING_SIZE	16

#define PKT_BUF_SIZE	1520


    /*
     *	Private Device Data
     */

struct ariadne_private {
    volatile struct TDRE *tx_ring[TX_RING_SIZE];
    volatile struct RDRE *rx_ring[RX_RING_SIZE];
    volatile u_short *tx_buff[TX_RING_SIZE];
    volatile u_short *rx_buff[RX_RING_SIZE];
    int cur_tx, cur_rx;			/* The next free ring entry */
    int dirty_tx;			/* The ring entries to be free()ed. */
    char tx_full;
};


    /*
     *	Structure Created in the Ariadne's RAM Buffer
     */

struct lancedata {
    struct TDRE tx_ring[TX_RING_SIZE];
    struct RDRE rx_ring[RX_RING_SIZE];
    u_short tx_buff[TX_RING_SIZE][PKT_BUF_SIZE/sizeof(u_short)];
    u_short rx_buff[RX_RING_SIZE][PKT_BUF_SIZE/sizeof(u_short)];
};

static int ariadne_open(struct net_device *dev);
static void ariadne_init_ring(struct net_device *dev);
static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev);
static void ariadne_tx_timeout(struct net_device *dev);
static int ariadne_rx(struct net_device *dev);
static void ariadne_reset(struct net_device *dev);
static irqreturn_t ariadne_interrupt(int irq, void *data);
static int ariadne_close(struct net_device *dev);
static struct net_device_stats *ariadne_get_stats(struct net_device *dev);
#ifdef HAVE_MULTICAST
static void set_multicast_list(struct net_device *dev);
#endif


static void memcpyw(volatile u_short *dest, u_short *src, int len)
{
    while (len >= 2) {
	*(dest++) = *(src++);
	len -= 2;
    }
    if (len == 1)
	*dest = (*(u_char *)src)<<8;
}


static int __devinit ariadne_init_one(struct zorro_dev *z,
				      const struct zorro_device_id *ent);
static void __devexit ariadne_remove_one(struct zorro_dev *z);


static struct zorro_device_id ariadne_zorro_tbl[] __devinitdata = {
    { ZORRO_PROD_VILLAGE_TRONIC_ARIADNE },
    { 0 }
};

static struct zorro_driver ariadne_driver = {
    .name	= "ariadne",
    .id_table	= ariadne_zorro_tbl,
    .probe	= ariadne_init_one,
    .remove	= __devexit_p(ariadne_remove_one),
};

static int __devinit ariadne_init_one(struct zorro_dev *z,
				      const struct zorro_device_id *ent)
{
    unsigned long board = z->resource.start;
    unsigned long base_addr = board+ARIADNE_LANCE;
    unsigned long mem_start = board+ARIADNE_RAM;
    struct resource *r1, *r2;
    struct net_device *dev;
    struct ariadne_private *priv;
    int err;

    r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960");
    if (!r1)
	return -EBUSY;
    r2 = request_mem_region(mem_start, ARIADNE_RAM_SIZE, "RAM");
    if (!r2) {
	release_resource(r1);
	return -EBUSY;
    }

    dev = alloc_etherdev(sizeof(struct ariadne_private));
    if (dev == NULL) {
	release_resource(r1);
	release_resource(r2);
	return -ENOMEM;
    }

    priv = netdev_priv(dev);

    r1->name = dev->name;
    r2->name = dev->name;

    dev->dev_addr[0] = 0x00;
    dev->dev_addr[1] = 0x60;
    dev->dev_addr[2] = 0x30;
    dev->dev_addr[3] = (z->rom.er_SerialNumber>>16) & 0xff;
    dev->dev_addr[4] = (z->rom.er_SerialNumber>>8) & 0xff;
    dev->dev_addr[5] = z->rom.er_SerialNumber & 0xff;