1. 29 9月, 2010 9 次提交
    • D
      pcmcia: use autoconfiguration feature for ioports and iomem · 00990e7c
      Dominik Brodowski 提交于
      When CONF_AUTO_SET_IO or CONF_AUTO_SET_IOMEM are set, the corresponding
      fields in struct pcmcia_device *p_dev->resource[0,1,2] are set
      accordinly. Drivers wishing to override certain settings may do so in
      the callback function, but they no longer need to parse the CIS entries
      stored in cistpl_cftable_entry_t themselves.
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-ide@vger.kernel.org
      CC: linux-usb@vger.kernel.org
      CC: laforge@gnumonks.org
      CC: linux-mtd@lists.infradead.org
      CC: linux-bluetooth@vger.kernel.org
      CC: alsa-devel@alsa-project.org
      CC: linux-serial@vger.kernel.org
      CC: Jiri Kosina <jkosina@suse.cz>
      CC: linux-scsi@vger.kernel.org
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      00990e7c
    • D
      pcmcia: introduce autoconfiguration feature · 440eed43
      Dominik Brodowski 提交于
      Introduce an autoconfiguration feature to set certain values in
      pcmcia_loop_config(), instead of copying the same code over and over
      in each PCMCIA driver. At first, introduce the following options:
      
      CONF_AUTO_CHECK_VCC	check or matching Vcc entry
      CONF_AUTO_SET_VPP	set Vpp
      CONF_AUTO_AUDIO		enable the speaker line
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-ide@vger.kernel.org
      CC: linux-usb@vger.kernel.org
      CC: laforge@gnumonks.org
      CC: linux-mtd@lists.infradead.org
      CC: alsa-devel@alsa-project.org
      CC: linux-serial@vger.kernel.org
      CC: Jiri Kosina <jkosina@suse.cz>
      CC: linux-scsi@vger.kernel.org
      Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth)
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      440eed43
    • D
      pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device · 1ac71e5a
      Dominik Brodowski 提交于
      pcmcia_enable_device() now replaces pcmcia_request_configuration().
      Instead of config_req_t, all necessary flags are either passed as
      a parameter to pcmcia_enable_device(), or (in rare circumstances)
      set in struct pcmcia_device -> flags.
      
      With the last remaining user of include/pcmcia/cs.h gone, remove
      all references.
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-ide@vger.kernel.org
      CC: linux-usb@vger.kernel.org
      CC: laforge@gnumonks.org
      CC: linux-mtd@lists.infradead.org
      CC: alsa-devel@alsa-project.org
      CC: linux-serial@vger.kernel.org
      CC: Jiri Kosina <jkosina@suse.cz>
      CC: linux-scsi@vger.kernel.org
      Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth)
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      1ac71e5a
    • D
      pcmcia: move config_{base,index,regs} to struct pcmcia_device · 7feabb64
      Dominik Brodowski 提交于
      Several drivers prefer to explicitly set config_{base,index,regs},
      formerly known as ConfigBase, ConfigIndex and Present. Instead of
      passing these values inside config_req_t, store it in struct
      pcmcia_device.
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-ide@vger.kernel.org
      CC: linux-usb@vger.kernel.org
      CC: laforge@gnumonks.org
      CC: linux-mtd@lists.infradead.org
      CC: alsa-devel@alsa-project.org
      CC: linux-serial@vger.kernel.org
      CC: Jiri Kosina <jkosina@suse.cz>
      CC: linux-scsi@vger.kernel.org
      Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth)
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      7feabb64
    • D
      pcmcia: simplify IntType · 37979e15
      Dominik Brodowski 提交于
      IntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO
      (all other drivers). As this flags seems to relate to ioport access, make
      it conditional to the driver having requested IO port access. There are two
      drivers which do not request IO ports, but did set INT_MEMORY_AND_IO:
      ray_cs and b43. For those, we consistently only set INT_MEMORY in future.
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-ide@vger.kernel.org
      CC: linux-usb@vger.kernel.org
      CC: laforge@gnumonks.org
      CC: linux-mtd@lists.infradead.org
      CC: alsa-devel@alsa-project.org
      CC: linux-serial@vger.kernel.org
      CC: Jiri Kosina <jkosina@suse.cz>
      CC: linux-scsi@vger.kernel.org
      Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth)
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      37979e15
    • D
      pcmcia: simplify Status, ExtStatus register access · fc301101
      Dominik Brodowski 提交于
      The Status (CISREG_CCSR) and ExtStatus (CISREG_ESR) registers were
      only accessed to enable audio output for some drivers and IRQ for
      serial_cs.c. The former also required setting config_req_t.Attributes
      to CONF_ENABLE_SPKR; the latter can be simplified to setting this
      field to CONF_ENABLE_ESR.
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-serial@vger.kernel.org
      CC: linux-scsi@vger.kernel.org
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      fc301101
    • D
      pcmcia: move Vpp setup to struct pcmcia_device · e8405f0f
      Dominik Brodowski 提交于
      Some drivers prefer to explicitly set Vpp. Instead of passing the
      voltage inside config_req_t, store it in struct pcmcia_device.
      
      CC: linux-ide@vger.kernel.org
      CC: netdev@vger.kernel.org
      CC: linux-mtd@lists.infradead.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-serial@vger.kernel.org
      CC: linux-usb@vger.kernel.org
      CC: linux-scsi@vger.kernel.org
      Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth)
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      e8405f0f
    • D
      pcmcia: split up modify_configuration() into two fixup functions · fb49fa53
      Dominik Brodowski 提交于
      pcmcia_modify_configuration() was only used by two drivers to fix up
      one issue each: setting the Vpp to a different value, and reducing
      the IO width to 8 bit. Introduce two explicitly named functions
      handling these things, and remove one further typedef.
      
      CC: netdev@vger.kernel.org
      CC: linux-mtd@lists.infradead.org
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      fb49fa53
    • D
      pcmcia: do not use win_req_t when calling pcmcia_request_window() · cdb13808
      Dominik Brodowski 提交于
      Instead of win_req_t, drivers are now requested to fill out
      struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four iomem
      ranges. After a call to pcmcia_request_window(), the windows found there
      are reserved and may be used until pcmcia_release_window() is called.
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: linux-mtd@lists.infradead.org
      CC: Jiri Kosina <jkosina@suse.cz>
      CC: linux-scsi@vger.kernel.org
      Tested-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      cdb13808
  2. 28 9月, 2010 2 次提交
    • O
      de2104x: fix ethtool · 387a8562
      Ondrej Zary 提交于
      When the interface is up, using ethtool breaks it because:
      a) link is put down but media_timer interval is not shortened to NO_LINK
      b) rxtx is stopped but not restarted
      
      Also manual 10baseT-HD (and probably FD too - untested) mode does not work -
      the link is forced up, packets are transmitted but nothing is received.
      Changing CSR14 value to match documentation (not disabling link check) fixes this.
      Signed-off-by: NOndrej Zary <linux@rainbow-software.org>
      Acked-by: NJeff Garzik <jgarzik@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      387a8562
    • J
      3c59x: fix regression from patch "Add ethtool WOL support" · 3fd6c88e
      Jan Beulich 提交于
      This patch (commit 690a1f20) added a
      new call site for acpi_set_WOL() without checking that the function is
      actually suitable to be called via
      
       vortex_set_wol+0xcd/0xe0 [3c59x]
       dev_ethtool+0xa5a/0xb70
       dev_ioctl+0x2e0/0x4b0
       T.961+0x49/0x50
       sock_ioctl+0x47/0x290
       do_vfs_ioctl+0x7f/0x340
       sys_ioctl+0x80/0xa0
       system_call_fastpath+0x16/0x1b
      
      i.e. outside of code paths run when the device is not yet enabled or
      already disabled. In particular, putting the device into D3hot is a
      pretty bad idea when it was already brought up.
      
      Furthermore, all prior callers of the function made sure they're
      actually dealing with a PCI device, while the newly added one didn't.
      
      In the same spirit, the .get_wol handler shouldn't indicate support
      for WOL for non-PCI devices.
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fd6c88e
  3. 27 9月, 2010 6 次提交
  4. 25 9月, 2010 1 次提交
  5. 23 9月, 2010 8 次提交
  6. 22 9月, 2010 2 次提交
  7. 18 9月, 2010 2 次提交
    • E
      qlcnic: dont assume NET_IP_ALIGN is 2 · 04746ff1
      Eric Dumazet 提交于
      qlcnic driver allocates rx skbs and gives to hardware too bytes of extra
      storage, allowing for corruption of kernel data.
      
      NET_IP_ALIGN being 0 on some platforms (including x86), drivers should
      not assume it's 2.
      
      rds_ring->skb_size = rds_ring->dma_size + NET_IP_ALIGN;
      ...
      skb = dev_alloc_skb(rds_ring->skb_size);
      skb_reserve(skb, 2);
      pci_map_single(pdev, skb->data, rds_ring->dma_size, PCI_DMA_FROMDEVICE);
      
      (and rds_ring->skb_size == rds_ring->dma_size) -> bug
      
      
      Because of extra alignment (1500 + 32) -> four extra bytes are available
      before the struct skb_shared_info, so corruption is not noticed.
      
      Note: this driver could use netdev_alloc_skb_ip_align()
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04746ff1
    • W
      iwlwifi: do not perferm force reset while doing scan · 7acc7c68
      Wey-Yi Guy 提交于
      When uCode error condition detected, driver try to perform either
      rf reset or firmware reload in order bring device back to
      working condition.
      
      If rf reset is required and scan is in process, there is no need
      to issue rf reset since scan already reset the rf.
      
      If firmware reload is required and scan is in process, skip the
      reload request. There is a possibility firmware reload during
      scan cause problem.
      
      [  485.804046] WARNING: at net/mac80211/main.c:310 ieee80211_restart_hw+0x28/0x62()
      [  485.804049] Hardware name: Latitude E6400
      [  485.804052] ieee80211_restart_hw called with hardware scan in progress
      [  485.804054] Modules linked in: iwlagn iwlcore bnep sco rfcomm l2cap crc16 bluetooth [last unloaded: iwlcore]
      [  485.804069] Pid: 812, comm: kworker/u:3 Tainted: G        W   2.6.36-rc3-wl+ #74
      [  485.804072] Call Trace:
      [  485.804079]  [<c103019a>] warn_slowpath_common+0x60/0x75
      [  485.804084]  [<c1030213>] warn_slowpath_fmt+0x26/0x2a
      [  485.804089]  [<c145da67>] ieee80211_restart_hw+0x28/0x62
      [  485.804102]  [<f8b35dc6>] iwl_bg_restart+0x113/0x150 [iwlagn]
      [  485.804108]  [<c10415d5>] process_one_work+0x181/0x25c
      [  485.804119]  [<f8b35cb3>] ? iwl_bg_restart+0x0/0x150 [iwlagn]
      [  485.804124]  [<c104190a>] worker_thread+0xf9/0x1f2
      [  485.804128]  [<c1041811>] ? worker_thread+0x0/0x1f2
      [  485.804133]  [<c10451b0>] kthread+0x64/0x69
      [  485.804137]  [<c104514c>] ? kthread+0x0/0x69
      [  485.804141]  [<c1002df6>] kernel_thread_helper+0x6/0x10
      [  485.804145] ---[ end trace 3d4ebdc02d524bbb ]---
      [  485.804148] WG> 1
      [  485.804153] Pid: 812, comm: kworker/u:3 Tainted: G        W   2.6.36-rc3-wl+ #74
      [  485.804156] Call Trace:
      [  485.804161]  [<c145da9b>] ? ieee80211_restart_hw+0x5c/0x62
      [  485.804172]  [<f8b35dcb>] iwl_bg_restart+0x118/0x150 [iwlagn]
      [  485.804177]  [<c10415d5>] process_one_work+0x181/0x25c
      [  485.804188]  [<f8b35cb3>] ? iwl_bg_restart+0x0/0x150 [iwlagn]
      [  485.804192]  [<c104190a>] worker_thread+0xf9/0x1f2
      [  485.804197]  [<c1041811>] ? worker_thread+0x0/0x1f2
      [  485.804201]  [<c10451b0>] kthread+0x64/0x69
      [  485.804205]  [<c104514c>] ? kthread+0x0/0x69
      [  485.804209]  [<c1002df6>] kernel_thread_helper+0x6/0x10
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      7acc7c68
  8. 17 9月, 2010 3 次提交
  9. 16 9月, 2010 2 次提交
    • M
      r8169: Handle rxfifo errors on 8168 chips · 801e147c
      Matthew Garrett 提交于
      The Thinkpad X100e seems to have some odd behaviour when the display is
      powered off - the onboard r8169 starts generating rxfifo overflow errors.
      The root cause of this has not yet been identified and may well be a
      hardware design bug on the platform, but r8169 should be more resiliant to
      this. This patch enables the rxfifo interrupt on 8168 devices and removes
      the MAC version check in the interrupt handler, and the machine no longer
      crashes when under network load while the screen turns off.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Acked-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      801e147c
    • D
      3c59x: Remove atomic context inside vortex_{set|get}_wol · 84176b7b
      Denis Kirjanov 提交于
      There is no need to use spinlocks in vortex_{set|get}_wol.
      This also fixes a bug:
      [  254.214993] 3c59x 0000:00:0d.0: PME# enabled
      [  254.215021] BUG: sleeping function called from invalid context at kernel/mutex.c:94
      [  254.215030] in_atomic(): 0, irqs_disabled(): 1, pid: 4875, name: ethtool
      [  254.215042] Pid: 4875, comm: ethtool Tainted: G        W   2.6.36-rc3+ #7
      [  254.215049] Call Trace:
      [  254.215050]  [] __might_sleep+0xb1/0xb6
      [  254.215050]  [] mutex_lock+0x17/0x30
      [  254.215050]  [] acpi_enable_wakeup_device_power+0x2b/0xb1
      [  254.215050]  [] acpi_pm_device_sleep_wake+0x42/0x7f
      [  254.215050]  [] acpi_pci_sleep_wake+0x5d/0x63
      [  254.215050]  [] platform_pci_sleep_wake+0x1d/0x20
      [  254.215050]  [] __pci_enable_wake+0x90/0xd0
      [  254.215050]  [] acpi_set_WOL+0x8e/0xf5 [3c59x]
      [  254.215050]  [] vortex_set_wol+0x4e/0x5e [3c59x]
      [  254.215050]  [] dev_ethtool+0x1cf/0xb61
      [  254.215050]  [] ? debug_mutex_free_waiter+0x45/0x4a
      [  254.215050]  [] ? __mutex_lock_common+0x204/0x20e
      [  254.215050]  [] ? __mutex_lock_slowpath+0x12/0x15
      [  254.215050]  [] ? mutex_lock+0x23/0x30
      [  254.215050]  [] dev_ioctl+0x42c/0x533
      [  254.215050]  [] ? _cond_resched+0x8/0x1c
      [  254.215050]  [] ? lock_page+0x1c/0x30
      [  254.215050]  [] ? page_address+0x15/0x7c
      [  254.215050]  [] ? filemap_fault+0x187/0x2c4
      [  254.215050]  [] sock_ioctl+0x1d4/0x1e0
      [  254.215050]  [] ? sock_ioctl+0x0/0x1e0
      [  254.215050]  [] vfs_ioctl+0x19/0x33
      [  254.215050]  [] do_vfs_ioctl+0x424/0x46f
      [  254.215050]  [] ? selinux_file_ioctl+0x3c/0x40
      [  254.215050]  [] sys_ioctl+0x40/0x5a
      [  254.215050]  [] sysenter_do_call+0x12/0x22
      
      vortex_set_wol protected with a spinlock, but nested  acpi_set_WOL acquires a mutex inside atomic context.
      Ethtool operations are already serialized by RTNL mutex, so it is safe to drop the locks.
      Signed-off-by: NDenis Kirjanov <dkirjanov@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84176b7b
  10. 15 9月, 2010 3 次提交
  11. 14 9月, 2010 1 次提交
  12. 10 9月, 2010 1 次提交
    • D
      ipheth: remove incorrect devtype to WWAN · c9cedbba
      Dan Williams 提交于
      The 'wwan' devtype is meant for devices that require preconfiguration
      and *every* time setup before the ethernet interface can be used, like
      cellular modems which require a series of setup commands on serial ports
      or other mechanisms before the ethernet interface will handle packets.
      
      As ipheth only requires one-per-hotplug pairing setup with no
      preconfiguration (like APN, phone #, etc) and the network interface is
      usable at any time after that initial setup, remove the incorrect
      devtype wwan.
      Signed-off-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9cedbba