~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to net/dsa/mv88e6xxx.h

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.2.0-26.41
  • Date: 2012-06-18 15:24:05 UTC
  • Revision ID: package-import@ubuntu.com-20120618152405-z7926x1fy2ozd0t8
Tags: 3.2.0-1415.20
* Release Tracking Bug
  - LP: #1013464

[ Paolo Pisati ]

* rebase on 3.2.0-26.41

[ Ubuntu: 3.2.0-26.41 ]

* Release Tracking Bug
  - LP: #1012057
* [Config] fix up postinst to ensure we know which error is which
  - LP: #1002388
* [Config] highbank -- commonise filesystems
  - LP: #1000831, #1010463
* [Config] highbank -- commonise subsystems
  - LP: #1000831, #1010463
* [Config] highbank -- commonise network protocols
  - LP: #1000831, #1010463
* [Config] highbank -- commonise input drivers
  - LP: #1000831, #1010463
* [Config] highbank -- commonise CRYPTO options
  - LP: #1000831, #1010463
* [Config] highbank -- commonise HID options
  - LP: #1000831, #1010463
* [Config] highbank -- commonise sensors options
  - LP: #1000831, #1010463
* [Config] highbank -- commonise EXPORTFS/FHANDLE
  - LP: #1000831, #1010463
* [Config] highbank -- commonise CONFIG_CRYPTO_LZO
  - LP: #1000831, #1010463
* [Config] highbank -- commonise ENCRYPTED_KEYS
  - LP: #1000831, #1010463
* [Config] highbank -- commonise CONFIG_ATALK
  - LP: #1000831, #1010463
* [Config] highbank -- commonise INET/INET6
  - LP: #1000831, #1010463
* [Config] highbank -- commonise NLS
  - LP: #1000831, #1010463
* [Config] highbank -- commonise BLK/CHR
  - LP: #1000831, #1010463
* [Config] highbank -- commonise PHY settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise CRC settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise BINFMT settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise DM settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise RTC_DRV settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise KEYBOARD/MOUSE settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise USB settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise GPIO settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise I2C settings
  - LP: #1000831, #1010463
* [Config] highbank -- commonise numerous subsystem selectors
  - LP: #1000831, #1010463
* [Config] highbank -- commonise A-C modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise D-F modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise G-I modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise J-L modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise M modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise N-P modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise Q-R modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise S modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise T modules missmatches
  - LP: #1000831, #1010463
* [Config] highbank -- commonise U-Z modules missmatches
  - LP: #1000831, #1010463
* SAUCE: fix get_gate_vma call in i386 NX emulation code
  - LP: #1009200
* [Config] add highbank into d-i list
  - LP: #1007459
* SAUCE: dell-laptop: rfkill blacklist Dell XPS 13z, 15
  - LP: #901410
* SAUCE: ext4: fix the free blocks calculation for ext3 file systems w/
  uninit_bg
  - LP: #1010022
* [Config] CONFIG_NET_DSA=m
  - LP: #1004148
* [Config] armhf should not be skipabi or skipmodules
  - LP: #1006913
* [Config] highbank -- highbank.ignore.modules
* dsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions
  - LP: #1004148
* dsa: Export functions from core to modules
  - LP: #1004148
* dsa: Combine core and tagging code
  - LP: #1004148
* mv88e6xxx: Combine mv88e6131 and mv88e612_61_65 drivers
  - LP: #1004148
* dsa: Define module author, description, license and aliases for drivers
  - LP: #1004148
* dsa: Allow core and drivers to be built as modules
  - LP: #1004148
* dsa: Remove unnecessary exports
  - LP: #1004148
* dsa: Move all definitions needed by drivers into <net/dsa.h>
  - LP: #1004148
* dsa: Move switch drivers to new directory drivers/net/dsa
  - LP: #1004148
* dsa: Add reporting of silicon revision for Marvell
  88E6123/88E6161/88E6165 switches.
  - LP: #1004148
* drivers/net: dsa/mv88e6xxx.c files need linux/module.h
  - LP: #1004148
* power_supply: Drop usage of nowarn variant of sysfs_create_link()
  - LP: #1005264
* KVM: mmu_notifier: Flush TLBs before releasing mmu_lock
  - LP: #1008711
* KVM: lock slots_lock around device assignment
  - LP: #1008711
* KVM: nVMX: Fix erroneous exception bitmap check
  - LP: #1008711
* KVM: VMX: vmx_set_cr0 expects kvm->srcu locked
  - LP: #1008711
