mirror of https://gitee.com/openkylin/linux.git
Merge branch 'upstream-fixes'
This commit is contained in:
commit
b4ea75b649
|
@ -522,6 +522,7 @@ CONFIG_E100=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000_NAPI=y
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -493,6 +493,7 @@ CONFIG_NETDEVICES=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000_NAPI=y
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -415,6 +415,7 @@ CONFIG_NETDEVICES=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000_NAPI=y
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -496,6 +496,7 @@ CONFIG_NETDEVICES=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000_NAPI=y
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -496,6 +496,7 @@ CONFIG_NETDEVICES=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
CONFIG_E1000_NAPI=y
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -644,6 +644,8 @@ CONFIG_8139TOO_PIO=y
|
|||
# CONFIG_ACENIC is not set
|
||||
# CONFIG_DL2K is not set
|
||||
# CONFIG_E1000 is not set
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -557,6 +557,7 @@ CONFIG_E100=m
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -565,6 +565,7 @@ CONFIG_E100=m
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -548,6 +548,7 @@ CONFIG_E100=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -565,6 +565,7 @@ CONFIG_E100=m
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -602,6 +602,7 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=m
|
||||
CONFIG_E1000_NAPI=y
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -626,6 +626,7 @@ CONFIG_ACENIC=m
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=m
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -533,6 +533,7 @@ CONFIG_MII=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=m
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -675,6 +675,7 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -567,6 +567,7 @@ CONFIG_ACENIC=m
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=m
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -454,6 +454,7 @@ CONFIG_AMD8111_ETH=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -724,6 +724,7 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -671,6 +671,7 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -499,6 +499,7 @@ CONFIG_NATSEMI=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -488,6 +488,7 @@ CONFIG_E100=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -402,6 +402,7 @@ CONFIG_E100=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -442,6 +442,7 @@ CONFIG_E100=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -295,8 +295,7 @@ static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus)
|
|||
int ioptex;
|
||||
int i;
|
||||
|
||||
if (busa < iommu->start)
|
||||
BUG();
|
||||
BUG_ON(busa < iommu->start);
|
||||
ioptex = (busa - iommu->start) >> PAGE_SHIFT;
|
||||
for (i = 0; i < npages; i++) {
|
||||
iopte_val(iommu->page_table[ioptex + i]) = 0;
|
||||
|
@ -340,9 +339,9 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
|
|||
iopte_t *first;
|
||||
int ioptex;
|
||||
|
||||
if ((va & ~PAGE_MASK) != 0) BUG();
|
||||
if ((addr & ~PAGE_MASK) != 0) BUG();
|
||||
if ((len & ~PAGE_MASK) != 0) BUG();
|
||||
BUG_ON((va & ~PAGE_MASK) != 0);
|
||||
BUG_ON((addr & ~PAGE_MASK) != 0);
|
||||
BUG_ON((len & ~PAGE_MASK) != 0);
|
||||
|
||||
/* page color = physical address */
|
||||
ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT,
|
||||
|
@ -405,8 +404,8 @@ static void iommu_unmap_dma_area(unsigned long busa, int len)
|
|||
unsigned long end;
|
||||
int ioptex = (busa - iommu->start) >> PAGE_SHIFT;
|
||||
|
||||
if ((busa & ~PAGE_MASK) != 0) BUG();
|
||||
if ((len & ~PAGE_MASK) != 0) BUG();
|
||||
BUG_ON((busa & ~PAGE_MASK) != 0);
|
||||
BUG_ON((len & ~PAGE_MASK) != 0);
|
||||
|
||||
iopte += ioptex;
|
||||
end = busa + len;
|
||||
|
|
|
@ -529,6 +529,7 @@ CONFIG_NET_PCI=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=m
|
||||
CONFIG_E1000_NAPI=y
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_MYRI_SBUS is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
|
|
|
@ -280,9 +280,9 @@ static struct sparc64_tick_ops stick_operations __read_mostly = {
|
|||
* Since STICK is constantly updating, we have to access it carefully.
|
||||
*
|
||||
* The sequence we use to read is:
|
||||
* 1) read low
|
||||
* 2) read high
|
||||
* 3) read low again, if it rolled over increment high by 1
|
||||
* 1) read high
|
||||
* 2) read low
|
||||
* 3) read high again, if it rolled re-read both low and high again.
|
||||
*
|
||||
* Writing STICK safely is also tricky:
|
||||
* 1) write low to zero
|
||||
|
@ -295,18 +295,18 @@ static struct sparc64_tick_ops stick_operations __read_mostly = {
|
|||
static unsigned long __hbird_read_stick(void)
|
||||
{
|
||||
unsigned long ret, tmp1, tmp2, tmp3;
|
||||
unsigned long addr = HBIRD_STICK_ADDR;
|
||||
unsigned long addr = HBIRD_STICK_ADDR+8;
|
||||
|
||||
__asm__ __volatile__("ldxa [%1] %5, %2\n\t"
|
||||
"add %1, 0x8, %1\n\t"
|
||||
"ldxa [%1] %5, %3\n\t"
|
||||
__asm__ __volatile__("ldxa [%1] %5, %2\n"
|
||||
"1:\n\t"
|
||||
"sub %1, 0x8, %1\n\t"
|
||||
"ldxa [%1] %5, %3\n\t"
|
||||
"add %1, 0x8, %1\n\t"
|
||||
"ldxa [%1] %5, %4\n\t"
|
||||
"cmp %4, %2\n\t"
|
||||
"blu,a,pn %%xcc, 1f\n\t"
|
||||
" add %3, 1, %3\n"
|
||||
"1:\n\t"
|
||||
"sllx %3, 32, %3\n\t"
|
||||
"bne,a,pn %%xcc, 1b\n\t"
|
||||
" mov %4, %2\n\t"
|
||||
"sllx %4, 32, %4\n\t"
|
||||
"or %3, %4, %0\n\t"
|
||||
: "=&r" (ret), "=&r" (addr),
|
||||
"=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3)
|
||||
|
|
|
@ -646,6 +646,7 @@ CONFIG_8139TOO=y
|
|||
# CONFIG_DL2K is not set
|
||||
CONFIG_E1000=y
|
||||
# CONFIG_E1000_NAPI is not set
|
||||
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
|
||||
# CONFIG_NS83820 is not set
|
||||
# CONFIG_HAMACHI is not set
|
||||
# CONFIG_YELLOWFIN is not set
|
||||
|
|
|
@ -1914,6 +1914,15 @@ config E1000_NAPI
|
|||
|
||||
If in doubt, say N.
|
||||
|
||||
config E1000_DISABLE_PACKET_SPLIT
|
||||
bool "Disable Packet Split for PCI express adapters"
|
||||
depends on E1000
|
||||
help
|
||||
Say Y here if you want to use the legacy receive path for PCI express
|
||||
hadware.
|
||||
|
||||
If in doubt, say N.
|
||||
|
||||
source "drivers/net/ixp2000/Kconfig"
|
||||
|
||||
config MYRI_SBUS
|
||||
|
|
|
@ -1925,8 +1925,8 @@ static void cas_tx(struct net_device *dev, struct cas *cp,
|
|||
u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);
|
||||
#endif
|
||||
if (netif_msg_intr(cp))
|
||||
printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n",
|
||||
cp->dev->name, status, compwb);
|
||||
printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %llx\n",
|
||||
cp->dev->name, status, (unsigned long long)compwb);
|
||||
/* process all the rings */
|
||||
for (ring = 0; ring < N_TX_RINGS; ring++) {
|
||||
#ifdef USE_TX_COMPWB
|
||||
|
|
|
@ -280,8 +280,7 @@ e1000_set_pauseparam(struct net_device *netdev,
|
|||
e1000_up(adapter);
|
||||
} else
|
||||
e1000_reset(adapter);
|
||||
}
|
||||
else
|
||||
} else
|
||||
return ((hw->media_type == e1000_media_type_fiber) ?
|
||||
e1000_setup_link(hw) : e1000_force_mac_fc(hw));
|
||||
|
||||
|
|
|
@ -4504,6 +4504,7 @@ e1000_read_mac_addr(struct e1000_hw * hw)
|
|||
hw->perm_mac_addr[i] = (uint8_t) (eeprom_data & 0x00FF);
|
||||
hw->perm_mac_addr[i+1] = (uint8_t) (eeprom_data >> 8);
|
||||
}
|
||||
|
||||
switch (hw->mac_type) {
|
||||
default:
|
||||
break;
|
||||
|
@ -6840,6 +6841,7 @@ int32_t
|
|||
e1000_check_phy_reset_block(struct e1000_hw *hw)
|
||||
{
|
||||
uint32_t manc = 0;
|
||||
|
||||
if (hw->mac_type > e1000_82547_rev_2)
|
||||
manc = E1000_READ_REG(hw, MANC);
|
||||
return (manc & E1000_MANC_BLK_PHY_RST_ON_IDE) ?
|
||||
|
|
|
@ -377,6 +377,7 @@ int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask);
|
|||
void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask);
|
||||
|
||||
/* Filters (multicast, vlan, receive) */
|
||||
void e1000_mc_addr_list_update(struct e1000_hw *hw, uint8_t * mc_addr_list, uint32_t mc_addr_count, uint32_t pad, uint32_t rar_used_count);
|
||||
uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr);
|
||||
void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value);
|
||||
void e1000_rar_set(struct e1000_hw *hw, uint8_t * mc_addr, uint32_t rar_index);
|
||||
|
@ -401,7 +402,9 @@ void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
|
|||
void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
|
||||
/* Port I/O is only supported on 82544 and newer */
|
||||
uint32_t e1000_io_read(struct e1000_hw *hw, unsigned long port);
|
||||
uint32_t e1000_read_reg_io(struct e1000_hw *hw, uint32_t offset);
|
||||
void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value);
|
||||
void e1000_enable_pciex_master(struct e1000_hw *hw);
|
||||
int32_t e1000_disable_pciex_master(struct e1000_hw *hw);
|
||||
int32_t e1000_get_software_semaphore(struct e1000_hw *hw);
|
||||
void e1000_release_software_semaphore(struct e1000_hw *hw);
|
||||
|
@ -1761,7 +1764,6 @@ struct e1000_hw {
|
|||
#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */
|
||||
#define E1000_TXDCTL_COUNT_DESC 0x00400000 /* Enable the counting of desc.
|
||||
still to be processed. */
|
||||
|
||||
/* Transmit Configuration Word */
|
||||
#define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */
|
||||
#define E1000_TXCW_HD 0x00000040 /* TXCW half duplex */
|
||||
|
|
|
@ -29,11 +29,71 @@
|
|||
#include "e1000.h"
|
||||
|
||||
/* Change Log
|
||||
* 6.0.58 4/20/05
|
||||
* o Accepted ethtool cleanup patch from Stephen Hemminger
|
||||
* 6.0.44+ 2/15/05
|
||||
* o applied Anton's patch to resolve tx hang in hardware
|
||||
* o Applied Andrew Mortons patch - e1000 stops working after resume
|
||||
* 6.3.9 12/16/2005
|
||||
* o incorporate fix for recycled skbs from IBM LTC
|
||||
* 6.3.7 11/18/2005
|
||||
* o Honor eeprom setting for enabling/disabling Wake On Lan
|
||||
* 6.3.5 11/17/2005
|
||||
* o Fix memory leak in rx ring handling for PCI Express adapters
|
||||
* 6.3.4 11/8/05
|
||||
* o Patch from Jesper Juhl to remove redundant NULL checks for kfree
|
||||
* 6.3.2 9/20/05
|
||||
* o Render logic that sets/resets DRV_LOAD as inline functions to
|
||||
* avoid code replication. If f/w is AMT then set DRV_LOAD only when
|
||||
* network interface is open.
|
||||
* o Handle DRV_LOAD set/reset in cases where AMT uses VLANs.
|
||||
* o Adjust PBA partioning for Jumbo frames using MTU size and not
|
||||
* rx_buffer_len
|
||||
* 6.3.1 9/19/05
|
||||
* o Use adapter->tx_timeout_factor in Tx Hung Detect logic
|
||||
(e1000_clean_tx_irq)
|
||||
* o Support for 8086:10B5 device (Quad Port)
|
||||
* 6.2.14 9/15/05
|
||||
* o In AMT enabled configurations, set/reset DRV_LOAD bit on interface
|
||||
* open/close
|
||||
* 6.2.13 9/14/05
|
||||
* o Invoke e1000_check_mng_mode only for 8257x controllers since it
|
||||
* accesses the FWSM that is not supported in other controllers
|
||||
* 6.2.12 9/9/05
|
||||
* o Add support for device id E1000_DEV_ID_82546GB_QUAD_COPPER
|
||||
* o set RCTL:SECRC only for controllers newer than 82543.
|
||||
* o When the n/w interface comes down reset DRV_LOAD bit to notify f/w.
|
||||
* This code was moved from e1000_remove to e1000_close
|
||||
* 6.2.10 9/6/05
|
||||
* o Fix error in updating RDT in el1000_alloc_rx_buffers[_ps] -- one off.
|
||||
* o Enable fc by default on 82573 controllers (do not read eeprom)
|
||||
* o Fix rx_errors statistic not to include missed_packet_count
|
||||
* o Fix rx_dropped statistic not to include missed_packet_count
|
||||
(Padraig Brady)
|
||||
* 6.2.9 8/30/05
|
||||
* o Remove call to update statistics from the controller ib e1000_get_stats
|
||||
* 6.2.8 8/30/05
|
||||
* o Improved algorithm for rx buffer allocation/rdt update
|
||||
* o Flow control watermarks relative to rx PBA size
|
||||
* o Simplified 'Tx Hung' detect logic
|
||||
* 6.2.7 8/17/05
|
||||
* o Report rx buffer allocation failures and tx timeout counts in stats
|
||||
* 6.2.6 8/16/05
|
||||
* o Implement workaround for controller erratum -- linear non-tso packet
|
||||
* following a TSO gets written back prematurely
|
||||
* 6.2.5 8/15/05
|
||||
* o Set netdev->tx_queue_len based on link speed/duplex settings.
|
||||
* o Fix net_stats.rx_fifo_errors <p@draigBrady.com>
|
||||
* o Do not power off PHY if SoL/IDER session is active
|
||||
* 6.2.4 8/10/05
|
||||
* o Fix loopback test setup/cleanup for 82571/3 controllers
|
||||
* o Fix parsing of outgoing packets (e1000_transfer_dhcp_info) to treat
|
||||
* all packets as raw
|
||||
* o Prevent operations that will cause the PHY to be reset if SoL/IDER
|
||||
* sessions are active and log a message
|
||||
* 6.2.2 7/21/05
|
||||
* o used fixed size descriptors for all MTU sizes, reduces memory load
|
||||
* 6.1.2 4/13/05
|
||||
* o Fixed ethtool diagnostics
|
||||
* o Enabled flow control to take default eeprom settings
|
||||
* o Added stats_lock around e1000_read_phy_reg commands to avoid concurrent
|
||||
* calls, one from mii_ioctl and other from within update_stats while
|
||||
* processing MIIREG ioctl.
|
||||
*/
|
||||
|
||||
char e1000_driver_name[] = "e1000";
|
||||
|
@ -1298,8 +1358,8 @@ e1000_setup_tx_resources(struct e1000_adapter *adapter,
|
|||
"at %p\n", txdr->size, txdr->desc);
|
||||
/* Try again, without freeing the previous */
|
||||
txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
|
||||
if(!txdr->desc) {
|
||||
/* Failed allocation, critical failure */
|
||||
if (!txdr->desc) {
|
||||
pci_free_consistent(pdev, txdr->size, olddesc, olddma);
|
||||
goto setup_tx_desc_die;
|
||||
}
|
||||
|
@ -1621,7 +1681,7 @@ e1000_setup_rctl(struct e1000_adapter *adapter)
|
|||
{
|
||||
uint32_t rctl, rfctl;
|
||||
uint32_t psrctl = 0;
|
||||
#ifdef CONFIG_E1000_PACKET_SPLIT
|
||||
#ifndef CONFIG_E1000_DISABLE_PACKET_SPLIT
|
||||
uint32_t pages = 0;
|
||||
#endif
|
||||
|
||||
|
@ -1653,26 +1713,11 @@ e1000_setup_rctl(struct e1000_adapter *adapter)
|
|||
rctl |= adapter->rx_buffer_len << 0x11;
|
||||
} else {
|
||||
rctl &= ~E1000_RCTL_SZ_4096;
|
||||
rctl |= E1000_RCTL_BSEX;
|
||||
switch (adapter->rx_buffer_len) {
|
||||
case E1000_RXBUFFER_2048:
|
||||
default:
|
||||
rctl |= E1000_RCTL_SZ_2048;
|
||||
rctl &= ~E1000_RCTL_BSEX;
|
||||
break;
|
||||
case E1000_RXBUFFER_4096:
|
||||
rctl |= E1000_RCTL_SZ_4096;
|
||||
break;
|
||||
case E1000_RXBUFFER_8192:
|
||||
rctl |= E1000_RCTL_SZ_8192;
|
||||
break;
|
||||
case E1000_RXBUFFER_16384:
|
||||
rctl |= E1000_RCTL_SZ_16384;
|
||||
break;
|
||||
}
|
||||
rctl |= E1000_RCTL_SZ_2048;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_E1000_PACKET_SPLIT
|
||||
#ifndef CONFIG_E1000_DISABLE_PACKET_SPLIT
|
||||
/* 82571 and greater support packet-split where the protocol
|
||||
* header is placed in skb->data and the packet data is
|
||||
* placed in pages hanging off of skb_shinfo(skb)->nr_frags.
|
||||
|
@ -2038,7 +2083,6 @@ e1000_clean_rx_ring(struct e1000_adapter *adapter,
|
|||
unsigned int i, j;
|
||||
|
||||
/* Free all the Rx ring sk_buffs */
|
||||
|
||||
for (i = 0; i < rx_ring->count; i++) {
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
if (buffer_info->skb) {
|
||||
|
@ -2142,9 +2186,9 @@ e1000_leave_82542_rst(struct e1000_adapter *adapter)
|
|||
e1000_pci_set_mwi(&adapter->hw);
|
||||
|
||||
if (netif_running(netdev)) {
|
||||
e1000_configure_rx(adapter);
|
||||
/* No need to loop, because 82542 supports only 1 queue */
|
||||
struct e1000_rx_ring *ring = &adapter->rx_ring[0];
|
||||
e1000_configure_rx(adapter);
|
||||
adapter->alloc_rx_buf(adapter, ring, E1000_DESC_UNUSED(ring));
|
||||
}
|
||||
}
|
||||
|
@ -2876,8 +2920,8 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
|||
}
|
||||
}
|
||||
|
||||
if((mss) || (skb->ip_summed == CHECKSUM_HW))
|
||||
/* reserve a descriptor for the offload context */
|
||||
if ((mss) || (skb->ip_summed == CHECKSUM_HW))
|
||||
count++;
|
||||
count++;
|
||||
#else
|
||||
|
@ -3326,14 +3370,14 @@ e1000_intr(int irq, void *data, struct pt_regs *regs)
|
|||
|
||||
#else /* if !CONFIG_E1000_NAPI */
|
||||
/* Writing IMC and IMS is needed for 82547.
|
||||
Due to Hub Link bus being occupied, an interrupt
|
||||
de-assertion message is not able to be sent.
|
||||
When an interrupt assertion message is generated later,
|
||||
two messages are re-ordered and sent out.
|
||||
That causes APIC to think 82547 is in de-assertion
|
||||
state, while 82547 is in assertion state, resulting
|
||||
in dead lock. Writing IMC forces 82547 into
|
||||
de-assertion state.
|
||||
* Due to Hub Link bus being occupied, an interrupt
|
||||
* de-assertion message is not able to be sent.
|
||||
* When an interrupt assertion message is generated later,
|
||||
* two messages are re-ordered and sent out.
|
||||
* That causes APIC to think 82547 is in de-assertion
|
||||
* state, while 82547 is in assertion state, resulting
|
||||
* in dead lock. Writing IMC forces 82547 into
|
||||
* de-assertion state.
|
||||
*/
|
||||
if (hw->mac_type == e1000_82547 || hw->mac_type == e1000_82547_rev_2) {
|
||||
atomic_inc(&adapter->irq_sem);
|
||||
|
@ -3569,9 +3613,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
|||
{
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
struct pci_dev *pdev = adapter->pdev;
|
||||
struct e1000_rx_desc *rx_desc;
|
||||
struct e1000_buffer *buffer_info;
|
||||
struct sk_buff *skb;
|
||||
struct e1000_rx_desc *rx_desc, *next_rxd;
|
||||
struct e1000_buffer *buffer_info, *next_buffer;
|
||||
unsigned long flags;
|
||||
uint32_t length;
|
||||
uint8_t last_byte;
|
||||
|
@ -3581,9 +3624,10 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
|||
|
||||
i = rx_ring->next_to_clean;
|
||||
rx_desc = E1000_RX_DESC(*rx_ring, i);
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
|
||||
while (rx_desc->status & E1000_RXD_STAT_DD) {
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
struct sk_buff *skb, *next_skb;
|
||||
u8 status;
|
||||
#ifdef CONFIG_E1000_NAPI
|
||||
if (*work_done >= work_to_do)
|
||||
|
@ -3591,6 +3635,14 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
|||
(*work_done)++;
|
||||
#endif
|
||||
status = rx_desc->status;
|
||||
skb = buffer_info->skb;
|
||||
buffer_info->skb = NULL;
|
||||
|
||||
if (++i == rx_ring->count) i = 0;
|
||||
next_rxd = E1000_RX_DESC(*rx_ring, i);
|
||||
next_buffer = &rx_ring->buffer_info[i];
|
||||
next_skb = next_buffer->skb;
|
||||
|
||||
cleaned = TRUE;
|
||||
cleaned_count++;
|
||||
pci_unmap_single(pdev,
|
||||
|
@ -3598,20 +3650,50 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
|||
buffer_info->length,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
|
||||
skb = buffer_info->skb;
|
||||
length = le16_to_cpu(rx_desc->length);
|
||||
|
||||
if(unlikely(!(rx_desc->status & E1000_RXD_STAT_EOP))) {
|
||||
/* All receives must fit into a single buffer */
|
||||
E1000_DBG("%s: Receive packet consumed multiple"
|
||||
" buffers\n", netdev->name);
|
||||
dev_kfree_skb_irq(skb);
|
||||
skb_put(skb, length);
|
||||
|
||||
if (!(status & E1000_RXD_STAT_EOP)) {
|
||||
if (!rx_ring->rx_skb_top) {
|
||||
rx_ring->rx_skb_top = skb;
|
||||
rx_ring->rx_skb_top->len = length;
|
||||
rx_ring->rx_skb_prev = skb;
|
||||
} else {
|
||||
if (skb_shinfo(rx_ring->rx_skb_top)->frag_list) {
|
||||
rx_ring->rx_skb_prev->next = skb;
|
||||
skb->prev = rx_ring->rx_skb_prev;
|
||||
} else {
|
||||
skb_shinfo(rx_ring->rx_skb_top)->frag_list = skb;
|
||||
}
|
||||
rx_ring->rx_skb_prev = skb;
|
||||
rx_ring->rx_skb_top->data_len += length;
|
||||
}
|
||||
goto next_desc;
|
||||
} else {
|
||||
if (rx_ring->rx_skb_top) {
|
||||
if (skb_shinfo(rx_ring->rx_skb_top)
|
||||
->frag_list) {
|
||||
rx_ring->rx_skb_prev->next = skb;
|
||||
skb->prev = rx_ring->rx_skb_prev;
|
||||
} else
|
||||
skb_shinfo(rx_ring->rx_skb_top)
|
||||
->frag_list = skb;
|
||||
|
||||
rx_ring->rx_skb_top->data_len += length;
|
||||
rx_ring->rx_skb_top->len +=
|
||||
rx_ring->rx_skb_top->data_len;
|
||||
|
||||
skb = rx_ring->rx_skb_top;
|
||||
multi_descriptor = TRUE;
|
||||
rx_ring->rx_skb_top = NULL;
|
||||
rx_ring->rx_skb_prev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (unlikely(rx_desc->errors & E1000_RXD_ERR_FRAME_ERR_MASK)) {
|
||||
last_byte = *(skb->data + length - 1);
|
||||
if(TBI_ACCEPT(&adapter->hw, rx_desc->status,
|
||||
if (TBI_ACCEPT(&adapter->hw, status,
|
||||
rx_desc->errors, length, last_byte)) {
|
||||
spin_lock_irqsave(&adapter->stats_lock, flags);
|
||||
e1000_tbi_adjust_stats(&adapter->hw,
|
||||
|
@ -3656,6 +3738,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
|||
(uint32_t)(status) |
|
||||
((uint32_t)(rx_desc->errors) << 24),
|
||||
rx_desc->csum, skb);
|
||||
|
||||
skb->protocol = eth_type_trans(skb, netdev);
|
||||
#ifdef CONFIG_E1000_NAPI
|
||||
if (unlikely(adapter->vlgrp &&
|
||||
|
@ -3668,7 +3751,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
|||
}
|
||||
#else /* CONFIG_E1000_NAPI */
|
||||
if (unlikely(adapter->vlgrp &&
|
||||
(rx_desc->status & E1000_RXD_STAT_VP))) {
|
||||
(status & E1000_RXD_STAT_VP))) {
|
||||
vlan_hwaccel_rx(skb, adapter->vlgrp,
|
||||
le16_to_cpu(rx_desc->special) &
|
||||
E1000_RXD_SPC_VLAN_MASK);
|
||||
|
@ -3691,6 +3774,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
|
|||
cleaned_count = 0;
|
||||
}
|
||||
|
||||
rx_desc = next_rxd;
|
||||
buffer_info = next_buffer;
|
||||
}
|
||||
rx_ring->next_to_clean = i;
|
||||
|
||||
|
@ -3716,13 +3801,13 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
|
|||
struct e1000_rx_ring *rx_ring)
|
||||
#endif
|
||||
{
|
||||
union e1000_rx_desc_packet_split *rx_desc;
|
||||
union e1000_rx_desc_packet_split *rx_desc, *next_rxd;
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
struct pci_dev *pdev = adapter->pdev;
|
||||
struct e1000_buffer *buffer_info;
|
||||
struct e1000_buffer *buffer_info, *next_buffer;
|
||||
struct e1000_ps_page *ps_page;
|
||||
struct e1000_ps_page_dma *ps_page_dma;
|
||||
struct sk_buff *skb;
|
||||
struct sk_buff *skb, *next_skb;
|
||||
unsigned int i, j;
|
||||
uint32_t length, staterr;
|
||||
int cleaned_count = 0;
|
||||
|
@ -3731,9 +3816,9 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
|
|||
i = rx_ring->next_to_clean;
|
||||
rx_desc = E1000_RX_DESC_PS(*rx_ring, i);
|
||||
staterr = le32_to_cpu(rx_desc->wb.middle.status_error);
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
|
||||
while (staterr & E1000_RXD_STAT_DD) {
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
ps_page = &rx_ring->ps_page[i];
|
||||
ps_page_dma = &rx_ring->ps_page_dma[i];
|
||||
#ifdef CONFIG_E1000_NAPI
|
||||
|
@ -3741,14 +3826,19 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
|
|||
break;
|
||||
(*work_done)++;
|
||||
#endif
|
||||
skb = buffer_info->skb;
|
||||
|
||||
if (++i == rx_ring->count) i = 0;
|
||||
next_rxd = E1000_RX_DESC_PS(*rx_ring, i);
|
||||
next_buffer = &rx_ring->buffer_info[i];
|
||||
next_skb = next_buffer->skb;
|
||||
|
||||
cleaned = TRUE;
|
||||
cleaned_count++;
|
||||
pci_unmap_single(pdev, buffer_info->dma,
|
||||
buffer_info->length,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
|
||||
skb = buffer_info->skb;
|
||||
|
||||
if (unlikely(!(staterr & E1000_RXD_STAT_EOP))) {
|
||||
E1000_DBG("%s: Packet Split buffers didn't pick up"
|
||||
" the full packet\n", netdev->name);
|
||||
|
@ -3795,12 +3885,8 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
|
|||
skb->protocol = eth_type_trans(skb, netdev);
|
||||
|
||||
if (likely(rx_desc->wb.upper.header_status &
|
||||
E1000_RXDPS_HDRSTAT_HDRSP)) {
|
||||
E1000_RXDPS_HDRSTAT_HDRSP))
|
||||
adapter->rx_hdr_split++;
|
||||
#ifdef HAVE_RX_ZERO_COPY
|
||||
skb_shinfo(skb)->zero_copy = TRUE;
|
||||
#endif
|
||||
}
|
||||
#ifdef CONFIG_E1000_NAPI
|
||||
if (unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) {
|
||||
vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
|
||||
|
@ -3834,6 +3920,9 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
|
|||
cleaned_count = 0;
|
||||
}
|
||||
|
||||
rx_desc = next_rxd;
|
||||
buffer_info = next_buffer;
|
||||
|
||||
staterr = le32_to_cpu(rx_desc->wb.middle.status_error);
|
||||
}
|
||||
rx_ring->next_to_clean = i;
|
||||
|
@ -3940,7 +4029,16 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
|
|||
rx_desc = E1000_RX_DESC(*rx_ring, i);
|
||||
rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
|
||||
|
||||
if(unlikely((i & ~(E1000_RX_BUFFER_WRITE - 1)) == i)) {
|
||||
if (unlikely(++i == rx_ring->count))
|
||||
i = 0;
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
}
|
||||
|
||||
if (likely(rx_ring->next_to_use != i)) {
|
||||
rx_ring->next_to_use = i;
|
||||
if (unlikely(i-- == 0))
|
||||
i = (rx_ring->count - 1);
|
||||
|
||||
/* Force memory writes to complete before letting h/w
|
||||
* know there are new descriptors to fetch. (Only
|
||||
* applicable for weak-ordered memory model archs,
|
||||
|
@ -3948,12 +4046,6 @@ e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
|
|||
wmb();
|
||||
writel(i, adapter->hw.hw_addr + rx_ring->rdt);
|
||||
}
|
||||
|
||||
if(unlikely(++i == rx_ring->count)) i = 0;
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
}
|
||||
|
||||
rx_ring->next_to_use = i;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3988,8 +4080,10 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
|
|||
if (likely(!ps_page->ps_page[j])) {
|
||||
ps_page->ps_page[j] =
|
||||
alloc_page(GFP_ATOMIC);
|
||||
if (unlikely(!ps_page->ps_page[j]))
|
||||
if (unlikely(!ps_page->ps_page[j])) {
|
||||
adapter->alloc_rx_buff_failed++;
|
||||
goto no_buffers;
|
||||
}
|
||||
ps_page_dma->ps_page_dma[j] =
|
||||
pci_map_page(pdev,
|
||||
ps_page->ps_page[j],
|
||||
|
@ -4008,8 +4102,10 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
|
|||
|
||||
skb = dev_alloc_skb(adapter->rx_ps_bsize0 + NET_IP_ALIGN);
|
||||
|
||||
if(unlikely(!skb))
|
||||
if (unlikely(!skb)) {
|
||||
adapter->alloc_rx_buff_failed++;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Make buffer alignment 2 beyond a 16 byte boundary
|
||||
* this will result in a 16 byte aligned IP header after
|
||||
|
@ -4027,7 +4123,17 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
|
|||
|
||||
rx_desc->read.buffer_addr[0] = cpu_to_le64(buffer_info->dma);
|
||||
|
||||
if(unlikely((i & ~(E1000_RX_BUFFER_WRITE - 1)) == i)) {
|
||||
if (unlikely(++i == rx_ring->count)) i = 0;
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
ps_page = &rx_ring->ps_page[i];
|
||||
ps_page_dma = &rx_ring->ps_page_dma[i];
|
||||
}
|
||||
|
||||
no_buffers:
|
||||
if (likely(rx_ring->next_to_use != i)) {
|
||||
rx_ring->next_to_use = i;
|
||||
if (unlikely(i-- == 0)) i = (rx_ring->count - 1);
|
||||
|
||||
/* Force memory writes to complete before letting h/w
|
||||
* know there are new descriptors to fetch. (Only
|
||||
* applicable for weak-ordered memory model archs,
|
||||
|
@ -4039,15 +4145,6 @@ e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
|
|||
*/
|
||||
writel(i<<1, adapter->hw.hw_addr + rx_ring->rdt);
|
||||
}
|
||||
|
||||
if(unlikely(++i == rx_ring->count)) i = 0;
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
ps_page = &rx_ring->ps_page[i];
|
||||
ps_page_dma = &rx_ring->ps_page_dma[i];
|
||||
}
|
||||
|
||||
no_buffers:
|
||||
rx_ring->next_to_use = i;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4326,6 +4423,7 @@ e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid)
|
|||
{
|
||||
struct e1000_adapter *adapter = netdev_priv(netdev);
|
||||
uint32_t vfta, index;
|
||||
|
||||
if ((adapter->hw.mng_cookie.status &
|
||||
E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) &&
|
||||
(vid == adapter->mng_vlan_id))
|
||||
|
@ -4418,6 +4516,54 @@ e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* these functions save and restore 16 or 64 dwords (64-256 bytes) of config
|
||||
* space versus the 64 bytes that pci_[save|restore]_state handle
|
||||
*/
|
||||
#define PCIE_CONFIG_SPACE_LEN 256
|
||||
#define PCI_CONFIG_SPACE_LEN 64
|
||||
static int
|
||||
e1000_pci_save_state(struct e1000_adapter *adapter)
|
||||
{
|
||||
struct pci_dev *dev = adapter->pdev;
|
||||
int size;
|
||||
int i;
|
||||
if (adapter->hw.mac_type >= e1000_82571)
|
||||
size = PCIE_CONFIG_SPACE_LEN;
|
||||
else
|
||||
size = PCI_CONFIG_SPACE_LEN;
|
||||
|
||||
WARN_ON(adapter->config_space != NULL);
|
||||
|
||||
adapter->config_space = kmalloc(size, GFP_KERNEL);
|
||||
if (!adapter->config_space) {
|
||||
DPRINTK(PROBE, ERR, "unable to allocate %d bytes\n", size);
|
||||
return -ENOMEM;
|
||||
}
|
||||
for (i = 0; i < (size / 4); i++)
|
||||
pci_read_config_dword(dev, i * 4, &adapter->config_space[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
e1000_pci_restore_state(struct e1000_adapter *adapter)
|
||||
{
|
||||
struct pci_dev *dev = adapter->pdev;
|
||||
int size;
|
||||
int i;
|
||||
if (adapter->config_space == NULL)
|
||||
return;
|
||||
if (adapter->hw.mac_type >= e1000_82571)
|
||||
size = PCIE_CONFIG_SPACE_LEN;
|
||||
else
|
||||
size = PCI_CONFIG_SPACE_LEN;
|
||||
for (i = 0; i < (size / 4); i++)
|
||||
pci_write_config_dword(dev, i * 4, adapter->config_space[i]);
|
||||
kfree(adapter->config_space);
|
||||
adapter->config_space = NULL;
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static int
|
||||
e1000_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
{
|
||||
|
@ -4432,6 +4578,14 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
if (netif_running(netdev))
|
||||
e1000_down(adapter);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/* implement our own version of pci_save_state(pdev) because pci
|
||||
* express adapters have larger 256 byte config spaces */
|
||||
retval = e1000_pci_save_state(adapter);
|
||||
if (retval)
|
||||
return retval;
|
||||
#endif
|
||||
|
||||
status = E1000_READ_REG(&adapter->hw, STATUS);
|
||||
if (status & E1000_STATUS_LU)
|
||||
wufc &= ~E1000_WUFC_LNKC;
|
||||
|
@ -4488,8 +4642,6 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
DPRINTK(PROBE, ERR, "Error enabling D3 cold wake\n");
|
||||
}
|
||||
|
||||
pci_save_state(pdev);
|
||||
|
||||
if (adapter->hw.mac_type >= e1000_82540 &&
|
||||
adapter->hw.media_type == e1000_media_type_copper) {
|
||||
manc = E1000_READ_REG(&adapter->hw, MANC);
|
||||
|
@ -4518,6 +4670,7 @@ e1000_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int
|
||||
e1000_resume(struct pci_dev *pdev)
|
||||
{
|
||||
|
@ -4529,6 +4682,7 @@ e1000_resume(struct pci_dev *pdev)
|
|||
retval = pci_set_power_state(pdev, PCI_D0);
|
||||
if (retval)
|
||||
DPRINTK(PROBE, ERR, "Error in setting power state\n");
|
||||
e1000_pci_restore_state(adapter);
|
||||
ret_val = pci_enable_device(pdev);
|
||||
pci_set_master(pdev);
|
||||
|
||||
|
|
|
@ -69,8 +69,8 @@
|
|||
|
||||
#define DRV_MODULE_NAME "tg3"
|
||||
#define PFX DRV_MODULE_NAME ": "
|
||||
#define DRV_MODULE_VERSION "3.47"
|
||||
#define DRV_MODULE_RELDATE "Dec 28, 2005"
|
||||
#define DRV_MODULE_VERSION "3.48"
|
||||
#define DRV_MODULE_RELDATE "Jan 16, 2006"
|
||||
|
||||
#define TG3_DEF_MAC_MODE 0
|
||||
#define TG3_DEF_RX_MODE 0
|
||||
|
@ -1325,9 +1325,11 @@ static int tg3_set_power_state(struct tg3 *tp, int state)
|
|||
val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1);
|
||||
tw32(0x7d00, val);
|
||||
if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) {
|
||||
tg3_nvram_lock(tp);
|
||||
int err;
|
||||
|
||||
err = tg3_nvram_lock(tp);
|
||||
tg3_halt_cpu(tp, RX_CPU_BASE);
|
||||
tw32_f(NVRAM_SWARB, SWARB_REQ_CLR0);
|
||||
if (!err)
|
||||
tg3_nvram_unlock(tp);
|
||||
}
|
||||
}
|
||||
|
@ -4193,24 +4195,33 @@ static int tg3_nvram_lock(struct tg3 *tp)
|
|||
if (tp->tg3_flags & TG3_FLAG_NVRAM) {
|
||||
int i;
|
||||
|
||||
if (tp->nvram_lock_cnt == 0) {
|
||||
tw32(NVRAM_SWARB, SWARB_REQ_SET1);
|
||||
for (i = 0; i < 8000; i++) {
|
||||
if (tr32(NVRAM_SWARB) & SWARB_GNT1)
|
||||
break;
|
||||
udelay(20);
|
||||
}
|
||||
if (i == 8000)
|
||||
if (i == 8000) {
|
||||
tw32(NVRAM_SWARB, SWARB_REQ_CLR1);
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
tp->nvram_lock_cnt++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* tp->lock is held. */
|
||||
static void tg3_nvram_unlock(struct tg3 *tp)
|
||||
{
|
||||
if (tp->tg3_flags & TG3_FLAG_NVRAM)
|
||||
if (tp->tg3_flags & TG3_FLAG_NVRAM) {
|
||||
if (tp->nvram_lock_cnt > 0)
|
||||
tp->nvram_lock_cnt--;
|
||||
if (tp->nvram_lock_cnt == 0)
|
||||
tw32_f(NVRAM_SWARB, SWARB_REQ_CLR1);
|
||||
}
|
||||
}
|
||||
|
||||
/* tp->lock is held. */
|
||||
static void tg3_enable_nvram_access(struct tg3 *tp)
|
||||
|
@ -4320,8 +4331,13 @@ static int tg3_chip_reset(struct tg3 *tp)
|
|||
void (*write_op)(struct tg3 *, u32, u32);
|
||||
int i;
|
||||
|
||||
if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X))
|
||||
if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) {
|
||||
tg3_nvram_lock(tp);
|
||||
/* No matching tg3_nvram_unlock() after this because
|
||||
* chip reset below will undo the nvram lock.
|
||||
*/
|
||||
tp->nvram_lock_cnt = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* We must avoid the readl() that normally takes place.
|
||||
|
@ -4717,6 +4733,10 @@ static int tg3_halt_cpu(struct tg3 *tp, u32 offset)
|
|||
(offset == RX_CPU_BASE ? "RX" : "TX"));
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Clear firmware's nvram arbitration. */
|
||||
if (tp->tg3_flags & TG3_FLAG_NVRAM)
|
||||
tw32(NVRAM_SWARB, SWARB_REQ_CLR0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -4736,7 +4756,7 @@ struct fw_info {
|
|||
static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_base,
|
||||
int cpu_scratch_size, struct fw_info *info)
|
||||
{
|
||||
int err, i;
|
||||
int err, lock_err, i;
|
||||
void (*write_op)(struct tg3 *, u32, u32);
|
||||
|
||||
if (cpu_base == TX_CPU_BASE &&
|
||||
|
@ -4755,8 +4775,9 @@ static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_b
|
|||
/* It is possible that bootcode is still loading at this point.
|
||||
* Get the nvram lock first before halting the cpu.
|
||||
*/
|
||||
tg3_nvram_lock(tp);
|
||||
lock_err = tg3_nvram_lock(tp);
|
||||
err = tg3_halt_cpu(tp, cpu_base);
|
||||
if (!lock_err)
|
||||
tg3_nvram_unlock(tp);
|
||||
if (err)
|
||||
goto out;
|
||||
|
@ -8182,7 +8203,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
|
|||
data[1] = 1;
|
||||
}
|
||||
if (etest->flags & ETH_TEST_FL_OFFLINE) {
|
||||
int irq_sync = 0;
|
||||
int err, irq_sync = 0;
|
||||
|
||||
if (netif_running(dev)) {
|
||||
tg3_netif_stop(tp);
|
||||
|
@ -8192,10 +8213,11 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
|
|||
tg3_full_lock(tp, irq_sync);
|
||||
|
||||
tg3_halt(tp, RESET_KIND_SUSPEND, 1);
|
||||
tg3_nvram_lock(tp);
|
||||
err = tg3_nvram_lock(tp);
|
||||
tg3_halt_cpu(tp, RX_CPU_BASE);
|
||||
if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
|
||||
tg3_halt_cpu(tp, TX_CPU_BASE);
|
||||
if (!err)
|
||||
tg3_nvram_unlock(tp);
|
||||
|
||||
if (tg3_test_registers(tp) != 0) {
|
||||
|
@ -8588,7 +8610,11 @@ static void __devinit tg3_nvram_init(struct tg3 *tp)
|
|||
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) {
|
||||
tp->tg3_flags |= TG3_FLAG_NVRAM;
|
||||
|
||||
tg3_nvram_lock(tp);
|
||||
if (tg3_nvram_lock(tp)) {
|
||||
printk(KERN_WARNING PFX "%s: Cannot get nvarm lock, "
|
||||
"tg3_nvram_init failed.\n", tp->dev->name);
|
||||
return;
|
||||
}
|
||||
tg3_enable_nvram_access(tp);
|
||||
|
||||
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752)
|
||||
|
@ -8686,7 +8712,9 @@ static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val)
|
|||
if (offset > NVRAM_ADDR_MSK)
|
||||
return -EINVAL;
|
||||
|
||||
tg3_nvram_lock(tp);
|
||||
ret = tg3_nvram_lock(tp);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
tg3_enable_nvram_access(tp);
|
||||
|
||||
|
@ -8785,10 +8813,6 @@ static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len,
|
|||
|
||||
offset = offset + (pagesize - page_off);
|
||||
|
||||
/* Nvram lock released by tg3_nvram_read() above,
|
||||
* so need to get it again.
|
||||
*/
|
||||
tg3_nvram_lock(tp);
|
||||
tg3_enable_nvram_access(tp);
|
||||
|
||||
/*
|
||||
|
@ -8925,7 +8949,9 @@ static int tg3_nvram_write_block(struct tg3 *tp, u32 offset, u32 len, u8 *buf)
|
|||
else {
|
||||
u32 grc_mode;
|
||||
|
||||
tg3_nvram_lock(tp);
|
||||
ret = tg3_nvram_lock(tp);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
tg3_enable_nvram_access(tp);
|
||||
if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) &&
|
||||
|
|
|
@ -2275,6 +2275,7 @@ struct tg3 {
|
|||
dma_addr_t stats_mapping;
|
||||
struct work_struct reset_task;
|
||||
|
||||
int nvram_lock_cnt;
|
||||
u32 nvram_size;
|
||||
u32 nvram_pagesize;
|
||||
u32 nvram_jedecnum;
|
||||
|
|
|
@ -1142,6 +1142,9 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev)
|
|||
case 0x27c4:
|
||||
ich = 7;
|
||||
break;
|
||||
case 0x2828: /* ICH8M */
|
||||
ich = 8;
|
||||
break;
|
||||
default:
|
||||
/* we do not handle this PCI device */
|
||||
return;
|
||||
|
@ -1161,7 +1164,7 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev)
|
|||
else
|
||||
return; /* not in combined mode */
|
||||
} else {
|
||||
WARN_ON((ich != 6) && (ich != 7));
|
||||
WARN_ON((ich != 6) && (ich != 7) && (ich != 8));
|
||||
tmp &= 0x3; /* interesting bits 1:0 */
|
||||
if (tmp & (1 << 0))
|
||||
comb = (1 << 2); /* PATA port 0, SATA port 1 */
|
||||
|
|
|
@ -276,6 +276,16 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
|||
board_ahci }, /* ESB2 */
|
||||
{ PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_ahci }, /* ICH7-M DH */
|
||||
{ PCI_VENDOR_ID_INTEL, 0x2821, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_ahci }, /* ICH8 */
|
||||
{ PCI_VENDOR_ID_INTEL, 0x2822, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_ahci }, /* ICH8 */
|
||||
{ PCI_VENDOR_ID_INTEL, 0x2824, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_ahci }, /* ICH8 */
|
||||
{ PCI_VENDOR_ID_INTEL, 0x2829, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_ahci }, /* ICH8M */
|
||||
{ PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_ahci }, /* ICH8M */
|
||||
{ } /* terminate list */
|
||||
};
|
||||
|
||||
|
|
|
@ -157,6 +157,9 @@ static const struct pci_device_id piix_pci_tbl[] = {
|
|||
{ 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
|
||||
{ 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
|
||||
{ 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
|
||||
{ 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
|
||||
{ 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
|
||||
{ 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
|
||||
|
||||
{ } /* terminate list */
|
||||
};
|
||||
|
|
|
@ -611,6 +611,10 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc)
|
|||
if (dev->flags & ATA_DFLAG_PIO) {
|
||||
tf->protocol = ATA_PROT_PIO;
|
||||
index = dev->multi_count ? 0 : 8;
|
||||
} else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) {
|
||||
/* Unable to use DMA due to host limitation */
|
||||
tf->protocol = ATA_PROT_PIO;
|
||||
index = dev->multi_count ? 0 : 4;
|
||||
} else {
|
||||
tf->protocol = ATA_PROT_DMA;
|
||||
index = 16;
|
||||
|
@ -1051,18 +1055,22 @@ static unsigned int ata_pio_modes(const struct ata_device *adev)
|
|||
{
|
||||
u16 modes;
|
||||
|
||||
/* Usual case. Word 53 indicates word 88 is valid */
|
||||
if (adev->id[ATA_ID_FIELD_VALID] & (1 << 2)) {
|
||||
/* Usual case. Word 53 indicates word 64 is valid */
|
||||
if (adev->id[ATA_ID_FIELD_VALID] & (1 << 1)) {
|
||||
modes = adev->id[ATA_ID_PIO_MODES] & 0x03;
|
||||
modes <<= 3;
|
||||
modes |= 0x7;
|
||||
return modes;
|
||||
}
|
||||
|
||||
/* If word 88 isn't valid then Word 51 holds the PIO timing number
|
||||
for the maximum. Turn it into a mask and return it */
|
||||
modes = (2 << (adev->id[ATA_ID_OLD_PIO_MODES] & 0xFF)) - 1 ;
|
||||
/* If word 64 isn't valid then Word 51 high byte holds the PIO timing
|
||||
number for the maximum. Turn it into a mask and return it */
|
||||
modes = (2 << ((adev->id[ATA_ID_OLD_PIO_MODES] >> 8) & 0xFF)) - 1 ;
|
||||
return modes;
|
||||
/* But wait.. there's more. Design your standards by committee and
|
||||
you too can get a free iordy field to process. However its the
|
||||
speeds not the modes that are supported... Note drivers using the
|
||||
timing API will get this right anyway */
|
||||
}
|
||||
|
||||
struct ata_exec_internal_arg {
|
||||
|
@ -1164,6 +1172,39 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
|
|||
return AC_ERR_OTHER;
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_pio_need_iordy - check if iordy needed
|
||||
* @adev: ATA device
|
||||
*
|
||||
* Check if the current speed of the device requires IORDY. Used
|
||||
* by various controllers for chip configuration.
|
||||
*/
|
||||
|
||||
unsigned int ata_pio_need_iordy(const struct ata_device *adev)
|
||||
{
|
||||
int pio;
|
||||
int speed = adev->pio_mode - XFER_PIO_0;
|
||||
|
||||
if (speed < 2)
|
||||
return 0;
|
||||
if (speed > 2)
|
||||
return 1;
|
||||
|
||||
/* If we have no drive specific rule, then PIO 2 is non IORDY */
|
||||
|
||||
if (adev->id[ATA_ID_FIELD_VALID] & 2) { /* EIDE */
|
||||
pio = adev->id[ATA_ID_EIDE_PIO];
|
||||
/* Is the speed faster than the drive allows non IORDY ? */
|
||||
if (pio) {
|
||||
/* This is cycle times not frequency - watch the logic! */
|
||||
if (pio > 240) /* PIO2 is 240nS per cycle */
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_dev_identify - obtain IDENTIFY x DEVICE page
|
||||
* @ap: port on which device we wish to probe resides
|
||||
|
@ -1415,7 +1456,7 @@ void ata_dev_config(struct ata_port *ap, unsigned int i)
|
|||
ap->udma_mask &= ATA_UDMA5;
|
||||
ap->host->max_sectors = ATA_MAX_SECTORS;
|
||||
ap->host->hostt->max_sectors = ATA_MAX_SECTORS;
|
||||
ap->device->flags |= ATA_DFLAG_LOCK_SECTORS;
|
||||
ap->device[i].flags |= ATA_DFLAG_LOCK_SECTORS;
|
||||
}
|
||||
|
||||
if (ap->ops->dev_config)
|
||||
|
@ -3056,10 +3097,21 @@ static void ata_pio_data_xfer(struct ata_port *ap, unsigned char *buf,
|
|||
static void ata_data_xfer(struct ata_port *ap, unsigned char *buf,
|
||||
unsigned int buflen, int do_write)
|
||||
{
|
||||
/* Make the crap hardware pay the costs not the good stuff */
|
||||
if (unlikely(ap->flags & ATA_FLAG_IRQ_MASK)) {
|
||||
unsigned long flags;
|
||||
local_irq_save(flags);
|
||||
if (ap->flags & ATA_FLAG_MMIO)
|
||||
ata_mmio_data_xfer(ap, buf, buflen, do_write);
|
||||
else
|
||||
ata_pio_data_xfer(ap, buf, buflen, do_write);
|
||||
local_irq_restore(flags);
|
||||
} else {
|
||||
if (ap->flags & ATA_FLAG_MMIO)
|
||||
ata_mmio_data_xfer(ap, buf, buflen, do_write);
|
||||
else
|
||||
ata_pio_data_xfer(ap, buf, buflen, do_write);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5122,6 +5174,7 @@ EXPORT_SYMBOL_GPL(ata_dev_id_string);
|
|||
EXPORT_SYMBOL_GPL(ata_dev_config);
|
||||
EXPORT_SYMBOL_GPL(ata_scsi_simulate);
|
||||
|
||||
EXPORT_SYMBOL_GPL(ata_pio_need_iordy);
|
||||
EXPORT_SYMBOL_GPL(ata_timing_compute);
|
||||
EXPORT_SYMBOL_GPL(ata_timing_merge);
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ enum {
|
|||
board_2037x = 0, /* FastTrak S150 TX2plus */
|
||||
board_20319 = 1, /* FastTrak S150 TX4 */
|
||||
board_20619 = 2, /* FastTrak TX4000 */
|
||||
board_20771 = 3, /* FastTrak TX2300 */
|
||||
|
||||
PDC_HAS_PATA = (1 << 1), /* PDC20375 has PATA */
|
||||
|
||||
|
@ -190,6 +191,16 @@ static const struct ata_port_info pdc_port_info[] = {
|
|||
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
|
||||
.port_ops = &pdc_pata_ops,
|
||||
},
|
||||
|
||||
/* board_20771 */
|
||||
{
|
||||
.sht = &pdc_ata_sht,
|
||||
.host_flags = PDC_COMMON_FLAGS | ATA_FLAG_SATA,
|
||||
.pio_mask = 0x1f, /* pio0-4 */
|
||||
.mwdma_mask = 0x07, /* mwdma0-2 */
|
||||
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
|
||||
.port_ops = &pdc_sata_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct pci_device_id pdc_ata_pci_tbl[] = {
|
||||
|
@ -226,6 +237,8 @@ static const struct pci_device_id pdc_ata_pci_tbl[] = {
|
|||
{ PCI_VENDOR_ID_PROMISE, 0x6629, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_20619 },
|
||||
|
||||
{ PCI_VENDOR_ID_PROMISE, 0x3570, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
board_20771 },
|
||||
{ } /* terminate list */
|
||||
};
|
||||
|
||||
|
@ -706,6 +719,9 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
|
|||
case board_2037x:
|
||||
probe_ent->n_ports = 2;
|
||||
break;
|
||||
case board_20771:
|
||||
probe_ent->n_ports = 2;
|
||||
break;
|
||||
case board_20619:
|
||||
probe_ent->n_ports = 4;
|
||||
|
||||
|
|
|
@ -470,6 +470,7 @@ static const struct pci_device_id k2_sata_pci_tbl[] = {
|
|||
{ 0x1166, 0x0241, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
|
||||
{ 0x1166, 0x0242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
|
||||
{ 0x1166, 0x024a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
|
||||
{ 0x1166, 0x024b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -199,8 +199,7 @@ struct fbcmap32 {
|
|||
#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
|
||||
#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)
|
||||
|
||||
static int fbiogetputcmap(struct file *file, struct fb_info *info,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct fbcmap32 __user *argp = (void __user *)arg;
|
||||
struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p));
|
||||
|
@ -236,8 +235,7 @@ struct fbcursor32 {
|
|||
#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
|
||||
#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)
|
||||
|
||||
static int fbiogscursor(struct file *file, struct fb_info *info,
|
||||
unsigned long arg)
|
||||
static int fbiogscursor(struct fb_info *info, unsigned long arg)
|
||||
{
|
||||
struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p));
|
||||
struct fbcursor32 __user *argp = (void __user *)arg;
|
||||
|
@ -263,8 +261,7 @@ static int fbiogscursor(struct file *file, struct fb_info *info,
|
|||
return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p);
|
||||
}
|
||||
|
||||
long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
switch (cmd) {
|
||||
case FBIOGTYPE:
|
||||
|
|
|
@ -20,7 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
|
|||
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
|
||||
struct fb_info *info,
|
||||
int type, int fb_depth, unsigned long fb_size);
|
||||
long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
|
||||
#endif /* _SBUSLIB_H */
|
||||
|
|
|
@ -336,24 +336,47 @@ static inline int bio_add_buffer(struct bio *bio, struct buffer_head *bh)
|
|||
}
|
||||
|
||||
/*
|
||||
* Submit all of the bios for all of the ioends we have saved up,
|
||||
* covering the initial writepage page and also any probed pages.
|
||||
* Submit all of the bios for all of the ioends we have saved up, covering the
|
||||
* initial writepage page and also any probed pages.
|
||||
*
|
||||
* Because we may have multiple ioends spanning a page, we need to start
|
||||
* writeback on all the buffers before we submit them for I/O. If we mark the
|
||||
* buffers as we got, then we can end up with a page that only has buffers
|
||||
* marked async write and I/O complete on can occur before we mark the other
|
||||
* buffers async write.
|
||||
*
|
||||
* The end result of this is that we trip a bug in end_page_writeback() because
|
||||
* we call it twice for the one page as the code in end_buffer_async_write()
|
||||
* assumes that all buffers on the page are started at the same time.
|
||||
*
|
||||
* The fix is two passes across the ioend list - one to start writeback on the
|
||||
* bufferheads, and then the second one submit them for I/O.
|
||||
*/
|
||||
STATIC void
|
||||
xfs_submit_ioend(
|
||||
xfs_ioend_t *ioend)
|
||||
{
|
||||
xfs_ioend_t *head = ioend;
|
||||
xfs_ioend_t *next;
|
||||
struct buffer_head *bh;
|
||||
struct bio *bio;
|
||||
sector_t lastblock = 0;
|
||||
|
||||
/* Pass 1 - start writeback */
|
||||
do {
|
||||
next = ioend->io_list;
|
||||
for (bh = ioend->io_buffer_head; bh; bh = bh->b_private) {
|
||||
xfs_start_buffer_writeback(bh);
|
||||
}
|
||||
} while ((ioend = next) != NULL);
|
||||
|
||||
/* Pass 2 - submit I/O */
|
||||
ioend = head;
|
||||
do {
|
||||
next = ioend->io_list;
|
||||
bio = NULL;
|
||||
|
||||
for (bh = ioend->io_buffer_head; bh; bh = bh->b_private) {
|
||||
xfs_start_buffer_writeback(bh);
|
||||
|
||||
if (!bio) {
|
||||
retry:
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
/* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k
|
||||
* alignment is sufficient to prevent this */
|
||||
struct __attribute__((__aligned__(0x400))) lppaca {
|
||||
struct lppaca {
|
||||
//=============================================================================
|
||||
// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
|
||||
// NOTE: The xDynXyz fields are fields that will be dynamically changed by
|
||||
|
@ -129,7 +129,7 @@ struct __attribute__((__aligned__(0x400))) lppaca {
|
|||
// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data
|
||||
//=============================================================================
|
||||
u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF
|
||||
};
|
||||
} __attribute__((__aligned__(0x400)));
|
||||
|
||||
extern struct lppaca lppaca[];
|
||||
|
||||
|
|
|
@ -228,6 +228,7 @@ extern void dump_stack(void);
|
|||
ntohs((addr).s6_addr16[6]), \
|
||||
ntohs((addr).s6_addr16[7])
|
||||
#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
|
||||
#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x"
|
||||
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
#define HIPQUAD(addr) \
|
||||
|
|
|
@ -126,16 +126,19 @@ enum {
|
|||
|
||||
ATA_FLAG_SUSPENDED = (1 << 12), /* port is suspended */
|
||||
|
||||
ATA_FLAG_PIO_LBA48 = (1 << 13), /* Host DMA engine is LBA28 only */
|
||||
ATA_FLAG_IRQ_MASK = (1 << 14), /* Mask IRQ in PIO xfers */
|
||||
|
||||
ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
|
||||
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
|
||||
ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */
|
||||
ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
|
||||
|
||||
/* various lengths of time */
|
||||
ATA_TMOUT_EDD = 5 * HZ, /* hueristic */
|
||||
ATA_TMOUT_EDD = 5 * HZ, /* heuristic */
|
||||
ATA_TMOUT_PIO = 30 * HZ,
|
||||
ATA_TMOUT_BOOT = 30 * HZ, /* hueristic */
|
||||
ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */
|
||||
ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */
|
||||
ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */
|
||||
ATA_TMOUT_CDB = 30 * HZ,
|
||||
ATA_TMOUT_CDB_QUICK = 5 * HZ,
|
||||
ATA_TMOUT_INTERNAL = 30 * HZ,
|
||||
|
@ -499,6 +502,8 @@ extern int ata_scsi_slave_config(struct scsi_device *sdev);
|
|||
/*
|
||||
* Timing helpers
|
||||
*/
|
||||
|
||||
extern unsigned int ata_pio_need_iordy(const struct ata_device *);
|
||||
extern int ata_timing_compute(struct ata_device *, unsigned short,
|
||||
struct ata_timing *, int, int);
|
||||
extern void ata_timing_merge(const struct ata_timing *,
|
||||
|
|
|
@ -18,13 +18,4 @@ struct ip6t_ah
|
|||
#define IP6T_AH_INV_LEN 0x02 /* Invert the sense of length. */
|
||||
#define IP6T_AH_INV_MASK 0x03 /* All possible flags. */
|
||||
|
||||
#define MASK_HOPOPTS 128
|
||||
#define MASK_DSTOPTS 64
|
||||
#define MASK_ROUTING 32
|
||||
#define MASK_FRAGMENT 16
|
||||
#define MASK_AH 8
|
||||
#define MASK_ESP 4
|
||||
#define MASK_NONE 2
|
||||
#define MASK_PROTO 1
|
||||
|
||||
#endif /*_IP6T_AH_H*/
|
||||
|
|
|
@ -7,15 +7,6 @@ struct ip6t_esp
|
|||
u_int8_t invflags; /* Inverse flags */
|
||||
};
|
||||
|
||||
#define MASK_HOPOPTS 128
|
||||
#define MASK_DSTOPTS 64
|
||||
#define MASK_ROUTING 32
|
||||
#define MASK_FRAGMENT 16
|
||||
#define MASK_AH 8
|
||||
#define MASK_ESP 4
|
||||
#define MASK_NONE 2
|
||||
#define MASK_PROTO 1
|
||||
|
||||
/* Values for "invflags" field in struct ip6t_esp. */
|
||||
#define IP6T_ESP_INV_SPI 0x01 /* Invert the sense of spi. */
|
||||
#define IP6T_ESP_INV_MASK 0x01 /* All possible flags. */
|
||||
|
|
|
@ -21,13 +21,4 @@ struct ip6t_frag
|
|||
#define IP6T_FRAG_INV_LEN 0x02 /* Invert the sense of length. */
|
||||
#define IP6T_FRAG_INV_MASK 0x03 /* All possible flags. */
|
||||
|
||||
#define MASK_HOPOPTS 128
|
||||
#define MASK_DSTOPTS 64
|
||||
#define MASK_ROUTING 32
|
||||
#define MASK_FRAGMENT 16
|
||||
#define MASK_AH 8
|
||||
#define MASK_ESP 4
|
||||
#define MASK_NONE 2
|
||||
#define MASK_PROTO 1
|
||||
|
||||
#endif /*_IP6T_FRAG_H*/
|
||||
|
|
|
@ -20,13 +20,4 @@ struct ip6t_opts
|
|||
#define IP6T_OPTS_INV_LEN 0x01 /* Invert the sense of length. */
|
||||
#define IP6T_OPTS_INV_MASK 0x01 /* All possible flags. */
|
||||
|
||||
#define MASK_HOPOPTS 128
|
||||
#define MASK_DSTOPTS 64
|
||||
#define MASK_ROUTING 32
|
||||
#define MASK_FRAGMENT 16
|
||||
#define MASK_AH 8
|
||||
#define MASK_ESP 4
|
||||
#define MASK_NONE 2
|
||||
#define MASK_PROTO 1
|
||||
|
||||
#endif /*_IP6T_OPTS_H*/
|
||||
|
|
|
@ -30,13 +30,4 @@ struct ip6t_rt
|
|||
#define IP6T_RT_INV_LEN 0x04 /* Invert the sense of length. */
|
||||
#define IP6T_RT_INV_MASK 0x07 /* All possible flags. */
|
||||
|
||||
#define MASK_HOPOPTS 128
|
||||
#define MASK_DSTOPTS 64
|
||||
#define MASK_ROUTING 32
|
||||
#define MASK_FRAGMENT 16
|
||||
#define MASK_AH 8
|
||||
#define MASK_ESP 4
|
||||
#define MASK_NONE 2
|
||||
#define MASK_PROTO 1
|
||||
|
||||
#endif /*_IP6T_RT_H*/
|
||||
|
|
|
@ -926,7 +926,7 @@ static inline int skb_tailroom(const struct sk_buff *skb)
|
|||
* Increase the headroom of an empty &sk_buff by reducing the tail
|
||||
* room. This is only allowed for an empty buffer.
|
||||
*/
|
||||
static inline void skb_reserve(struct sk_buff *skb, unsigned int len)
|
||||
static inline void skb_reserve(struct sk_buff *skb, int len)
|
||||
{
|
||||
skb->data += len;
|
||||
skb->tail += len;
|
||||
|
|
|
@ -92,7 +92,9 @@ static int ebt_ip_check(const char *tablename, unsigned int hookmask,
|
|||
if (info->invflags & EBT_IP_PROTO)
|
||||
return -EINVAL;
|
||||
if (info->protocol != IPPROTO_TCP &&
|
||||
info->protocol != IPPROTO_UDP)
|
||||
info->protocol != IPPROTO_UDP &&
|
||||
info->protocol != IPPROTO_SCTP &&
|
||||
info->protocol != IPPROTO_DCCP)
|
||||
return -EINVAL;
|
||||
}
|
||||
if (info->bitmask & EBT_IP_DPORT && info->dport[0] > info->dport[1])
|
||||
|
|
|
@ -95,7 +95,9 @@ ebt_log_packet(unsigned int pf, unsigned int hooknum,
|
|||
"tos=0x%02X, IP proto=%d", NIPQUAD(ih->saddr),
|
||||
NIPQUAD(ih->daddr), ih->tos, ih->protocol);
|
||||
if (ih->protocol == IPPROTO_TCP ||
|
||||
ih->protocol == IPPROTO_UDP) {
|
||||
ih->protocol == IPPROTO_UDP ||
|
||||
ih->protocol == IPPROTO_SCTP ||
|
||||
ih->protocol == IPPROTO_DCCP) {
|
||||
struct tcpudphdr _ports, *pptr;
|
||||
|
||||
pptr = skb_header_pointer(skb, ih->ihl*4,
|
||||
|
|
|
@ -74,7 +74,6 @@ static inline void *load_pointer(struct sk_buff *skb, int k,
|
|||
* filtering, filter is the array of filter instructions, and
|
||||
* len is the number of filter blocks in the array.
|
||||
*/
|
||||
|
||||
unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen)
|
||||
{
|
||||
struct sock_filter *fentry; /* We walk down these */
|
||||
|
|
|
@ -703,7 +703,7 @@ int netpoll_setup(struct netpoll *np)
|
|||
}
|
||||
}
|
||||
|
||||
if (!memcmp(np->local_mac, "\0\0\0\0\0\0", 6) && ndev->dev_addr)
|
||||
if (is_zero_ether_addr(np->local_mac) && ndev->dev_addr)
|
||||
memcpy(np->local_mac, ndev->dev_addr, 6);
|
||||
|
||||
if (!np->local_ip) {
|
||||
|
|
|
@ -139,6 +139,7 @@
|
|||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <net/checksum.h>
|
||||
#include <net/ipv6.h>
|
||||
#include <net/addrconf.h>
|
||||
|
@ -281,8 +282,8 @@ struct pktgen_dev {
|
|||
__u32 src_mac_count; /* How many MACs to iterate through */
|
||||
__u32 dst_mac_count; /* How many MACs to iterate through */
|
||||
|
||||
unsigned char dst_mac[6];
|
||||
unsigned char src_mac[6];
|
||||
unsigned char dst_mac[ETH_ALEN];
|
||||
unsigned char src_mac[ETH_ALEN];
|
||||
|
||||
__u32 cur_dst_mac_offset;
|
||||
__u32 cur_src_mac_offset;
|
||||
|
@ -594,16 +595,9 @@ static int pktgen_if_show(struct seq_file *seq, void *v)
|
|||
|
||||
seq_puts(seq, " src_mac: ");
|
||||
|
||||
if ((pkt_dev->src_mac[0] == 0) &&
|
||||
(pkt_dev->src_mac[1] == 0) &&
|
||||
(pkt_dev->src_mac[2] == 0) &&
|
||||
(pkt_dev->src_mac[3] == 0) &&
|
||||
(pkt_dev->src_mac[4] == 0) &&
|
||||
(pkt_dev->src_mac[5] == 0))
|
||||
|
||||
if (is_zero_ether_addr(pkt_dev->src_mac))
|
||||
for (i = 0; i < 6; i++)
|
||||
seq_printf(seq, "%02X%s", pkt_dev->odev->dev_addr[i], i == 5 ? " " : ":");
|
||||
|
||||
else
|
||||
for (i = 0; i < 6; i++)
|
||||
seq_printf(seq, "%02X%s", pkt_dev->src_mac[i], i == 5 ? " " : ":");
|
||||
|
@ -1189,9 +1183,9 @@ static ssize_t pktgen_if_write(struct file *file, const char __user *user_buffer
|
|||
}
|
||||
if (!strcmp(name, "dst_mac")) {
|
||||
char *v = valstr;
|
||||
unsigned char old_dmac[6];
|
||||
unsigned char old_dmac[ETH_ALEN];
|
||||
unsigned char *m = pkt_dev->dst_mac;
|
||||
memcpy(old_dmac, pkt_dev->dst_mac, 6);
|
||||
memcpy(old_dmac, pkt_dev->dst_mac, ETH_ALEN);
|
||||
|
||||
len = strn_len(&user_buffer[i], sizeof(valstr) - 1);
|
||||
if (len < 0) { return len; }
|
||||
|
@ -1220,8 +1214,8 @@ static ssize_t pktgen_if_write(struct file *file, const char __user *user_buffer
|
|||
}
|
||||
|
||||
/* Set up Dest MAC */
|
||||
if (memcmp(old_dmac, pkt_dev->dst_mac, 6) != 0)
|
||||
memcpy(&(pkt_dev->hh[0]), pkt_dev->dst_mac, 6);
|
||||
if (compare_ether_addr(old_dmac, pkt_dev->dst_mac))
|
||||
memcpy(&(pkt_dev->hh[0]), pkt_dev->dst_mac, ETH_ALEN);
|
||||
|
||||
sprintf(pg_result, "OK: dstmac");
|
||||
return count;
|
||||
|
@ -1560,17 +1554,11 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
|
|||
|
||||
/* Default to the interface's mac if not explicitly set. */
|
||||
|
||||
if ((pkt_dev->src_mac[0] == 0) &&
|
||||
(pkt_dev->src_mac[1] == 0) &&
|
||||
(pkt_dev->src_mac[2] == 0) &&
|
||||
(pkt_dev->src_mac[3] == 0) &&
|
||||
(pkt_dev->src_mac[4] == 0) &&
|
||||
(pkt_dev->src_mac[5] == 0)) {
|
||||
if (is_zero_ether_addr(pkt_dev->src_mac))
|
||||
memcpy(&(pkt_dev->hh[6]), pkt_dev->odev->dev_addr, ETH_ALEN);
|
||||
|
||||
memcpy(&(pkt_dev->hh[6]), pkt_dev->odev->dev_addr, 6);
|
||||
}
|
||||
/* Set up Dest MAC */
|
||||
memcpy(&(pkt_dev->hh[0]), pkt_dev->dst_mac, 6);
|
||||
memcpy(&(pkt_dev->hh[0]), pkt_dev->dst_mac, ETH_ALEN);
|
||||
|
||||
/* Set up pkt size */
|
||||
pkt_dev->cur_pkt_size = pkt_dev->min_pkt_size;
|
||||
|
|
|
@ -144,7 +144,7 @@ static inline int dccp_ackvec_set_buf_head_state(struct dccp_ackvec *av,
|
|||
const unsigned char state)
|
||||
{
|
||||
unsigned int gap;
|
||||
signed long new_head;
|
||||
long new_head;
|
||||
|
||||
if (av->dccpav_vec_len + packets > av->dccpav_buf_len)
|
||||
return -ENOBUFS;
|
||||
|
|
|
@ -46,7 +46,6 @@ obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o
|
|||
obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o
|
||||
|
||||
# matches
|
||||
obj-$(CONFIG_IP_NF_MATCH_HELPER) += ipt_helper.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_HASHLIMIT) += ipt_hashlimit.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_IPRANGE) += ipt_iprange.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport.o
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <linux/in.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
static DEFINE_RWLOCK(ip_ct_gre_lock);
|
||||
#define ASSERT_READ_LOCK(x)
|
||||
|
|
|
@ -95,7 +95,10 @@ match_policy_out(const struct sk_buff *skb, const struct ipt_policy_info *info)
|
|||
static int match(const struct sk_buff *skb,
|
||||
const struct net_device *in,
|
||||
const struct net_device *out,
|
||||
const void *matchinfo, int offset, int *hotdrop)
|
||||
const void *matchinfo,
|
||||
int offset,
|
||||
unsigned int protoff,
|
||||
int *hotdrop)
|
||||
{
|
||||
const struct ipt_policy_info *info = matchinfo;
|
||||
int ret;
|
||||
|
@ -113,7 +116,7 @@ static int match(const struct sk_buff *skb,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int checkentry(const char *tablename, const struct ipt_ip *ip,
|
||||
static int checkentry(const char *tablename, const void *ip_void,
|
||||
void *matchinfo, unsigned int matchsize,
|
||||
unsigned int hook_mask)
|
||||
{
|
||||
|
|
|
@ -240,9 +240,8 @@ static unsigned rt_hash_mask;
|
|||
static int rt_hash_log;
|
||||
static unsigned int rt_hash_rnd;
|
||||
|
||||
static struct rt_cache_stat *rt_cache_stat;
|
||||
#define RT_CACHE_STAT_INC(field) \
|
||||
(per_cpu_ptr(rt_cache_stat, raw_smp_processor_id())->field++)
|
||||
static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat);
|
||||
#define RT_CACHE_STAT_INC(field) (__get_cpu_var(rt_cache_stat).field++)
|
||||
|
||||
static int rt_intern_hash(unsigned hash, struct rtable *rth,
|
||||
struct rtable **res);
|
||||
|
@ -401,7 +400,7 @@ static void *rt_cpu_seq_start(struct seq_file *seq, loff_t *pos)
|
|||
if (!cpu_possible(cpu))
|
||||
continue;
|
||||
*pos = cpu+1;
|
||||
return per_cpu_ptr(rt_cache_stat, cpu);
|
||||
return &per_cpu(rt_cache_stat, cpu);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -414,7 +413,7 @@ static void *rt_cpu_seq_next(struct seq_file *seq, void *v, loff_t *pos)
|
|||
if (!cpu_possible(cpu))
|
||||
continue;
|
||||
*pos = cpu+1;
|
||||
return per_cpu_ptr(rt_cache_stat, cpu);
|
||||
return &per_cpu(rt_cache_stat, cpu);
|
||||
}
|
||||
return NULL;
|
||||
|
||||
|
@ -3160,10 +3159,6 @@ int __init ip_rt_init(void)
|
|||
ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1);
|
||||
ip_rt_max_size = (rt_hash_mask + 1) * 16;
|
||||
|
||||
rt_cache_stat = alloc_percpu(struct rt_cache_stat);
|
||||
if (!rt_cache_stat)
|
||||
return -ENOMEM;
|
||||
|
||||
devinet_init();
|
||||
ip_fib_init();
|
||||
|
||||
|
@ -3191,7 +3186,6 @@ int __init ip_rt_init(void)
|
|||
if (!proc_net_fops_create("rt_cache", S_IRUGO, &rt_cache_seq_fops) ||
|
||||
!(rtstat_pde = create_proc_entry("rt_cache", S_IRUGO,
|
||||
proc_net_stat))) {
|
||||
free_percpu(rt_cache_stat);
|
||||
return -ENOMEM;
|
||||
}
|
||||
rtstat_pde->proc_fops = &rt_cpu_seq_fops;
|
||||
|
|
|
@ -2644,7 +2644,7 @@ static int if6_seq_show(struct seq_file *seq, void *v)
|
|||
{
|
||||
struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
|
||||
seq_printf(seq,
|
||||
NIP6_FMT " %02x %02x %02x %02x %8s\n",
|
||||
NIP6_SEQFMT " %02x %02x %02x %02x %8s\n",
|
||||
NIP6(ifp->addr),
|
||||
ifp->idev->dev->ifindex,
|
||||
ifp->prefix_len,
|
||||
|
|
|
@ -532,7 +532,7 @@ static int ac6_seq_show(struct seq_file *seq, void *v)
|
|||
struct ac6_iter_state *state = ac6_seq_private(seq);
|
||||
|
||||
seq_printf(seq,
|
||||
"%-4d %-15s " NIP6_FMT " %5d\n",
|
||||
"%-4d %-15s " NIP6_SEQFMT " %5d\n",
|
||||
state->dev->ifindex, state->dev->name,
|
||||
NIP6(im->aca_addr),
|
||||
im->aca_users);
|
||||
|
|
|
@ -629,7 +629,7 @@ static void ip6fl_fl_seq_show(struct seq_file *seq, struct ip6_flowlabel *fl)
|
|||
{
|
||||
while(fl) {
|
||||
seq_printf(seq,
|
||||
"%05X %-1d %-6d %-6d %-6ld %-8ld " NIP6_FMT " %-4d\n",
|
||||
"%05X %-1d %-6d %-6d %-6ld %-8ld " NIP6_SEQFMT " %-4d\n",
|
||||
(unsigned)ntohl(fl->label),
|
||||
fl->share,
|
||||
(unsigned)fl->owner,
|
||||
|
@ -645,7 +645,7 @@ static void ip6fl_fl_seq_show(struct seq_file *seq, struct ip6_flowlabel *fl)
|
|||
static int ip6fl_seq_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
if (v == SEQ_START_TOKEN)
|
||||
seq_printf(seq, "%-5s %-1s %-6s %-6s %-6s %-8s %-39s %s\n",
|
||||
seq_printf(seq, "%-5s %-1s %-6s %-6s %-6s %-8s %-32s %s\n",
|
||||
"Label", "S", "Owner", "Users", "Linger", "Expires", "Dst", "Opt");
|
||||
else
|
||||
ip6fl_fl_seq_show(seq, v);
|
||||
|
|
|
@ -2373,7 +2373,7 @@ static int igmp6_mc_seq_show(struct seq_file *seq, void *v)
|
|||
struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq);
|
||||
|
||||
seq_printf(seq,
|
||||
"%-4d %-15s " NIP6_FMT " %5d %08X %ld\n",
|
||||
"%-4d %-15s " NIP6_SEQFMT " %5d %08X %ld\n",
|
||||
state->dev->ifindex, state->dev->name,
|
||||
NIP6(im->mca_addr),
|
||||
im->mca_users, im->mca_flags,
|
||||
|
@ -2542,12 +2542,12 @@ static int igmp6_mcf_seq_show(struct seq_file *seq, void *v)
|
|||
if (v == SEQ_START_TOKEN) {
|
||||
seq_printf(seq,
|
||||
"%3s %6s "
|
||||
"%39s %39s %6s %6s\n", "Idx",
|
||||
"%32s %32s %6s %6s\n", "Idx",
|
||||
"Device", "Multicast Address",
|
||||
"Source Address", "INC", "EXC");
|
||||
} else {
|
||||
seq_printf(seq,
|
||||
"%3d %6.6s " NIP6_FMT " " NIP6_FMT " %6lu %6lu\n",
|
||||
"%3d %6.6s " NIP6_SEQFMT " " NIP6_SEQFMT " %6lu %6lu\n",
|
||||
state->dev->ifindex, state->dev->name,
|
||||
NIP6(state->im->mca_addr),
|
||||
NIP6(psf->sf_addr),
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
# Link order matters here.
|
||||
obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_LENGTH) += ip6t_length.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o ip6t_dst.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o
|
||||
|
|
|
@ -97,8 +97,7 @@ match(const struct sk_buff *skb,
|
|||
((optinfo->hdrlen == hdrlen) ^
|
||||
!!(optinfo->invflags & IP6T_OPTS_INV_LEN))));
|
||||
|
||||
ret = (oh != NULL)
|
||||
&&
|
||||
ret = (oh != NULL) &&
|
||||
(!(optinfo->flags & IP6T_OPTS_LEN) ||
|
||||
((optinfo->hdrlen == hdrlen) ^
|
||||
!!(optinfo->invflags & IP6T_OPTS_INV_LEN)));
|
||||
|
@ -169,7 +168,8 @@ match(const struct sk_buff *skb,
|
|||
}
|
||||
if (temp == optinfo->optsnr)
|
||||
return ret;
|
||||
else return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -191,8 +191,7 @@ checkentry(const char *tablename,
|
|||
return 0;
|
||||
}
|
||||
if (optsinfo->invflags & ~IP6T_OPTS_INV_MASK) {
|
||||
DEBUGP("ip6t_opts: unknown flags %X\n",
|
||||
optsinfo->invflags);
|
||||
DEBUGP("ip6t_opts: unknown flags %X\n", optsinfo->invflags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,13 +27,12 @@ match(const struct sk_buff *skb,
|
|||
unsigned int protoff,
|
||||
int *hotdrop)
|
||||
{
|
||||
|
||||
unsigned char eui64[8];
|
||||
int i = 0;
|
||||
|
||||
if ( !(skb->mac.raw >= skb->head
|
||||
&& (skb->mac.raw + ETH_HLEN) <= skb->data)
|
||||
&& offset != 0) {
|
||||
if (!(skb->mac.raw >= skb->head &&
|
||||
(skb->mac.raw + ETH_HLEN) <= skb->data) &&
|
||||
offset != 0) {
|
||||
*hotdrop = 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -49,8 +48,9 @@ match(const struct sk_buff *skb,
|
|||
eui64[0] |= 0x02;
|
||||
|
||||
i = 0;
|
||||
while ((skb->nh.ipv6h->saddr.s6_addr[8+i] ==
|
||||
eui64[i]) && (i<8)) i++;
|
||||
while ((skb->nh.ipv6h->saddr.s6_addr[8+i] == eui64[i])
|
||||
&& (i < 8))
|
||||
i++;
|
||||
|
||||
if (i == 8)
|
||||
return 1;
|
||||
|
|
|
@ -128,8 +128,7 @@ checkentry(const char *tablename,
|
|||
return 0;
|
||||
}
|
||||
if (fraginfo->invflags & ~IP6T_FRAG_INV_MASK) {
|
||||
DEBUGP("ip6t_frag: unknown flags %X\n",
|
||||
fraginfo->invflags);
|
||||
DEBUGP("ip6t_frag: unknown flags %X\n", fraginfo->invflags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,8 +97,7 @@ match(const struct sk_buff *skb,
|
|||
((optinfo->hdrlen == hdrlen) ^
|
||||
!!(optinfo->invflags & IP6T_OPTS_INV_LEN))));
|
||||
|
||||
ret = (oh != NULL)
|
||||
&&
|
||||
ret = (oh != NULL) &&
|
||||
(!(optinfo->flags & IP6T_OPTS_LEN) ||
|
||||
((optinfo->hdrlen == hdrlen) ^
|
||||
!!(optinfo->invflags & IP6T_OPTS_INV_LEN)));
|
||||
|
@ -169,7 +168,8 @@ match(const struct sk_buff *skb,
|
|||
}
|
||||
if (temp == optinfo->optsnr)
|
||||
return ret;
|
||||
else return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -191,8 +191,7 @@ checkentry(const char *tablename,
|
|||
return 0;
|
||||
}
|
||||
if (optsinfo->invflags & ~IP6T_OPTS_INV_MASK) {
|
||||
DEBUGP("ip6t_opts: unknown flags %X\n",
|
||||
optsinfo->invflags);
|
||||
DEBUGP("ip6t_opts: unknown flags %X\n", optsinfo->invflags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,8 +137,8 @@ ipv6header_checkentry(const char *tablename,
|
|||
return 0;
|
||||
|
||||
/* invflags is 0 or 0xff in hard mode */
|
||||
if ((!info->modeflag) && info->invflags != 0x00
|
||||
&& info->invflags != 0xFF)
|
||||
if ((!info->modeflag) && info->invflags != 0x00 &&
|
||||
info->invflags != 0xFF)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
@ -164,4 +164,3 @@ static void __exit ipv6header_exit(void)
|
|||
|
||||
module_init(ipv6header_init);
|
||||
module_exit(ipv6header_exit);
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ static int match(const struct sk_buff *skb,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int checkentry(const char *tablename, const struct ip6t_ip6 *ip,
|
||||
static int checkentry(const char *tablename, const void *ip_void,
|
||||
void *matchinfo, unsigned int matchsize,
|
||||
unsigned int hook_mask)
|
||||
{
|
||||
|
|
|
@ -34,8 +34,8 @@ static inline int
|
|||
segsleft_match(u_int32_t min, u_int32_t max, u_int32_t id, int invert)
|
||||
{
|
||||
int r = 0;
|
||||
DEBUGP("rt segsleft_match:%c 0x%x <= 0x%x <= 0x%x",invert? '!':' ',
|
||||
min,id,max);
|
||||
DEBUGP("rt segsleft_match:%c 0x%x <= 0x%x <= 0x%x",
|
||||
invert ? '!' : ' ', min, id, max);
|
||||
r = (id >= min && id <= max) ^ invert;
|
||||
DEBUGP(" result %s\n", r ? "PASS" : "FAILED");
|
||||
return r;
|
||||
|
@ -92,8 +92,10 @@ match(const struct sk_buff *skb,
|
|||
((rtinfo->hdrlen == hdrlen) ^
|
||||
!!(rtinfo->invflags & IP6T_RT_INV_LEN))));
|
||||
DEBUGP("res %02X %02X %02X ",
|
||||
(rtinfo->flags & IP6T_RT_RES), ((struct rt0_hdr *)rh)->reserved,
|
||||
!((rtinfo->flags & IP6T_RT_RES) && (((struct rt0_hdr *)rh)->reserved)));
|
||||
(rtinfo->flags & IP6T_RT_RES),
|
||||
((struct rt0_hdr *)rh)->reserved,
|
||||
!((rtinfo->flags & IP6T_RT_RES) &&
|
||||
(((struct rt0_hdr *)rh)->reserved)));
|
||||
|
||||
ret = (rh != NULL)
|
||||
&&
|
||||
|
@ -112,8 +114,10 @@ match(const struct sk_buff *skb,
|
|||
if (ret && (rtinfo->flags & IP6T_RT_RES)) {
|
||||
u_int32_t *rp, _reserved;
|
||||
rp = skb_header_pointer(skb,
|
||||
ptr + offsetof(struct rt0_hdr, reserved),
|
||||
sizeof(_reserved), &_reserved);
|
||||
ptr + offsetof(struct rt0_hdr,
|
||||
reserved),
|
||||
sizeof(_reserved),
|
||||
&_reserved);
|
||||
|
||||
ret = (*rp == 0);
|
||||
}
|
||||
|
@ -130,7 +134,9 @@ match(const struct sk_buff *skb,
|
|||
unsigned int i = 0;
|
||||
|
||||
DEBUGP("#%d ", rtinfo->addrnr);
|
||||
for(temp=0; temp<(unsigned int)((hdrlen-8)/16); temp++){
|
||||
for (temp = 0;
|
||||
temp < (unsigned int)((hdrlen - 8) / 16);
|
||||
temp++) {
|
||||
ap = skb_header_pointer(skb,
|
||||
ptr
|
||||
+ sizeof(struct rt0_hdr)
|
||||
|
@ -144,12 +150,14 @@ match(const struct sk_buff *skb,
|
|||
DEBUGP("i=%d temp=%d;\n", i, temp);
|
||||
i++;
|
||||
}
|
||||
if (i==rtinfo->addrnr) break;
|
||||
if (i == rtinfo->addrnr)
|
||||
break;
|
||||
}
|
||||
DEBUGP("i=%d #%d\n", i, rtinfo->addrnr);
|
||||
if (i == rtinfo->addrnr)
|
||||
return ret;
|
||||
else return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
DEBUGP("Strict ");
|
||||
|
@ -171,9 +179,11 @@ match(const struct sk_buff *skb,
|
|||
break;
|
||||
}
|
||||
DEBUGP("temp=%d #%d\n", temp, rtinfo->addrnr);
|
||||
if ((temp == rtinfo->addrnr) && (temp == (unsigned int)((hdrlen-8)/16)))
|
||||
if ((temp == rtinfo->addrnr) &&
|
||||
(temp == (unsigned int)((hdrlen - 8) / 16)))
|
||||
return ret;
|
||||
else return 0;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,8 +206,7 @@ checkentry(const char *tablename,
|
|||
return 0;
|
||||
}
|
||||
if (rtinfo->invflags & ~IP6T_RT_INV_MASK) {
|
||||
DEBUGP("ip6t_rt: unknown flags %X\n",
|
||||
rtinfo->invflags);
|
||||
DEBUGP("ip6t_rt: unknown flags %X\n", rtinfo->invflags);
|
||||
return 0;
|
||||
}
|
||||
if ((rtinfo->flags & (IP6T_RT_RES | IP6T_RT_FST_MASK)) &&
|
||||
|
|
|
@ -81,7 +81,7 @@ static int krxtimod(void *arg)
|
|||
|
||||
for (;;) {
|
||||
unsigned long jif;
|
||||
signed long timeout;
|
||||
long timeout;
|
||||
|
||||
/* deal with the server being asked to die */
|
||||
if (krxtimod_die) {
|
||||
|
|
|
@ -361,7 +361,7 @@ static void rxrpc_proc_peers_stop(struct seq_file *p, void *v)
|
|||
static int rxrpc_proc_peers_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct rxrpc_peer *peer = list_entry(v, struct rxrpc_peer, proc_link);
|
||||
signed long timeout;
|
||||
long timeout;
|
||||
|
||||
/* display header on line 1 */
|
||||
if (v == SEQ_START_TOKEN) {
|
||||
|
@ -373,8 +373,8 @@ static int rxrpc_proc_peers_show(struct seq_file *m, void *v)
|
|||
/* display one peer per line on subsequent lines */
|
||||
timeout = 0;
|
||||
if (!list_empty(&peer->timeout.link))
|
||||
timeout = (signed long) peer->timeout.timo_jif -
|
||||
(signed long) jiffies;
|
||||
timeout = (long) peer->timeout.timo_jif -
|
||||
(long) jiffies;
|
||||
|
||||
seq_printf(m, "%5hu %08x %5d %5d %8ld %5Zu %7lu\n",
|
||||
peer->trans->port,
|
||||
|
@ -468,7 +468,7 @@ static void rxrpc_proc_conns_stop(struct seq_file *p, void *v)
|
|||
static int rxrpc_proc_conns_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct rxrpc_connection *conn;
|
||||
signed long timeout;
|
||||
long timeout;
|
||||
|
||||
conn = list_entry(v, struct rxrpc_connection, proc_link);
|
||||
|
||||
|
@ -484,8 +484,8 @@ static int rxrpc_proc_conns_show(struct seq_file *m, void *v)
|
|||
/* display one conn per line on subsequent lines */
|
||||
timeout = 0;
|
||||
if (!list_empty(&conn->timeout.link))
|
||||
timeout = (signed long) conn->timeout.timo_jif -
|
||||
(signed long) jiffies;
|
||||
timeout = (long) conn->timeout.timo_jif -
|
||||
(long) jiffies;
|
||||
|
||||
seq_printf(m,
|
||||
"%5hu %08x %5hu %04hx %08x %-3.3s %08x %08x %5Zu %8ld\n",
|
||||
|
|
|
@ -228,14 +228,13 @@ static int prio_tune(struct Qdisc *sch, struct rtattr *opt)
|
|||
}
|
||||
sch_tree_unlock(sch);
|
||||
|
||||
for (i=0; i<=TC_PRIO_MAX; i++) {
|
||||
int band = q->prio2band[i];
|
||||
if (q->queues[band] == &noop_qdisc) {
|
||||
for (i=0; i<q->bands; i++) {
|
||||
if (q->queues[i] == &noop_qdisc) {
|
||||
struct Qdisc *child;
|
||||
child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops);
|
||||
if (child) {
|
||||
sch_tree_lock(sch);
|
||||
child = xchg(&q->queues[band], child);
|
||||
child = xchg(&q->queues[i], child);
|
||||
|
||||
if (child != &noop_qdisc)
|
||||
qdisc_destroy(child);
|
||||
|
|
|
@ -144,6 +144,8 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
|
|||
if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
|
||||
(iph->protocol == IPPROTO_TCP ||
|
||||
iph->protocol == IPPROTO_UDP ||
|
||||
iph->protocol == IPPROTO_SCTP ||
|
||||
iph->protocol == IPPROTO_DCCP ||
|
||||
iph->protocol == IPPROTO_ESP))
|
||||
h2 ^= *(((u32*)iph) + iph->ihl);
|
||||
break;
|
||||
|
@ -155,6 +157,8 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
|
|||
h2 = iph->saddr.s6_addr32[3]^iph->nexthdr;
|
||||
if (iph->nexthdr == IPPROTO_TCP ||
|
||||
iph->nexthdr == IPPROTO_UDP ||
|
||||
iph->nexthdr == IPPROTO_SCTP ||
|
||||
iph->nexthdr == IPPROTO_DCCP ||
|
||||
iph->nexthdr == IPPROTO_ESP)
|
||||
h2 ^= *(u32*)&iph[1];
|
||||
break;
|
||||
|
|
|
@ -69,13 +69,14 @@ struct sbus_dma_info {
|
|||
};
|
||||
#endif
|
||||
|
||||
struct snd_cs4231;
|
||||
struct cs4231_dma_control {
|
||||
void (*prepare)(struct cs4231_dma_control *dma_cont, int dir);
|
||||
void (*enable)(struct cs4231_dma_control *dma_cont, int on);
|
||||
int (*request)(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len);
|
||||
unsigned int (*address)(struct cs4231_dma_control *dma_cont);
|
||||
void (*reset)(struct snd_cs4231 *chip);
|
||||
void (*preallocate)(struct snd_cs4231 *chip, struct snd_snd_pcm *pcm);
|
||||
void (*preallocate)(struct snd_cs4231 *chip, struct snd_pcm *pcm);
|
||||
#ifdef EBUS_SUPPORT
|
||||
struct ebus_dma_info ebus_info;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue