Commit Graph

138 Commits

Author SHA1 Message Date
kiyohara
95bbad455e Support vendor dependent functions. 2010-10-16 05:29:29 +00:00
kiyohara
fc53f5307a Add timeout for wait.
Not send STOP, if received ACK.
2010-10-10 04:49:48 +00:00
kiyohara
171c49e42c Add more explanation to XXXX. It value from Marvell LSP. 2010-10-08 11:20:22 +00:00
kiyohara
0ad10ce34f Fix ack/no-ack. Last data sends with stop-bit without ack. 2010-10-03 07:14:33 +00:00
kiyohara
f876f061d1 Support Kirkwood's GbE. 2010-10-02 05:57:42 +00:00
kiyohara
d7b57ebb2b Add Marvell EHCI Controller wrapper.
However, because this driver has some problems now, it will not work the
way things are going.
2010-10-02 05:53:37 +00:00
kiyohara
c9cd553838 Add Marvell Secure Digital Input/Output (SDIO) Interface Driver. 2010-09-23 12:36:01 +00:00
kiyohara
e9e049ccf0 Add include opt_com.h. 2010-09-04 05:01:20 +00:00
kiyohara
049fc26168 Cleanup foo_match().
+ Remove check for model.
  + Remove unnecessary null line.
2010-08-01 06:57:06 +00:00
kiyohara
bb67784ce9 Cleanup mvuart_match(). 2010-08-01 06:47:16 +00:00
kiyohara
24eff00c48 Remove some attribute macros. Its specifically for Orion. 2010-07-20 12:01:33 +00:00
kiyohara
88f9b614ac Add macro MARVELL_ORION_1_88F6183.
Add some comments.
  Product ID of Discovery V maybe 0x6450.
  Product ID of Discovery VI maybe 0x6490.
2010-07-20 11:56:47 +00:00
kiyohara
0664db2b43 Add some Kirkwood/Discovery Innovation products. 2010-07-20 11:50:18 +00:00
kiyohara
0326b42837 Fix information on the product with comment-out. This was obtained from
the data sheet of Marvell.
2010-07-20 11:47:59 +00:00
kiyohara
c766e06918 Add notes for remembrance' sake. This is information obtained looking for
www.marvell.com.
2010-07-20 11:42:22 +00:00
kiyohara
f86aa060f7 Add MARVELL_TAG_MAX to enum marvell_tags. 2010-07-20 11:37:39 +00:00
kiyohara
9cccbb6195 Add Kirkwood/Discovery Innovation macros. 2010-07-13 14:00:07 +00:00
kiyohara
8406aeece8 Add SATA for Marvell SC/SoC. 2010-07-13 13:05:05 +00:00
kiyohara
f99b65b3f2 Add UART and PCIe controller for Marvell SoC.
However not define attribute *_mbus in our tree yet.
2010-07-13 11:16:02 +00:00
kiyohara
2c444bf727 Add macro MVA_{UNIT,OFFSET,IRQ}_DEFAULT. 2010-07-11 08:43:36 +00:00
kiyohara
c1903f8449 Remove unnecessary define.
Reorder.
Add necessary attributes.
2010-07-11 08:34:57 +00:00
kiyohara
8a73a79a6f Fix debug messages.
- s/DEBUG/GT_DEBUG/.
  - Indent.
  - The old one is 20 bits in the mask of the address register, and the
    new one is 16 bits.
2010-06-09 02:19:51 +00:00
kiyohara
14a717de1d Support big endian machines. 2010-06-08 05:15:52 +00:00
kiyohara
a0143cae24 Fix sume bugs.
- Why +1 ?
  - mvidmac_dump_xoredesc() -> gtidmac_dump_xoredesc().
  - bitmask_snprintf() -> snprintb().
Support big endian machines with GTIDMAC_CCHR_ENDIAN_BE.
2010-06-04 06:31:50 +00:00
kiyohara
742d392da8 Move memory protection parameters to MI part.
Gtpci believes the initialization of the firmware(boot-loader) if protection
information is not obtained.
2010-06-02 06:44:32 +00:00
kiyohara
17a4632c34 Set NULL to tag when the property doesn't get it. 2010-06-02 06:33:40 +00:00
kiyohara
a52a1474bf Remove unused gpio.h. 2010-06-02 06:24:59 +00:00
kiyohara
3224e25a97 Add Marvell Gigabit Ethernet Controller on SC/SoC.
Will support on ofppc soon.
  Tested on G4+PegasosII (kiyohara@)
	    G3+PegasosII (phx@)
2010-06-02 06:18:11 +00:00
kiyohara
e9d9dba532 Use kmem(9) instead of malloc(9) in gtidmac_attach(). 2010-06-02 06:05:32 +00:00
kiyohara
dedb67d0a4 Erase the old definition macro that forgot to be erased. 2010-06-02 06:02:20 +00:00
kiyohara
d2e6cc1913 Remove unused header-file. 2010-06-02 05:59:36 +00:00
kiyohara
a5e8bd5f06 Enable gtidmac. 2010-05-07 17:06:32 +00:00
kiyohara
fca22c5f5d Use macro PCI_PRODUCT_MARVELL_MV64[34]60. 2010-05-07 14:25:07 +00:00
kiyohara
a748aedcb5 Clean up gt and peripherals.
This change tested compile only.
2010-04-28 13:51:55 +00:00
joerg
58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
matt
7b012669b8 Adapt to <powerpc/spr.h> breakup. 2010-02-25 23:34:54 +00:00
pooka
10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
cegger
99747a8099 struct device * -> device_t, no functional changes intended. 2009-05-12 14:28:22 +00:00
cegger
32c4940900 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 12:10:29 +00:00
tsutsui
d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
cegger
e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
yamt
b1fea83762 remove extra semicolons. 2009-01-03 03:43:21 +00:00
dyoung
de87fe677d *** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link
02🇩🇪ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.
2008-11-07 00:20:01 +00:00
gmcgarry
0de5da9678 Replace most gcc-specific __attribute__ uses with BSD-style sys/cdef.h
preprocessor macros.
2008-09-08 23:36:53 +00:00
he
bd8aa5583f Use a local temporary struct gt_softc* so we don't try to
de-reference void*.  Restores buildability of this file.
2008-06-17 22:41:30 +00:00
cegger
4795ee76a4 use device_lookup_private to get softc 2008-06-12 22:28:26 +00:00
cegger
5819fc04b4 use device_lookup_private to get softc 2008-06-11 20:52:14 +00:00