* KVM: s390: do store status after handling STOP_ON_STOP bit
  - LP: #1008711
* KVM: s390: Sanitize fpc registers for KVM_SET_FPU
  - LP: #1008711
* bio: don't overflow in bio_get_nr_vecs()
  - LP: #1008711
* bio allocation failure due to bio_get_nr_vecs()
  - LP: #1008711
* block: fix buffer overflow when printing partition UUIDs
  - LP: #1008711
* fix PA1.1 oops on boot
  - LP: #1008711
* fix crash in flush_icache_page_asm on PA1.1
  - LP: #1008711
* fix panic on prefetch(NULL) on PA7300LC
  - LP: #1008711
* arch/tile/Kconfig: remove pointless "!M386" test.
  - LP: #1008711
* tilegx: enable SYSCALL_WRAPPERS support
  - LP: #1008711
* mtd: sm_ftl: fix typo in major number.
  - LP: #1008711
* hpsa: Fix problem with MSA2xxx devices
  - LP: #1008711
* SELinux: if sel_make_bools errors don't leave inconsistent state
  - LP: #1008711
* cfg80211: warn if db.txt is empty with CONFIG_CFG80211_INTERNAL_REGDB
  - LP: #1008711
* mpt2sas: Fix for panic happening because of improper memory allocation
  - LP: #1008711
* isdn/gigaset: ratelimit CAPI message dumps
  - LP: #1008711
* isdn/gigaset: fix CAPI disconnect B3 handling
  - LP: #1008711
* isdn/gigaset: improve error handling querying firmware version
  - LP: #1008711
* KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32
  compat
  - LP: #1008711
* IB/core: Fix mismatch between locked and pinned pages
  - LP: #1008711
* regulator: core: Release regulator-regulator supplies on error
  - LP: #1008711
* iommu: Fix off by one in dmar_get_fault_reason()
  - LP: #1008711
* RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr()
  - LP: #1008711
* RDMA/cxgb4: Drop peer_abort when no endpoint found
  - LP: #1008711
* s390/pfault: fix task state race
  - LP: #1008711
* isci: fix oem parameter validation on single controller skus
  - LP: #1008711
* Fix blocking allocations called very early during bootup
  - LP: #1008711
* vfs: make AIO use the proper rw_verify_area() area helpers
  - LP: #1008711
* docs: update HOWTO for 2.6.x -> 3.x versioning
  - LP: #1008711
* drivers/staging/comedi/comedi_fops.c: add missing vfree
  - LP: #1008711
* USB: move usb_translate_errors to linux/usb.h
  - LP: #1008711
* USB: cdc-wdm: sanitize error returns
  - LP: #1008711
* USB: cdc-wdm: fix memory leak
  - LP: #1008711
* 8250_pci: fix pch uart matching
  - LP: #1008711
* usb: add USB_QUIRK_RESET_RESUME for M-Audio 88es
  - LP: #1008711
* usb: usbtest: two super speed fixes for usbtest
  - LP: #1008711
* 8250.c: less than 2400 baud fix.
  - LP: #1008711
* usb-xhci: Handle COMP_TX_ERR for isoc tds
  - LP: #1008711
* xhci: Avoid dead ports when CONFIG_USB_XHCI_HCD=n
  - LP: #1008711
* xhci: Add Lynx Point to list of Intel switchable hosts.
  - LP: #1008711
* usb: gadget: fsl_udc_core: dTD's next dtd pointer need to be updated
  once written
  - LP: #1008711
* Add missing call to uart_update_timeout()
  - LP: #1008711
* USB: ftdi-sio: add support for Physik Instrumente E-861
  - LP: #1008711
* USB: ffs-test: fix length argument of out function call
  - LP: #1008711
* HID: wiimote: Fix IR data parser
  - LP: #1008711
* usb-storage: unusual_devs entry for Yarvik PMP400 MP4 player
  - LP: #1008711
* USB: ohci-at91: add a reset function to fix race condition
  - LP: #1008711
* HID: logitech: read all 32 bits of report type bitfield
  - LP: #1008711
* USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial console
  - LP: #1008711
* USB: cdc-wdm: poll must return POLLHUP if device is gone
  - LP: #1008711
* USB: cdc-wdm: add debug messages on cleanup
  - LP: #1008711
* USB: cdc-wdm: cannot use dev_printk when device is gone
  - LP: #1008711
* tty: Allow uart_register/unregister/register
  - LP: #1008711
* workqueue: skip nr_running sanity check in worker_enter_idle() if
  trustee is active
  - LP: #1008711
* xhci: Add new short TX quirk for Fresco Logic host.
  - LP: #1008711
