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

« back to all changes in this revision

Viewing changes to drivers/net/qlcnic/qlcnic_main.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:
42
42
module_param(use_msi_x, int, 0444);
43
43
MODULE_PARM_DESC(use_msi_x, "MSI-X interrupt (0=disabled, 1=enabled");
44
44
 
45
 
static int auto_fw_reset = AUTO_FW_RESET_ENABLED;
 
45
static int auto_fw_reset = 1;
46
46
module_param(auto_fw_reset, int, 0644);
47
47
MODULE_PARM_DESC(auto_fw_reset, "Auto firmware reset (0=disabled, 1=enabled");
48
48
 
2099
2099
        struct cmd_desc_type0 *hwdesc, *first_desc;
2100
2100
        struct pci_dev *pdev;
2101
2101
        struct ethhdr *phdr;
 
2102
        int delta = 0;
2102
2103
        int i, k;
2103
2104
 
2104
2105
        u32 producer;
2118
2119
        }
2119
2120
 
2120
2121
        frag_count = skb_shinfo(skb)->nr_frags + 1;
 
2122
        /* 14 frags supported for normal packet and
 
2123
         * 32 frags supported for TSO packet
 
2124
         */
 
2125
        if (!skb_is_gso(skb) && frag_count > QLCNIC_MAX_FRAGS_PER_TX) {
 
2126
 
 
2127
                for (i = 0; i < (frag_count - QLCNIC_MAX_FRAGS_PER_TX); i++)
 
2128
                        delta += skb_shinfo(skb)->frags[i].size;
 
2129
 
 
2130
                if (!__pskb_pull_tail(skb, delta))
 
2131
                        goto drop_packet;
 
2132
 
 
2133
                frag_count = 1 + skb_shinfo(skb)->nr_frags;
 
2134
        }
2121
2135
 
2122
2136
        /* 4 fragments per cmd des */
2123
2137
        no_of_desc = (frag_count + 3) >> 2;
2959
2973
                if (adapter->need_fw_reset)
2960
2974
                        goto detach;
2961
2975
 
2962
 
                if (adapter->reset_context &&
2963
 
                    auto_fw_reset == AUTO_FW_RESET_ENABLED) {
 
2976
                if (adapter->reset_context && auto_fw_reset) {
2964
2977
                        qlcnic_reset_hw_context(adapter);
2965
2978
                        adapter->netdev->trans_start = jiffies;
2966
2979
                }
2973
2986
 
2974
2987
        qlcnic_dev_request_reset(adapter);
2975
2988
 
2976
 
        if ((auto_fw_reset == AUTO_FW_RESET_ENABLED))
 
2989
        if (auto_fw_reset)
2977
2990
                clear_bit(__QLCNIC_FW_ATTACHED, &adapter->state);
2978
2991
 
2979
2992
        dev_info(&netdev->dev, "firmware hang detected\n");
2982
2995
        adapter->dev_state = (state == QLCNIC_DEV_NEED_QUISCENT) ? state :
2983
2996
                QLCNIC_DEV_NEED_RESET;
2984
2997
 
2985
 
        if ((auto_fw_reset == AUTO_FW_RESET_ENABLED) &&
 
2998
        if (auto_fw_reset &&
2986
2999
                !test_and_set_bit(__QLCNIC_RESETTING, &adapter->state)) {
2987
3000
 
2988
3001
                qlcnic_schedule_work(adapter, qlcnic_detach_work, 0);
3654
3667
                if (adapter->npars[pci_func].type != QLCNIC_TYPE_NIC)
3655
3668
                        return QL_STATUS_INVALID_PARAM;
3656
3669
 
3657
 
                if (!IS_VALID_BW(np_cfg[i].min_bw)
3658
 
                                || !IS_VALID_BW(np_cfg[i].max_bw)
3659
 
                                || !IS_VALID_RX_QUEUES(np_cfg[i].max_rx_queues)
3660
 
                                || !IS_VALID_TX_QUEUES(np_cfg[i].max_tx_queues))
 
3670
                if (!IS_VALID_BW(np_cfg[i].min_bw) ||
 
3671
                    !IS_VALID_BW(np_cfg[i].max_bw))
3661
3672
                        return QL_STATUS_INVALID_PARAM;
3662
3673
        }
3663
3674
        return 0;