~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/net/gianfar.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
static void adjust_link(struct net_device *dev);
124
124
static void init_registers(struct net_device *dev);
125
125
static int init_phy(struct net_device *dev);
126
 
static int gfar_probe(struct platform_device *ofdev,
127
 
                const struct of_device_id *match);
 
126
static int gfar_probe(struct platform_device *ofdev);
128
127
static int gfar_remove(struct platform_device *ofdev);
129
128
static void free_skb_resources(struct gfar_private *priv);
130
129
static void gfar_set_multi(struct net_device *dev);
950
949
                        (pvr == 0x80861010 && (mod & 0xfff9) == 0x80c0))
951
950
                priv->errata |= GFAR_ERRATA_A002;
952
951
 
 
952
        /* MPC8313 Rev < 2.0, MPC8548 rev 2.0 */
 
953
        if ((pvr == 0x80850010 && mod == 0x80b0 && rev < 0x0020) ||
 
954
                        (pvr == 0x80210020 && mod == 0x8030 && rev == 0x0020))
 
955
                priv->errata |= GFAR_ERRATA_12;
 
956
 
953
957
        if (priv->errata)
954
958
                dev_info(dev, "enabled errata workarounds, flags: 0x%x\n",
955
959
                         priv->errata);
957
961
 
958
962
/* Set up the ethernet device structure, private data,
959
963
 * and anything else we need before we start */
960
 
static int gfar_probe(struct platform_device *ofdev,
961
 
                const struct of_device_id *match)
 
964
static int gfar_probe(struct platform_device *ofdev)
962
965
{
963
966
        u32 tempval;
964
967
        struct net_device *dev = NULL;
2156
2159
        /* Set up checksumming */
2157
2160
        if (CHECKSUM_PARTIAL == skb->ip_summed) {
2158
2161
                fcb = gfar_add_fcb(skb);
2159
 
                lstatus |= BD_LFLAG(TXBD_TOE);
2160
 
                gfar_tx_checksum(skb, fcb);
 
2162
                /* as specified by errata */
 
2163
                if (unlikely(gfar_has_errata(priv, GFAR_ERRATA_12)
 
2164
                             && ((unsigned long)fcb % 0x20) > 0x18)) {
 
2165
                        __skb_pull(skb, GMAC_FCB_LEN);
 
2166
                        skb_checksum_help(skb);
 
2167
                } else {
 
2168
                        lstatus |= BD_LFLAG(TXBD_TOE);
 
2169
                        gfar_tx_checksum(skb, fcb);
 
2170
                }
2161
2171
        }
2162
2172
 
2163
2173
        if (vlan_tx_tag_present(skb)) {
3256
3266
MODULE_DEVICE_TABLE(of, gfar_match);
3257
3267
 
3258
3268
/* Structure for a device driver */
3259
 
static struct of_platform_driver gfar_driver = {
 
3269
static struct platform_driver gfar_driver = {
3260
3270
        .driver = {
3261
3271
                .name = "fsl-gianfar",
3262
3272
                .owner = THIS_MODULE,
3269
3279
 
3270
3280
static int __init gfar_init(void)
3271
3281
{
3272
 
        return of_register_platform_driver(&gfar_driver);
 
3282
        return platform_driver_register(&gfar_driver);
3273
3283
}
3274
3284
 
3275
3285
static void __exit gfar_exit(void)
3276
3286
{
3277
 
        of_unregister_platform_driver(&gfar_driver);
 
3287
        platform_driver_unregister(&gfar_driver);
3278
3288
}
3279
3289
 
3280
3290
module_init(gfar_init);