* usbcore: enable USB2 LPM if port suspend fails
  - LP: #1008711
* perf/x86: Update event scheduling constraints for AMD family 15h models
  - LP: #1008711
* USB: fix resource leak in xhci power loss path
  - LP: #1008711
* xhci: Reset reserved command ring TRBs on cleanup.
  - LP: #1008711
* USB: Remove races in devio.c
  - LP: #1008711
* md: using GFP_NOIO to allocate bio for flush request
  - LP: #1008711
* um: Implement a custom pte_same() function
  - LP: #1008711
* um: Fix __swp_type()
  - LP: #1008711
* swap: don't do discard if no discard option added
  - LP: #1008711
* ahci: Detect Marvell 88SE9172 SATA controller
  - LP: #1008711
* ARM: 7365/1: drop unused parameter from flush_cache_user_range
  - LP: #1008711
* ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held
  - LP: #1008711
* sony-laptop: Enable keyboard backlight by default
  - LP: #1008711
* init: don't try mounting device as nfs root unless type fully matches
  - LP: #1008711
* memcg: free spare array to avoid memory leak
  - LP: #1008711
* compat: Fix RT signal mask corruption via sigprocmask
  - LP: #1008711
* ext3: Fix error handling on inode bitmap corruption
  - LP: #1008711
* ext4: fix error handling on inode bitmap corruption
  - LP: #1008711
* ACPI / PM: Add Sony Vaio VPCCW29FX to nonvs blacklist.
  - LP: #1008711
* hpsa: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler
  - LP: #1008711
* wake up s_wait_unfrozen when ->freeze_fs fails
  - LP: #1008711
* cifs: fix revalidation test in cifs_llseek()
  - LP: #1008711
* OMAPDSS: VENC: fix NULL pointer dereference in DSS2 VENC sysfs debug
  attr on OMAP4
  - LP: #1008711
* i2c-eg20t: change timeout value 50msec to 1000msec
  - LP: #1008711
* drm/i915: [GEN7] Use HW scheduler for fixed function shaders
  - LP: #1008711
* mmc: sdio: avoid spurious calls to interrupt handlers
  - LP: #1008711
* smsusb: add autodetection support for USB ID 2040:c0a0
  - LP: #1008711
* uvcvideo: Fix ENUMINPUT handling
  - LP: #1008711
* drm/i915: Avoid a double-read of PCH_IIR during interrupt handling
  - LP: #1008711
* b43legacy: Fix error due to MMIO access with SSB unpowered
  - LP: #1008711
* gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
  - LP: #1008711
* drm/i915: don't clobber the pipe param in sanitize_modesetting
  - LP: #1008711
* spi/spi-fsl-spi: reference correct pdata in fsl_spi_cs_control
  - LP: #1008711
* xen: do not map the same GSI twice in PVHVM guests.
  - LP: #1008711
* nouveau: nouveau_set_bo_placement takes TTM flags
  - LP: #1008711
* MCE: Fix vm86 handling for 32bit mce handler
  - LP: #1008711
* x86/mce: Fix check for processor context when machine check was taken.
  - LP: #1008711
* tile: fix bug where fls(0) was not returning 0
  - LP: #1008711
* intel-iommu: Add device info into list before doing context mapping
  - LP: #1008711
* block: don't mark buffers beyond end of disk as mapped
  - LP: #1008711
* drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
  - LP: #1008711
* rtlwifi: Preallocate USB read buffers and eliminate kalloc in read
  routine
  - LP: #1008711
* NFS4: fix compile warnings in nfs4proc.c
* Avoid reading past buffer when calling GETACL
  - LP: #1002505, #1008711
  - CVE-2012-2375
* Avoid beyond bounds copy while caching ACL
  - LP: #1002505, #1008711
  - CVE-2012-2375
* i2c: tegra: notify transfer-complete after clearing status.
  - LP: #1008711
* i2c: davinci: Free requested IRQ in remove
  - LP: #1008711
* x86, realmode: 16-bit real-mode code support for relocs tool
  - LP: #1008711
* x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
  - LP: #1008711
* x86, relocs: When printing an error, say relative or absolute
  - LP: #1008711
* x86, relocs: Build clean fix
  - LP: #1008711
* x86-32, relocs: Whitelist more symbols for ld bug workaround
  - LP: #1008711
* x86, relocs: Add jiffies and jiffies_64 to the relative whitelist
  - LP: #1008711
* Linux 3.2.19
  - LP: #1008711
* ALSA: HDA: Add support for Cirrus Logic 4213
  - LP: #910792
* tg3: Fix TSO CAP for 5704 devs w / ASF enabled
  - LP: #1005699
* drm/i915:: Disable FBC on SandyBridge
  - LP: #974830

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * net/dsa/mv88e6xxx.h - Marvell 88e6xxx switch chip support
3
 
 * Copyright (c) 2008 Marvell Semiconductor
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; either version 2 of the License, or
8
 
 * (at your option) any later version.
9
 
 */
10
 
 
11
 
#ifndef __MV88E6XXX_H
12
 
#define __MV88E6XXX_H
13
 
 
14
 
#define REG_PORT(p)             (0x10 + (p))
15
 
#define REG_GLOBAL              0x1b
16
 
#define REG_GLOBAL2             0x1c
17
 
 
18
 
struct mv88e6xxx_priv_state {
19
 
        /*
20
 
         * When using multi-chip addressing, this mutex protects
21
 
         * access to the indirect access registers.  (In single-chip
22
 
         * mode, this mutex is effectively useless.)
23
 
         */
24
 
        struct mutex    smi_mutex;
25
 
 
26
 
#ifdef CONFIG_NET_DSA_MV88E6XXX_NEED_PPU
27
 
        /*
28
 
         * Handles automatic disabling and re-enabling of the PHY
29
 
         * polling unit.
30
 
         */
31
 
        struct mutex            ppu_mutex;
32
 
        int                     ppu_disabled;
33
 
        struct work_struct      ppu_work;
34
 
        struct timer_list       ppu_timer;
35
 
#endif
36
 
 
37
 
        /*
38
 
         * This mutex serialises access to the statistics unit.
39
 
         * Hold this mutex over snapshot + dump sequences.
40
 
         */
41
 
        struct mutex    stats_mutex;
42
 
 
43
 
        int             id; /* switch product id */
44
 
};
45
 
 
46
 
struct mv88e6xxx_hw_stat {
47
 
        char string[ETH_GSTRING_LEN];
48
 
        int sizeof_stat;
49
 
        int reg;
50
 
};
51
 
 
52
 
int __mv88e6xxx_reg_read(struct mii_bus *bus, int sw_addr, int addr, int reg);
53
 
int mv88e6xxx_reg_read(struct dsa_switch *ds, int addr, int reg);
54
 
int __mv88e6xxx_reg_write(struct mii_bus *bus, int sw_addr, int addr,
55
 
                          int reg, u16 val);
56
 
int mv88e6xxx_reg_write(struct dsa_switch *ds, int addr, int reg, u16 val);
57
 
int mv88e6xxx_config_prio(struct dsa_switch *ds);
58
 
int mv88e6xxx_set_addr_direct(struct dsa_switch *ds, u8 *addr);
59
 
int mv88e6xxx_set_addr_indirect(struct dsa_switch *ds, u8 *addr);
60
 
int mv88e6xxx_phy_read(struct dsa_switch *ds, int addr, int regnum);
61
 
int mv88e6xxx_phy_write(struct dsa_switch *ds, int addr, int regnum, u16 val);
62
 
void mv88e6xxx_ppu_state_init(struct dsa_switch *ds);
63
 
int mv88e6xxx_phy_read_ppu(struct dsa_switch *ds, int addr, int regnum);
64
 
int mv88e6xxx_phy_write_ppu(struct dsa_switch *ds, int addr,
65
 
                            int regnum, u16 val);
66
 
void mv88e6xxx_poll_link(struct dsa_switch *ds);
67
 
void mv88e6xxx_get_strings(struct dsa_switch *ds,
68
 
                           int nr_stats, struct mv88e6xxx_hw_stat *stats,
69
 
                           int port, uint8_t *data);
70
 
void mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds,
71
 
                                 int nr_stats, struct mv88e6xxx_hw_stat *stats,
72
 
                                 int port, uint64_t *data);
73
 
 
74
 
#define REG_READ(addr, reg)                                             \
75
 
        ({                                                              \
76
 
                int __ret;                                              \
77
 
                                                                        \
78
 
                __ret = mv88e6xxx_reg_read(ds, addr, reg);              \
79
 
                if (__ret < 0)                                          \
80
 
                        return __ret;                                   \
81
 
                __ret;                                                  \
82
 
        })
83
 
 
84
 
#define REG_WRITE(addr, reg, val)                                       \
85
 
        ({                                                              \
86
 
                int __ret;                                              \
87
 
                                                                        \
88
 
                __ret = mv88e6xxx_reg_write(ds, addr, reg, val);        \
89
 
                if (__ret < 0)                                          \
90
 
                        return __ret;                                   \
91
 
        })
92
 
 
93
 
 
94
 
 
95
 
#endif