···26262727 git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git28282929+ - Note that it is highly important to install the mke2fs.conf file3030+ that comes with the e2fsprogs 1.41.x sources in /etc/mke2fs.conf. If3131+ you have edited the /etc/mke2fs.conf file installed on your system,3232+ you will need to merge your changes with the version from e2fsprogs3333+ 1.41.x.3434+2935 - Create a new filesystem using the ext4dev filesystem type:30363137 # mke2fs -t ext4dev /dev/hda1
···11+NOTE:22+This is a version of Documentation/SubmitChecklist into Japanese.33+This document is maintained by Takenori Nagano <t-nagano@ah.jp.nec.com>44+and the JF Project team <http://www.linux.or.jp/JF/>.55+If you find any difference between this document and the original file66+or a problem with the translation,77+please contact the maintainer of this file or JF project.88+99+Please also note that the purpose of this file is to be easier to read1010+for non English (read: Japanese) speakers and is not intended as a1111+fork. So if you have any comments or updates of this file, please try1212+to update the original English file first.1313+1414+Last Updated: 2008/07/141515+==================================1616+これは、1717+linux-2.6.26/Documentation/SubmitChecklist の和訳です。1818+1919+翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >2020+翻訳日: 2008/07/142121+翻訳者: Takenori Nagano <t-nagano at ah dot jp dot nec dot com>2222+校正者: Masanori Kobayashi さん <zap03216 at nifty dot ne dot jp>2323+==================================2424+2525+2626+Linux カーネルパッチ投稿者向けチェックリスト2727+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2828+2929+本書では、パッチをより素早く取り込んでもらいたい開発者が実践すべき基本的な事柄3030+をいくつか紹介します。ここにある全ての事柄は、Documentation/SubmittingPatches3131+などのLinuxカーネルパッチ投稿に際しての心得を補足するものです。3232+3333+ 1: 妥当なCONFIGオプションや変更されたCONFIGオプション、つまり =y, =m, =n3434+ 全てで正しくビルドできることを確認してください。その際、gcc及びリンカが3535+ warningやerrorを出していないことも確認してください。3636+3737+ 2: allnoconfig, allmodconfig オプションを用いて正しくビルドできることを3838+ 確認してください。3939+4040+ 3: 手許のクロスコンパイルツールやOSDLのPLMのようなものを用いて、複数の4141+ アーキテクチャにおいても正しくビルドできることを確認してください。4242+4343+ 4: 64bit長の'unsigned long'を使用しているppc64は、クロスコンパイルでの4444+ チェックに適当なアーキテクチャです。4545+4646+ 5: カーネルコーディングスタイルに準拠しているかどうか確認してください(!)4747+4848+ 6: CONFIGオプションの追加・変更をした場合には、CONFIGメニューが壊れていない4949+ ことを確認してください。5050+5151+ 7: 新しくKconfigのオプションを追加する際には、必ずそのhelpも記述してください。5252+5353+ 8: 適切なKconfigの依存関係を考えながら慎重にチェックしてください。5454+ ただし、この作業はマシンを使ったテストできちんと行うのがとても困難です。5555+ うまくやるには、自分の頭で考えることです。5656+5757+ 9: sparseを利用してちゃんとしたコードチェックをしてください。5858+5959+10: 'make checkstack' と 'make namespacecheck' を利用し、問題が発見されたら6060+ 修正してください。'make checkstack' は明示的に問題を示しませんが、どれか6161+ 1つの関数が512バイトより大きいスタックを使っていれば、修正すべき候補と6262+ なります。6363+6464+11: グローバルなkernel API を説明する kernel-doc をソースの中に含めてください。6565+ ( staticな関数においては必須ではありませんが、含めてもらっても結構です )6666+ そして、'make htmldocs' もしくは 'make mandocs' を利用して追記した6767+ ドキュメントのチェックを行い、問題が見つかった場合には修正を行ってください。6868+6969+12: CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, CONFIG_DEBUG_SLAB,7070+ CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, CONFIG_DEBUG_SPINLOCK,7171+ CONFIG_DEBUG_SPINLOCK_SLEEP これら全てを同時に有効にして動作確認を7272+ 行ってください。7373+7474+13: CONFIG_SMP, CONFIG_PREEMPT を有効にした場合と無効にした場合の両方で7575+ ビルドした上、動作確認を行ってください。7676+7777+14: もしパッチがディスクのI/O性能などに影響を与えるようであれば、7878+ 'CONFIG_LBD'オプションを有効にした場合と無効にした場合の両方で7979+ テストを実施してみてください。8080+8181+15: lockdepの機能を全て有効にした上で、全てのコードパスを評価してください。8282+8383+16: /proc に新しいエントリを追加した場合には、Documentation/ 配下に8484+ 必ずドキュメントを追加してください。8585+8686+17: 新しいブートパラメータを追加した場合には、8787+ 必ずDocumentation/kernel-parameters.txt に説明を追加してください。8888+8989+18: 新しくmoduleにパラメータを追加した場合には、MODULE_PARM_DESC()を9090+ 利用して必ずその説明を記述してください。9191+9292+19: 新しいuserspaceインタフェースを作成した場合には、Documentation/ABI/ に9393+ Documentation/ABI/README を参考にして必ずドキュメントを追加してください。9494+9595+20: 'make headers_check'を実行して全く問題がないことを確認してください。9696+9797+21: 少なくともslabアロケーションとpageアロケーションに失敗した場合の9898+ 挙動について、fault-injectionを利用して確認してください。9999+ Documentation/fault-injection/ を参照してください。100100+101101+ 追加したコードがかなりの量であったならば、サブシステム特有の102102+ fault-injectionを追加したほうが良いかもしれません。103103+104104+22: 新たに追加したコードは、`gcc -W'でコンパイルしてください。105105+ このオプションは大量の不要なメッセージを出力しますが、106106+ "warning: comparison between signed and unsigned" のようなメッセージは、107107+ バグを見つけるのに役に立ちます。108108+109109+23: 投稿したパッチが -mm パッチセットにマージされた後、全ての既存のパッチや110110+ VM, VFS およびその他のサブシステムに関する様々な変更と、現時点でも共存111111+ できることを確認するテストを行ってください。
+5
Documentation/kernel-parameters.txt
···365365 no delay (0).366366 Format: integer367367368368+ bootmem_debug [KNL] Enable bootmem allocator debug messages.369369+368370 bttv.card= [HW,V4L] bttv (bt848 + bt878 based grabber cards)369371 bttv.radio= Most important insmod options are available as370372 kernel args too.···10731071 allowed.1074107210751073 * [no]ncq: Turn on or off NCQ.10741074+10751075+ * nohrst, nosrst, norst: suppress hard, soft10761076+ and both resets.1076107710771078 If there are multiple matching configurations changing10781079 the same attribute, the last one is used.
+5
Documentation/rfkill.txt
···363363when possible) the overall transmitter rfkill state, not of a particular rfkill364364line.365365366366+5. During suspend, the rfkill class will attempt to soft-block the radio367367+through a call to rfkill->toggle_radio, and will try to restore its previous368368+state during resume. After a rfkill class is suspended, it will *not* call369369+rfkill->toggle_radio until it is resumed.370370+366371Example of a WLAN wireless driver connected to the rfkill subsystem:367372--------------------------------------------------------------------368373
+23
Documentation/scsi/ChangeLog.megaraid_sas
···11+22+1 Release Date : Thur.July. 24 11:41:51 PST 2008 -33+ (emaild-id:megaraidlinux@lsi.com)44+ Sumant Patro55+ Bo Yang66+77+2 Current Version : 00.00.04.0188+3 Older Version : 00.00.03.2299+1010+1. Add the new controller (0078, 0079) support to the driver1111+ Those controllers are LSI's next generatation(gen2) SAS controllers.1212+1313+1 Release Date : Mon.June. 23 10:12:45 PST 2008 -1414+ (emaild-id:megaraidlinux@lsi.com)1515+ Sumant Patro1616+ Bo Yang1717+1818+2 Current Version : 00.00.03.221919+3 Older Version : 00.00.03.202020+2121+1. Add shutdown DCMD cmd to the shutdown routine to make FW shutdown proper.2222+2. Unexpected interrupt occurs in HWR Linux driver, add the dumy readl pci flush will fix this issue.2323+1241 Release Date : Mon. March 10 11:02:31 PDT 2008 -225 (emaild-id:megaraidlinux@lsi.com)326 Sumant Patro
···166166;167167168168/*169169- * PXA 2xx clock declarations. Order is important (see aliases below)170170- * Please be careful not to disrupt the ordering.169169+ * PXA 2xx clock declarations.171170 */172171static struct clk pxa25x_clks[] = {173172 INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev),···191192 INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL),192193 */193194 INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),194194-};195195-196196-static struct clk pxa2xx_clk_aliases[] = {197197- INIT_CKOTHER("GPIO7_CLK", &pxa25x_clks[4], NULL),198198- INIT_CKOTHER("SA1111_CLK", &pxa25x_clks[5], NULL),199195};200196201197#ifdef CONFIG_PM···368374 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */369375 if (cpu_is_pxa255())370376 ret = platform_device_register(&pxa_device_hwuart);371371-372372- clks_register(pxa2xx_clk_aliases, ARRAY_SIZE(pxa2xx_clk_aliases));373377374378 return ret;375379}
···1010 * it under the terms of the GNU General Public License version 2 as1111 * published by the Free Software Foundation.1212 */1313-#include <linux/version.h>1413#include <linux/kernel.h>1514#include <linux/init.h>1615#include <linux/module.h>
···11-#22-# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.2344-# Thu Oct 18 16:03:40 200755-#66-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"77-88-#99-# General setup1010-#1111-CONFIG_EXPERIMENTAL=y1212-CONFIG_LOCK_KERNEL=y1313-CONFIG_INIT_ENV_ARG_LIMIT=321414-CONFIG_LOCALVERSION=""1515-# CONFIG_LOCALVERSION_AUTO is not set1616-CONFIG_SWAP=y1717-CONFIG_SYSVIPC=y1818-CONFIG_SYSVIPC_SYSCTL=y1919-CONFIG_POSIX_MQUEUE=y2020-# CONFIG_BSD_PROCESS_ACCT is not set2121-CONFIG_TASKSTATS=y2222-# CONFIG_TASK_DELAY_ACCT is not set2323-CONFIG_TASK_XACCT=y2424-CONFIG_TASK_IO_ACCOUNTING=y2525-# CONFIG_USER_NS is not set2626-# CONFIG_AUDIT is not set2727-# CONFIG_IKCONFIG is not set2828-CONFIG_LOG_BUF_SHIFT=202929-CONFIG_CGROUPS=y3030-CONFIG_CPUSETS=y3131-CONFIG_FAIR_GROUP_SCHED=y3232-CONFIG_FAIR_USER_SCHED=y3333-CONFIG_SYSFS_DEPRECATED=y3434-CONFIG_RELAY=y3535-CONFIG_BLK_DEV_INITRD=y3636-CONFIG_INITRAMFS_SOURCE=""3737-CONFIG_CC_OPTIMIZE_FOR_SIZE=y3838-CONFIG_SYSCTL=y3939-# CONFIG_EMBEDDED is not set4040-CONFIG_SYSCTL_SYSCALL=y4141-CONFIG_KALLSYMS=y4242-CONFIG_KALLSYMS_ALL=y4343-# CONFIG_KALLSYMS_EXTRA_PASS is not set4444-CONFIG_HOTPLUG=y4545-CONFIG_PRINTK=y4646-CONFIG_BUG=y4747-CONFIG_ELF_CORE=y4848-CONFIG_BASE_FULL=y4949-CONFIG_FUTEX=y5050-CONFIG_ANON_INODES=y5151-CONFIG_EPOLL=y5252-CONFIG_SIGNALFD=y5353-CONFIG_EVENTFD=y5454-CONFIG_SHMEM=y5555-CONFIG_VM_EVENT_COUNTERS=y5656-CONFIG_SLUB_DEBUG=y5757-# CONFIG_SLAB is not set5858-CONFIG_SLUB=y5959-# CONFIG_SLOB is not set6060-CONFIG_RT_MUTEXES=y6161-# CONFIG_TINY_SHMEM is not set6262-CONFIG_BASE_SMALL=06363-CONFIG_MODULES=y6464-CONFIG_MODULE_UNLOAD=y6565-# CONFIG_MODULE_FORCE_UNLOAD is not set6666-# CONFIG_MODVERSIONS is not set6767-# CONFIG_MODULE_SRCVERSION_ALL is not set6868-CONFIG_KMOD=y6969-CONFIG_STOP_MACHINE=y7070-CONFIG_BLOCK=y7171-# CONFIG_BLK_DEV_IO_TRACE is not set7272-CONFIG_BLK_DEV_BSG=y7373-CONFIG_BLOCK_COMPAT=y7474-7575-#7676-# IO Schedulers7777-#7878-CONFIG_IOSCHED_NOOP=y7979-CONFIG_IOSCHED_AS=y8080-CONFIG_IOSCHED_DEADLINE=y8181-CONFIG_IOSCHED_CFQ=y8282-CONFIG_DEFAULT_AS=y8383-# CONFIG_DEFAULT_DEADLINE is not set8484-# CONFIG_DEFAULT_CFQ is not set8585-# CONFIG_DEFAULT_NOOP is not set8686-CONFIG_DEFAULT_IOSCHED="anticipatory"8787-8888-#8989-# Processor type and features9090-#9191-CONFIG_IA64=y9292-CONFIG_64BIT=y9393-CONFIG_QUICKLIST=y9494-CONFIG_MMU=y9595-CONFIG_RWSEM_XCHGADD_ALGORITHM=y9696-# CONFIG_ARCH_HAS_ILOG2_U32 is not set9797-# CONFIG_ARCH_HAS_ILOG2_U64 is not set9898-CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y9999-CONFIG_GENERIC_FIND_NEXT_BIT=y100100-CONFIG_GENERIC_CALIBRATE_DELAY=y101101-CONFIG_GENERIC_TIME=y102102-CONFIG_GENERIC_TIME_VSYSCALL=y103103-CONFIG_DMI=y104104-CONFIG_EFI=y105105-CONFIG_GENERIC_IOMAP=y106106-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y107107-CONFIG_IA64_UNCACHED_ALLOCATOR=y108108-CONFIG_AUDIT_ARCH=y109109-# CONFIG_IA64_GENERIC is not set110110-# CONFIG_IA64_DIG is not set111111-# CONFIG_IA64_HP_ZX1 is not set112112-# CONFIG_IA64_HP_ZX1_SWIOTLB is not set113113-CONFIG_IA64_SGI_SN2=y114114-# CONFIG_IA64_HP_SIM is not set115115-# CONFIG_ITANIUM is not set116116-CONFIG_MCKINLEY=y117117-# CONFIG_IA64_PAGE_SIZE_4KB is not set118118-# CONFIG_IA64_PAGE_SIZE_8KB is not set119119-# CONFIG_IA64_PAGE_SIZE_16KB is not set120120-CONFIG_IA64_PAGE_SIZE_64KB=y121121-CONFIG_PGTABLE_3=y122122-# CONFIG_PGTABLE_4 is not set123123-# CONFIG_HZ_100 is not set124124-CONFIG_HZ_250=y125125-# CONFIG_HZ_300 is not set126126-# CONFIG_HZ_1000 is not set127127-CONFIG_HZ=250128128-CONFIG_IA64_L1_CACHE_SHIFT=7129129-# CONFIG_IA64_CYCLONE is not set130130-CONFIG_IOSAPIC=y131131-CONFIG_IA64_SGI_SN_XP=m132132-CONFIG_FORCE_MAX_ZONEORDER=17133133-CONFIG_SMP=y134134-CONFIG_NR_CPUS=1024135135-# CONFIG_HOTPLUG_CPU is not set136136-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y137137-CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y138138-CONFIG_SCHED_SMT=y139139-CONFIG_PREEMPT_NONE=y140140-# CONFIG_PREEMPT_VOLUNTARY is not set141141-# CONFIG_PREEMPT is not set142142-CONFIG_PREEMPT_BKL=y143143-CONFIG_SELECT_MEMORY_MODEL=y144144-# CONFIG_FLATMEM_MANUAL is not set145145-CONFIG_DISCONTIGMEM_MANUAL=y146146-# CONFIG_SPARSEMEM_MANUAL is not set147147-CONFIG_DISCONTIGMEM=y148148-CONFIG_FLAT_NODE_MEM_MAP=y149149-CONFIG_NEED_MULTIPLE_NODES=y150150-# CONFIG_SPARSEMEM_STATIC is not set151151-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y152152-CONFIG_SPLIT_PTLOCK_CPUS=4153153-CONFIG_MIGRATION=y154154-CONFIG_RESOURCES_64BIT=y155155-CONFIG_ZONE_DMA_FLAG=0156156-CONFIG_NR_QUICK=1157157-CONFIG_VIRT_TO_BUS=y158158-CONFIG_ARCH_SELECT_MEMORY_MODEL=y159159-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y160160-CONFIG_ARCH_FLATMEM_ENABLE=y161161-CONFIG_ARCH_SPARSEMEM_ENABLE=y162162-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y163163-CONFIG_NUMA=y164164-CONFIG_NODES_SHIFT=10165165-CONFIG_ARCH_POPULATES_NODE_MAP=y166166-CONFIG_VIRTUAL_MEM_MAP=y167167-CONFIG_HOLES_IN_ZONE=y168168-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y169169-CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y170170-CONFIG_IA32_SUPPORT=y171171-CONFIG_COMPAT=y172172-CONFIG_COMPAT_FOR_U64_ALIGNMENT=y173173-CONFIG_IA64_MCA_RECOVERY=y174174-CONFIG_PERFMON=y175175-CONFIG_IA64_PALINFO=y176176-CONFIG_IA64_MC_ERR_INJECT=y177177-CONFIG_SGI_SN=y178178-# CONFIG_IA64_ESI is not set179179-# CONFIG_IA64_HP_AML_NFW is not set180180-181181-#182182-# SN Devices183183-#184184-CONFIG_SGI_IOC3=y185185-186186-#187187-# Firmware Drivers188188-#189189-CONFIG_EFI_VARS=y190190-CONFIG_EFI_PCDP=y191191-CONFIG_DMIID=y192192-CONFIG_BINFMT_ELF=y193193-# CONFIG_BINFMT_MISC is not set194194-195195-#196196-# Power management and ACPI197197-#198198-CONFIG_PM=y199199-# CONFIG_PM_LEGACY is not set200200-# CONFIG_PM_DEBUG is not set201201-CONFIG_ACPI=y202202-# CONFIG_ACPI_PROCFS is not set203203-CONFIG_ACPI_PROC_EVENT=y204204-# CONFIG_ACPI_BUTTON is not set205205-# CONFIG_ACPI_FAN is not set206206-# CONFIG_ACPI_DOCK is not set207207-# CONFIG_ACPI_PROCESSOR is not set208208-CONFIG_ACPI_NUMA=y209209-CONFIG_ACPI_BLACKLIST_YEAR=0210210-# CONFIG_ACPI_DEBUG is not set211211-CONFIG_ACPI_EC=y212212-CONFIG_ACPI_POWER=y213213-CONFIG_ACPI_SYSTEM=y214214-# CONFIG_ACPI_CONTAINER is not set215215-216216-#217217-# CPU Frequency scaling218218-#219219-# CONFIG_CPU_FREQ is not set220220-221221-#222222-# Bus options (PCI, PCMCIA)223223-#224224-CONFIG_PCI=y225225-CONFIG_PCI_DOMAINS=y226226-CONFIG_PCI_SYSCALL=y227227-CONFIG_PCIEPORTBUS=y228228-CONFIG_HOTPLUG_PCI_PCIE=y229229-CONFIG_PCIEAER=y230230-CONFIG_ARCH_SUPPORTS_MSI=y231231-# CONFIG_PCI_MSI is not set232232-# CONFIG_PCI_DEBUG is not set233233-CONFIG_HOTPLUG_PCI=y234234-# CONFIG_HOTPLUG_PCI_FAKE is not set235235-# CONFIG_HOTPLUG_PCI_ACPI is not set236236-# CONFIG_HOTPLUG_PCI_CPCI is not set237237-# CONFIG_HOTPLUG_PCI_SHPC is not set238238-CONFIG_HOTPLUG_PCI_SGI=y239239-# CONFIG_PCCARD is not set240240-241241-#242242-# Networking243243-#244244-CONFIG_NET=y245245-246246-#247247-# Networking options248248-#249249-CONFIG_PACKET=y250250-CONFIG_PACKET_MMAP=y251251-CONFIG_UNIX=y252252-CONFIG_XFRM=y253253-# CONFIG_XFRM_USER is not set254254-# CONFIG_XFRM_SUB_POLICY is not set255255-# CONFIG_XFRM_MIGRATE is not set256256-# CONFIG_NET_KEY is not set257257-CONFIG_INET=y258258-CONFIG_IP_MULTICAST=y259259-# CONFIG_IP_ADVANCED_ROUTER is not set260260-CONFIG_IP_FIB_HASH=y261261-# CONFIG_IP_PNP is not set262262-# CONFIG_NET_IPIP is not set263263-# CONFIG_NET_IPGRE is not set264264-# CONFIG_IP_MROUTE is not set265265-# CONFIG_ARPD is not set266266-CONFIG_SYN_COOKIES=y267267-# CONFIG_INET_AH is not set268268-# CONFIG_INET_ESP is not set269269-# CONFIG_INET_IPCOMP is not set270270-# CONFIG_INET_XFRM_TUNNEL is not set271271-CONFIG_INET_TUNNEL=m272272-CONFIG_INET_XFRM_MODE_TRANSPORT=y273273-CONFIG_INET_XFRM_MODE_TUNNEL=y274274-CONFIG_INET_XFRM_MODE_BEET=y275275-CONFIG_INET_LRO=y276276-CONFIG_INET_DIAG=m277277-CONFIG_INET_TCP_DIAG=m278278-# CONFIG_TCP_CONG_ADVANCED is not set279279-CONFIG_TCP_CONG_CUBIC=y280280-CONFIG_DEFAULT_TCP_CONG="cubic"281281-# CONFIG_TCP_MD5SIG is not set282282-CONFIG_IPV6=m283283-# CONFIG_IPV6_PRIVACY is not set284284-# CONFIG_IPV6_ROUTER_PREF is not set285285-# CONFIG_IPV6_OPTIMISTIC_DAD is not set286286-# CONFIG_INET6_AH is not set287287-# CONFIG_INET6_ESP is not set288288-# CONFIG_INET6_IPCOMP is not set289289-# CONFIG_IPV6_MIP6 is not set290290-# CONFIG_INET6_XFRM_TUNNEL is not set291291-# CONFIG_INET6_TUNNEL is not set292292-CONFIG_INET6_XFRM_MODE_TRANSPORT=m293293-CONFIG_INET6_XFRM_MODE_TUNNEL=m294294-CONFIG_INET6_XFRM_MODE_BEET=m295295-# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set296296-CONFIG_IPV6_SIT=m297297-# CONFIG_IPV6_TUNNEL is not set298298-# CONFIG_IPV6_MULTIPLE_TABLES is not set299299-# CONFIG_NETWORK_SECMARK is not set300300-# CONFIG_NETFILTER is not set301301-# CONFIG_IP_DCCP is not set302302-# CONFIG_IP_SCTP is not set303303-# CONFIG_TIPC is not set304304-# CONFIG_ATM is not set305305-# CONFIG_BRIDGE is not set306306-# CONFIG_VLAN_8021Q is not set307307-# CONFIG_DECNET is not set308308-# CONFIG_LLC2 is not set309309-# CONFIG_IPX is not set310310-# CONFIG_ATALK is not set311311-# CONFIG_X25 is not set312312-# CONFIG_LAPB is not set313313-# CONFIG_ECONET is not set314314-# CONFIG_WAN_ROUTER is not set315315-316316-#317317-# QoS and/or fair queueing318318-#319319-# CONFIG_NET_SCHED is not set320320-321321-#322322-# Network testing323323-#324324-# CONFIG_NET_PKTGEN is not set325325-# CONFIG_HAMRADIO is not set326326-# CONFIG_IRDA is not set327327-# CONFIG_BT is not set328328-# CONFIG_AF_RXRPC is not set329329-330330-#331331-# Wireless332332-#333333-# CONFIG_CFG80211 is not set334334-# CONFIG_WIRELESS_EXT is not set335335-# CONFIG_MAC80211 is not set336336-# CONFIG_IEEE80211 is not set337337-# CONFIG_RFKILL is not set338338-# CONFIG_NET_9P is not set339339-340340-#341341-# Device Drivers342342-#343343-344344-#345345-# Generic Driver Options346346-#347347-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"348348-CONFIG_STANDALONE=y349349-CONFIG_PREVENT_FIRMWARE_BUILD=y350350-CONFIG_FW_LOADER=y351351-# CONFIG_DEBUG_DRIVER is not set352352-# CONFIG_DEBUG_DEVRES is not set353353-# CONFIG_SYS_HYPERVISOR is not set354354-# CONFIG_CONNECTOR is not set355355-# CONFIG_MTD is not set356356-# CONFIG_PARPORT is not set357357-CONFIG_PNP=y358358-# CONFIG_PNP_DEBUG is not set359359-360360-#361361-# Protocols362362-#363363-CONFIG_PNPACPI=y364364-CONFIG_BLK_DEV=y365365-# CONFIG_BLK_CPQ_DA is not set366366-# CONFIG_BLK_CPQ_CISS_DA is not set367367-# CONFIG_BLK_DEV_DAC960 is not set368368-# CONFIG_BLK_DEV_UMEM is not set369369-# CONFIG_BLK_DEV_COW_COMMON is not set370370-CONFIG_BLK_DEV_LOOP=y371371-CONFIG_BLK_DEV_CRYPTOLOOP=m372372-CONFIG_BLK_DEV_NBD=m373373-# CONFIG_BLK_DEV_SX8 is not set374374-# CONFIG_BLK_DEV_UB is not set375375-CONFIG_BLK_DEV_RAM=y376376-CONFIG_BLK_DEV_RAM_COUNT=16377377-CONFIG_BLK_DEV_RAM_SIZE=4096378378-CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024379379-# CONFIG_CDROM_PKTCDVD is not set380380-CONFIG_ATA_OVER_ETH=m381381-CONFIG_MISC_DEVICES=y382382-# CONFIG_PHANTOM is not set383383-# CONFIG_EEPROM_93CX6 is not set384384-CONFIG_SGI_IOC4=y385385-# CONFIG_TIFM_CORE is not set386386-CONFIG_IDE=y387387-CONFIG_IDE_MAX_HWIFS=4388388-CONFIG_BLK_DEV_IDE=y389389-390390-#391391-# Please see Documentation/ide.txt for help/info on IDE drives392392-#393393-# CONFIG_BLK_DEV_IDE_SATA is not set394394-CONFIG_BLK_DEV_IDEDISK=y395395-# CONFIG_IDEDISK_MULTI_MODE is not set396396-CONFIG_BLK_DEV_IDECD=y397397-# CONFIG_BLK_DEV_IDETAPE is not set398398-# CONFIG_BLK_DEV_IDEFLOPPY is not set399399-# CONFIG_BLK_DEV_IDESCSI is not set400400-# CONFIG_BLK_DEV_IDEACPI is not set401401-# CONFIG_IDE_TASK_IOCTL is not set402402-CONFIG_IDE_PROC_FS=y403403-404404-#405405-# IDE chipset support/bugfixes406406-#407407-CONFIG_IDE_GENERIC=y408408-# CONFIG_BLK_DEV_PLATFORM is not set409409-# CONFIG_BLK_DEV_IDEPNP is not set410410-411411-#412412-# PCI IDE chipsets support413413-#414414-CONFIG_BLK_DEV_IDEPCI=y415415-CONFIG_IDEPCI_SHARE_IRQ=y416416-CONFIG_IDEPCI_PCIBUS_ORDER=y417417-# CONFIG_BLK_DEV_OFFBOARD is not set418418-# CONFIG_BLK_DEV_GENERIC is not set419419-# CONFIG_BLK_DEV_OPTI621 is not set420420-CONFIG_BLK_DEV_IDEDMA_PCI=y421421-# CONFIG_BLK_DEV_AEC62XX is not set422422-# CONFIG_BLK_DEV_ALI15X3 is not set423423-# CONFIG_BLK_DEV_AMD74XX is not set424424-# CONFIG_BLK_DEV_CMD64X is not set425425-# CONFIG_BLK_DEV_TRIFLEX is not set426426-# CONFIG_BLK_DEV_CY82C693 is not set427427-# CONFIG_BLK_DEV_CS5520 is not set428428-# CONFIG_BLK_DEV_CS5530 is not set429429-# CONFIG_BLK_DEV_HPT34X is not set430430-# CONFIG_BLK_DEV_HPT366 is not set431431-# CONFIG_BLK_DEV_JMICRON is not set432432-# CONFIG_BLK_DEV_SC1200 is not set433433-# CONFIG_BLK_DEV_PIIX is not set434434-# CONFIG_BLK_DEV_IT8213 is not set435435-# CONFIG_BLK_DEV_IT821X is not set436436-# CONFIG_BLK_DEV_NS87415 is not set437437-# CONFIG_BLK_DEV_PDC202XX_OLD is not set438438-# CONFIG_BLK_DEV_PDC202XX_NEW is not set439439-# CONFIG_BLK_DEV_SVWKS is not set440440-CONFIG_BLK_DEV_SGIIOC4=y441441-# CONFIG_BLK_DEV_SIIMAGE is not set442442-# CONFIG_BLK_DEV_SLC90E66 is not set443443-# CONFIG_BLK_DEV_TRM290 is not set444444-# CONFIG_BLK_DEV_VIA82CXXX is not set445445-# CONFIG_BLK_DEV_TC86C001 is not set446446-# CONFIG_IDE_ARM is not set447447-CONFIG_BLK_DEV_IDEDMA=y448448-# CONFIG_BLK_DEV_HD is not set449449-450450-#451451-# SCSI device support452452-#453453-# CONFIG_RAID_ATTRS is not set454454-CONFIG_SCSI=y455455-CONFIG_SCSI_DMA=y456456-# CONFIG_SCSI_TGT is not set457457-CONFIG_SCSI_NETLINK=y458458-CONFIG_SCSI_PROC_FS=y459459-460460-#461461-# SCSI support type (disk, tape, CD-ROM)462462-#463463-CONFIG_BLK_DEV_SD=y464464-CONFIG_CHR_DEV_ST=m465465-# CONFIG_CHR_DEV_OSST is not set466466-CONFIG_BLK_DEV_SR=m467467-# CONFIG_BLK_DEV_SR_VENDOR is not set468468-CONFIG_CHR_DEV_SG=m469469-CONFIG_CHR_DEV_SCH=m470470-471471-#472472-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs473473-#474474-# CONFIG_SCSI_MULTI_LUN is not set475475-CONFIG_SCSI_CONSTANTS=y476476-# CONFIG_SCSI_LOGGING is not set477477-# CONFIG_SCSI_SCAN_ASYNC is not set478478-CONFIG_SCSI_WAIT_SCAN=m479479-480480-#481481-# SCSI Transports482482-#483483-CONFIG_SCSI_SPI_ATTRS=y484484-CONFIG_SCSI_FC_ATTRS=y485485-CONFIG_SCSI_ISCSI_ATTRS=m486486-CONFIG_SCSI_SAS_ATTRS=y487487-CONFIG_SCSI_SAS_LIBSAS=y488488-# CONFIG_SCSI_SAS_ATA is not set489489-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set490490-CONFIG_SCSI_SRP_ATTRS=y491491-CONFIG_SCSI_LOWLEVEL=y492492-CONFIG_ISCSI_TCP=m493493-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set494494-# CONFIG_SCSI_3W_9XXX is not set495495-# CONFIG_SCSI_ACARD is not set496496-# CONFIG_SCSI_AACRAID is not set497497-# CONFIG_SCSI_AIC7XXX is not set498498-# CONFIG_SCSI_AIC7XXX_OLD is not set499499-# CONFIG_SCSI_AIC79XX is not set500500-# CONFIG_SCSI_AIC94XX is not set501501-# CONFIG_SCSI_ADVANSYS is not set502502-# CONFIG_SCSI_ARCMSR is not set503503-# CONFIG_MEGARAID_NEWGEN is not set504504-# CONFIG_MEGARAID_LEGACY is not set505505-# CONFIG_MEGARAID_SAS is not set506506-# CONFIG_SCSI_HPTIOP is not set507507-# CONFIG_SCSI_DMX3191D is not set508508-# CONFIG_SCSI_FUTURE_DOMAIN is not set509509-# CONFIG_SCSI_IPS is not set510510-# CONFIG_SCSI_INITIO is not set511511-# CONFIG_SCSI_INIA100 is not set512512-# CONFIG_SCSI_STEX is not set513513-# CONFIG_SCSI_SYM53C8XX_2 is not set514514-# CONFIG_SCSI_IPR is not set515515-CONFIG_SCSI_QLOGIC_1280=y516516-CONFIG_SCSI_QLA_FC=y517517-# CONFIG_SCSI_QLA_ISCSI is not set518518-# CONFIG_SCSI_LPFC is not set519519-# CONFIG_SCSI_DC395x is not set520520-# CONFIG_SCSI_DC390T is not set521521-# CONFIG_SCSI_DEBUG is not set522522-# CONFIG_SCSI_SRP is not set523523-CONFIG_ATA=y524524-CONFIG_ATA_NONSTANDARD=y525525-CONFIG_ATA_ACPI=y526526-# CONFIG_SATA_AHCI is not set527527-# CONFIG_SATA_SVW is not set528528-# CONFIG_ATA_PIIX is not set529529-# CONFIG_SATA_MV is not set530530-# CONFIG_SATA_NV is not set531531-# CONFIG_PDC_ADMA is not set532532-# CONFIG_SATA_QSTOR is not set533533-# CONFIG_SATA_PROMISE is not set534534-# CONFIG_SATA_SX4 is not set535535-# CONFIG_SATA_SIL is not set536536-# CONFIG_SATA_SIL24 is not set537537-# CONFIG_SATA_SIS is not set538538-# CONFIG_SATA_ULI is not set539539-# CONFIG_SATA_VIA is not set540540-CONFIG_SATA_VITESSE=y541541-# CONFIG_SATA_INIC162X is not set542542-# CONFIG_PATA_ACPI is not set543543-# CONFIG_PATA_ALI is not set544544-# CONFIG_PATA_AMD is not set545545-# CONFIG_PATA_ARTOP is not set546546-# CONFIG_PATA_ATIIXP is not set547547-# CONFIG_PATA_CMD640_PCI is not set548548-# CONFIG_PATA_CMD64X is not set549549-# CONFIG_PATA_CS5520 is not set550550-# CONFIG_PATA_CS5530 is not set551551-# CONFIG_PATA_CYPRESS is not set552552-# CONFIG_PATA_EFAR is not set553553-# CONFIG_ATA_GENERIC is not set554554-# CONFIG_PATA_HPT366 is not set555555-# CONFIG_PATA_HPT37X is not set556556-# CONFIG_PATA_HPT3X2N is not set557557-# CONFIG_PATA_HPT3X3 is not set558558-# CONFIG_PATA_IT821X is not set559559-# CONFIG_PATA_IT8213 is not set560560-# CONFIG_PATA_JMICRON is not set561561-# CONFIG_PATA_TRIFLEX is not set562562-# CONFIG_PATA_MARVELL is not set563563-# CONFIG_PATA_MPIIX is not set564564-# CONFIG_PATA_OLDPIIX is not set565565-# CONFIG_PATA_NETCELL is not set566566-# CONFIG_PATA_NS87410 is not set567567-# CONFIG_PATA_NS87415 is not set568568-# CONFIG_PATA_OPTI is not set569569-# CONFIG_PATA_OPTIDMA is not set570570-# CONFIG_PATA_PDC_OLD is not set571571-# CONFIG_PATA_RADISYS is not set572572-# CONFIG_PATA_RZ1000 is not set573573-# CONFIG_PATA_SC1200 is not set574574-# CONFIG_PATA_SERVERWORKS is not set575575-# CONFIG_PATA_PDC2027X is not set576576-# CONFIG_PATA_SIL680 is not set577577-# CONFIG_PATA_SIS is not set578578-# CONFIG_PATA_VIA is not set579579-# CONFIG_PATA_WINBOND is not set580580-CONFIG_MD=y581581-CONFIG_BLK_DEV_MD=y582582-CONFIG_MD_LINEAR=y583583-CONFIG_MD_RAID0=y584584-CONFIG_MD_RAID1=y585585-# CONFIG_MD_RAID10 is not set586586-CONFIG_MD_RAID456=y587587-# CONFIG_MD_RAID5_RESHAPE is not set588588-CONFIG_MD_MULTIPATH=y589589-# CONFIG_MD_FAULTY is not set590590-CONFIG_BLK_DEV_DM=y591591-# CONFIG_DM_DEBUG is not set592592-CONFIG_DM_CRYPT=m593593-CONFIG_DM_SNAPSHOT=m594594-CONFIG_DM_MIRROR=m595595-CONFIG_DM_ZERO=m596596-CONFIG_DM_MULTIPATH=m597597-CONFIG_DM_MULTIPATH_EMC=m598598-# CONFIG_DM_MULTIPATH_RDAC is not set599599-# CONFIG_DM_DELAY is not set600600-CONFIG_FUSION=y601601-CONFIG_FUSION_SPI=y602602-CONFIG_FUSION_FC=y603603-CONFIG_FUSION_SAS=y604604-CONFIG_FUSION_MAX_SGE=128605605-CONFIG_FUSION_CTL=m606606-CONFIG_FUSION_LOGGING=y607607-608608-#609609-# IEEE 1394 (FireWire) support610610-#611611-# CONFIG_FIREWIRE is not set612612-# CONFIG_IEEE1394 is not set613613-# CONFIG_I2O is not set614614-CONFIG_NETDEVICES=y615615-# CONFIG_NETDEVICES_MULTIQUEUE is not set616616-# CONFIG_DUMMY is not set617617-# CONFIG_BONDING is not set618618-# CONFIG_MACVLAN is not set619619-# CONFIG_EQUALIZER is not set620620-# CONFIG_TUN is not set621621-# CONFIG_VETH is not set622622-# CONFIG_NET_SB1000 is not set623623-# CONFIG_IP1000 is not set624624-# CONFIG_ARCNET is not set625625-# CONFIG_NET_ETHERNET is not set626626-CONFIG_NETDEV_1000=y627627-# CONFIG_ACENIC is not set628628-# CONFIG_DL2K is not set629629-# CONFIG_E1000 is not set630630-# CONFIG_E1000E is not set631631-# CONFIG_NS83820 is not set632632-# CONFIG_HAMACHI is not set633633-# CONFIG_YELLOWFIN is not set634634-# CONFIG_R8169 is not set635635-# CONFIG_SIS190 is not set636636-# CONFIG_SKGE is not set637637-# CONFIG_SKY2 is not set638638-# CONFIG_SK98LIN is not set639639-# CONFIG_VIA_VELOCITY is not set640640-CONFIG_TIGON3=y641641-# CONFIG_BNX2 is not set642642-# CONFIG_QLA3XXX is not set643643-# CONFIG_ATL1 is not set644644-CONFIG_NETDEV_10000=y645645-CONFIG_CHELSIO_T1=m646646-CONFIG_CHELSIO_T1_1G=y647647-# CONFIG_CHELSIO_T1_NAPI is not set648648-CONFIG_CHELSIO_T3=m649649-CONFIG_IXGBE=m650650-# CONFIG_IXGB is not set651651-CONFIG_S2IO=m652652-# CONFIG_S2IO_NAPI is not set653653-# CONFIG_MYRI10GE is not set654654-# CONFIG_NETXEN_NIC is not set655655-# CONFIG_NIU is not set656656-# CONFIG_MLX4_CORE is not set657657-# CONFIG_TEHUTI is not set658658-# CONFIG_TR is not set659659-660660-#661661-# Wireless LAN662662-#663663-# CONFIG_WLAN_PRE80211 is not set664664-# CONFIG_WLAN_80211 is not set665665-666666-#667667-# USB Network Adapters668668-#669669-# CONFIG_USB_CATC is not set670670-# CONFIG_USB_KAWETH is not set671671-# CONFIG_USB_PEGASUS is not set672672-# CONFIG_USB_RTL8150 is not set673673-# CONFIG_USB_USBNET_MII is not set674674-# CONFIG_USB_USBNET is not set675675-# CONFIG_WAN is not set676676-# CONFIG_FDDI is not set677677-# CONFIG_HIPPI is not set678678-# CONFIG_PPP is not set679679-# CONFIG_SLIP is not set680680-# CONFIG_NET_FC is not set681681-# CONFIG_SHAPER is not set682682-CONFIG_NETCONSOLE=y683683-# CONFIG_NETCONSOLE_DYNAMIC is not set684684-CONFIG_NETPOLL=y685685-# CONFIG_NETPOLL_TRAP is not set686686-CONFIG_NET_POLL_CONTROLLER=y687687-# CONFIG_ISDN is not set688688-# CONFIG_PHONE is not set689689-690690-#691691-# Input device support692692-#693693-CONFIG_INPUT=y694694-# CONFIG_INPUT_FF_MEMLESS is not set695695-# CONFIG_INPUT_POLLDEV is not set696696-697697-#698698-# Userland interfaces699699-#700700-CONFIG_INPUT_MOUSEDEV=y701701-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set702702-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024703703-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768704704-# CONFIG_INPUT_JOYDEV is not set705705-# CONFIG_INPUT_EVDEV is not set706706-# CONFIG_INPUT_EVBUG is not set707707-708708-#709709-# Input Device Drivers710710-#711711-# CONFIG_INPUT_KEYBOARD is not set712712-# CONFIG_INPUT_MOUSE is not set713713-# CONFIG_INPUT_JOYSTICK is not set714714-# CONFIG_INPUT_TABLET is not set715715-# CONFIG_INPUT_TOUCHSCREEN is not set716716-# CONFIG_INPUT_MISC is not set717717-718718-#719719-# Hardware I/O ports720720-#721721-# CONFIG_SERIO is not set722722-# CONFIG_GAMEPORT is not set723723-724724-#725725-# Character devices726726-#727727-CONFIG_VT=y728728-# CONFIG_VT_UNICODE is not set729729-CONFIG_VT_CONSOLE=y730730-CONFIG_HW_CONSOLE=y731731-# CONFIG_VT_HW_CONSOLE_BINDING is not set732732-CONFIG_SERIAL_NONSTANDARD=y733733-# CONFIG_COMPUTONE is not set734734-# CONFIG_ROCKETPORT is not set735735-# CONFIG_CYCLADES is not set736736-# CONFIG_DIGIEPCA is not set737737-# CONFIG_MOXA_INTELLIO is not set738738-# CONFIG_MOXA_SMARTIO is not set739739-# CONFIG_MOXA_SMARTIO_NEW is not set740740-# CONFIG_ISI is not set741741-# CONFIG_SYNCLINKMP is not set742742-# CONFIG_SYNCLINK_GT is not set743743-# CONFIG_N_HDLC is not set744744-# CONFIG_SPECIALIX is not set745745-# CONFIG_SX is not set746746-# CONFIG_RIO is not set747747-# CONFIG_STALDRV is not set748748-CONFIG_SGI_SNSC=y749749-CONFIG_SGI_TIOCX=y750750-CONFIG_SGI_MBCS=m751751-752752-#753753-# Serial drivers754754-#755755-# CONFIG_SERIAL_8250 is not set756756-757757-#758758-# Non-8250 serial port support759759-#760760-CONFIG_SERIAL_CORE=y761761-CONFIG_SERIAL_CORE_CONSOLE=y762762-CONFIG_SERIAL_SGI_L1_CONSOLE=y763763-# CONFIG_SERIAL_JSM is not set764764-CONFIG_SERIAL_SGI_IOC4=y765765-CONFIG_SERIAL_SGI_IOC3=y766766-CONFIG_UNIX98_PTYS=y767767-CONFIG_LEGACY_PTYS=y768768-CONFIG_LEGACY_PTY_COUNT=256769769-# CONFIG_IPMI_HANDLER is not set770770-# CONFIG_WATCHDOG is not set771771-# CONFIG_HW_RANDOM is not set772772-CONFIG_EFI_RTC=y773773-# CONFIG_R3964 is not set774774-# CONFIG_APPLICOM is not set775775-CONFIG_RAW_DRIVER=m776776-CONFIG_MAX_RAW_DEVS=256777777-# CONFIG_HPET is not set778778-# CONFIG_HANGCHECK_TIMER is not set779779-CONFIG_MMTIMER=y780780-# CONFIG_TCG_TPM is not set781781-CONFIG_DEVPORT=y782782-# CONFIG_I2C is not set783783-784784-#785785-# SPI support786786-#787787-# CONFIG_SPI is not set788788-# CONFIG_SPI_MASTER is not set789789-# CONFIG_W1 is not set790790-# CONFIG_POWER_SUPPLY is not set791791-# CONFIG_HWMON is not set792792-793793-#794794-# Sonics Silicon Backplane795795-#796796-CONFIG_SSB_POSSIBLE=y797797-# CONFIG_SSB is not set798798-799799-#800800-# Multifunction device drivers801801-#802802-# CONFIG_MFD_SM501 is not set803803-804804-#805805-# Multimedia devices806806-#807807-# CONFIG_VIDEO_DEV is not set808808-# CONFIG_DVB_CORE is not set809809-# CONFIG_DAB is not set810810-811811-#812812-# Graphics support813813-#814814-CONFIG_AGP=y815815-CONFIG_AGP_SGI_TIOCA=y816816-# CONFIG_DRM is not set817817-# CONFIG_VGASTATE is not set818818-CONFIG_VIDEO_OUTPUT_CONTROL=m819819-# CONFIG_FB is not set820820-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set821821-822822-#823823-# Display device support824824-#825825-# CONFIG_DISPLAY_SUPPORT is not set826826-827827-#828828-# Console display driver support829829-#830830-CONFIG_VGA_CONSOLE=y831831-# CONFIG_VGACON_SOFT_SCROLLBACK is not set832832-CONFIG_DUMMY_CONSOLE=y833833-834834-#835835-# Sound836836-#837837-# CONFIG_SOUND is not set838838-CONFIG_HID_SUPPORT=y839839-CONFIG_HID=y840840-CONFIG_HID_DEBUG=y841841-# CONFIG_HIDRAW is not set842842-843843-#844844-# USB Input Devices845845-#846846-CONFIG_USB_HID=m847847-# CONFIG_USB_HIDINPUT_POWERBOOK is not set848848-# CONFIG_HID_FF is not set849849-# CONFIG_USB_HIDDEV is not set850850-851851-#852852-# USB HID Boot Protocol drivers853853-#854854-# CONFIG_USB_KBD is not set855855-# CONFIG_USB_MOUSE is not set856856-CONFIG_USB_SUPPORT=y857857-CONFIG_USB_ARCH_HAS_HCD=y858858-CONFIG_USB_ARCH_HAS_OHCI=y859859-CONFIG_USB_ARCH_HAS_EHCI=y860860-CONFIG_USB=m861861-# CONFIG_USB_DEBUG is not set862862-863863-#864864-# Miscellaneous USB options865865-#866866-# CONFIG_USB_DEVICEFS is not set867867-CONFIG_USB_DEVICE_CLASS=y868868-# CONFIG_USB_DYNAMIC_MINORS is not set869869-# CONFIG_USB_SUSPEND is not set870870-# CONFIG_USB_PERSIST is not set871871-# CONFIG_USB_OTG is not set872872-873873-#874874-# USB Host Controller Drivers875875-#876876-CONFIG_USB_EHCI_HCD=m877877-# CONFIG_USB_EHCI_SPLIT_ISO is not set878878-# CONFIG_USB_EHCI_ROOT_HUB_TT is not set879879-# CONFIG_USB_EHCI_TT_NEWSCHED is not set880880-# CONFIG_USB_ISP116X_HCD is not set881881-CONFIG_USB_OHCI_HCD=m882882-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set883883-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set884884-CONFIG_USB_OHCI_LITTLE_ENDIAN=y885885-CONFIG_USB_UHCI_HCD=m886886-# CONFIG_USB_SL811_HCD is not set887887-# CONFIG_USB_R8A66597_HCD is not set888888-889889-#890890-# USB Device Class drivers891891-#892892-# CONFIG_USB_ACM is not set893893-# CONFIG_USB_PRINTER is not set894894-895895-#896896-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'897897-#898898-899899-#900900-# may also be needed; see USB_STORAGE Help for more information901901-#902902-# CONFIG_USB_STORAGE is not set903903-# CONFIG_USB_LIBUSUAL is not set904904-905905-#906906-# USB Imaging devices907907-#908908-# CONFIG_USB_MDC800 is not set909909-# CONFIG_USB_MICROTEK is not set910910-CONFIG_USB_MON=y911911-912912-#913913-# USB port drivers914914-#915915-916916-#917917-# USB Serial Converter support918918-#919919-# CONFIG_USB_SERIAL is not set920920-921921-#922922-# USB Miscellaneous drivers923923-#924924-# CONFIG_USB_EMI62 is not set925925-# CONFIG_USB_EMI26 is not set926926-# CONFIG_USB_ADUTUX is not set927927-# CONFIG_USB_AUERSWALD is not set928928-# CONFIG_USB_RIO500 is not set929929-# CONFIG_USB_LEGOTOWER is not set930930-# CONFIG_USB_LCD is not set931931-# CONFIG_USB_BERRY_CHARGE is not set932932-# CONFIG_USB_LED is not set933933-# CONFIG_USB_CYPRESS_CY7C63 is not set934934-# CONFIG_USB_CYTHERM is not set935935-# CONFIG_USB_PHIDGET is not set936936-# CONFIG_USB_IDMOUSE is not set937937-# CONFIG_USB_FTDI_ELAN is not set938938-# CONFIG_USB_APPLEDISPLAY is not set939939-# CONFIG_USB_SISUSBVGA is not set940940-# CONFIG_USB_LD is not set941941-# CONFIG_USB_TRANCEVIBRATOR is not set942942-# CONFIG_USB_IOWARRIOR is not set943943-944944-#945945-# USB DSL modem support946946-#947947-948948-#949949-# USB Gadget Support950950-#951951-# CONFIG_USB_GADGET is not set952952-# CONFIG_MMC is not set953953-# CONFIG_NEW_LEDS is not set954954-CONFIG_INFINIBAND=m955955-# CONFIG_INFINIBAND_USER_MAD is not set956956-CONFIG_INFINIBAND_USER_ACCESS=m957957-CONFIG_INFINIBAND_USER_MEM=y958958-CONFIG_INFINIBAND_ADDR_TRANS=y959959-CONFIG_INFINIBAND_MTHCA=m960960-CONFIG_INFINIBAND_MTHCA_DEBUG=y961961-# CONFIG_INFINIBAND_AMSO1100 is not set962962-# CONFIG_INFINIBAND_CXGB3 is not set963963-# CONFIG_MLX4_INFINIBAND is not set964964-CONFIG_INFINIBAND_IPOIB=m965965-# CONFIG_INFINIBAND_IPOIB_CM is not set966966-CONFIG_INFINIBAND_IPOIB_DEBUG=y967967-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set968968-CONFIG_INFINIBAND_SRP=m969969-# CONFIG_INFINIBAND_ISER is not set970970-# CONFIG_RTC_CLASS is not set971971-972972-#973973-# Userspace I/O974974-#975975-# CONFIG_UIO is not set976976-CONFIG_MSPEC=y977977-978978-#979979-# File systems980980-#981981-CONFIG_EXT2_FS=y982982-CONFIG_EXT2_FS_XATTR=y983983-CONFIG_EXT2_FS_POSIX_ACL=y984984-CONFIG_EXT2_FS_SECURITY=y985985-# CONFIG_EXT2_FS_XIP is not set986986-CONFIG_EXT3_FS=y987987-CONFIG_EXT3_FS_XATTR=y988988-CONFIG_EXT3_FS_POSIX_ACL=y989989-CONFIG_EXT3_FS_SECURITY=y990990-# CONFIG_EXT4DEV_FS is not set991991-CONFIG_JBD=y992992-# CONFIG_JBD_DEBUG is not set993993-CONFIG_FS_MBCACHE=y994994-CONFIG_REISERFS_FS=y995995-# CONFIG_REISERFS_CHECK is not set996996-# CONFIG_REISERFS_PROC_INFO is not set997997-CONFIG_REISERFS_FS_XATTR=y998998-CONFIG_REISERFS_FS_POSIX_ACL=y999999-CONFIG_REISERFS_FS_SECURITY=y10001000-# CONFIG_JFS_FS is not set10011001-CONFIG_FS_POSIX_ACL=y10021002-CONFIG_XFS_FS=y10031003-CONFIG_XFS_QUOTA=y10041004-# CONFIG_XFS_SECURITY is not set10051005-CONFIG_XFS_POSIX_ACL=y10061006-CONFIG_XFS_RT=y10071007-# CONFIG_GFS2_FS is not set10081008-# CONFIG_OCFS2_FS is not set10091009-# CONFIG_MINIX_FS is not set10101010-# CONFIG_ROMFS_FS is not set10111011-CONFIG_INOTIFY=y10121012-CONFIG_INOTIFY_USER=y10131013-CONFIG_QUOTA=y10141014-CONFIG_QUOTA_NETLINK_INTERFACE=y10151015-CONFIG_PRINT_QUOTA_WARNING=y10161016-# CONFIG_QFMT_V1 is not set10171017-# CONFIG_QFMT_V2 is not set10181018-CONFIG_QUOTACTL=y10191019-CONFIG_DNOTIFY=y10201020-CONFIG_AUTOFS_FS=m10211021-CONFIG_AUTOFS4_FS=m10221022-CONFIG_FUSE_FS=m10231023-10241024-#10251025-# CD-ROM/DVD Filesystems10261026-#10271027-CONFIG_ISO9660_FS=y10281028-CONFIG_JOLIET=y10291029-# CONFIG_ZISOFS is not set10301030-CONFIG_UDF_FS=m10311031-CONFIG_UDF_NLS=y10321032-10331033-#10341034-# DOS/FAT/NT Filesystems10351035-#10361036-CONFIG_FAT_FS=y10371037-# CONFIG_MSDOS_FS is not set10381038-CONFIG_VFAT_FS=y10391039-CONFIG_FAT_DEFAULT_CODEPAGE=43710401040-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"10411041-# CONFIG_NTFS_FS is not set10421042-10431043-#10441044-# Pseudo filesystems10451045-#10461046-CONFIG_PROC_FS=y10471047-CONFIG_PROC_KCORE=y10481048-CONFIG_PROC_SYSCTL=y10491049-CONFIG_SYSFS=y10501050-CONFIG_TMPFS=y10511051-# CONFIG_TMPFS_POSIX_ACL is not set10521052-CONFIG_HUGETLBFS=y10531053-CONFIG_HUGETLB_PAGE=y10541054-# CONFIG_CONFIGFS_FS is not set10551055-10561056-#10571057-# Miscellaneous filesystems10581058-#10591059-# CONFIG_ADFS_FS is not set10601060-# CONFIG_AFFS_FS is not set10611061-# CONFIG_HFS_FS is not set10621062-# CONFIG_HFSPLUS_FS is not set10631063-# CONFIG_BEFS_FS is not set10641064-# CONFIG_BFS_FS is not set10651065-# CONFIG_EFS_FS is not set10661066-# CONFIG_CRAMFS is not set10671067-# CONFIG_VXFS_FS is not set10681068-# CONFIG_HPFS_FS is not set10691069-# CONFIG_QNX4FS_FS is not set10701070-# CONFIG_SYSV_FS is not set10711071-# CONFIG_UFS_FS is not set10721072-CONFIG_NETWORK_FILESYSTEMS=y10731073-CONFIG_NFS_FS=m10741074-CONFIG_NFS_V3=y10751075-# CONFIG_NFS_V3_ACL is not set10761076-CONFIG_NFS_V4=y10771077-CONFIG_NFS_DIRECTIO=y10781078-CONFIG_NFSD=m10791079-CONFIG_NFSD_V3=y10801080-# CONFIG_NFSD_V3_ACL is not set10811081-CONFIG_NFSD_V4=y10821082-CONFIG_NFSD_TCP=y10831083-CONFIG_LOCKD=m10841084-CONFIG_LOCKD_V4=y10851085-CONFIG_EXPORTFS=m10861086-CONFIG_NFS_COMMON=y10871087-CONFIG_SUNRPC=m10881088-CONFIG_SUNRPC_GSS=m10891089-CONFIG_SUNRPC_XPRT_RDMA=m10901090-# CONFIG_SUNRPC_BIND34 is not set10911091-CONFIG_RPCSEC_GSS_KRB5=m10921092-# CONFIG_RPCSEC_GSS_SPKM3 is not set10931093-CONFIG_SMB_FS=m10941094-# CONFIG_SMB_NLS_DEFAULT is not set10951095-CONFIG_CIFS=m10961096-# CONFIG_CIFS_STATS is not set10971097-# CONFIG_CIFS_WEAK_PW_HASH is not set10981098-# CONFIG_CIFS_XATTR is not set10991099-# CONFIG_CIFS_DEBUG2 is not set11001100-# CONFIG_CIFS_EXPERIMENTAL is not set11011101-# CONFIG_NCP_FS is not set11021102-# CONFIG_CODA_FS is not set11031103-# CONFIG_AFS_FS is not set11041104-11051105-#11061106-# Partition Types11071107-#11081108-CONFIG_PARTITION_ADVANCED=y11091109-# CONFIG_ACORN_PARTITION is not set11101110-# CONFIG_OSF_PARTITION is not set11111111-# CONFIG_AMIGA_PARTITION is not set11121112-# CONFIG_ATARI_PARTITION is not set11131113-# CONFIG_MAC_PARTITION is not set11141114-CONFIG_MSDOS_PARTITION=y11151115-# CONFIG_BSD_DISKLABEL is not set11161116-# CONFIG_MINIX_SUBPARTITION is not set11171117-# CONFIG_SOLARIS_X86_PARTITION is not set11181118-# CONFIG_UNIXWARE_DISKLABEL is not set11191119-# CONFIG_LDM_PARTITION is not set11201120-CONFIG_SGI_PARTITION=y11211121-# CONFIG_ULTRIX_PARTITION is not set11221122-# CONFIG_SUN_PARTITION is not set11231123-# CONFIG_KARMA_PARTITION is not set11241124-CONFIG_EFI_PARTITION=y11251125-# CONFIG_SYSV68_PARTITION is not set11261126-CONFIG_NLS=y11271127-CONFIG_NLS_DEFAULT="iso8859-1"11281128-CONFIG_NLS_CODEPAGE_437=y11291129-# CONFIG_NLS_CODEPAGE_737 is not set11301130-# CONFIG_NLS_CODEPAGE_775 is not set11311131-# CONFIG_NLS_CODEPAGE_850 is not set11321132-# CONFIG_NLS_CODEPAGE_852 is not set11331133-# CONFIG_NLS_CODEPAGE_855 is not set11341134-# CONFIG_NLS_CODEPAGE_857 is not set11351135-# CONFIG_NLS_CODEPAGE_860 is not set11361136-# CONFIG_NLS_CODEPAGE_861 is not set11371137-# CONFIG_NLS_CODEPAGE_862 is not set11381138-# CONFIG_NLS_CODEPAGE_863 is not set11391139-# CONFIG_NLS_CODEPAGE_864 is not set11401140-# CONFIG_NLS_CODEPAGE_865 is not set11411141-# CONFIG_NLS_CODEPAGE_866 is not set11421142-# CONFIG_NLS_CODEPAGE_869 is not set11431143-# CONFIG_NLS_CODEPAGE_936 is not set11441144-# CONFIG_NLS_CODEPAGE_950 is not set11451145-# CONFIG_NLS_CODEPAGE_932 is not set11461146-# CONFIG_NLS_CODEPAGE_949 is not set11471147-# CONFIG_NLS_CODEPAGE_874 is not set11481148-# CONFIG_NLS_ISO8859_8 is not set11491149-# CONFIG_NLS_CODEPAGE_1250 is not set11501150-# CONFIG_NLS_CODEPAGE_1251 is not set11511151-# CONFIG_NLS_ASCII is not set11521152-CONFIG_NLS_ISO8859_1=y11531153-# CONFIG_NLS_ISO8859_2 is not set11541154-# CONFIG_NLS_ISO8859_3 is not set11551155-# CONFIG_NLS_ISO8859_4 is not set11561156-# CONFIG_NLS_ISO8859_5 is not set11571157-# CONFIG_NLS_ISO8859_6 is not set11581158-# CONFIG_NLS_ISO8859_7 is not set11591159-# CONFIG_NLS_ISO8859_9 is not set11601160-# CONFIG_NLS_ISO8859_13 is not set11611161-# CONFIG_NLS_ISO8859_14 is not set11621162-# CONFIG_NLS_ISO8859_15 is not set11631163-# CONFIG_NLS_KOI8_R is not set11641164-# CONFIG_NLS_KOI8_U is not set11651165-CONFIG_NLS_UTF8=y11661166-# CONFIG_DLM is not set11671167-11681168-#11691169-# Library routines11701170-#11711171-CONFIG_BITREVERSE=y11721172-# CONFIG_CRC_CCITT is not set11731173-CONFIG_CRC16=m11741174-# CONFIG_CRC_ITU_T is not set11751175-CONFIG_CRC32=y11761176-# CONFIG_CRC7 is not set11771177-CONFIG_LIBCRC32C=m11781178-CONFIG_ZLIB_INFLATE=m11791179-CONFIG_ZLIB_DEFLATE=m11801180-CONFIG_GENERIC_ALLOCATOR=y11811181-CONFIG_PLIST=y11821182-CONFIG_HAS_IOMEM=y11831183-CONFIG_HAS_IOPORT=y11841184-CONFIG_HAS_DMA=y11851185-CONFIG_GENERIC_HARDIRQS=y11861186-CONFIG_GENERIC_IRQ_PROBE=y11871187-CONFIG_GENERIC_PENDING_IRQ=y11881188-CONFIG_IRQ_PER_CPU=y11891189-11901190-#11911191-# Instrumentation Support11921192-#11931193-# CONFIG_PROFILING is not set11941194-# CONFIG_KPROBES is not set11951195-11961196-#11971197-# Kernel hacking11981198-#11991199-# CONFIG_PRINTK_TIME is not set12001200-CONFIG_ENABLE_MUST_CHECK=y12011201-CONFIG_MAGIC_SYSRQ=y12021202-# CONFIG_UNUSED_SYMBOLS is not set12031203-# CONFIG_DEBUG_FS is not set12041204-# CONFIG_HEADERS_CHECK is not set12051205-CONFIG_DEBUG_KERNEL=y12061206-# CONFIG_DEBUG_SHIRQ is not set12071207-CONFIG_DETECT_SOFTLOCKUP=y12081208-CONFIG_SCHED_DEBUG=y12091209-# CONFIG_SCHEDSTATS is not set12101210-# CONFIG_TIMER_STATS is not set12111211-# CONFIG_SLUB_DEBUG_ON is not set12121212-# CONFIG_DEBUG_RT_MUTEXES is not set12131213-# CONFIG_RT_MUTEX_TESTER is not set12141214-# CONFIG_DEBUG_SPINLOCK is not set12151215-# CONFIG_DEBUG_MUTEXES is not set12161216-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set12171217-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set12181218-# CONFIG_DEBUG_KOBJECT is not set12191219-CONFIG_DEBUG_INFO=y12201220-# CONFIG_DEBUG_VM is not set12211221-# CONFIG_DEBUG_LIST is not set12221222-CONFIG_FORCED_INLINING=y12231223-# CONFIG_BOOT_PRINTK_DELAY is not set12241224-# CONFIG_RCU_TORTURE_TEST is not set12251225-# CONFIG_FAULT_INJECTION is not set12261226-CONFIG_IA64_GRANULE_16MB=y12271227-# CONFIG_IA64_GRANULE_64MB is not set12281228-# CONFIG_IA64_PRINT_HAZARDS is not set12291229-# CONFIG_DISABLE_VHPT is not set12301230-# CONFIG_IA64_DEBUG_CMPXCHG is not set12311231-# CONFIG_IA64_DEBUG_IRQ is not set12321232-CONFIG_SYSVIPC_COMPAT=y12331233-12341234-#12351235-# Security options12361236-#12371237-# CONFIG_KEYS is not set12381238-# CONFIG_SECURITY is not set12391239-# CONFIG_SECURITY_FILE_CAPABILITIES is not set12401240-CONFIG_XOR_BLOCKS=y12411241-CONFIG_ASYNC_CORE=y12421242-CONFIG_ASYNC_MEMCPY=y12431243-CONFIG_ASYNC_XOR=y12441244-CONFIG_CRYPTO=y12451245-CONFIG_CRYPTO_ALGAPI=y12461246-CONFIG_CRYPTO_BLKCIPHER=m12471247-CONFIG_CRYPTO_HASH=y12481248-CONFIG_CRYPTO_MANAGER=y12491249-CONFIG_CRYPTO_HMAC=y12501250-# CONFIG_CRYPTO_XCBC is not set12511251-# CONFIG_CRYPTO_NULL is not set12521252-# CONFIG_CRYPTO_MD4 is not set12531253-CONFIG_CRYPTO_MD5=y12541254-CONFIG_CRYPTO_SHA1=m12551255-# CONFIG_CRYPTO_SHA256 is not set12561256-# CONFIG_CRYPTO_SHA512 is not set12571257-# CONFIG_CRYPTO_WP512 is not set12581258-# CONFIG_CRYPTO_TGR192 is not set12591259-# CONFIG_CRYPTO_GF128MUL is not set12601260-CONFIG_CRYPTO_ECB=m12611261-CONFIG_CRYPTO_CBC=m12621262-CONFIG_CRYPTO_PCBC=m12631263-# CONFIG_CRYPTO_LRW is not set12641264-# CONFIG_CRYPTO_XTS is not set12651265-# CONFIG_CRYPTO_CRYPTD is not set12661266-CONFIG_CRYPTO_DES=m12671267-# CONFIG_CRYPTO_FCRYPT is not set12681268-# CONFIG_CRYPTO_BLOWFISH is not set12691269-# CONFIG_CRYPTO_TWOFISH is not set12701270-# CONFIG_CRYPTO_SERPENT is not set12711271-# CONFIG_CRYPTO_AES is not set12721272-# CONFIG_CRYPTO_CAST5 is not set12731273-# CONFIG_CRYPTO_CAST6 is not set12741274-# CONFIG_CRYPTO_TEA is not set12751275-# CONFIG_CRYPTO_ARC4 is not set12761276-# CONFIG_CRYPTO_KHAZAD is not set12771277-# CONFIG_CRYPTO_ANUBIS is not set12781278-# CONFIG_CRYPTO_SEED is not set12791279-CONFIG_CRYPTO_DEFLATE=m12801280-# CONFIG_CRYPTO_MICHAEL_MIC is not set12811281-CONFIG_CRYPTO_CRC32C=m12821282-# CONFIG_CRYPTO_CAMELLIA is not set12831283-# CONFIG_CRYPTO_TEST is not set12841284-# CONFIG_CRYPTO_AUTHENC is not set12851285-# CONFIG_CRYPTO_HW is not set
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.26-rc444-# Fri May 30 09:49:33 200833+# Linux kernel version: 2.6.27-rc444+# Thu Aug 21 19:43:29 200855#66CONFIG_SCHED_MC=y77CONFIG_MMU=y···6868CONFIG_SYSCTL=y6969# CONFIG_EMBEDDED is not set7070CONFIG_SYSCTL_SYSCALL=y7171-CONFIG_SYSCTL_SYSCALL_CHECK=y7271CONFIG_KALLSYMS=y7372# CONFIG_KALLSYMS_ALL is not set7473# CONFIG_KALLSYMS_EXTRA_PASS is not set···9293# CONFIG_MARKERS is not set9394CONFIG_HAVE_OPROFILE=y9495CONFIG_KPROBES=y9696+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set9597CONFIG_KRETPROBES=y9898+# CONFIG_HAVE_IOREMAP_PROT is not set9699CONFIG_HAVE_KPROBES=y97100CONFIG_HAVE_KRETPROBES=y101101+# CONFIG_HAVE_ARCH_TRACEHOOK is not set98102# CONFIG_HAVE_DMA_ATTRS is not set103103+# CONFIG_USE_GENERIC_SMP_HELPERS is not set104104+# CONFIG_HAVE_CLK is not set99105CONFIG_PROC_PAGE_MONITOR=y106106+# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set100107CONFIG_SLABINFO=y101108CONFIG_RT_MUTEXES=y102109# CONFIG_TINY_SHMEM is not set···118113CONFIG_BLOCK=y119114# CONFIG_BLK_DEV_IO_TRACE is not set120115CONFIG_BLK_DEV_BSG=y116116+# CONFIG_BLK_DEV_INTEGRITY is not set121117CONFIG_BLOCK_COMPAT=y122118123119#···181175CONFIG_ARCH_SPARSEMEM_ENABLE=y182176CONFIG_ARCH_SPARSEMEM_DEFAULT=y183177CONFIG_ARCH_SELECT_MEMORY_MODEL=y178178+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y179179+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y184180CONFIG_SELECT_MEMORY_MODEL=y185181# CONFIG_FLATMEM_MANUAL is not set186182# CONFIG_DISCONTIGMEM_MANUAL is not set···193185CONFIG_SPARSEMEM_EXTREME=y194186CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y195187CONFIG_SPARSEMEM_VMEMMAP=y188188+CONFIG_MEMORY_HOTPLUG=y189189+CONFIG_MEMORY_HOTPLUG_SPARSE=y190190+CONFIG_MEMORY_HOTREMOVE=y196191CONFIG_PAGEFLAGS_EXTENDED=y197192CONFIG_SPLIT_PTLOCK_CPUS=4193193+CONFIG_MIGRATION=y198194CONFIG_RESOURCES_64BIT=y199195CONFIG_ZONE_DMA_FLAG=1200196CONFIG_BOUNCE=y···210198CONFIG_MACHCHK_WARNING=y211199CONFIG_QDIO=y212200# CONFIG_QDIO_DEBUG is not set201201+CONFIG_CHSC_SCH=m213202214203#215204# Misc···219206# CONFIG_IPL_TAPE is not set220207CONFIG_IPL_VM=y221208CONFIG_BINFMT_ELF=y209209+CONFIG_COMPAT_BINFMT_ELF=y222210CONFIG_BINFMT_MISC=m223211CONFIG_FORCE_MAX_ZONEORDER=9224212# CONFIG_PROCESS_DEBUG is not set···240226CONFIG_KEXEC=y241227# CONFIG_ZFCPDUMP is not set242228CONFIG_S390_GUEST=y243243-244244-#245245-# Networking246246-#247229CONFIG_NET=y248230249231#···374364# CONFIG_NET_SCH_HTB is not set375365# CONFIG_NET_SCH_HFSC is not set376366CONFIG_NET_SCH_PRIO=m377377-CONFIG_NET_SCH_RR=m378367CONFIG_NET_SCH_RED=m379368CONFIG_NET_SCH_SFQ=m380369CONFIG_NET_SCH_TEQL=m···439430CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"440431CONFIG_STANDALONE=y441432CONFIG_PREVENT_FIRMWARE_BUILD=y442442-# CONFIG_FW_LOADER is not set433433+CONFIG_FW_LOADER=y434434+# CONFIG_FIRMWARE_IN_KERNEL is not set435435+CONFIG_EXTRA_FIRMWARE=""443436# CONFIG_DEBUG_DRIVER is not set444437# CONFIG_DEBUG_DEVRES is not set445438CONFIG_SYS_HYPERVISOR=y···518507# CONFIG_ISCSI_TCP is not set519508# CONFIG_SCSI_DEBUG is not set520509CONFIG_ZFCP=y510510+CONFIG_SCSI_DH=m511511+CONFIG_SCSI_DH_RDAC=m512512+CONFIG_SCSI_DH_HP_SW=m513513+CONFIG_SCSI_DH_EMC=m514514+CONFIG_SCSI_DH_ALUA=m521515CONFIG_MD=y522516CONFIG_BLK_DEV_MD=y523517CONFIG_MD_LINEAR=m···538522CONFIG_DM_SNAPSHOT=y539523CONFIG_DM_MIRROR=y540524CONFIG_DM_ZERO=y541541-CONFIG_DM_MULTIPATH=y542542-# CONFIG_DM_MULTIPATH_EMC is not set543543-# CONFIG_DM_MULTIPATH_RDAC is not set544544-# CONFIG_DM_MULTIPATH_HP is not set525525+CONFIG_DM_MULTIPATH=m545526# CONFIG_DM_DELAY is not set546527# CONFIG_DM_UEVENT is not set547528CONFIG_NETDEVICES=y548548-# CONFIG_NETDEVICES_MULTIQUEUE is not set549529# CONFIG_IFB is not set550530CONFIG_DUMMY=m551531CONFIG_BONDING=m···556544# CONFIG_IBM_NEW_EMAC_TAH is not set557545# CONFIG_IBM_NEW_EMAC_EMAC4 is not set558546CONFIG_NETDEV_1000=y559559-# CONFIG_E1000E_ENABLED is not set560547CONFIG_NETDEV_10000=y561548# CONFIG_TR is not set562549# CONFIG_WAN is not set···587576CONFIG_UNIX98_PTYS=y588577CONFIG_LEGACY_PTYS=y589578CONFIG_LEGACY_PTY_COUNT=256579579+CONFIG_HVC_DRIVER=y580580+CONFIG_VIRTIO_CONSOLE=y590581CONFIG_HW_RANDOM=m582582+CONFIG_HW_RANDOM_VIRTIO=m591583# CONFIG_R3964 is not set592584CONFIG_RAW_DRIVER=m593585CONFIG_MAX_RAW_DEVS=256···630616CONFIG_S390_VMUR=m631617# CONFIG_POWER_SUPPLY is not set632618# CONFIG_THERMAL is not set619619+# CONFIG_THERMAL_HWMON is not set633620# CONFIG_WATCHDOG is not set634621635622#···708693# CONFIG_CRAMFS is not set709694# CONFIG_VXFS_FS is not set710695# CONFIG_MINIX_FS is not set696696+# CONFIG_OMFS_FS is not set711697# CONFIG_HPFS_FS is not set712698# CONFIG_QNX4FS_FS is not set713699# CONFIG_ROMFS_FS is not set···728712CONFIG_EXPORTFS=y729713CONFIG_NFS_COMMON=y730714CONFIG_SUNRPC=y731731-# CONFIG_SUNRPC_BIND34 is not set732715# CONFIG_RPCSEC_GSS_KRB5 is not set733716# CONFIG_RPCSEC_GSS_SPKM3 is not set734717# CONFIG_SMB_FS is not set···795780# CONFIG_DEBUG_INFO is not set796781# CONFIG_DEBUG_VM is not set797782# CONFIG_DEBUG_WRITECOUNT is not set783783+CONFIG_DEBUG_MEMORY_INIT=y798784# CONFIG_DEBUG_LIST is not set799785# CONFIG_DEBUG_SG is not set800786# CONFIG_FRAME_POINTER is not set···805789# CONFIG_LKDTM is not set806790# CONFIG_FAULT_INJECTION is not set807791# CONFIG_LATENCYTOP is not set792792+CONFIG_SYSCTL_SYSCALL_CHECK=y808793CONFIG_SAMPLES=y809794# CONFIG_SAMPLE_KOBJECT is not set810795# CONFIG_SAMPLE_KPROBES is not set···864847# CONFIG_CRYPTO_MD4 is not set865848CONFIG_CRYPTO_MD5=m866849# CONFIG_CRYPTO_MICHAEL_MIC is not set850850+CONFIG_CRYPTO_RMD128=m851851+CONFIG_CRYPTO_RMD160=m852852+CONFIG_CRYPTO_RMD256=m853853+CONFIG_CRYPTO_RMD320=m867854CONFIG_CRYPTO_SHA1=m868855# CONFIG_CRYPTO_SHA256 is not set869856# CONFIG_CRYPTO_SHA512 is not set···916895# CONFIG_GENERIC_FIND_NEXT_BIT is not set917896# CONFIG_CRC_CCITT is not set918897# CONFIG_CRC16 is not set898898+CONFIG_CRC_T10DIF=y919899# CONFIG_CRC_ITU_T is not set920900CONFIG_CRC32=m921901CONFIG_CRC7=m
+3-3
arch/s390/include/asm/bitops.h
···709709 * __ffz_word returns __BITOPS_WORDSIZE710710 * if no zero bit is present in the word.711711 */712712- set = __ffz_word(0, *p >> bit) + bit;712712+ set = __ffz_word(bit, *p >> bit);713713 if (set >= size)714714 return size + offset;715715 if (set < __BITOPS_WORDSIZE)···824824 * s390 version of ffz returns __BITOPS_WORDSIZE825825 * if no zero bit is present in the word.826826 */827827- set = ffz(__load_ulong_le(p, 0) >> bit) + bit;827827+ set = __ffz_word(bit, __load_ulong_le(p, 0) >> bit);828828 if (set >= size)829829 return size + offset;830830 if (set < __BITOPS_WORDSIZE)···865865 * s390 version of ffz returns __BITOPS_WORDSIZE866866 * if no zero bit is present in the word.867867 */868868- set = ffs(__load_ulong_le(p, 0) >> bit) + bit;868868+ set = __ffs_word(0, __load_ulong_le(p, 0) & (~0UL << bit));869869 if (set >= size)870870 return size + offset;871871 if (set < __BITOPS_WORDSIZE)
···33 *44 * Renesas SH-X3 Prototype Board Support.55 *66- * Copyright (C) 2007 Paul Mundt66+ * Copyright (C) 2007 - 2008 Paul Mundt77 *88 * This file is subject to the terms and conditions of the GNU General Public99 * License. See the file "COPYING" in the main directory of this archive···1313#include <linux/platform_device.h>1414#include <linux/kernel.h>1515#include <linux/io.h>1616+#include <linux/smc91x.h>1617#include <asm/ilsel.h>17181819static struct resource heartbeat_resources[] = {···2928 .id = -1,3029 .num_resources = ARRAY_SIZE(heartbeat_resources),3130 .resource = heartbeat_resources,3131+};3232+3333+static struct smc91x_platdata smc91x_info = {3434+ .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,3235};33363437static struct resource smc91x_resources[] = {···5247 .id = -1,5348 .resource = smc91x_resources,5449 .num_resources = ARRAY_SIZE(smc91x_resources),5050+ .dev = {5151+ .platform_data = &smc91x_info,5252+ },5553};56545755static struct resource r8a66597_usb_host_resources[] = {
+96-15
arch/sh/configs/sh7763rdp_defconfig
···11#22# Automatically generated make config: don't edit33-# Linux kernel version: 2.6.26-rc444-# Fri Jun 6 12:20:17 200833+# Linux kernel version: 2.6.27-rc244+# Fri Aug 8 13:44:20 200855#66CONFIG_SUPERH=y77CONFIG_SUPERH32=y88+CONFIG_ARCH_DEFCONFIG="arch/sh/configs/shx3_defconfig"89CONFIG_RWSEM_GENERIC_SPINLOCK=y910CONFIG_GENERIC_BUG=y1011CONFIG_GENERIC_FIND_NEXT_BIT=y1112CONFIG_GENERIC_HWEIGHT=y1213CONFIG_GENERIC_HARDIRQS=y1414+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y1315CONFIG_GENERIC_IRQ_PROBE=y1416CONFIG_GENERIC_CALIBRATE_DELAY=y1517CONFIG_GENERIC_TIME=y···2119# CONFIG_ARCH_HAS_ILOG2_U32 is not set2220# CONFIG_ARCH_HAS_ILOG2_U64 is not set2321CONFIG_ARCH_NO_VIRT_TO_BUS=y2424-CONFIG_ARCH_SUPPORTS_AOUT=y2522CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"26232724#···8483# CONFIG_MARKERS is not set8584CONFIG_OPROFILE=y8685CONFIG_HAVE_OPROFILE=y8686+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set8787+# CONFIG_HAVE_IOREMAP_PROT is not set8788# CONFIG_HAVE_KPROBES is not set8889# CONFIG_HAVE_KRETPROBES is not set9090+# CONFIG_HAVE_ARCH_TRACEHOOK is not set8991# CONFIG_HAVE_DMA_ATTRS is not set9292+# CONFIG_USE_GENERIC_SMP_HELPERS is not set9393+CONFIG_HAVE_CLK=y9094CONFIG_PROC_PAGE_MONITOR=y9595+CONFIG_HAVE_GENERIC_DMA_COHERENT=y9196CONFIG_SLABINFO=y9297CONFIG_RT_MUTEXES=y9398# CONFIG_TINY_SHMEM is not set···10396# CONFIG_MODULE_UNLOAD is not set10497# CONFIG_MODVERSIONS is not set10598# CONFIG_MODULE_SRCVERSION_ALL is not set106106-# CONFIG_KMOD is not set9999+CONFIG_KMOD=y107100CONFIG_BLOCK=y108101# CONFIG_LBD is not set109102# CONFIG_BLK_DEV_IO_TRACE is not set110103# CONFIG_LSF is not set111104# CONFIG_BLK_DEV_BSG is not set105105+# CONFIG_BLK_DEV_INTEGRITY is not set112106113107#114108# IO Schedulers···185177# CONFIG_PAGE_SIZE_8KB is not set186178# CONFIG_PAGE_SIZE_16KB is not set187179# CONFIG_PAGE_SIZE_64KB is not set180180+CONFIG_ENTRY_OFFSET=0x00001000188181CONFIG_SELECT_MEMORY_MODEL=y189182# CONFIG_FLATMEM_MANUAL is not set190183# CONFIG_DISCONTIGMEM_MANUAL is not set···267258# CONFIG_SCHED_HRTICK is not set268259# CONFIG_KEXEC is not set269260# CONFIG_CRASH_DUMP is not set261261+CONFIG_SECCOMP=y270262CONFIG_PREEMPT_NONE=y271263# CONFIG_PREEMPT_VOLUNTARY is not set272264# CONFIG_PREEMPT is not set···292282#293283CONFIG_BINFMT_ELF=y294284# CONFIG_BINFMT_MISC is not set295295-296296-#297297-# Networking298298-#299285CONFIG_NET=y300286301287#···367361#368362# CONFIG_CFG80211 is not set369363CONFIG_WIRELESS_EXT=y364364+CONFIG_WIRELESS_EXT_SYSFS=y370365# CONFIG_MAC80211 is not set371366# CONFIG_IEEE80211 is not set372367# CONFIG_RFKILL is not set···384377CONFIG_STANDALONE=y385378CONFIG_PREVENT_FIRMWARE_BUILD=y386379CONFIG_FW_LOADER=y380380+CONFIG_FIRMWARE_IN_KERNEL=y381381+CONFIG_EXTRA_FIRMWARE=""387382# CONFIG_SYS_HYPERVISOR is not set388383# CONFIG_CONNECTOR is not set389384CONFIG_MTD=y···480471# CONFIG_BLK_DEV_RAM is not set481472# CONFIG_CDROM_PKTCDVD is not set482473# CONFIG_ATA_OVER_ETH is not set474474+# CONFIG_BLK_DEV_HD is not set483475# CONFIG_MISC_DEVICES is not set484476CONFIG_HAVE_IDE=y485477# CONFIG_IDE is not set···525515CONFIG_SCSI_LOWLEVEL=y526516# CONFIG_ISCSI_TCP is not set527517# CONFIG_SCSI_DEBUG is not set518518+# CONFIG_SCSI_DH is not set528519# CONFIG_ATA is not set529520# CONFIG_MD is not set530521CONFIG_NETDEVICES=y531531-# CONFIG_NETDEVICES_MULTIQUEUE is not set532522# CONFIG_DUMMY is not set533523# CONFIG_BONDING is not set534524# CONFIG_MACVLAN is not set···556546CONFIG_MII=y557547# CONFIG_AX88796 is not set558548# CONFIG_STNIC is not set549549+CONFIG_SH_ETH=y559550# CONFIG_SMC91X is not set551551+# CONFIG_SMC911X is not set560552# CONFIG_IBM_NEW_EMAC_ZMII is not set561553# CONFIG_IBM_NEW_EMAC_RGMII is not set562554# CONFIG_IBM_NEW_EMAC_TAH is not set···625613#626614# Character devices627615#628628-# CONFIG_VT is not set616616+CONFIG_VT=y617617+CONFIG_CONSOLE_TRANSLATIONS=y618618+CONFIG_VT_CONSOLE=y619619+CONFIG_HW_CONSOLE=y620620+# CONFIG_VT_HW_CONSOLE_BINDING is not set629621CONFIG_DEVKMEM=y630622# CONFIG_SERIAL_NONSTANDARD is not set631623···660644# CONFIG_POWER_SUPPLY is not set661645# CONFIG_HWMON is not set662646# CONFIG_THERMAL is not set647647+# CONFIG_THERMAL_HWMON is not set663648# CONFIG_WATCHDOG is not set664649665650#···672655#673656# Multifunction device drivers674657#658658+# CONFIG_MFD_CORE is not set675659# CONFIG_MFD_SM501 is not set676660# CONFIG_HTC_PASIC3 is not set677661···697679#698680# CONFIG_VGASTATE is not set699681# CONFIG_VIDEO_OUTPUT_CONTROL is not set700700-# CONFIG_FB is not set682682+CONFIG_FB=y683683+# CONFIG_FIRMWARE_EDID is not set684684+# CONFIG_FB_DDC is not set685685+CONFIG_FB_CFB_FILLRECT=y686686+CONFIG_FB_CFB_COPYAREA=y687687+CONFIG_FB_CFB_IMAGEBLIT=y688688+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set689689+# CONFIG_FB_SYS_FILLRECT is not set690690+# CONFIG_FB_SYS_COPYAREA is not set691691+# CONFIG_FB_SYS_IMAGEBLIT is not set692692+CONFIG_FB_FOREIGN_ENDIAN=y693693+CONFIG_FB_BOTH_ENDIAN=y694694+# CONFIG_FB_BIG_ENDIAN is not set695695+# CONFIG_FB_LITTLE_ENDIAN is not set696696+# CONFIG_FB_SYS_FOPS is not set697697+# CONFIG_FB_SVGALIB is not set698698+# CONFIG_FB_MACMODES is not set699699+# CONFIG_FB_BACKLIGHT is not set700700+# CONFIG_FB_MODE_HELPERS is not set701701+# CONFIG_FB_TILEBLITTING is not set702702+703703+#704704+# Frame buffer hardware drivers705705+#706706+# CONFIG_FB_S1D13XXX is not set707707+# CONFIG_FB_SH_MOBILE_LCDC is not set708708+CONFIG_FB_SH7760=y709709+# CONFIG_FB_VIRTUAL is not set701710# CONFIG_BACKLIGHT_LCD_SUPPORT is not set702711703712#···733688# CONFIG_DISPLAY_SUPPORT is not set734689735690#736736-# Sound691691+# Console display driver support737692#693693+CONFIG_DUMMY_CONSOLE=y694694+CONFIG_FRAMEBUFFER_CONSOLE=y695695+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set696696+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set697697+# CONFIG_FONTS is not set698698+CONFIG_FONT_8x8=y699699+CONFIG_FONT_8x16=y700700+CONFIG_LOGO=y701701+CONFIG_LOGO_LINUX_MONO=y702702+CONFIG_LOGO_LINUX_VGA16=y703703+CONFIG_LOGO_LINUX_CLUT224=y704704+CONFIG_LOGO_SUPERH_MONO=y705705+CONFIG_LOGO_SUPERH_VGA16=y706706+CONFIG_LOGO_SUPERH_CLUT224=y738707# CONFIG_SOUND is not set739708# CONFIG_HID_SUPPORT is not set740709CONFIG_USB_SUPPORT=y···847788# CONFIG_USB_IOWARRIOR is not set848789# CONFIG_USB_ISIGHTFW is not set849790# CONFIG_USB_GADGET is not set850850-# CONFIG_MMC is not set791791+CONFIG_MMC=y792792+# CONFIG_MMC_DEBUG is not set793793+# CONFIG_MMC_UNSAFE_RESUME is not set794794+795795+#796796+# MMC/SD Card Drivers797797+#798798+CONFIG_MMC_BLOCK=y799799+CONFIG_MMC_BLOCK_BOUNCE=y800800+# CONFIG_SDIO_UART is not set801801+# CONFIG_MMC_TEST is not set802802+803803+#804804+# MMC/SD Host Controller Drivers805805+#806806+# CONFIG_MMC_SDHCI is not set851807# CONFIG_MEMSTICK is not set852808# CONFIG_NEW_LEDS is not set853809# CONFIG_ACCESSIBILITY is not set854810# CONFIG_RTC_CLASS is not set811811+# CONFIG_DMADEVICES is not set855812# CONFIG_UIO is not set856813857814#···940865# CONFIG_CRAMFS is not set941866# CONFIG_VXFS_FS is not set942867# CONFIG_MINIX_FS is not set868868+# CONFIG_OMFS_FS is not set943869# CONFIG_HPFS_FS is not set944870# CONFIG_QNX4FS_FS is not set945871# CONFIG_ROMFS_FS is not set···950874CONFIG_NFS_FS=y951875# CONFIG_NFS_V3 is not set952876# CONFIG_NFS_V4 is not set953953-# CONFIG_NFSD is not set954877CONFIG_ROOT_NFS=y878878+# CONFIG_NFSD is not set955879CONFIG_LOCKD=y956880CONFIG_NFS_COMMON=y957881CONFIG_SUNRPC=y958958-# CONFIG_SUNRPC_BIND34 is not set959882# CONFIG_RPCSEC_GSS_KRB5 is not set960883# CONFIG_RPCSEC_GSS_SPKM3 is not set961884# CONFIG_SMB_FS is not set···1024949# CONFIG_HEADERS_CHECK is not set1025950# CONFIG_DEBUG_KERNEL is not set1026951# CONFIG_DEBUG_BUGVERBOSE is not set952952+# CONFIG_DEBUG_MEMORY_INIT is not set1027953# CONFIG_SAMPLES is not set1028954# CONFIG_SH_STANDARD_BIOS is not set1029955# CONFIG_EARLY_SCIF_CONSOLE is not set···10791003# CONFIG_CRYPTO_MD4 is not set10801004# CONFIG_CRYPTO_MD5 is not set10811005# CONFIG_CRYPTO_MICHAEL_MIC is not set10061006+# CONFIG_CRYPTO_RMD128 is not set10071007+# CONFIG_CRYPTO_RMD160 is not set10081008+# CONFIG_CRYPTO_RMD256 is not set10091009+# CONFIG_CRYPTO_RMD320 is not set10821010# CONFIG_CRYPTO_SHA1 is not set10831011# CONFIG_CRYPTO_SHA256 is not set10841012# CONFIG_CRYPTO_SHA512 is not set···11221042# CONFIG_GENERIC_FIND_FIRST_BIT is not set11231043# CONFIG_CRC_CCITT is not set11241044# CONFIG_CRC16 is not set10451045+CONFIG_CRC_T10DIF=y11251046# CONFIG_CRC_ITU_T is not set11261047CONFIG_CRC32=y11271048# CONFIG_CRC7 is not set
···4747 void (*display_off)(void *board_data);4848};49495050+struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */5151+ unsigned long width;5252+ unsigned long height;5353+};5454+5055struct sh_mobile_lcdc_chan_cfg {5156 int chan;5257 int bpp;5358 int interface_type; /* selects RGBn or SYSn I/F, see above */5459 int clock_divider;5560 struct fb_videomode lcd_cfg;6161+ struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg;5662 struct sh_mobile_lcdc_board_cfg board_cfg;5763 struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */5864};
+10
arch/sh/include/cpu-sh3/cpu/cacheflush.h
···2929void flush_dcache_page(struct page *pg);3030void flush_icache_range(unsigned long start, unsigned long end);3131void flush_icache_page(struct vm_area_struct *vma, struct page *page);3232+3333+#define flush_dcache_mmap_lock(mapping) do { } while (0)3434+#define flush_dcache_mmap_unlock(mapping) do { } while (0)3535+3636+/* SH3 has unified cache so no special action needed here */3737+#define flush_cache_sigtramp(vaddr) do { } while (0)3838+#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)3939+4040+#define p3_cache_init() do { } while (0)4141+3242#else3343#include <cpu-common/cpu/cacheflush.h>3444#endif
···107107 * GCC >= 4.2 emits these for division, as do GCC 4.1.x versions of the ST108108 * compiler which include backported patches.109109 */110110-DECLARE_EXPORT(__sdivsi3_i4i);111110DECLARE_EXPORT(__udiv_qrnnd_16);111111+#if !defined(CONFIG_CPU_SH2)112112+DECLARE_EXPORT(__sdivsi3_i4i);112113DECLARE_EXPORT(__udivsi3_i4i);114114+#endif113115#endif114116#else /* GCC 3.x */115117DECLARE_EXPORT(__movstr_i4_even);
+2
arch/sh/mm/Kconfig
···181181choice182182 prompt "HugeTLB page size"183183 depends on HUGETLB_PAGE && (CPU_SH4 || CPU_SH5) && MMU184184+ default HUGETLB_PAGE_SIZE_1MB if PAGE_SIZE_64KB184185 default HUGETLB_PAGE_SIZE_64K185186186187config HUGETLB_PAGE_SIZE_64K187188 bool "64kB"189189+ depends on !PAGE_SIZE_64KB188190189191config HUGETLB_PAGE_SIZE_256K190192 bool "256kB"
+27
arch/sh/mm/consistent.c
···9595}9696EXPORT_SYMBOL(dma_cache_sync);97979898+static int __init memchunk_setup(char *str)9999+{100100+ return 1; /* accept anything that begins with "memchunk." */101101+}102102+__setup("memchunk.", memchunk_setup);103103+104104+static void memchunk_cmdline_override(char *name, unsigned long *sizep)105105+{106106+ char *p = boot_command_line;107107+ int k = strlen(name);108108+109109+ while ((p = strstr(p, "memchunk."))) {110110+ p += 9; /* strlen("memchunk.") */111111+ if (!strncmp(name, p, k) && p[k] == '=') {112112+ p += k + 1;113113+ *sizep = memparse(p, NULL);114114+ pr_info("%s: forcing memory chunk size to 0x%08lx\n",115115+ name, *sizep);116116+ break;117117+ }118118+ }119119+}120120+98121int platform_resource_setup_memory(struct platform_device *pdev,99122 char *name, unsigned long memsize)100123{···131108 name);132109 return -EINVAL;133110 }111111+112112+ memchunk_cmdline_override(name, &memsize);113113+ if (!memsize)114114+ return 0;134115135116 buf = dma_alloc_coherent(NULL, memsize, &dma_handle, GFP_KERNEL);136117 if (!buf) {
+36-73
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
···737737#ifdef CONFIG_X86_POWERNOW_K8_ACPI738738static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index)739739{740740- if (!data->acpi_data->state_count || (cpu_family == CPU_HW_PSTATE))740740+ if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE))741741 return;742742743743- data->irt = (data->acpi_data->states[index].control >> IRT_SHIFT) & IRT_MASK;744744- data->rvo = (data->acpi_data->states[index].control >> RVO_SHIFT) & RVO_MASK;745745- data->exttype = (data->acpi_data->states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK;746746- data->plllock = (data->acpi_data->states[index].control >> PLL_L_SHIFT) & PLL_L_MASK;747747- data->vidmvs = 1 << ((data->acpi_data->states[index].control >> MVS_SHIFT) & MVS_MASK);748748- data->vstable = (data->acpi_data->states[index].control >> VST_SHIFT) & VST_MASK;749749-}750750-751751-752752-static struct acpi_processor_performance *acpi_perf_data;753753-static int preregister_valid;754754-755755-static int powernow_k8_cpu_preinit_acpi(void)756756-{757757- acpi_perf_data = alloc_percpu(struct acpi_processor_performance);758758- if (!acpi_perf_data)759759- return -ENODEV;760760-761761- if (acpi_processor_preregister_performance(acpi_perf_data))762762- return -ENODEV;763763- else764764- preregister_valid = 1;765765- return 0;743743+ data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK;744744+ data->rvo = (data->acpi_data.states[index].control >> RVO_SHIFT) & RVO_MASK;745745+ data->exttype = (data->acpi_data.states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK;746746+ data->plllock = (data->acpi_data.states[index].control >> PLL_L_SHIFT) & PLL_L_MASK;747747+ data->vidmvs = 1 << ((data->acpi_data.states[index].control >> MVS_SHIFT) & MVS_MASK);748748+ data->vstable = (data->acpi_data.states[index].control >> VST_SHIFT) & VST_MASK;766749}767750768751static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)769752{770753 struct cpufreq_frequency_table *powernow_table;771754 int ret_val;772772- int cpu = 0;773755774774- data->acpi_data = percpu_ptr(acpi_perf_data, cpu);775775- if (acpi_processor_register_performance(data->acpi_data, data->cpu)) {756756+ if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) {776757 dprintk("register performance failed: bad ACPI data\n");777758 return -EIO;778759 }779760780761 /* verify the data contained in the ACPI structures */781781- if (data->acpi_data->state_count <= 1) {762762+ if (data->acpi_data.state_count <= 1) {782763 dprintk("No ACPI P-States\n");783764 goto err_out;784765 }785766786786- if ((data->acpi_data->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||787787- (data->acpi_data->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {767767+ if ((data->acpi_data.control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||768768+ (data->acpi_data.status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {788769 dprintk("Invalid control/status registers (%x - %x)\n",789789- data->acpi_data->control_register.space_id,790790- data->acpi_data->status_register.space_id);770770+ data->acpi_data.control_register.space_id,771771+ data->acpi_data.status_register.space_id);791772 goto err_out;792773 }793774794775 /* fill in data->powernow_table */795776 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table)796796- * (data->acpi_data->state_count + 1)), GFP_KERNEL);777777+ * (data->acpi_data.state_count + 1)), GFP_KERNEL);797778 if (!powernow_table) {798779 dprintk("powernow_table memory alloc failure\n");799780 goto err_out;···787806 if (ret_val)788807 goto err_out_mem;789808790790- powernow_table[data->acpi_data->state_count].frequency = CPUFREQ_TABLE_END;791791- powernow_table[data->acpi_data->state_count].index = 0;809809+ powernow_table[data->acpi_data.state_count].frequency = CPUFREQ_TABLE_END;810810+ powernow_table[data->acpi_data.state_count].index = 0;792811 data->powernow_table = powernow_table;793812794813 /* fill in data */795795- data->numps = data->acpi_data->state_count;814814+ data->numps = data->acpi_data.state_count;796815 if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu)797816 print_basics(data);798817 powernow_k8_acpi_pst_values(data, 0);···800819 /* notify BIOS that we exist */801820 acpi_processor_notify_smm(THIS_MODULE);802821803803- /* determine affinity, from ACPI if available */804804- if (preregister_valid) {805805- if ((data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ALL) ||806806- (data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ANY))807807- data->starting_core_affinity = data->acpi_data->shared_cpu_map;808808- else809809- data->starting_core_affinity = cpumask_of_cpu(data->cpu);810810- } else {811811- /* best guess from family if not */812812- if (cpu_family == CPU_HW_PSTATE)813813- data->starting_core_affinity = cpumask_of_cpu(data->cpu);814814- else815815- data->starting_core_affinity = per_cpu(cpu_core_map, data->cpu);816816- }817817-818822 return 0;819823820824err_out_mem:821825 kfree(powernow_table);822826823827err_out:824824- acpi_processor_unregister_performance(data->acpi_data, data->cpu);828828+ acpi_processor_unregister_performance(&data->acpi_data, data->cpu);825829826830 /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */827827- data->acpi_data->state_count = 0;831831+ data->acpi_data.state_count = 0;828832829833 return -ENODEV;830834}···821855 rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo);822856 data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT;823857824824- for (i = 0; i < data->acpi_data->state_count; i++) {858858+ for (i = 0; i < data->acpi_data.state_count; i++) {825859 u32 index;826860827827- index = data->acpi_data->states[i].control & HW_PSTATE_MASK;861861+ index = data->acpi_data.states[i].control & HW_PSTATE_MASK;828862 if (index > data->max_hw_pstate) {829863 printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index);830864 printk(KERN_ERR PFX "Please report to BIOS manufacturer\n");···840874841875 powernow_table[i].index = index;842876843843- powernow_table[i].frequency = data->acpi_data->states[i].core_frequency * 1000;877877+ powernow_table[i].frequency = data->acpi_data.states[i].core_frequency * 1000;844878 }845879 return 0;846880}···849883{850884 int i;851885 int cntlofreq = 0;852852- for (i = 0; i < data->acpi_data->state_count; i++) {886886+ for (i = 0; i < data->acpi_data.state_count; i++) {853887 u32 fid;854888 u32 vid;855889856890 if (data->exttype) {857857- fid = data->acpi_data->states[i].status & EXT_FID_MASK;858858- vid = (data->acpi_data->states[i].status >> VID_SHIFT) & EXT_VID_MASK;891891+ fid = data->acpi_data.states[i].status & EXT_FID_MASK;892892+ vid = (data->acpi_data.states[i].status >> VID_SHIFT) & EXT_VID_MASK;859893 } else {860860- fid = data->acpi_data->states[i].control & FID_MASK;861861- vid = (data->acpi_data->states[i].control >> VID_SHIFT) & VID_MASK;894894+ fid = data->acpi_data.states[i].control & FID_MASK;895895+ vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK;862896 }863897864898 dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid);···899933 cntlofreq = i;900934 }901935902902- if (powernow_table[i].frequency != (data->acpi_data->states[i].core_frequency * 1000)) {936936+ if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) {903937 printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n",904938 powernow_table[i].frequency,905905- (unsigned int) (data->acpi_data->states[i].core_frequency * 1000));939939+ (unsigned int) (data->acpi_data.states[i].core_frequency * 1000));906940 powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;907941 continue;908942 }···912946913947static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data)914948{915915- if (data->acpi_data->state_count)916916- acpi_processor_unregister_performance(data->acpi_data, data->cpu);949949+ if (data->acpi_data.state_count)950950+ acpi_processor_unregister_performance(&data->acpi_data, data->cpu);917951}918952919953#else920920-static int powernow_k8_cpu_preinit_acpi(void) { return -ENODEV; }921954static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; }922955static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; }923956static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; }···11011136static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)11021137{11031138 struct powernow_k8_data *data;11041104- cpumask_t oldmask = CPU_MASK_ALL;11391139+ cpumask_t oldmask;11051140 int rc;1106114111071142 if (!cpu_online(pol->cpu))···11741209 /* run on any CPU again */11751210 set_cpus_allowed_ptr(current, &oldmask);1176121111771177- pol->cpus = data->starting_core_affinity;12121212+ if (cpu_family == CPU_HW_PSTATE)12131213+ pol->cpus = cpumask_of_cpu(pol->cpu);12141214+ else12151215+ pol->cpus = per_cpu(cpu_core_map, pol->cpu);11781216 data->available_cores = &(pol->cpus);1179121711801218 /* Take a crude guess here.···13001332 }1301133313021334 if (supported_cpus == num_online_cpus()) {13031303- powernow_k8_cpu_preinit_acpi();13041335 printk(KERN_INFO PFX "Found %d %s "13051336 "processors (%d cpu cores) (" VERSION ")\n",13061337 num_online_nodes(),···13161349 dprintk("exit\n");1317135013181351 cpufreq_unregister_driver(&cpufreq_amd64_driver);13191319-13201320-#ifdef CONFIG_X86_POWERNOW_K8_ACPI13211321- free_percpu(acpi_perf_data);13221322-#endif13231352}1324135313251354MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>");
+1-2
arch/x86/kernel/cpu/cpufreq/powernow-k8.h
···3333#ifdef CONFIG_X86_POWERNOW_K8_ACPI3434 /* the acpi table needs to be kept. it's only available if ACPI was3535 * used to determine valid frequency/vid/fid states */3636- struct acpi_processor_performance *acpi_data;3636+ struct acpi_processor_performance acpi_data;3737#endif3838 /* we need to keep track of associated cores, but let cpufreq3939 * handle hotplug events - so just point at cpufreq pol->cpus4040 * structure */4141 cpumask_t *available_cores;4242- cpumask_t starting_core_affinity;4342};44434544
···590590 case PCI_DEVICE_ID_INTEL_ICH10_1:591591 case PCI_DEVICE_ID_INTEL_ICH10_2:592592 case PCI_DEVICE_ID_INTEL_ICH10_3:593593+ case PCI_DEVICE_ID_INTEL_PCH_0:594594+ case PCI_DEVICE_ID_INTEL_PCH_1:593595 r->name = "PIIX/ICH";594596 r->get = pirq_piix_get;595597 r->set = pirq_piix_set;
+1-1
arch/x86/pci/legacy.c
···1414 int n, devfn;1515 long node;16161717- if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff)1717+ if (pcibios_last_bus <= 0 || pcibios_last_bus > 0xff)1818 return;1919 DBG("PCI: Peer bridge fixup\n");2020
+48-17
arch/x86/pci/mmconfig-shared.c
···293293 return AE_OK;294294}295295296296-static int __init is_acpi_reserved(unsigned long start, unsigned long end)296296+static int __init is_acpi_reserved(u64 start, u64 end, unsigned not_used)297297{298298 struct resource mcfg_res;299299···310310 return mcfg_res.flags;311311}312312313313+typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type);314314+315315+static int __init is_mmconf_reserved(check_reserved_t is_reserved,316316+ u64 addr, u64 size, int i,317317+ typeof(pci_mmcfg_config[0]) *cfg, int with_e820)318318+{319319+ u64 old_size = size;320320+ int valid = 0;321321+322322+ while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) {323323+ size >>= 1;324324+ if (size < (16UL<<20))325325+ break;326326+ }327327+328328+ if (size >= (16UL<<20) || size == old_size) {329329+ printk(KERN_NOTICE330330+ "PCI: MCFG area at %Lx reserved in %s\n",331331+ addr, with_e820?"E820":"ACPI motherboard resources");332332+ valid = 1;333333+334334+ if (old_size != size) {335335+ /* update end_bus_number */336336+ cfg->end_bus_number = cfg->start_bus_number + ((size>>20) - 1);337337+ printk(KERN_NOTICE "PCI: updated MCFG configuration %d: base %lx "338338+ "segment %hu buses %u - %u\n",339339+ i, (unsigned long)cfg->address, cfg->pci_segment,340340+ (unsigned int)cfg->start_bus_number,341341+ (unsigned int)cfg->end_bus_number);342342+ }343343+ }344344+345345+ return valid;346346+}347347+313348static void __init pci_mmcfg_reject_broken(int early)314349{315350 typeof(pci_mmcfg_config[0]) *cfg;···359324360325 for (i = 0; i < pci_mmcfg_config_num; i++) {361326 int valid = 0;362362- u32 size = (cfg->end_bus_number + 1) << 20;327327+ u64 addr, size;328328+363329 cfg = &pci_mmcfg_config[i];330330+ addr = cfg->start_bus_number;331331+ addr <<= 20;332332+ addr += cfg->address;333333+ size = cfg->end_bus_number + 1 - cfg->start_bus_number;334334+ size <<= 20;364335 printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx "365336 "segment %hu buses %u - %u\n",366337 i, (unsigned long)cfg->address, cfg->pci_segment,367338 (unsigned int)cfg->start_bus_number,368339 (unsigned int)cfg->end_bus_number);369340370370- if (!early &&371371- is_acpi_reserved(cfg->address, cfg->address + size - 1)) {372372- printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved "373373- "in ACPI motherboard resources\n",374374- cfg->address);375375- valid = 1;376376- }341341+ if (!early)342342+ valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0);377343378344 if (valid)379345 continue;···383347 printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not"384348 " reserved in ACPI motherboard resources\n",385349 cfg->address);350350+386351 /* Don't try to do this check unless configuration387352 type 1 is available. how about type 2 ?*/388388- if (raw_pci_ops && e820_all_mapped(cfg->address,389389- cfg->address + size - 1,390390- E820_RESERVED)) {391391- printk(KERN_NOTICE392392- "PCI: MCFG area at %Lx reserved in E820\n",393393- cfg->address);394394- valid = 1;395395- }353353+ if (raw_pci_ops)354354+ valid = is_mmconf_reserved(e820_all_mapped, addr, size, i, cfg, 1);396355397356 if (!valid)398357 goto reject;
+24-12
block/genhd.c
···293293/* iterator */294294static int find_start(struct device *dev, void *data)295295{296296- loff_t k = *(loff_t *)data;296296+ loff_t *k = data;297297298298 if (dev->type != &disk_type)299299 return 0;300300- if (!k--)300300+ if (!*k)301301 return 1;302302+ (*k)--;302303 return 0;303304}304305305306static void *part_start(struct seq_file *part, loff_t *pos)306307{307308 struct device *dev;308308- loff_t n = *pos;309309+ loff_t k = *pos;309310310310- if (!n)311311+ if (!k)311312 seq_puts(part, "major minor #blocks name\n\n");312313313314 mutex_lock(&block_class_lock);314314- dev = class_find_device(&block_class, NULL, (void *)pos, find_start);315315- if (dev)315315+ dev = class_find_device(&block_class, NULL, &k, find_start);316316+ if (dev) {317317+ put_device(dev);316318 return dev_to_disk(dev);319319+ }317320 return NULL;318321}319322···333330 struct device *dev;334331 ++*pos;335332 dev = class_find_device(&block_class, &gp->dev, NULL, find_next);336336- if (dev)333333+ if (dev) {334334+ put_device(dev);337335 return dev_to_disk(dev);336336+ }338337 return NULL;339338}340339···573568static void *diskstats_start(struct seq_file *part, loff_t *pos)574569{575570 struct device *dev;571571+ loff_t k = *pos;576572577573 mutex_lock(&block_class_lock);578578- dev = class_find_device(&block_class, NULL, (void *)pos, find_start);579579- if (dev)574574+ dev = class_find_device(&block_class, NULL, &k, find_start);575575+ if (dev) {576576+ put_device(dev);580577 return dev_to_disk(dev);578578+ }581579 return NULL;582580}583581···591583592584 ++*pos;593585 dev = class_find_device(&block_class, &gp->dev, NULL, find_next);594594- if (dev)586586+ if (dev) {587587+ put_device(dev);595588 return dev_to_disk(dev);589589+ }596590 return NULL;597591}598592···722712 mutex_lock(&block_class_lock);723713 find.name = name;724714 find.part = part;725725- dev = class_find_device(&block_class, NULL, (void *)&find, match_id);726726- if (dev)715715+ dev = class_find_device(&block_class, NULL, &find, match_id);716716+ if (dev) {717717+ put_device(dev);727718 devt = MKDEV(MAJOR(dev->devt),728719 MINOR(dev->devt) + part);720720+ }729721 mutex_unlock(&block_class_lock);730722731723 return devt;
···275275 { 0x8086, 0x3a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },276276 /* SATA Controller IDE (ICH10) */277277 { 0x8086, 0x3a26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },278278+ /* SATA Controller IDE (PCH) */279279+ { 0x8086, 0x3b20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },280280+ /* SATA Controller IDE (PCH) */281281+ { 0x8086, 0x3b26, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },282282+ /* SATA Controller IDE (PCH) */283283+ { 0x8086, 0x3b2d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },284284+ /* SATA Controller IDE (PCH) */285285+ { 0x8086, 0x3b2e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },278286279287 { } /* terminate list */280288};
+37-23
drivers/ata/libata-core.c
···104104 unsigned long xfer_mask;105105 unsigned int horkage_on;106106 unsigned int horkage_off;107107+ unsigned int lflags;107108};108109109110struct ata_force_ent {···197196}198197199198/**200200- * ata_force_spd_limit - force SATA spd limit according to libata.force199199+ * ata_force_link_limits - force link limits according to libata.force201200 * @link: ATA link of interest202201 *203203- * Force SATA spd limit according to libata.force and whine about204204- * it. When only the port part is specified (e.g. 1:), the limit205205- * applies to all links connected to both the host link and all206206- * fan-out ports connected via PMP. If the device part is207207- * specified as 0 (e.g. 1.00:), it specifies the first fan-out208208- * link not the host link. Device number 15 always points to the209209- * host link whether PMP is attached or not.202202+ * Force link flags and SATA spd limit according to libata.force203203+ * and whine about it. When only the port part is specified204204+ * (e.g. 1:), the limit applies to all links connected to both205205+ * the host link and all fan-out ports connected via PMP. If the206206+ * device part is specified as 0 (e.g. 1.00:), it specifies the207207+ * first fan-out link not the host link. Device number 15 always208208+ * points to the host link whether PMP is attached or not.210209 *211210 * LOCKING:212211 * EH context.213212 */214214-static void ata_force_spd_limit(struct ata_link *link)213213+static void ata_force_link_limits(struct ata_link *link)215214{215215+ bool did_spd = false;216216 int linkno, i;217217218218 if (ata_is_host_link(link))···230228 if (fe->device != -1 && fe->device != linkno)231229 continue;232230233233- if (!fe->param.spd_limit)234234- continue;231231+ /* only honor the first spd limit */232232+ if (!did_spd && fe->param.spd_limit) {233233+ link->hw_sata_spd_limit = (1 << fe->param.spd_limit) - 1;234234+ ata_link_printk(link, KERN_NOTICE,235235+ "FORCE: PHY spd limit set to %s\n",236236+ fe->param.name);237237+ did_spd = true;238238+ }235239236236- link->hw_sata_spd_limit = (1 << fe->param.spd_limit) - 1;237237- ata_link_printk(link, KERN_NOTICE,238238- "FORCE: PHY spd limit set to %s\n", fe->param.name);239239- return;240240+ /* let lflags stack */241241+ if (fe->param.lflags) {242242+ link->flags |= fe->param.lflags;243243+ ata_link_printk(link, KERN_NOTICE,244244+ "FORCE: link flag 0x%x forced -> 0x%x\n",245245+ fe->param.lflags, link->flags);246246+ }240247 }241248}242249···32883277 dev->dma_mode = ata_xfer_mask2mode(dma_mask);3289327832903279 found = 1;32913291- if (dev->dma_mode != 0xff)32803280+ if (ata_dma_enabled(dev))32923281 used_dma = 1;32933282 }32943283 if (!found)···3313330233143303 /* step 3: set host DMA timings */33153304 ata_link_for_each_dev(dev, link) {33163316- if (!ata_dev_enabled(dev) || dev->dma_mode == 0xff)33053305+ if (!ata_dev_enabled(dev) || !ata_dma_enabled(dev))33173306 continue;3318330733193308 dev->xfer_mode = dev->dma_mode;···51995188 */52005189int sata_link_init_spd(struct ata_link *link)52015190{52025202- u32 scontrol;52035191 u8 spd;52045192 int rc;5205519352065206- rc = sata_scr_read(link, SCR_CONTROL, &scontrol);51945194+ rc = sata_scr_read(link, SCR_CONTROL, &link->saved_scontrol);52075195 if (rc)52085196 return rc;5209519752105210- spd = (scontrol >> 4) & 0xf;51985198+ spd = (link->saved_scontrol >> 4) & 0xf;52115199 if (spd)52125200 link->hw_sata_spd_limit &= (1 << spd) - 1;5213520152145214- ata_force_spd_limit(link);52025202+ ata_force_link_limits(link);5215520352165204 link->sata_spd_limit = link->hw_sata_spd_limit;52175205···57935783 ata_port_wait_eh(ap);5794578457955785 /* EH is now guaranteed to see UNLOADING - EH context belongs57965796- * to us. Disable all existing devices.57865786+ * to us. Restore SControl and disable all existing devices.57975787 */57985798- ata_port_for_each_link(link, ap) {57885788+ __ata_port_for_each_link(link, ap) {57895789+ sata_scr_write(link, SCR_CONTROL, link->saved_scontrol);57995790 ata_link_for_each_dev(dev, link)58005791 ata_dev_disable(dev);58015792 }···60025991 { "udma133", .xfer_mask = 1 << (ATA_SHIFT_UDMA + 6) },60035992 { "udma/133", .xfer_mask = 1 << (ATA_SHIFT_UDMA + 6) },60045993 { "udma7", .xfer_mask = 1 << (ATA_SHIFT_UDMA + 7) },59945994+ { "nohrst", .lflags = ATA_LFLAG_NO_HRST },59955995+ { "nosrst", .lflags = ATA_LFLAG_NO_SRST },59965996+ { "norst", .lflags = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST },60055997 };60065998 char *start = *cur, *p = *cur;60075999 char *id, *val, *endp;
+13-17
drivers/ata/libata-eh.c
···20402040 }2041204120422042 if (ehc->i.serror)20432043- ata_port_printk(ap, KERN_ERR,20432043+ ata_link_printk(link, KERN_ERR,20442044 "SError: { %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s}\n",20452045 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "",20462046 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "",···21712171}2172217221732173static int ata_eh_followup_srst_needed(struct ata_link *link,21742174- int rc, int classify,21752175- const unsigned int *classes)21742174+ int rc, const unsigned int *classes)21762175{21772176 if ((link->flags & ATA_LFLAG_NO_SRST) || ata_link_offline(link))21782177 return 0;21792179- if (rc == -EAGAIN) {21802180- if (classify)21812181- return 1;21822182- rc = 0;21832183- }21842184- if (rc != 0)21852185- return 0;21782178+ if (rc == -EAGAIN)21792179+ return 1;21862180 if (sata_pmp_supported(link->ap) && ata_is_host_link(link))21872181 return 1;21882182 return 0;···22042210 */22052211 while (ata_eh_reset_timeouts[max_tries] != ULONG_MAX)22062212 max_tries++;22132213+ if (link->flags & ATA_LFLAG_NO_HRST)22142214+ hardreset = NULL;22152215+ if (link->flags & ATA_LFLAG_NO_SRST)22162216+ softreset = NULL;2207221722082218 now = jiffies;22092219 deadline = ata_deadline(ehc->last_reset, ATA_EH_RESET_COOL_DOWN);···22452247 ehc->i.action &= ~ATA_EH_RESET;22462248 if (hardreset) {22472249 reset = hardreset;22482248- ehc->i.action = ATA_EH_HARDRESET;22502250+ ehc->i.action |= ATA_EH_HARDRESET;22492251 } else if (softreset) {22502252 reset = softreset;22512251- ehc->i.action = ATA_EH_SOFTRESET;22532253+ ehc->i.action |= ATA_EH_SOFTRESET;22522254 }2253225522542256 if (prereset) {···23032305 ehc->i.flags |= ATA_EHI_DID_SOFTRESET;2304230623052307 rc = ata_do_reset(link, reset, classes, deadline);23082308+ if (rc && rc != -EAGAIN)23092309+ goto fail;2306231023072311 if (reset == hardreset &&23082308- ata_eh_followup_srst_needed(link, rc, classify, classes)) {23122312+ ata_eh_followup_srst_needed(link, rc, classes)) {23092313 /* okay, let's do follow-up softreset */23102314 reset = softreset;23112315···23222322 ata_eh_about_to_do(link, NULL, ATA_EH_RESET);23232323 rc = ata_do_reset(link, reset, classes, deadline);23242324 }23252325-23262326- /* -EAGAIN can happen if we skipped followup SRST */23272327- if (rc && rc != -EAGAIN)23282328- goto fail;23292325 } else {23302326 if (verbose)23312327 ata_link_printk(link, KERN_INFO, "no reset method "
+1-1
drivers/ata/pata_acpi.c
···181181182182 if (adev != acpi->last) {183183 pacpi_set_piomode(ap, adev);184184- if (adev->dma_mode)184184+ if (ata_dma_enabled(adev))185185 pacpi_set_dmamode(ap, adev);186186 acpi->last = adev;187187 }
···198198199199 if (adev != ap->private_data) {200200 oldpiix_set_piomode(ap, adev);201201- if (adev->dma_mode)201201+ if (ata_dma_enabled(adev))202202 oldpiix_set_dmamode(ap, adev);203203 }204204 return ata_sff_qc_issue(qc);
+3-3
drivers/ata/pata_sc1200.c
···167167 struct ata_device *prev = ap->private_data;168168169169 /* See if the DMA settings could be wrong */170170- if (adev->dma_mode != 0 && adev != prev && prev != NULL) {170170+ if (ata_dma_enabled(adev) && adev != prev && prev != NULL) {171171 /* Maybe, but do the channels match MWDMA/UDMA ? */172172- if ((adev->dma_mode >= XFER_UDMA_0 && prev->dma_mode < XFER_UDMA_0) ||173173- (adev->dma_mode < XFER_UDMA_0 && prev->dma_mode >= XFER_UDMA_0))172172+ if ((ata_using_udma(adev) && !ata_using_udma(prev)) ||173173+ (ata_using_udma(prev) && !ata_using_udma(adev)))174174 /* Switch the mode bits */175175 sc1200_set_dmamode(ap, adev);176176 }
+11-48
drivers/ata/pata_via.c
···324324}325325326326/**327327- * via_ata_sff_tf_load - send taskfile registers to host controller327327+ * via_tf_load - send taskfile registers to host controller328328 * @ap: Port to which output is sent329329 * @tf: ATA taskfile register set330330 *331331 * Outputs ATA taskfile to standard ATA host controller.332332 *333333 * Note: This is to fix the internal bug of via chipsets, which334334- * will reset the device register after changing the IEN bit on335335- * ctl register334334+ * will reset the device register after changing the IEN bit on335335+ * ctl register336336 */337337-static void via_ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)337337+static void via_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)338338{339339- struct ata_ioports *ioaddr = &ap->ioaddr;340340- unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;339339+ struct ata_taskfile tmp_tf;341340342342- if (tf->ctl != ap->last_ctl) {343343- iowrite8(tf->ctl, ioaddr->ctl_addr);344344- iowrite8(tf->device, ioaddr->device_addr);345345- ap->last_ctl = tf->ctl;346346- ata_wait_idle(ap);341341+ if (ap->ctl != ap->last_ctl && !(tf->flags & ATA_TFLAG_DEVICE)) {342342+ tmp_tf = *tf;343343+ tmp_tf.flags |= ATA_TFLAG_DEVICE;344344+ tf = &tmp_tf;347345 }348348-349349- if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {350350- iowrite8(tf->hob_feature, ioaddr->feature_addr);351351- iowrite8(tf->hob_nsect, ioaddr->nsect_addr);352352- iowrite8(tf->hob_lbal, ioaddr->lbal_addr);353353- iowrite8(tf->hob_lbam, ioaddr->lbam_addr);354354- iowrite8(tf->hob_lbah, ioaddr->lbah_addr);355355- VPRINTK("hob: feat 0x%X nsect 0x%X, lba 0x%X 0x%X 0x%X\n",356356- tf->hob_feature,357357- tf->hob_nsect,358358- tf->hob_lbal,359359- tf->hob_lbam,360360- tf->hob_lbah);361361- }362362-363363- if (is_addr) {364364- iowrite8(tf->feature, ioaddr->feature_addr);365365- iowrite8(tf->nsect, ioaddr->nsect_addr);366366- iowrite8(tf->lbal, ioaddr->lbal_addr);367367- iowrite8(tf->lbam, ioaddr->lbam_addr);368368- iowrite8(tf->lbah, ioaddr->lbah_addr);369369- VPRINTK("feat 0x%X nsect 0x%X lba 0x%X 0x%X 0x%X\n",370370- tf->feature,371371- tf->nsect,372372- tf->lbal,373373- tf->lbam,374374- tf->lbah);375375- }376376-377377- if (tf->flags & ATA_TFLAG_DEVICE) {378378- iowrite8(tf->device, ioaddr->device_addr);379379- VPRINTK("device 0x%X\n", tf->device);380380- }381381-382382- ata_wait_idle(ap);346346+ ata_sff_tf_load(ap, tf);383347}384348385349static struct scsi_host_template via_sht = {···356392 .set_piomode = via_set_piomode,357393 .set_dmamode = via_set_dmamode,358394 .prereset = via_pre_reset,359359- .sff_tf_load = via_ata_tf_load,395395+ .sff_tf_load = via_tf_load,360396};361397362398static struct ata_port_operations via_port_ops_noirq = {363399 .inherits = &via_port_ops,364400 .sff_data_xfer = ata_sff_data_xfer_noirq,365365- .sff_tf_load = via_ata_tf_load,366401};367402368403/**
+12-25
drivers/ata/sata_mv.c
···11341134 if (ap->nr_active_links == 0)11351135 return 0;1136113611371137- if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) {11381138- /*11391139- * The port is operating in host queuing mode (EDMA).11401140- * It can accomodate a new qc if the qc protocol11411141- * is compatible with the current host queue mode.11421142- */11431143- if (pp->pp_flags & MV_PP_FLAG_NCQ_EN) {11441144- /*11451145- * The host queue (EDMA) is in NCQ mode.11461146- * If the new qc is also an NCQ command,11471147- * then allow the new qc.11481148- */11491149- if (qc->tf.protocol == ATA_PROT_NCQ)11501150- return 0;11511151- } else {11521152- /*11531153- * The host queue (EDMA) is in non-NCQ, DMA mode.11541154- * If the new qc is also a non-NCQ, DMA command,11551155- * then allow the new qc.11561156- */11571157- if (qc->tf.protocol == ATA_PROT_DMA)11581158- return 0;11591159- }11601160- }11371137+ /*11381138+ * The port is operating in host queuing mode (EDMA) with NCQ11391139+ * enabled, allow multiple NCQ commands. EDMA also allows11401140+ * queueing multiple DMA commands but libata core currently11411141+ * doesn't allow it.11421142+ */11431143+ if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) &&11441144+ (pp->pp_flags & MV_PP_FLAG_NCQ_EN) && ata_is_ncq(qc->tf.protocol))11451145+ return 0;11461146+11611147 return ATA_DEFER_PORT;11621148}11631149···30223036 break;30233037 case chip_soc:30243038 hpriv->ops = &mv_soc_ops;30253025- hp_flags |= MV_HP_FLAG_SOC | MV_HP_ERRATA_60X1C0;30393039+ hp_flags |= MV_HP_FLAG_SOC | MV_HP_GEN_IIE |30403040+ MV_HP_ERRATA_60X1C0;30263041 break;3027304230283043 default:
···295295296296 if (!class)297297 return -EINVAL;298298+ if (!class->p) {299299+ WARN(1, "%s called for class '%s' before it was initialized",300300+ __func__, class->name);301301+ return -EINVAL;302302+ }303303+298304 mutex_lock(&class->p->class_mutex);299305 list_for_each_entry(dev, &class->p->class_devices, node) {300306 if (start) {···350344351345 if (!class)352346 return NULL;347347+ if (!class->p) {348348+ WARN(1, "%s called for class '%s' before it was initialized",349349+ __func__, class->name);350350+ return NULL;351351+ }353352354353 mutex_lock(&class->p->class_mutex);355354 list_for_each_entry(dev, &class->p->class_devices, node) {
+20-11
drivers/base/core.c
···5353 * it is attached to. If it is not attached to a bus either, an empty5454 * string will be returned.5555 */5656-const char *dev_driver_string(struct device *dev)5656+const char *dev_driver_string(const struct device *dev)5757{5858 return dev->driver ? dev->driver->name :5959 (dev->bus ? dev->bus->name :···541541 spin_lock_init(&dev->devres_lock);542542 INIT_LIST_HEAD(&dev->devres_head);543543 device_init_wakeup(dev, 0);544544+ device_pm_init(dev);544545 set_dev_node(dev, -1);545546}546547···844843{845844 struct device *parent = NULL;846845 struct class_interface *class_intf;847847- int error;846846+ int error = -EINVAL;848847849848 dev = get_device(dev);850850- if (!dev || !strlen(dev->bus_id)) {851851- error = -EINVAL;852852- goto Done;853853- }849849+ if (!dev)850850+ goto done;851851+852852+ /* Temporarily support init_name if it is set.853853+ * It will override bus_id for now */854854+ if (dev->init_name)855855+ dev_set_name(dev, "%s", dev->init_name);856856+857857+ if (!strlen(dev->bus_id))858858+ goto done;854859855860 pr_debug("device: '%s': %s\n", dev->bus_id, __func__);856861···904897 error = bus_add_device(dev);905898 if (error)906899 goto BusError;907907- error = device_pm_add(dev);900900+ error = dpm_sysfs_add(dev);908901 if (error)909909- goto PMError;902902+ goto DPMError;903903+ device_pm_add(dev);910904 kobject_uevent(&dev->kobj, KOBJ_ADD);911905 bus_attach_device(dev);912906 if (parent)···925917 class_intf->add_dev(dev, class_intf);926918 mutex_unlock(&dev->class->p->class_mutex);927919 }928928- Done:920920+done:929921 put_device(dev);930922 return error;931931- PMError:923923+ DPMError:932924 bus_remove_device(dev);933925 BusError:934926 if (dev->bus)···952944 cleanup_device_parent(dev);953945 if (parent)954946 put_device(parent);955955- goto Done;947947+ goto done;956948}957949958950/**···10151007 struct class_interface *class_intf;1016100810171009 device_pm_remove(dev);10101010+ dpm_sysfs_remove(dev);10181011 if (parent)10191012 klist_del(&dev->knode_parent);10201013 if (MAJOR(dev->devt)) {
···6767 * device_pm_add - add a device to the list of active devices6868 * @dev: Device to be added to the list6969 */7070-int device_pm_add(struct device *dev)7070+void device_pm_add(struct device *dev)7171{7272- int error;7373-7472 pr_debug("PM: Adding info for %s:%s\n",7573 dev->bus ? dev->bus->name : "No Bus",7674 kobject_name(&dev->kobj));7775 mutex_lock(&dpm_list_mtx);7876 if (dev->parent) {7979- if (dev->parent->power.status >= DPM_SUSPENDING) {8080- dev_warn(dev, "parent %s is sleeping, will not add\n",7777+ if (dev->parent->power.status >= DPM_SUSPENDING)7878+ dev_warn(dev, "parent %s should not be sleeping\n",8179 dev->parent->bus_id);8282- WARN_ON(true);8383- }8480 } else if (transition_started) {8581 /*8682 * We refuse to register parentless devices while a PM···8589 */8690 WARN_ON(true);8791 }8888- error = dpm_sysfs_add(dev);8989- if (!error) {9090- dev->power.status = DPM_ON;9191- list_add_tail(&dev->power.entry, &dpm_list);9292- }9292+9393+ list_add_tail(&dev->power.entry, &dpm_list);9394 mutex_unlock(&dpm_list_mtx);9494- return error;9595}96969797/**···102110 dev->bus ? dev->bus->name : "No Bus",103111 kobject_name(&dev->kobj));104112 mutex_lock(&dpm_list_mtx);105105- dpm_sysfs_remove(dev);106113 list_del_init(&dev->power.entry);107114 mutex_unlock(&dpm_list_mtx);108115}
···707707708708 BUILD_BUG_ON(sizeof(struct nbd_request) != 28);709709710710- nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);711711- if (!nbd_dev)712712- return -ENOMEM;713713-714710 if (max_part < 0) {715711 printk(KERN_CRIT "nbd: max_part must be >= 0\n");716712 return -EINVAL;717713 }714714+715715+ nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);716716+ if (!nbd_dev)717717+ return -ENOMEM;718718719719 part_shift = 0;720720 if (max_part > 0)···779779 blk_cleanup_queue(nbd_dev[i].disk->queue);780780 put_disk(nbd_dev[i].disk);781781 }782782+ kfree(nbd_dev);782783 return err;783784}784785···796795 }797796 }798797 unregister_blkdev(NBD_MAJOR, "nbd");798798+ kfree(nbd_dev);799799 printk(KERN_INFO "nbd: unregistered device at major %d\n", NBD_MAJOR);800800}801801
+4-6
drivers/bluetooth/Kconfig
···33 depends on BT4455config BT_HCIUSB66- tristate "HCI USB driver"77- depends on USB66+ tristate "HCI USB driver (old version)"77+ depends on USB && BT_HCIBTUSB=n88 help99 Bluetooth HCI USB driver.1010 This driver is required if you want to use Bluetooth devices with···2323 Say Y here to compile support for SCO over HCI USB.24242525config BT_HCIBTUSB2626- tristate "HCI USB driver (alternate version)"2727- depends on USB && EXPERIMENTAL && BT_HCIUSB=n2626+ tristate "HCI USB driver"2727+ depends on USB2828 help2929 Bluetooth HCI USB driver.3030 This driver is required if you want to use Bluetooth devices with3131 USB interface.3232-3333- This driver is still experimental and has no SCO support.34323533 Say Y here to compile support for Bluetooth USB devices into the3634 kernel or say M to compile it as module (btusb).
+1-1
drivers/bluetooth/bt3c_cs.c
···6060/* ======================== Module parameters ======================== */616162626363-MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>, Jose Orlando Pereira <jop@di.uminho.pt>");6363+MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");6464MODULE_DESCRIPTION("Bluetooth driver for the 3Com Bluetooth PCMCIA card");6565MODULE_LICENSE("GPL");6666MODULE_FIRMWARE("BT3CPCC.bin");
+268-14
drivers/bluetooth/btusb.c
···22 *33 * Generic Bluetooth USB driver44 *55- * Copyright (C) 2005-2007 Marcel Holtmann <marcel@holtmann.org>55+ * Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org>66 *77 *88 * This program is free software; you can redistribute it and/or modify···4141#define BT_DBG(D...)4242#endif43434444-#define VERSION "0.2"4444+#define VERSION "0.3"45454646static int ignore_dga;4747static int ignore_csr;···160160 { } /* Terminating entry */161161};162162163163+#define BTUSB_MAX_ISOC_FRAMES 10164164+163165#define BTUSB_INTR_RUNNING 0164166#define BTUSB_BULK_RUNNING 1167167+#define BTUSB_ISOC_RUNNING 2165168166169struct btusb_data {167170 struct hci_dev *hdev;168171 struct usb_device *udev;172172+ struct usb_interface *isoc;169173170174 spinlock_t lock;171175···180176 struct usb_anchor tx_anchor;181177 struct usb_anchor intr_anchor;182178 struct usb_anchor bulk_anchor;179179+ struct usb_anchor isoc_anchor;183180184181 struct usb_endpoint_descriptor *intr_ep;185182 struct usb_endpoint_descriptor *bulk_tx_ep;186183 struct usb_endpoint_descriptor *bulk_rx_ep;184184+ struct usb_endpoint_descriptor *isoc_tx_ep;185185+ struct usb_endpoint_descriptor *isoc_rx_ep;186186+187187+ int isoc_altsetting;187188};188189189190static void btusb_intr_complete(struct urb *urb)···204195 return;205196206197 if (urb->status == 0) {198198+ hdev->stat.byte_rx += urb->actual_length;199199+207200 if (hci_recv_fragment(hdev, HCI_EVENT_PKT,208201 urb->transfer_buffer,209202 urb->actual_length) < 0) {···227216 }228217}229218230230-static inline int btusb_submit_intr_urb(struct hci_dev *hdev)219219+static int btusb_submit_intr_urb(struct hci_dev *hdev)231220{232221 struct btusb_data *data = hdev->driver_data;233222 struct urb *urb;···236225 int err, size;237226238227 BT_DBG("%s", hdev->name);228228+229229+ if (!data->intr_ep)230230+ return -ENODEV;239231240232 urb = usb_alloc_urb(0, GFP_ATOMIC);241233 if (!urb)···288274 return;289275290276 if (urb->status == 0) {277277+ hdev->stat.byte_rx += urb->actual_length;278278+291279 if (hci_recv_fragment(hdev, HCI_ACLDATA_PKT,292280 urb->transfer_buffer,293281 urb->actual_length) < 0) {···311295 }312296}313297314314-static inline int btusb_submit_bulk_urb(struct hci_dev *hdev)298298+static int btusb_submit_bulk_urb(struct hci_dev *hdev)315299{316300 struct btusb_data *data = hdev->driver_data;317301 struct urb *urb;···320304 int err, size;321305322306 BT_DBG("%s", hdev->name);307307+308308+ if (!data->bulk_rx_ep)309309+ return -ENODEV;323310324311 urb = usb_alloc_urb(0, GFP_KERNEL);325312 if (!urb)···344325 urb->transfer_flags |= URB_FREE_BUFFER;345326346327 usb_anchor_urb(urb, &data->bulk_anchor);328328+329329+ err = usb_submit_urb(urb, GFP_KERNEL);330330+ if (err < 0) {331331+ BT_ERR("%s urb %p submission failed (%d)",332332+ hdev->name, urb, -err);333333+ usb_unanchor_urb(urb);334334+ kfree(buf);335335+ }336336+337337+ usb_free_urb(urb);338338+339339+ return err;340340+}341341+342342+static void btusb_isoc_complete(struct urb *urb)343343+{344344+ struct hci_dev *hdev = urb->context;345345+ struct btusb_data *data = hdev->driver_data;346346+ int i, err;347347+348348+ BT_DBG("%s urb %p status %d count %d", hdev->name,349349+ urb, urb->status, urb->actual_length);350350+351351+ if (!test_bit(HCI_RUNNING, &hdev->flags))352352+ return;353353+354354+ if (urb->status == 0) {355355+ for (i = 0; i < urb->number_of_packets; i++) {356356+ unsigned int offset = urb->iso_frame_desc[i].offset;357357+ unsigned int length = urb->iso_frame_desc[i].actual_length;358358+359359+ if (urb->iso_frame_desc[i].status)360360+ continue;361361+362362+ hdev->stat.byte_rx += length;363363+364364+ if (hci_recv_fragment(hdev, HCI_SCODATA_PKT,365365+ urb->transfer_buffer + offset,366366+ length) < 0) {367367+ BT_ERR("%s corrupted SCO packet", hdev->name);368368+ hdev->stat.err_rx++;369369+ }370370+ }371371+ }372372+373373+ if (!test_bit(BTUSB_ISOC_RUNNING, &data->flags))374374+ return;375375+376376+ usb_anchor_urb(urb, &data->isoc_anchor);377377+378378+ err = usb_submit_urb(urb, GFP_ATOMIC);379379+ if (err < 0) {380380+ BT_ERR("%s urb %p failed to resubmit (%d)",381381+ hdev->name, urb, -err);382382+ usb_unanchor_urb(urb);383383+ }384384+}385385+386386+static void inline __fill_isoc_descriptor(struct urb *urb, int len, int mtu)387387+{388388+ int i, offset = 0;389389+390390+ BT_DBG("len %d mtu %d", len, mtu);391391+392392+ for (i = 0; i < BTUSB_MAX_ISOC_FRAMES && len >= mtu;393393+ i++, offset += mtu, len -= mtu) {394394+ urb->iso_frame_desc[i].offset = offset;395395+ urb->iso_frame_desc[i].length = mtu;396396+ }397397+398398+ if (len && i < BTUSB_MAX_ISOC_FRAMES) {399399+ urb->iso_frame_desc[i].offset = offset;400400+ urb->iso_frame_desc[i].length = len;401401+ i++;402402+ }403403+404404+ urb->number_of_packets = i;405405+}406406+407407+static int btusb_submit_isoc_urb(struct hci_dev *hdev)408408+{409409+ struct btusb_data *data = hdev->driver_data;410410+ struct urb *urb;411411+ unsigned char *buf;412412+ unsigned int pipe;413413+ int err, size;414414+415415+ BT_DBG("%s", hdev->name);416416+417417+ if (!data->isoc_rx_ep)418418+ return -ENODEV;419419+420420+ urb = usb_alloc_urb(BTUSB_MAX_ISOC_FRAMES, GFP_KERNEL);421421+ if (!urb)422422+ return -ENOMEM;423423+424424+ size = le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize) *425425+ BTUSB_MAX_ISOC_FRAMES;426426+427427+ buf = kmalloc(size, GFP_KERNEL);428428+ if (!buf) {429429+ usb_free_urb(urb);430430+ return -ENOMEM;431431+ }432432+433433+ pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress);434434+435435+ urb->dev = data->udev;436436+ urb->pipe = pipe;437437+ urb->context = hdev;438438+ urb->complete = btusb_isoc_complete;439439+ urb->interval = data->isoc_rx_ep->bInterval;440440+441441+ urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP;442442+ urb->transfer_buffer = buf;443443+ urb->transfer_buffer_length = size;444444+445445+ __fill_isoc_descriptor(urb, size,446446+ le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize));447447+448448+ usb_anchor_urb(urb, &data->isoc_anchor);347449348450 err = usb_submit_urb(urb, GFP_KERNEL);349451 if (err < 0) {···532392 if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))533393 return 0;534394395395+ clear_bit(BTUSB_ISOC_RUNNING, &data->flags);396396+ usb_kill_anchored_urbs(&data->intr_anchor);397397+535398 clear_bit(BTUSB_BULK_RUNNING, &data->flags);536399 usb_kill_anchored_urbs(&data->bulk_anchor);537400···596453 break;597454598455 case HCI_ACLDATA_PKT:456456+ if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1)457457+ return -ENODEV;458458+599459 urb = usb_alloc_urb(0, GFP_ATOMIC);600460 if (!urb)601461 return -ENOMEM;···613467 break;614468615469 case HCI_SCODATA_PKT:470470+ if (!data->isoc_tx_ep || hdev->conn_hash.sco_num < 1)471471+ return -ENODEV;472472+473473+ urb = usb_alloc_urb(BTUSB_MAX_ISOC_FRAMES, GFP_ATOMIC);474474+ if (!urb)475475+ return -ENOMEM;476476+477477+ pipe = usb_sndisocpipe(data->udev,478478+ data->isoc_tx_ep->bEndpointAddress);479479+480480+ urb->dev = data->udev;481481+ urb->pipe = pipe;482482+ urb->context = skb;483483+ urb->complete = btusb_tx_complete;484484+ urb->interval = data->isoc_tx_ep->bInterval;485485+486486+ urb->transfer_flags = URB_ISO_ASAP;487487+ urb->transfer_buffer = skb->data;488488+ urb->transfer_buffer_length = skb->len;489489+490490+ __fill_isoc_descriptor(urb, skb->len,491491+ le16_to_cpu(data->isoc_tx_ep->wMaxPacketSize));492492+616493 hdev->stat.sco_tx++;617617- kfree_skb(skb);618618- return 0;494494+ break;619495620496 default:621497 return -EILSEQ;···676508 schedule_work(&data->work);677509}678510511511+static int inline __set_isoc_interface(struct hci_dev *hdev, int altsetting)512512+{513513+ struct btusb_data *data = hdev->driver_data;514514+ struct usb_interface *intf = data->isoc;515515+ struct usb_endpoint_descriptor *ep_desc;516516+ int i, err;517517+518518+ if (!data->isoc)519519+ return -ENODEV;520520+521521+ err = usb_set_interface(data->udev, 1, altsetting);522522+ if (err < 0) {523523+ BT_ERR("%s setting interface failed (%d)", hdev->name, -err);524524+ return err;525525+ }526526+527527+ data->isoc_altsetting = altsetting;528528+529529+ data->isoc_tx_ep = NULL;530530+ data->isoc_rx_ep = NULL;531531+532532+ for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {533533+ ep_desc = &intf->cur_altsetting->endpoint[i].desc;534534+535535+ if (!data->isoc_tx_ep && usb_endpoint_is_isoc_out(ep_desc)) {536536+ data->isoc_tx_ep = ep_desc;537537+ continue;538538+ }539539+540540+ if (!data->isoc_rx_ep && usb_endpoint_is_isoc_in(ep_desc)) {541541+ data->isoc_rx_ep = ep_desc;542542+ continue;543543+ }544544+ }545545+546546+ if (!data->isoc_tx_ep || !data->isoc_rx_ep) {547547+ BT_ERR("%s invalid SCO descriptors", hdev->name);548548+ return -ENODEV;549549+ }550550+551551+ return 0;552552+}553553+679554static void btusb_work(struct work_struct *work)680555{681556 struct btusb_data *data = container_of(work, struct btusb_data, work);682557 struct hci_dev *hdev = data->hdev;683558684684- if (hdev->conn_hash.acl_num == 0) {559559+ if (hdev->conn_hash.acl_num > 0) {560560+ if (!test_and_set_bit(BTUSB_BULK_RUNNING, &data->flags)) {561561+ if (btusb_submit_bulk_urb(hdev) < 0)562562+ clear_bit(BTUSB_BULK_RUNNING, &data->flags);563563+ else564564+ btusb_submit_bulk_urb(hdev);565565+ }566566+ } else {685567 clear_bit(BTUSB_BULK_RUNNING, &data->flags);686568 usb_kill_anchored_urbs(&data->bulk_anchor);687687- return;688569 }689570690690- if (!test_and_set_bit(BTUSB_BULK_RUNNING, &data->flags)) {691691- if (btusb_submit_bulk_urb(hdev) < 0)692692- clear_bit(BTUSB_BULK_RUNNING, &data->flags);693693- else694694- btusb_submit_bulk_urb(hdev);571571+ if (hdev->conn_hash.sco_num > 0) {572572+ if (data->isoc_altsetting != 2) {573573+ clear_bit(BTUSB_ISOC_RUNNING, &data->flags);574574+ usb_kill_anchored_urbs(&data->isoc_anchor);575575+576576+ if (__set_isoc_interface(hdev, 2) < 0)577577+ return;578578+ }579579+580580+ if (!test_and_set_bit(BTUSB_ISOC_RUNNING, &data->flags)) {581581+ if (btusb_submit_isoc_urb(hdev) < 0)582582+ clear_bit(BTUSB_ISOC_RUNNING, &data->flags);583583+ else584584+ btusb_submit_isoc_urb(hdev);585585+ }586586+ } else {587587+ clear_bit(BTUSB_ISOC_RUNNING, &data->flags);588588+ usb_kill_anchored_urbs(&data->isoc_anchor);589589+590590+ __set_isoc_interface(hdev, 0);695591 }696592}697593···829597 init_usb_anchor(&data->tx_anchor);830598 init_usb_anchor(&data->intr_anchor);831599 init_usb_anchor(&data->bulk_anchor);600600+ init_usb_anchor(&data->isoc_anchor);832601833602 hdev = hci_alloc_dev();834603 if (!hdev) {···853620854621 hdev->owner = THIS_MODULE;855622623623+ /* interface numbers are hardcoded in the spec */624624+ data->isoc = usb_ifnum_to_if(data->udev, 1);625625+856626 if (reset || id->driver_info & BTUSB_RESET)857627 set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks);858628···864628 set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks);865629 }866630631631+ if (id->driver_info & BTUSB_BROKEN_ISOC)632632+ data->isoc = NULL;633633+867634 if (id->driver_info & BTUSB_SNIFFER) {868868- struct usb_device *udev = interface_to_usbdev(intf);635635+ struct usb_device *udev = data->udev;869636870637 if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997)871638 set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);639639+640640+ data->isoc = NULL;872641 }873642874643 if (id->driver_info & BTUSB_BCM92035) {···884643 if (skb) {885644 memcpy(skb_put(skb, sizeof(cmd)), cmd, sizeof(cmd));886645 skb_queue_tail(&hdev->driver_init, skb);646646+ }647647+ }648648+649649+ if (data->isoc) {650650+ err = usb_driver_claim_interface(&btusb_driver,651651+ data->isoc, NULL);652652+ if (err < 0) {653653+ hci_free_dev(hdev);654654+ kfree(data);655655+ return err;887656 }888657 }889658···920669 return;921670922671 hdev = data->hdev;672672+673673+ if (data->isoc)674674+ usb_driver_release_interface(&btusb_driver, data->isoc);923675924676 usb_set_intfdata(intf, NULL);925677
···26952695 for (i = 0; ; i++) {26962696 if (!ipmi_defaults[i].port)26972697 break;26982698-26992699- info = kzalloc(sizeof(*info), GFP_KERNEL);27002700- if (!info)27012701- return;27022702-27032698#ifdef CONFIG_PPC_MERGE27042699 if (check_legacy_ioport(ipmi_defaults[i].port))27052700 continue;27062701#endif27022702+ info = kzalloc(sizeof(*info), GFP_KERNEL);27032703+ if (!info)27042704+ return;2707270527082706 info->addr_source = NULL;27092707
···1212 This is the "Juju" FireWire stack, a new alternative implementation1313 designed for robustness and simplicity. You can build either this1414 stack, or the old stack (the ieee1394 driver, ohci1394 etc.) or both.1515- Please read http://wiki.linux1394.org/JujuMigration before you1616- enable the new stack.1515+ Please read http://ieee1394.wiki.kernel.org/index.php/Juju_Migration1616+ before you enable the new stack.17171818 To compile this driver as a module, say M here: the module will be1919 called firewire-core.
···844844 ne->host = host;845845 ne->nodeid = nodeid;846846 ne->generation = generation;847847- ne->needs_probe = 1;847847+ ne->needs_probe = true;848848849849 ne->guid = guid;850850 ne->guid_vendor_id = (guid >> 40) & 0xffffff;···11441144 struct csr1212_keyval *kv, *vendor_name_kv = NULL;11451145 u8 last_key_id = 0;1146114611471147- ne->needs_probe = 0;11471147+ ne->needs_probe = false;1148114811491149 csr1212_for_each_dir_entry(ne->csr, kv, ne->csr->root_kv, dentry) {11501150 switch (kv->key.id) {···12951295 nodemgr_update_bus_options(ne);1296129612971297 /* Mark the node as new, so it gets re-probed */12981298- ne->needs_probe = 1;12981298+ ne->needs_probe = true;12991299 } else {13001300 /* old cache is valid, so update its generation */13011301 struct nodemgr_csr_info *ci = ne->csr->private;···15661566struct probe_param {15671567 struct host_info *hi;15681568 int generation;15691569+ bool probe_now;15691570};1570157115711571-static int __nodemgr_node_probe(struct device *dev, void *data)15721572+static int node_probe(struct device *dev, void *data)15721573{15731573- struct probe_param *param = (struct probe_param *)data;15741574+ struct probe_param *p = data;15741575 struct node_entry *ne;1575157615771577+ if (p->generation != get_hpsb_generation(p->hi->host))15781578+ return -EAGAIN;15791579+15761580 ne = container_of(dev, struct node_entry, node_dev);15771577- if (!ne->needs_probe)15781578- nodemgr_probe_ne(param->hi, ne, param->generation);15791579- if (ne->needs_probe)15801580- nodemgr_probe_ne(param->hi, ne, param->generation);15811581+ if (ne->needs_probe == p->probe_now)15821582+ nodemgr_probe_ne(p->hi, ne, p->generation);15811583 return 0;15821584}1583158515841586static void nodemgr_node_probe(struct host_info *hi, int generation)15851587{15861586- struct hpsb_host *host = hi->host;15871587- struct probe_param param;15881588+ struct probe_param p;1588158915891589- param.hi = hi;15901590- param.generation = generation;15911591- /* Do some processing of the nodes we've probed. This pulls them15901590+ p.hi = hi;15911591+ p.generation = generation;15921592+ /*15931593+ * Do some processing of the nodes we've probed. This pulls them15921594 * into the sysfs layer if needed, and can result in processing of15931595 * unit-directories, or just updating the node and it's15941596 * unit-directories.15951597 *15961598 * Run updates before probes. Usually, updates are time-critical15971597- * while probes are time-consuming. (Well, those probes need some15981598- * improvement...) */15991599-16001600- class_for_each_device(&nodemgr_ne_class, NULL, ¶m,16011601- __nodemgr_node_probe);16021602-16031603- /* If we had a bus reset while we were scanning the bus, it is16041604- * possible that we did not probe all nodes. In that case, we16051605- * skip the clean up for now, since we could remove nodes that16061606- * were still on the bus. Another bus scan is pending which will16071607- * do the clean up eventually.15991599+ * while probes are time-consuming.16081600 *16011601+ * Meanwhile, another bus reset may have happened. In this case we16021602+ * skip everything here and let the next bus scan handle it.16031603+ * Otherwise we may prematurely remove nodes which are still there.16041604+ */16051605+ p.probe_now = false;16061606+ if (class_for_each_device(&nodemgr_ne_class, NULL, &p, node_probe) != 0)16071607+ return;16081608+16091609+ p.probe_now = true;16101610+ if (class_for_each_device(&nodemgr_ne_class, NULL, &p, node_probe) != 0)16111611+ return;16121612+ /*16091613 * Now let's tell the bus to rescan our devices. This may seem16101614 * like overhead, but the driver-model core will only scan a16111615 * device for a driver when either the device is added, or when a16121616 * new driver is added. A bus reset is a good reason to rescan16131617 * devices that were there before. For example, an sbp2 device16141618 * may become available for login, if the host that held it was16151615- * just removed. */16161616-16171617- if (generation == get_hpsb_generation(host))16181618- if (bus_rescan_devices(&ieee1394_bus_type))16191619- HPSB_DEBUG("bus_rescan_devices had an error");16191619+ * just removed.16201620+ */16211621+ if (bus_rescan_devices(&ieee1394_bus_type) != 0)16221622+ HPSB_DEBUG("bus_rescan_devices had an error");16201623}1621162416221625static int nodemgr_send_resume_packet(struct hpsb_host *host)
+1-1
drivers/ieee1394/nodemgr.h
···9797 struct hpsb_host *host; /* Host this node is attached to */9898 nodeid_t nodeid; /* NodeID */9999 struct bus_options busopt; /* Bus Options */100100- int needs_probe;100100+ bool needs_probe;101101 unsigned int generation; /* Synced with hpsb generation */102102103103 /* The following is read from the config rom */
+18-7
drivers/ieee1394/sbp2.c
···731731{732732 struct sbp2_lu *lu = ud->device.driver_data;733733734734- if (sbp2_reconnect_device(lu)) {735735- /* Reconnect has failed. Perhaps we didn't reconnect fast736736- * enough. Try a regular login, but first log out just in737737- * case of any weirdness. */734734+ if (sbp2_reconnect_device(lu) != 0) {735735+ /*736736+ * Reconnect failed. If another bus reset happened,737737+ * let nodemgr proceed and call sbp2_update again later738738+ * (or sbp2_remove if this node went away).739739+ */740740+ if (!hpsb_node_entry_valid(lu->ne))741741+ return 0;742742+ /*743743+ * Or the target rejected the reconnect because we weren't744744+ * fast enough. Try a regular login, but first log out745745+ * just in case of any weirdness.746746+ */738747 sbp2_logout_device(lu);739748740740- if (sbp2_login_device(lu)) {741741- /* Login failed too, just fail, and the backend742742- * will call our sbp2_remove for us */749749+ if (sbp2_login_device(lu) != 0) {750750+ if (!hpsb_node_entry_valid(lu->ne))751751+ return 0;752752+753753+ /* Maybe another initiator won the login. */743754 SBP2_ERR("Failed to reconnect to sbp2 device!");744755 return -EBUSY;745756 }
···156156157157 netif_stop_queue(dev);158158159159- /*160160- * Now flush workqueue to make sure a scheduled task doesn't161161- * bring our internal state back up.162162- */163163- flush_workqueue(ipoib_workqueue);164164-165165- ipoib_ib_dev_down(dev, 1);166166- ipoib_ib_dev_stop(dev, 1);159159+ ipoib_ib_dev_down(dev, 0);160160+ ipoib_ib_dev_stop(dev, 0);167161168162 if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {169163 struct ipoib_dev_priv *cpriv;···1308131413091315register_failed:13101316 ib_unregister_event_handler(&priv->event_handler);13111311- flush_scheduled_work();13171317+ flush_workqueue(ipoib_workqueue);1312131813131319event_failed:13141320 ipoib_dev_cleanup(priv->dev);···1367137313681374 list_for_each_entry_safe(priv, tmp, dev_list, list) {13691375 ib_unregister_event_handler(&priv->event_handler);13701370- flush_scheduled_work();13761376+13771377+ rtnl_lock();13781378+ dev_change_flags(priv->dev, priv->dev->flags & ~IFF_UP);13791379+ rtnl_unlock();13801380+13811381+ flush_workqueue(ipoib_workqueue);1371138213721383 unregister_netdev(priv->dev);13731384 ipoib_dev_cleanup(priv->dev);
+9-1
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
···392392 &priv->mcast_task, 0);393393 mutex_unlock(&mcast_mutex);394394395395- if (mcast == priv->broadcast)395395+ if (mcast == priv->broadcast) {396396+ /*397397+ * Take RTNL lock here to avoid racing with398398+ * ipoib_stop() and turning the carrier back399399+ * on while a device is being removed.400400+ */401401+ rtnl_lock();396402 netif_carrier_on(dev);403403+ rtnl_unlock();404404+ }397405398406 return 0;399407 }
···148148 return 0;149149}150150151151+MODULE_AUTHOR("Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>");152152+MODULE_DESCRIPTION("Cobalt button interface driver");153153+MODULE_LICENSE("GPL");151154/* work with hotplug and coldplug */152155MODULE_ALIAS("platform:Cobalt buttons");153156
···6464#include <asm/byteorder.h>656566666767-#include <linux/version.h>6867#include <linux/usb/input.h>69687069/* Version with a Major number of 2 is for kernel inclusion only. */
···1172117211731173config NE200011741174 tristate "NE2000/NE1000 support"11751175- depends on NET_ISA || (Q40 && m) || M32R || TOSHIBA_RBTX4927 || TOSHIBA_RBTX493811751175+ depends on NET_ISA || (Q40 && m) || M32R || MACH_TX49XX11761176 select CRC3211771177 ---help---11781178 If you have a network (Ethernet) card of this type, say Y and read
···510510 netdev_alloc_skb(netdev, length + NET_IP_ALIGN);511511 if (new_skb) {512512 skb_reserve(new_skb, NET_IP_ALIGN);513513- memcpy(new_skb->data - NET_IP_ALIGN,514514- skb->data - NET_IP_ALIGN,515515- length + NET_IP_ALIGN);513513+ skb_copy_to_linear_data_offset(new_skb,514514+ -NET_IP_ALIGN,515515+ (skb->data -516516+ NET_IP_ALIGN),517517+ (length +518518+ NET_IP_ALIGN));516519 /* save the skb in buffer_info as good */517520 buffer_info->skb = skb;518521 skb = new_skb;···12361233 return IRQ_HANDLED;12371234}1238123512361236+/**12371237+ * e1000_request_irq - initialize interrupts12381238+ *12391239+ * Attempts to configure interrupts using the best available12401240+ * capabilities of the hardware and kernel.12411241+ **/12391242static int e1000_request_irq(struct e1000_adapter *adapter)12401243{12411244 struct net_device *netdev = adapter->netdev;12421242- irq_handler_t handler = e1000_intr;12431245 int irq_flags = IRQF_SHARED;12441246 int err;1245124712461246- if (!pci_enable_msi(adapter->pdev)) {12471247- adapter->flags |= FLAG_MSI_ENABLED;12481248- handler = e1000_intr_msi;12491249- irq_flags = 0;12481248+ if (!(adapter->flags & FLAG_MSI_TEST_FAILED)) {12491249+ err = pci_enable_msi(adapter->pdev);12501250+ if (!err) {12511251+ adapter->flags |= FLAG_MSI_ENABLED;12521252+ irq_flags = 0;12531253+ }12501254 }1251125512521252- err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,12531253- netdev);12561256+ err = request_irq(adapter->pdev->irq,12571257+ ((adapter->flags & FLAG_MSI_ENABLED) ?12581258+ &e1000_intr_msi : &e1000_intr),12591259+ irq_flags, netdev->name, netdev);12541260 if (err) {12551255- e_err("Unable to allocate %s interrupt (return: %d)\n",12561256- adapter->flags & FLAG_MSI_ENABLED ? "MSI":"INTx", err);12571257- if (adapter->flags & FLAG_MSI_ENABLED)12611261+ if (adapter->flags & FLAG_MSI_ENABLED) {12581262 pci_disable_msi(adapter->pdev);12631263+ adapter->flags &= ~FLAG_MSI_ENABLED;12641264+ }12651265+ e_err("Unable to allocate interrupt, Error: %d\n", err);12591266 }1260126712611268 return err;···26052592}2606259326072594/**25952595+ * e1000_intr_msi_test - Interrupt Handler25962596+ * @irq: interrupt number25972597+ * @data: pointer to a network interface device structure25982598+ **/25992599+static irqreturn_t e1000_intr_msi_test(int irq, void *data)26002600+{26012601+ struct net_device *netdev = data;26022602+ struct e1000_adapter *adapter = netdev_priv(netdev);26032603+ struct e1000_hw *hw = &adapter->hw;26042604+ u32 icr = er32(ICR);26052605+26062606+ e_dbg("%s: icr is %08X\n", netdev->name, icr);26072607+ if (icr & E1000_ICR_RXSEQ) {26082608+ adapter->flags &= ~FLAG_MSI_TEST_FAILED;26092609+ wmb();26102610+ }26112611+26122612+ return IRQ_HANDLED;26132613+}26142614+26152615+/**26162616+ * e1000_test_msi_interrupt - Returns 0 for successful test26172617+ * @adapter: board private struct26182618+ *26192619+ * code flow taken from tg3.c26202620+ **/26212621+static int e1000_test_msi_interrupt(struct e1000_adapter *adapter)26222622+{26232623+ struct net_device *netdev = adapter->netdev;26242624+ struct e1000_hw *hw = &adapter->hw;26252625+ int err;26262626+26272627+ /* poll_enable hasn't been called yet, so don't need disable */26282628+ /* clear any pending events */26292629+ er32(ICR);26302630+26312631+ /* free the real vector and request a test handler */26322632+ e1000_free_irq(adapter);26332633+26342634+ /* Assume that the test fails, if it succeeds then the test26352635+ * MSI irq handler will unset this flag */26362636+ adapter->flags |= FLAG_MSI_TEST_FAILED;26372637+26382638+ err = pci_enable_msi(adapter->pdev);26392639+ if (err)26402640+ goto msi_test_failed;26412641+26422642+ err = request_irq(adapter->pdev->irq, &e1000_intr_msi_test, 0,26432643+ netdev->name, netdev);26442644+ if (err) {26452645+ pci_disable_msi(adapter->pdev);26462646+ goto msi_test_failed;26472647+ }26482648+26492649+ wmb();26502650+26512651+ e1000_irq_enable(adapter);26522652+26532653+ /* fire an unusual interrupt on the test handler */26542654+ ew32(ICS, E1000_ICS_RXSEQ);26552655+ e1e_flush();26562656+ msleep(50);26572657+26582658+ e1000_irq_disable(adapter);26592659+26602660+ rmb();26612661+26622662+ if (adapter->flags & FLAG_MSI_TEST_FAILED) {26632663+ err = -EIO;26642664+ e_info("MSI interrupt test failed!\n");26652665+ }26662666+26672667+ free_irq(adapter->pdev->irq, netdev);26682668+ pci_disable_msi(adapter->pdev);26692669+26702670+ if (err == -EIO)26712671+ goto msi_test_failed;26722672+26732673+ /* okay so the test worked, restore settings */26742674+ e_dbg("%s: MSI interrupt test succeeded!\n", netdev->name);26752675+msi_test_failed:26762676+ /* restore the original vector, even if it failed */26772677+ e1000_request_irq(adapter);26782678+ return err;26792679+}26802680+26812681+/**26822682+ * e1000_test_msi - Returns 0 if MSI test succeeds or INTx mode is restored26832683+ * @adapter: board private struct26842684+ *26852685+ * code flow taken from tg3.c, called with e1000 interrupts disabled.26862686+ **/26872687+static int e1000_test_msi(struct e1000_adapter *adapter)26882688+{26892689+ int err;26902690+ u16 pci_cmd;26912691+26922692+ if (!(adapter->flags & FLAG_MSI_ENABLED))26932693+ return 0;26942694+26952695+ /* disable SERR in case the MSI write causes a master abort */26962696+ pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd);26972697+ pci_write_config_word(adapter->pdev, PCI_COMMAND,26982698+ pci_cmd & ~PCI_COMMAND_SERR);26992699+27002700+ err = e1000_test_msi_interrupt(adapter);27012701+27022702+ /* restore previous setting of command word */27032703+ pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd);27042704+27052705+ /* success ! */27062706+ if (!err)27072707+ return 0;27082708+27092709+ /* EIO means MSI test failed */27102710+ if (err != -EIO)27112711+ return err;27122712+27132713+ /* back to INTx mode */27142714+ e_warn("MSI interrupt test failed, using legacy interrupt.\n");27152715+27162716+ e1000_free_irq(adapter);27172717+27182718+ err = e1000_request_irq(adapter);27192719+27202720+ return err;27212721+}27222722+27232723+/**26082724 * e1000_open - Called when a network interface is made active26092725 * @netdev: network interface device structure26102726 *···27902648 err = e1000_request_irq(adapter);27912649 if (err)27922650 goto err_req_irq;26512651+26522652+ /*26532653+ * Work around PCIe errata with MSI interrupts causing some chipsets to26542654+ * ignore e1000e MSI messages, which means we need to test our MSI26552655+ * interrupt now26562656+ */26572657+ {26582658+ err = e1000_test_msi(adapter);26592659+ if (err) {26602660+ e_err("Interrupt allocation failed\n");26612661+ goto err_req_irq;26622662+ }26632663+ }2793266427942665 /* From here on the code is the same as e1000e_up() */27952666 clear_bit(__E1000_DOWN, &adapter->state);···32103055 case SPEED_10:32113056 txb2b = 0;32123057 netdev->tx_queue_len = 10;32133213- adapter->tx_timeout_factor = 14;30583058+ adapter->tx_timeout_factor = 16;32143059 break;32153060 case SPEED_100:32163061 txb2b = 0;···38763721 struct e1000_adapter *adapter = netdev_priv(netdev);38773722 int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;3878372338793879- if ((max_frame < ETH_ZLEN + ETH_FCS_LEN) ||37243724+ if ((new_mtu < ETH_ZLEN + ETH_FCS_LEN + VLAN_HLEN) ||38803725 (max_frame > MAX_JUMBO_FRAME_SIZE)) {38813726 e_err("Invalid MTU setting\n");38823727 return -EINVAL;
+19-6
drivers/net/e1000e/param.c
···324324 adapter->itr = 20000;325325 break;326326 default:327327- e1000_validate_option(&adapter->itr, &opt,328328- adapter);329327 /*330330- * save the setting, because the dynamic bits331331- * change itr. clear the lower two bits332332- * because they are used as control328328+ * Save the setting, because the dynamic bits329329+ * change itr.333330 */334334- adapter->itr_setting = adapter->itr & ~3;331331+ if (e1000_validate_option(&adapter->itr, &opt,332332+ adapter) &&333333+ (adapter->itr == 3)) {334334+ /*335335+ * In case of invalid user value,336336+ * default to conservative mode.337337+ */338338+ adapter->itr_setting = adapter->itr;339339+ adapter->itr = 20000;340340+ } else {341341+ /*342342+ * Clear the lower two bits because343343+ * they are used as control.344344+ */345345+ adapter->itr_setting =346346+ adapter->itr & ~3;347347+ }335348 break;336349 }337350 } else {
+2-4
drivers/net/gianfar.c
···134134static void gfar_vlan_rx_register(struct net_device *netdev,135135 struct vlan_group *grp);136136void gfar_halt(struct net_device *dev);137137-#ifdef CONFIG_PM138137static void gfar_halt_nodisable(struct net_device *dev);139139-#endif140138void gfar_start(struct net_device *dev);141139static void gfar_clear_exact_match(struct net_device *dev);142140static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);···629631}630632631633632632-#ifdef CONFIG_PM633634/* Halt the receive and transmit queues */634635static void gfar_halt_nodisable(struct net_device *dev)635636{···654657 cpu_relax();655658 }656659}657657-#endif658660659661/* Halt the receive and transmit queues */660662void gfar_halt(struct net_device *dev)···661665 struct gfar_private *priv = netdev_priv(dev);662666 struct gfar __iomem *regs = priv->regs;663667 u32 tempval;668668+669669+ gfar_halt_nodisable(dev);664670665671 /* Disable Rx and Tx */666672 tempval = gfar_read(®s->maccfg1);
···190190 case IXGBE_DEV_ID_82598AF_DUAL_PORT:191191 case IXGBE_DEV_ID_82598AF_SINGLE_PORT:192192 case IXGBE_DEV_ID_82598EB_CX4:193193+ case IXGBE_DEV_ID_82598_CX4_DUAL_PORT:193194 media_type = ixgbe_media_type_fiber;194195 break;195196 case IXGBE_DEV_ID_82598AT_DUAL_PORT:
···1079107910801080void netxen_free_adapter_offload(struct netxen_adapter *adapter)10811081{10821082- int i;10821082+ int i = 100;1083108310841084- if (adapter->dummy_dma.addr) {10851085- i = 100;10841084+ if (!adapter->dummy_dma.addr)10851085+ return;10861086+10871087+ if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {10861088 do {10871089 if (dma_watchdog_shutdown_request(adapter) == 1)10881090 break;···10921090 if (dma_watchdog_shutdown_poll_result(adapter) == 1)10931091 break;10941092 } while (--i);10931093+ }1095109410961096- if (i) {10971097- pci_free_consistent(adapter->pdev,10981098- NETXEN_HOST_DUMMY_DMA_SIZE,10991099- adapter->dummy_dma.addr,11001100- adapter->dummy_dma.phys_addr);11011101- adapter->dummy_dma.addr = NULL;11021102- } else {11031103- printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",11041104- adapter->netdev->name);11051105- }10951095+ if (i) {10961096+ pci_free_consistent(adapter->pdev,10971097+ NETXEN_HOST_DUMMY_DMA_SIZE,10981098+ adapter->dummy_dma.addr,10991099+ adapter->dummy_dma.phys_addr);11001100+ adapter->dummy_dma.addr = NULL;11011101+ } else {11021102+ printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",11031103+ adapter->netdev->name);11061104 }11071105}11081106
+96-114
drivers/net/netxen/netxen_nic_main.c
···149149150150static struct netxen_legacy_intr_set legacy_intr[] = NX_LEGACY_INTR_CONFIG;151151152152-static void netxen_nic_disable_int(struct netxen_adapter *adapter)152152+static inline void netxen_nic_disable_int(struct netxen_adapter *adapter)153153{154154- u32 mask = 0x7ff;155155- int retries = 32;156156- int pci_fn = adapter->ahw.pci_func;157157-158158- if (adapter->msi_mode != MSI_MODE_MULTIFUNC)159159- adapter->pci_write_normalize(adapter,160160- adapter->crb_intr_mask, 0);161161-162162- if (adapter->intr_scheme != -1 &&163163- adapter->intr_scheme != INTR_SCHEME_PERPORT)164164- adapter->pci_write_immediate(adapter, ISR_INT_MASK, mask);165165-166166- if (!NETXEN_IS_MSI_FAMILY(adapter)) {167167- do {168168- adapter->pci_write_immediate(adapter,169169- adapter->legacy_intr.tgt_status_reg,170170- 0xffffffff);171171- mask = adapter->pci_read_immediate(adapter,172172- ISR_INT_VECTOR);173173- if (!(mask & 0x80))174174- break;175175- udelay(10);176176- } while (--retries);177177-178178- if (!retries) {179179- printk(KERN_NOTICE "%s: Failed to disable interrupt\n",180180- netxen_nic_driver_name);181181- }182182- } else {183183- if (adapter->msi_mode == MSI_MODE_MULTIFUNC) {184184- adapter->pci_write_immediate(adapter,185185- msi_tgt_status[pci_fn], 0xffffffff);186186- }187187- }154154+ adapter->pci_write_normalize(adapter, adapter->crb_intr_mask, 0);188155}189156190190-static void netxen_nic_enable_int(struct netxen_adapter *adapter)157157+static inline void netxen_nic_enable_int(struct netxen_adapter *adapter)191158{192192- u32 mask;193193-194194- if (adapter->intr_scheme != -1 &&195195- adapter->intr_scheme != INTR_SCHEME_PERPORT) {196196- switch (adapter->ahw.board_type) {197197- case NETXEN_NIC_GBE:198198- mask = 0x77b;199199- break;200200- case NETXEN_NIC_XGBE:201201- mask = 0x77f;202202- break;203203- default:204204- mask = 0x7ff;205205- break;206206- }207207-208208- adapter->pci_write_immediate(adapter, ISR_INT_MASK, mask);209209- }210210-211159 adapter->pci_write_normalize(adapter, adapter->crb_intr_mask, 0x1);212160213213- if (!NETXEN_IS_MSI_FAMILY(adapter)) {214214- mask = 0xbff;215215- if (adapter->intr_scheme == INTR_SCHEME_PERPORT)216216- adapter->pci_write_immediate(adapter,217217- adapter->legacy_intr.tgt_mask_reg, mask);218218- else219219- adapter->pci_write_normalize(adapter,220220- CRB_INT_VECTOR, 0);221221- }161161+ if (!NETXEN_IS_MSI_FAMILY(adapter))162162+ adapter->pci_write_immediate(adapter,163163+ adapter->legacy_intr.tgt_mask_reg, 0xfbff);222164}223165224166static int nx_set_dma_mask(struct netxen_adapter *adapter, uint8_t revision_id)···443501 adapter->msix_entries[i].entry = i;444502}445503504504+static int505505+netxen_read_mac_addr(struct netxen_adapter *adapter)506506+{507507+ int i;508508+ unsigned char *p;509509+ __le64 mac_addr;510510+ DECLARE_MAC_BUF(mac);511511+ struct net_device *netdev = adapter->netdev;512512+ struct pci_dev *pdev = adapter->pdev;513513+514514+ if (netxen_is_flash_supported(adapter) != 0)515515+ return -EIO;516516+517517+ if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) {518518+ if (netxen_p3_get_mac_addr(adapter, &mac_addr) != 0)519519+ return -EIO;520520+ } else {521521+ if (netxen_get_flash_mac_addr(adapter, &mac_addr) != 0)522522+ return -EIO;523523+ }524524+525525+ p = (unsigned char *)&mac_addr;526526+ for (i = 0; i < 6; i++)527527+ netdev->dev_addr[i] = *(p + 5 - i);528528+529529+ memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len);530530+531531+ /* set station address */532532+533533+ if (!is_valid_ether_addr(netdev->perm_addr)) {534534+ dev_warn(&pdev->dev, "Bad MAC address %s.\n",535535+ print_mac(mac, netdev->dev_addr));536536+ } else537537+ adapter->macaddr_set(adapter, netdev->dev_addr);538538+539539+ return 0;540540+}541541+446542/*447543 * netxen_nic_probe()448544 *···509529 unsigned long mem_base, mem_len, db_base, db_len, pci_len0 = 0;510530 int i = 0, err;511531 int first_driver, first_boot;512512- __le64 mac_addr[FLASH_NUM_PORTS + 1];513532 u32 val;514533 int pci_func_id = PCI_FUNC(pdev->devfn);515515- DECLARE_MAC_BUF(mac);516534 struct netxen_legacy_intr_set *legacy_intrp;517535 uint8_t revision_id;518536···520542 if (pdev->class != 0x020000) {521543 printk(KERN_DEBUG "NetXen function %d, class %x will not "522544 "be enabled.\n",pci_func_id, pdev->class);545545+ return -ENODEV;546546+ }547547+548548+ if (pdev->revision >= NX_P3_A0 && pdev->revision < NX_P3_B1) {549549+ printk(KERN_WARNING "NetXen chip revisions between 0x%x-0x%x"550550+ "will not be enabled.\n",551551+ NX_P3_A0, NX_P3_B1);523552 return -ENODEV;524553 }525554···883898 goto err_out_disable_msi;884899885900 init_timer(&adapter->watchdog_timer);886886- adapter->ahw.linkup = 0;887901 adapter->watchdog_timer.function = &netxen_watchdog;888902 adapter->watchdog_timer.data = (unsigned long)adapter;889903 INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task);890904 INIT_WORK(&adapter->tx_timeout_task, netxen_tx_timeout_task);891905892892- if (netxen_is_flash_supported(adapter) == 0 &&893893- netxen_get_flash_mac_addr(adapter, mac_addr) == 0) {894894- unsigned char *p;895895-896896- p = (unsigned char *)&mac_addr[adapter->portnum];897897- netdev->dev_addr[0] = *(p + 5);898898- netdev->dev_addr[1] = *(p + 4);899899- netdev->dev_addr[2] = *(p + 3);900900- netdev->dev_addr[3] = *(p + 2);901901- netdev->dev_addr[4] = *(p + 1);902902- netdev->dev_addr[5] = *(p + 0);903903-904904- memcpy(netdev->perm_addr, netdev->dev_addr,905905- netdev->addr_len);906906- if (!is_valid_ether_addr(netdev->perm_addr)) {907907- printk(KERN_ERR "%s: Bad MAC address %s.\n",908908- netxen_nic_driver_name,909909- print_mac(mac, netdev->dev_addr));910910- } else {911911- adapter->macaddr_set(adapter, netdev->dev_addr);912912- }913913- }906906+ err = netxen_read_mac_addr(adapter);907907+ if (err)908908+ dev_warn(&pdev->dev, "failed to read mac addr\n");914909915910 netif_carrier_off(netdev);916911 netif_stop_queue(netdev);···96510009661001 if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {9671002 netxen_free_hw_resources(adapter);10031003+ netxen_release_rx_buffers(adapter);9681004 netxen_free_sw_resources(adapter);9691005 }9701006···10351069 goto err_out_free_sw;10361070 }1037107110721072+ if ((adapter->msi_mode != MSI_MODE_MULTIFUNC) ||10731073+ (adapter->intr_scheme != INTR_SCHEME_PERPORT)) {10741074+ printk(KERN_ERR "%s: Firmware interrupt scheme is "10751075+ "incompatible with driver\n",10761076+ netdev->name);10771077+ adapter->driver_mismatch = 1;10781078+ goto err_out_free_hw;10791079+ }10801080+10381081 if (adapter->fw_major < 4) {10391082 adapter->crb_addr_cmd_producer =10401083 crb_cmd_producer[adapter->portnum];···10691094 flags, netdev->name, adapter);10701095 if (err) {10711096 printk(KERN_ERR "request_irq failed with: %d\n", err);10721072- goto err_out_free_hw;10971097+ goto err_out_free_rxbuf;10731098 }1074109910751100 adapter->is_up = NETXEN_ADAPTER_UP_MAGIC;···10911116 if (adapter->set_mtu)10921117 adapter->set_mtu(adapter, netdev->mtu);1093111811191119+ adapter->ahw.linkup = 0;10941120 mod_timer(&adapter->watchdog_timer, jiffies);1095112110961122 napi_enable(&adapter->napi);···1103112711041128err_out_free_irq:11051129 free_irq(adapter->irq, adapter);11301130+err_out_free_rxbuf:11311131+ netxen_release_rx_buffers(adapter);11061132err_out_free_hw:11071133 netxen_free_hw_resources(adapter);11081134err_out_free_sw:···1130115211311153 netxen_release_tx_buffers(adapter);1132115411331133- if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {11341134- FLUSH_SCHEDULED_WORK();11351135- del_timer_sync(&adapter->watchdog_timer);11361136- }11551155+ FLUSH_SCHEDULED_WORK();11561156+ del_timer_sync(&adapter->watchdog_timer);1137115711381158 return 0;11391159}···1434145814351459 netxen_nic_handle_phy_intr(adapter);1436146014371437- mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);14611461+ if (netif_running(adapter->netdev))14621462+ mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);14381463}1439146414401465static void netxen_tx_timeout(struct net_device *netdev)···14951518 return stats;14961519}1497152014981498-static inline void14991499-netxen_handle_int(struct netxen_adapter *adapter)15001500-{15011501- netxen_nic_disable_int(adapter);15021502- napi_schedule(&adapter->napi);15031503-}15041504-15051521static irqreturn_t netxen_intr(int irq, void *data)15061522{15071523 struct netxen_adapter *adapter = data;15081508- u32 our_int = 0;15091509-15101524 u32 status = 0;1511152515121526 status = adapter->pci_read_immediate(adapter, ISR_INT_VECTOR);···15121544 if (!ISR_LEGACY_INT_TRIGGERED(status))15131545 return IRQ_NONE;1514154615151515- } else if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {15471547+ } else {15481548+ unsigned long our_int = 0;1516154915171550 our_int = adapter->pci_read_normalize(adapter, CRB_INT_VECTOR);15511551+15181552 /* not our interrupt */15191519- if ((our_int & (0x80 << adapter->portnum)) == 0)15531553+ if (!test_and_clear_bit((7 + adapter->portnum), &our_int))15201554 return IRQ_NONE;1521155515221522- if (adapter->intr_scheme == INTR_SCHEME_PERPORT) {15231523- /* claim interrupt */15241524- adapter->pci_write_normalize(adapter,15251525- CRB_INT_VECTOR,15261526- our_int & ~((u32)(0x80 << adapter->portnum)));15271527- }15561556+ /* claim interrupt */15571557+ adapter->pci_write_normalize(adapter,15581558+ CRB_INT_VECTOR, (our_int & 0xffffffff));15281559 }1529156015301530- netxen_handle_int(adapter);15611561+ /* clear interrupt */15621562+ if (adapter->fw_major < 4)15631563+ netxen_nic_disable_int(adapter);15641564+15651565+ adapter->pci_write_immediate(adapter,15661566+ adapter->legacy_intr.tgt_status_reg,15671567+ 0xffffffff);15681568+ /* read twice to ensure write is flushed */15691569+ adapter->pci_read_immediate(adapter, ISR_INT_VECTOR);15701570+ adapter->pci_read_immediate(adapter, ISR_INT_VECTOR);15711571+15721572+ napi_schedule(&adapter->napi);1531157315321574 return IRQ_HANDLED;15331575}···15461568{15471569 struct netxen_adapter *adapter = data;1548157015491549- netxen_handle_int(adapter);15711571+ /* clear interrupt */15721572+ adapter->pci_write_immediate(adapter,15731573+ msi_tgt_status[adapter->ahw.pci_func], 0xffffffff);15741574+15751575+ napi_schedule(&adapter->napi);15501576 return IRQ_HANDLED;15511577}15521578
+2
drivers/net/netxen/netxen_nic_phan_reg.h
···125125#define CRB_SW_INT_MASK_2 NETXEN_NIC_REG(0x1e4)126126#define CRB_SW_INT_MASK_3 NETXEN_NIC_REG(0x1e8)127127128128+#define CRB_MAC_BLOCK_START NETXEN_CAM_RAM(0x1c0)129129+128130/*129131 * capabilities register, can be used to selectively enable/disable features130132 * for backward compability
···6060 *6161 */62626363-#include <linux/version.h>6464-6563/* MAX_INTR - the maximum number of times we can loop6664 * inside the interrupt function before returning6765 * control to the OS (maximum value is 256)
+101-4
drivers/net/tun.c
···358358 return mask;359359}360360361361+/* prepad is the amount to reserve at front. len is length after that.362362+ * linear is a hint as to how much to copy (usually headers). */363363+static struct sk_buff *tun_alloc_skb(size_t prepad, size_t len, size_t linear,364364+ gfp_t gfp)365365+{366366+ struct sk_buff *skb;367367+ unsigned int i;368368+369369+ skb = alloc_skb(prepad + len, gfp|__GFP_NOWARN);370370+ if (skb) {371371+ skb_reserve(skb, prepad);372372+ skb_put(skb, len);373373+ return skb;374374+ }375375+376376+ /* Under a page? Don't bother with paged skb. */377377+ if (prepad + len < PAGE_SIZE)378378+ return NULL;379379+380380+ /* Start with a normal skb, and add pages. */381381+ skb = alloc_skb(prepad + linear, gfp);382382+ if (!skb)383383+ return NULL;384384+385385+ skb_reserve(skb, prepad);386386+ skb_put(skb, linear);387387+388388+ len -= linear;389389+390390+ for (i = 0; i < MAX_SKB_FRAGS; i++) {391391+ skb_frag_t *f = &skb_shinfo(skb)->frags[i];392392+393393+ f->page = alloc_page(gfp|__GFP_ZERO);394394+ if (!f->page)395395+ break;396396+397397+ f->page_offset = 0;398398+ f->size = PAGE_SIZE;399399+400400+ skb->data_len += PAGE_SIZE;401401+ skb->len += PAGE_SIZE;402402+ skb->truesize += PAGE_SIZE;403403+ skb_shinfo(skb)->nr_frags++;404404+405405+ if (len < PAGE_SIZE) {406406+ len = 0;407407+ break;408408+ }409409+ len -= PAGE_SIZE;410410+ }411411+412412+ /* Too large, or alloc fail? */413413+ if (unlikely(len)) {414414+ kfree_skb(skb);415415+ skb = NULL;416416+ }417417+418418+ return skb;419419+}420420+361421/* Get packet from user space buffer */362422static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count)363423{···451391 return -EINVAL;452392 }453393454454- if (!(skb = alloc_skb(len + align, GFP_KERNEL))) {394394+ if (!(skb = tun_alloc_skb(align, len, gso.hdr_len, GFP_KERNEL))) {455395 tun->dev->stats.rx_dropped++;456396 return -ENOMEM;457397 }458398459459- if (align)460460- skb_reserve(skb, align);461461- if (memcpy_fromiovec(skb_put(skb, len), iv, len)) {399399+ if (skb_copy_datagram_from_iovec(skb, 0, iv, len)) {462400 tun->dev->stats.rx_dropped++;463401 kfree_skb(skb);464402 return -EFAULT;···806748 return err;807749}808750751751+static int tun_get_iff(struct net *net, struct file *file, struct ifreq *ifr)752752+{753753+ struct tun_struct *tun = file->private_data;754754+755755+ if (!tun)756756+ return -EBADFD;757757+758758+ DBG(KERN_INFO "%s: tun_get_iff\n", tun->dev->name);759759+760760+ strcpy(ifr->ifr_name, tun->dev->name);761761+762762+ ifr->ifr_flags = 0;763763+764764+ if (ifr->ifr_flags & TUN_TUN_DEV)765765+ ifr->ifr_flags |= IFF_TUN;766766+ else767767+ ifr->ifr_flags |= IFF_TAP;768768+769769+ if (tun->flags & TUN_NO_PI)770770+ ifr->ifr_flags |= IFF_NO_PI;771771+772772+ if (tun->flags & TUN_ONE_QUEUE)773773+ ifr->ifr_flags |= IFF_ONE_QUEUE;774774+775775+ if (tun->flags & TUN_VNET_HDR)776776+ ifr->ifr_flags |= IFF_VNET_HDR;777777+778778+ return 0;779779+}780780+809781/* This is like a cut-down ethtool ops, except done via tun fd so no810782 * privs required. */811783static int set_offload(struct net_device *dev, unsigned long arg)···921833 DBG(KERN_INFO "%s: tun_chr_ioctl cmd %d\n", tun->dev->name, cmd);922834923835 switch (cmd) {836836+ case TUNGETIFF:837837+ ret = tun_get_iff(current->nsproxy->net_ns, file, &ifr);838838+ if (ret)839839+ return ret;840840+841841+ if (copy_to_user(argp, &ifr, sizeof(ifr)))842842+ return -EFAULT;843843+ break;844844+924845 case TUNSETNOCSUM:925846 /* Disable/Enable checksum */926847 if (arg)
···154154 This driver creates an interface named "ethX", where X depends on155155 what other networking devices you have in use.156156157157-config USB_HSO158158- tristate "Option USB High Speed Mobile Devices"159159- depends on USB && RFKILL160160- default n161161- help162162- Choose this option if you have an Option HSDPA/HSUPA card.163163- These cards support downlink speeds of 7.2Mbps or greater.164164-165165- To compile this driver as a module, choose M here: the166166- module will be called hso.167167-168157config USB_NET_CDCETHER169158 tristate "CDC Ethernet support (smart devices such as cable modems)"170159 depends on USB_USBNET···326337 really need this non-conformant variant of CDC Ethernet (or in327338 some cases CDC MDLM) protocol, not "g_ether".328339340340+config USB_HSO341341+ tristate "Option USB High Speed Mobile Devices"342342+ depends on USB && RFKILL343343+ default n344344+ help345345+ Choose this option if you have an Option HSDPA/HSUPA card.346346+ These cards support downlink speeds of 7.2Mbps or greater.347347+348348+ To compile this driver as a module, choose M here: the349349+ module will be called hso.329350330351endmenu
+30-23
drivers/net/usb/hso.c
···102102103103#define MAX_RX_URBS 2104104105105-#define get_serial_by_tty(x) \106106- (x ? (struct hso_serial *)x->driver_data : NULL)105105+static inline struct hso_serial *get_serial_by_tty(struct tty_struct *tty)106106+{107107+ if (tty)108108+ return tty->driver_data;109109+ return NULL;110110+}107111108112/*****************************************************************************/109113/* Debugging functions */···298294299295/* #define DEBUG */300296301301-#define dev2net(x) (x->port_data.dev_net)302302-#define dev2ser(x) (x->port_data.dev_serial)297297+static inline struct hso_net *dev2net(struct hso_device *hso_dev)298298+{299299+ return hso_dev->port_data.dev_net;300300+}301301+302302+static inline struct hso_serial *dev2ser(struct hso_device *hso_dev)303303+{304304+ return hso_dev->port_data.dev_serial;305305+}303306304307/* Debugging functions */305308#ifdef DEBUG306309static void dbg_dump(int line_count, const char *func_name, unsigned char *buf,307310 unsigned int len)308311{309309- u8 i = 0;312312+ static char name[255];310313311311- printk(KERN_DEBUG "[%d:%s]: len %d", line_count, func_name, len);312312-313313- for (i = 0; i < len; i++) {314314- if (!(i % 16))315315- printk("\n 0x%03x: ", i);316316- printk("%02x ", (unsigned char)buf[i]);317317- }318318- printk("\n");314314+ sprintf(name, "hso[%d:%s]", line_count, func_name);315315+ print_hex_dump_bytes(name, DUMP_PREFIX_NONE, buf, len);319316}320317321318#define DUMP(buf_, len_) \···533528534529static struct hso_serial *get_serial_by_index(unsigned index)535530{536536- struct hso_serial *serial;531531+ struct hso_serial *serial = NULL;537532 unsigned long flags;538533539539- if (!serial_table[index])540540- return NULL;541534 spin_lock_irqsave(&serial_table_lock, flags);542542- serial = dev2ser(serial_table[index]);535535+ if (serial_table[index])536536+ serial = dev2ser(serial_table[index]);543537 spin_unlock_irqrestore(&serial_table_lock, flags);544538545539 return serial;···565561static void set_serial_by_index(unsigned index, struct hso_serial *serial)566562{567563 unsigned long flags;564564+568565 spin_lock_irqsave(&serial_table_lock, flags);569566 if (serial)570567 serial_table[index] = serial->parent;···574569 spin_unlock_irqrestore(&serial_table_lock, flags);575570}576571577577-/* log a meaningfull explanation of an USB status */572572+/* log a meaningful explanation of an USB status */578573static void log_usb_status(int status, const char *function)579574{580575 char *explanation;···11081103 /* reset the rts and dtr */11091104 /* do the actual close */11101105 serial->open_count--;11061106+ kref_put(&serial->parent->ref, hso_serial_ref_free);11111107 if (serial->open_count <= 0) {11121112- kref_put(&serial->parent->ref, hso_serial_ref_free);11131108 serial->open_count = 0;11141109 if (serial->tty) {11151110 serial->tty->driver_data = NULL;···14721467 return;14731468 }14741469 hso_put_activity(serial->parent);14751475- tty_wakeup(serial->tty);14701470+ if (serial->tty)14711471+ tty_wakeup(serial->tty);14761472 hso_kick_transmit(serial);1477147314781474 D1(" ");···15441538 clear_bit(HSO_SERIAL_FLAG_RX_SENT, &serial->flags);15451539 } else {15461540 hso_put_activity(serial->parent);15471547- tty_wakeup(serial->tty);15411541+ if (serial->tty)15421542+ tty_wakeup(serial->tty);15481543 /* response to a write command */15491544 hso_kick_transmit(serial);15501545 }···26592652 hso_stop_net_device(network_table[i]);26602653 cancel_work_sync(&network_table[i]->async_put_intf);26612654 cancel_work_sync(&network_table[i]->async_get_intf);26622662- if(rfk)26552655+ if (rfk)26632656 rfkill_unregister(rfk);26642657 hso_free_net_device(network_table[i]);26652658 }···27302723}2731272427322725/* operations setup of the serial interface */27332733-static struct tty_operations hso_serial_ops = {27262726+static const struct tty_operations hso_serial_ops = {27342727 .open = hso_serial_open,27352728 .close = hso_serial_close,27362729 .write = hso_serial_write,
···26262727#include <linux/kernel.h>2828#include <linux/module.h>2929-#include <linux/version.h>3029#include <linux/init.h>3130#include <linux/pci.h>3231#include <linux/dma-mapping.h>···966967967968 s = iwl4965_get_sub_band(priv, channel);968969 if (s >= EEPROM_TX_POWER_BANDS) {969969- IWL_ERROR("Tx Power can not find channel %d ", channel);970970+ IWL_ERROR("Tx Power can not find channel %d\n", channel);970971 return -1;971972 }972973
···207207 case WLAN_HT_CAP_MIMO_PS_DISABLED:208208 break;209209 default:210210- IWL_WARNING("Invalid MIMO PS mode %d", mimo_ps_mode);210210+ IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode);211211 break;212212 }213213···969969 return priv->hw_params.bcast_sta_id;970970971971 default:972972- IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode);972972+ IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode);973973 return priv->hw_params.bcast_sta_id;974974 }975975}
+2-2
drivers/net/wireless/iwlwifi/iwl-tx.c
···493493 /* Alloc keep-warm buffer */494494 ret = iwl_kw_alloc(priv);495495 if (ret) {496496- IWL_ERROR("Keep Warm allocation failed");496496+ IWL_ERROR("Keep Warm allocation failed\n");497497 goto error_kw;498498 }499499 spin_lock_irqsave(&priv->lock, flags);···14631463 u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn);1464146414651465 if (scd_flow >= priv->hw_params.max_txq_num) {14661466- IWL_ERROR("BUG_ON scd_flow is bigger than number of queues");14661466+ IWL_ERROR("BUG_ON scd_flow is bigger than number of queues\n");14671467 return;14681468 }14691469
+3-4
drivers/net/wireless/iwlwifi/iwl3945-base.c
···29293030#include <linux/kernel.h>3131#include <linux/module.h>3232-#include <linux/version.h>3332#include <linux/init.h>3433#include <linux/pci.h>3534#include <linux/dma-mapping.h>···15571558 BUILD_BUG_ON(sizeof(priv->eeprom) != IWL_EEPROM_IMAGE_SIZE);1558155915591560 if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {15601560- IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp);15611561+ IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);15611562 return -ENOENT;15621563 }15631564···15821583 }1583158415841585 if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) {15851585- IWL_ERROR("Time out reading EEPROM[%d]", addr);15861586+ IWL_ERROR("Time out reading EEPROM[%d]\n", addr);15861587 return -ETIMEDOUT;15871588 }15881589 e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16));···25062507 return priv->hw_setting.bcast_sta_id;2507250825082509 default:25092509- IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode);25102510+ IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode);25102511 return priv->hw_setting.bcast_sta_id;25112512 }25122513}
···181181 * (Only indirectly by looking at the failed TX counters182182 * in the register).183183 */184184+ txdesc.flags = 0;184185 if (!urb->status)185186 __set_bit(TXDONE_UNKNOWN, &txdesc.flags);186187 else
···382382int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags)383383{384384 acpi_status status;385385- acpi_handle chandle, handle = DEVICE_ACPI_HANDLE(&(dev->dev));385385+ acpi_handle chandle, handle;386386 struct pci_dev *pdev = dev;387387 struct pci_bus *parent;388388 struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL };···399399 * Per PCI firmware specification, we should run the ACPI _OSC400400 * method to get control of hotplug hardware before using it. If401401 * an _OSC is missing, we look for an OSHP to do the same thing.402402- * To handle different BIOS behavior, we look for _OSC and OSHP403403- * within the scope of the hotplug controller and its parents,402402+ * To handle different BIOS behavior, we look for _OSC on a root403403+ * bridge preferentially (according to PCI fw spec). Later for404404+ * OSHP within the scope of the hotplug controller and its parents,404405 * upto the host bridge under which this controller exists.405406 */407407+ handle = acpi_find_root_bridge_handle(pdev);408408+ if (handle) {409409+ acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);410410+ dbg("Trying to get hotplug control for %s\n",411411+ (char *)string.pointer);412412+ status = pci_osc_control_set(handle, flags);413413+ if (ACPI_SUCCESS(status))414414+ goto got_one;415415+ kfree(string.pointer);416416+ string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL };417417+ }418418+419419+ pdev = dev;420420+ handle = DEVICE_ACPI_HANDLE(&dev->dev);406421 while (!handle) {407422 /*408423 * This hotplug controller was not listed in the ACPI name···442427 acpi_get_name(handle, ACPI_FULL_PATHNAME, &string);443428 dbg("Trying to get hotplug control for %s \n",444429 (char *)string.pointer);445445- status = pci_osc_control_set(handle, flags);446446- if (status == AE_NOT_FOUND)447447- status = acpi_run_oshp(handle);448448- if (ACPI_SUCCESS(status)) {449449- dbg("Gained control for hotplug HW for pci %s (%s)\n",450450- pci_name(dev), (char *)string.pointer);451451- kfree(string.pointer);452452- return 0;453453- }430430+ status = acpi_run_oshp(handle);431431+ if (ACPI_SUCCESS(status))432432+ goto got_one;454433 if (acpi_root_bridge(handle))455434 break;456435 chandle = handle;···458449459450 kfree(string.pointer);460451 return -ENODEV;452452+got_one:453453+ dbg("Gained control for hotplug HW for pci %s (%s)\n", pci_name(dev),454454+ (char *)string.pointer);455455+ kfree(string.pointer);456456+ return 0;461457}462458EXPORT_SYMBOL(acpi_get_hp_hw_control_from_firmware);463459
+1-6
drivers/pci/pcie/aer/aerdrv_acpi.c
···3636 if (acpi_pci_disabled)3737 return -1;38383939- /* Find root host bridge */4040- while (pdev->bus->self)4141- pdev = pdev->bus->self;4242- handle = acpi_get_pci_rootbridge_handle(4343- pci_domain_nr(pdev->bus), pdev->bus->number);4444-3939+ handle = acpi_find_root_bridge_handle(pdev);4540 if (handle) {4641 pcie_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT);4742 status = pci_osc_control_set(handle,
···530530}531531EXPORT_SYMBOL(pci_bus_assign_resources);532532533533+static void pci_bus_dump_res(struct pci_bus *bus)534534+{535535+ int i;536536+537537+ for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {538538+ struct resource *res = bus->resource[i];539539+ if (!res)540540+ continue;541541+542542+ printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end);543543+ }544544+}545545+546546+static void pci_bus_dump_resources(struct pci_bus *bus)547547+{548548+ struct pci_bus *b;549549+ struct pci_dev *dev;550550+551551+552552+ pci_bus_dump_res(bus);553553+554554+ list_for_each_entry(dev, &bus->devices, bus_list) {555555+ b = dev->subordinate;556556+ if (!b)557557+ continue;558558+559559+ pci_bus_dump_resources(b);560560+ }561561+}562562+533563void __init534564pci_assign_unassigned_resources(void)535565{···574544 list_for_each_entry(bus, &pci_root_buses, node) {575545 pci_bus_assign_resources(bus);576546 pci_enable_bridges(bus);547547+ }548548+549549+ /* dump the resource on buses */550550+ list_for_each_entry(bus, &pci_root_buses, node) {551551+ pci_bus_dump_resources(bus);577552 }578553}
+1-1
drivers/rtc/Kconfig
···561561562562config RTC_DRV_BFIN563563 tristate "Blackfin On-Chip RTC"564564- depends on BLACKFIN564564+ depends on BLACKFIN && !BF561565565 help566566 If you say yes here you will get support for the567567 Blackfin On-Chip Real Time Clock.
+28-32
drivers/rtc/rtc-bfin.c
···218218 return IRQ_NONE;219219}220220221221-static int bfin_rtc_open(struct device *dev)222222-{223223- int ret;224224-225225- dev_dbg_stamp(dev);226226-227227- ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, to_platform_device(dev)->name, dev);228228- if (!ret)229229- bfin_rtc_reset(dev, RTC_ISTAT_WRITE_COMPLETE);230230-231231- return ret;232232-}233233-234234-static void bfin_rtc_release(struct device *dev)235235-{236236- dev_dbg_stamp(dev);237237- bfin_rtc_reset(dev, 0);238238- free_irq(IRQ_RTC, dev);239239-}240240-241221static void bfin_rtc_int_set(u16 rtc_int)242222{243223 bfin_write_RTC_ISTAT(rtc_int);···350370}351371352372static struct rtc_class_ops bfin_rtc_ops = {353353- .open = bfin_rtc_open,354354- .release = bfin_rtc_release,355373 .ioctl = bfin_rtc_ioctl,356374 .read_time = bfin_rtc_read_time,357375 .set_time = bfin_rtc_set_time,···361383static int __devinit bfin_rtc_probe(struct platform_device *pdev)362384{363385 struct bfin_rtc *rtc;386386+ struct device *dev = &pdev->dev;364387 int ret = 0;388388+ unsigned long timeout;365389366366- dev_dbg_stamp(&pdev->dev);390390+ dev_dbg_stamp(dev);367391392392+ /* Allocate memory for our RTC struct */368393 rtc = kzalloc(sizeof(*rtc), GFP_KERNEL);369394 if (unlikely(!rtc))370395 return -ENOMEM;396396+ platform_set_drvdata(pdev, rtc);397397+ device_init_wakeup(dev, 1);371398372372- rtc->rtc_dev = rtc_device_register(pdev->name, &pdev->dev, &bfin_rtc_ops, THIS_MODULE);373373- if (IS_ERR(rtc)) {374374- ret = PTR_ERR(rtc->rtc_dev);399399+ /* Grab the IRQ and init the hardware */400400+ ret = request_irq(IRQ_RTC, bfin_rtc_interrupt, IRQF_SHARED, pdev->name, dev);401401+ if (unlikely(ret))375402 goto err;376376- }377377-378378- /* see comment at top of file about stopwatch/PIE */403403+ /* sometimes the bootloader touched things, but the write complete was not404404+ * enabled, so let's just do a quick timeout here since the IRQ will not fire ...405405+ */406406+ timeout = jiffies + HZ;407407+ while (bfin_read_RTC_ISTAT() & RTC_ISTAT_WRITE_PENDING)408408+ if (time_after(jiffies, timeout))409409+ break;410410+ bfin_rtc_reset(dev, RTC_ISTAT_WRITE_COMPLETE);379411 bfin_write_RTC_SWCNT(0);380412381381- platform_set_drvdata(pdev, rtc);382382-383383- device_init_wakeup(&pdev->dev, 1);413413+ /* Register our RTC with the RTC framework */414414+ rtc->rtc_dev = rtc_device_register(pdev->name, dev, &bfin_rtc_ops, THIS_MODULE);415415+ if (unlikely(IS_ERR(rtc))) {416416+ ret = PTR_ERR(rtc->rtc_dev);417417+ goto err_irq;418418+ }384419385420 return 0;386421422422+ err_irq:423423+ free_irq(IRQ_RTC, dev);387424 err:388425 kfree(rtc);389426 return ret;···407414static int __devexit bfin_rtc_remove(struct platform_device *pdev)408415{409416 struct bfin_rtc *rtc = platform_get_drvdata(pdev);417417+ struct device *dev = &pdev->dev;410418419419+ bfin_rtc_reset(dev, 0);420420+ free_irq(IRQ_RTC, dev);411421 rtc_device_unregister(rtc->rtc_dev);412422 platform_set_drvdata(pdev, NULL);413423 kfree(rtc);
···173173 int cr, sr;174174 int ret = 0;175175176176- if (client->irq < 0)176176+ if (client->irq <= 0)177177 return -EINVAL;178178179179 mutex_lock(&ds1374->mutex);···212212 int cr;213213 int ret = 0;214214215215- if (client->irq < 0)215215+ if (client->irq <= 0)216216 return -EINVAL;217217218218 ret = ds1374_read_time(dev, &now);···381381 if (ret)382382 goto out_free;383383384384- if (client->irq >= 0) {384384+ if (client->irq > 0) {385385 ret = request_irq(client->irq, ds1374_irq, 0,386386 "ds1374", client);387387 if (ret) {···401401 return 0;402402403403out_irq:404404- if (client->irq >= 0)404404+ if (client->irq > 0)405405 free_irq(client->irq, client);406406407407out_free:···414414{415415 struct ds1374 *ds1374 = i2c_get_clientdata(client);416416417417- if (client->irq >= 0) {417417+ if (client->irq > 0) {418418 mutex_lock(&ds1374->mutex);419419 ds1374->exiting = 1;420420 mutex_unlock(&ds1374->mutex);
···384384 * get minor, add to list385385 */386386 down_write(&dcssblk_devices_sem);387387+ if (dcssblk_get_segment_by_name(local_buf)) {388388+ rc = -EEXIST;389389+ goto release_gd;390390+ }387391 rc = dcssblk_assign_free_minor(dev_info);388392 if (rc) {389393 up_write(&dcssblk_devices_sem);
+1-1
drivers/s390/char/tape_char.c
···109109110110 /* The current idal buffer is not correct. Allocate a new one. */111111 new = idal_buffer_alloc(block_size, 0);112112- if (new == NULL)112112+ if (IS_ERR(new))113113 return -ENOMEM;114114115115 if (device->char_data.idal_buf != NULL)
+1-1
drivers/s390/char/tape_std.c
···248248249249 /* Allocate a new idal buffer. */250250 new = idal_buffer_alloc(count, 0);251251- if (new == NULL)251251+ if (IS_ERR(new))252252 return -ENOMEM;253253 if (device->char_data.idal_buf != NULL)254254 idal_buffer_free(device->char_data.idal_buf);
···113113 struct qdio_q *q;114114 int i;115115116116- for_each_input_queue(irq_ptr, q, i) {116116+ for (i = 0; i < irq_ptr->nr_input_qs; i++) {117117+ q = irq_ptr->input_qs[i];118118+ /* if establish triggered an error */119119+ if (!q || !q->entry.prev || !q->entry.next)120120+ continue;117121 list_del_rcu(&q->entry);118122 synchronize_rcu();119123 }
···993993{994994 fc_port_t *fcport = *(fc_port_t **)rport->dd_data;995995996996+ /*997997+ * At this point all fcport's software-states are cleared. Perform any998998+ * final cleanup of firmware resources (PCBs and XCBs).999999+ */10001000+ if (fcport->loop_id != FC_NO_LOOP_ID) {10011001+ fcport->ha->isp_ops->fabric_logout(fcport->ha, fcport->loop_id,10021002+ fcport->d_id.b.domain, fcport->d_id.b.area,10031003+ fcport->d_id.b.al_pa);10041004+ fcport->loop_id = FC_NO_LOOP_ID;10051005+ }10061006+9961007 qla2x00_abort_fcport_cmds(fcport);9971008 scsi_target_unblock(&rport->dev);9981009}
+1
drivers/scsi/qla2xxx/qla_def.h
···22372237#define REGISTER_FDMI_NEEDED 2622382238#define FCPORT_UPDATE_NEEDED 2722392239#define VP_DPC_NEEDED 28 /* wake up for VP dpc handling */22402240+#define UNLOADING 292240224122412242 uint32_t device_flags;22422243#define DFLG_LOCAL_DEVICES BIT_0
+6-2
drivers/scsi/qla2xxx/qla_init.c
···976976 &ha->fw_attributes, &ha->fw_memory_size);977977 qla2x00_resize_request_q(ha);978978 ha->flags.npiv_supported = 0;979979- if ((IS_QLA24XX(ha) || IS_QLA25XX(ha)) &&980980- (ha->fw_attributes & BIT_2)) {979979+ if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) ||980980+ IS_QLA84XX(ha)) &&981981+ (ha->fw_attributes & BIT_2)) {981982 ha->flags.npiv_supported = 1;982983 if ((!ha->max_npiv_vports) ||983984 ((ha->max_npiv_vports + 1) %···32523251{32533252 int rval;32543253 uint8_t status = 0;32543254+ scsi_qla_host_t *vha;3255325532563256 if (ha->flags.online) {32573257 ha->flags.online = 0;···32673265 if (atomic_read(&ha->loop_state) != LOOP_DOWN) {32683266 atomic_set(&ha->loop_state, LOOP_DOWN);32693267 qla2x00_mark_all_devices_lost(ha, 0);32683268+ list_for_each_entry(vha, &ha->vp_list, vp_list)32693269+ qla2x00_mark_all_devices_lost(vha, 0);32703270 } else {32713271 if (!atomic_read(&ha->loop_down_timer))32723272 atomic_set(&ha->loop_down_timer,
+7-7
drivers/scsi/qla2xxx/qla_isr.c
···879879 sp->request_sense_ptr += sense_len;880880 sp->request_sense_length -= sense_len;881881 if (sp->request_sense_length != 0)882882- sp->ha->status_srb = sp;882882+ sp->fcport->ha->status_srb = sp;883883884884 DEBUG5(printk("%s(): Check condition Sense data, scsi(%ld:%d:%d:%d) "885885- "cmd=%p pid=%ld\n", __func__, sp->ha->host_no, cp->device->channel,886886- cp->device->id, cp->device->lun, cp, cp->serial_number));885885+ "cmd=%p pid=%ld\n", __func__, sp->fcport->ha->host_no,886886+ cp->device->channel, cp->device->id, cp->device->lun, cp,887887+ cp->serial_number));887888 if (sense_len)888889 DEBUG5(qla2x00_dump_buffer(cp->sense_buffer,889890 CMD_ACTUAL_SNSLEN(cp)));···11851184 atomic_read(&fcport->state)));1186118511871186 cp->result = DID_BUS_BUSY << 16;11881188- if (atomic_read(&fcport->state) == FCS_ONLINE) {11891189- qla2x00_mark_device_lost(ha, fcport, 1, 1);11901190- }11871187+ if (atomic_read(&fcport->state) == FCS_ONLINE)11881188+ qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1);11911189 break;1192119011931191 case CS_RESET:···1229122912301230 /* Check to see if logout occurred. */12311231 if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT))12321232- qla2x00_mark_device_lost(ha, fcport, 1, 1);12321232+ qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1);12331233 break;1234123412351235 default:
···1165116511661166int ssb_dma_set_mask(struct ssb_device *dev, u64 mask)11671167{11681168+#ifdef CONFIG_SSB_PCIHOST11681169 int err;11701170+#endif1169117111701172 switch (dev->bus->bustype) {11711173 case SSB_BUSTYPE_PCI:11741174+#ifdef CONFIG_SSB_PCIHOST11721175 err = pci_set_dma_mask(dev->bus->host_pci, mask);11731176 if (err)11741177 return err;11751178 err = pci_set_consistent_dma_mask(dev->bus->host_pci, mask);11761179 return err;11801180+#endif11771181 case SSB_BUSTYPE_SSB:11781182 return dma_set_mask(dev->dev, mask);11791183 default:···11921188{11931189 switch (dev->bus->bustype) {11941190 case SSB_BUSTYPE_PCI:11911191+#ifdef CONFIG_SSB_PCIHOST11951192 if (gfp_flags & GFP_DMA) {11961193 /* Workaround: The PCI API does not support passing11971194 * a GFP flag. */···12001195 size, dma_handle, gfp_flags);12011196 }12021197 return pci_alloc_consistent(dev->bus->host_pci, size, dma_handle);11981198+#endif12031199 case SSB_BUSTYPE_SSB:12041200 return dma_alloc_coherent(dev->dev, size, dma_handle, gfp_flags);12051201 default:···12161210{12171211 switch (dev->bus->bustype) {12181212 case SSB_BUSTYPE_PCI:12131213+#ifdef CONFIG_SSB_PCIHOST12191214 if (gfp_flags & GFP_DMA) {12201215 /* Workaround: The PCI API does not support passing12211216 * a GFP flag. */···12271220 pci_free_consistent(dev->bus->host_pci, size,12281221 vaddr, dma_handle);12291222 return;12231223+#endif12301224 case SSB_BUSTYPE_SSB:12311225 dma_free_coherent(dev->dev, size, vaddr, dma_handle);12321226 return;
+13
drivers/uio/Kconfig
···33333434 If you don't know what to do here, say N.35353636+config UIO_PDRV_GENIRQ3737+ tristate "Userspace I/O platform driver with generic IRQ handling"3838+ help3939+ Platform driver for Userspace I/O devices, including generic4040+ interrupt handling code. Shared interrupts are not supported.4141+4242+ This kernel driver requires that the matching userspace driver4343+ handles interrupts in a special way. Userspace is responsible4444+ for acknowledging the hardware device if needed, and re-enabling4545+ interrupts in the interrupt controller using the write() syscall.4646+4747+ If you don't know what to do here, say N.4848+3649config UIO_SMX3750 tristate "SMX cryptengine UIO interface"3851 default n
···11+/*22+ * drivers/uio/uio_pdrv_genirq.c33+ *44+ * Userspace I/O platform driver with generic IRQ handling code.55+ *66+ * Copyright (C) 2008 Magnus Damm77+ *88+ * Based on uio_pdrv.c by Uwe Kleine-Koenig,99+ * Copyright (C) 2008 by Digi International Inc.1010+ * All rights reserved.1111+ *1212+ * This program is free software; you can redistribute it and/or modify it1313+ * under the terms of the GNU General Public License version 2 as published by1414+ * the Free Software Foundation.1515+ */1616+1717+#include <linux/platform_device.h>1818+#include <linux/uio_driver.h>1919+#include <linux/spinlock.h>2020+#include <linux/bitops.h>2121+#include <linux/interrupt.h>2222+#include <linux/stringify.h>2323+2424+#define DRIVER_NAME "uio_pdrv_genirq"2525+2626+struct uio_pdrv_genirq_platdata {2727+ struct uio_info *uioinfo;2828+ spinlock_t lock;2929+ unsigned long flags;3030+};3131+3232+static irqreturn_t uio_pdrv_genirq_handler(int irq, struct uio_info *dev_info)3333+{3434+ struct uio_pdrv_genirq_platdata *priv = dev_info->priv;3535+3636+ /* Just disable the interrupt in the interrupt controller, and3737+ * remember the state so we can allow user space to enable it later.3838+ */3939+4040+ if (!test_and_set_bit(0, &priv->flags))4141+ disable_irq_nosync(irq);4242+4343+ return IRQ_HANDLED;4444+}4545+4646+static int uio_pdrv_genirq_irqcontrol(struct uio_info *dev_info, s32 irq_on)4747+{4848+ struct uio_pdrv_genirq_platdata *priv = dev_info->priv;4949+ unsigned long flags;5050+5151+ /* Allow user space to enable and disable the interrupt5252+ * in the interrupt controller, but keep track of the5353+ * state to prevent per-irq depth damage.5454+ *5555+ * Serialize this operation to support multiple tasks.5656+ */5757+5858+ spin_lock_irqsave(&priv->lock, flags);5959+ if (irq_on) {6060+ if (test_and_clear_bit(0, &priv->flags))6161+ enable_irq(dev_info->irq);6262+ } else {6363+ if (!test_and_set_bit(0, &priv->flags))6464+ disable_irq(dev_info->irq);6565+ }6666+ spin_unlock_irqrestore(&priv->lock, flags);6767+6868+ return 0;6969+}7070+7171+static int uio_pdrv_genirq_probe(struct platform_device *pdev)7272+{7373+ struct uio_info *uioinfo = pdev->dev.platform_data;7474+ struct uio_pdrv_genirq_platdata *priv;7575+ struct uio_mem *uiomem;7676+ int ret = -EINVAL;7777+ int i;7878+7979+ if (!uioinfo || !uioinfo->name || !uioinfo->version) {8080+ dev_err(&pdev->dev, "missing platform_data\n");8181+ goto bad0;8282+ }8383+8484+ if (uioinfo->handler || uioinfo->irqcontrol || uioinfo->irq_flags) {8585+ dev_err(&pdev->dev, "interrupt configuration error\n");8686+ goto bad0;8787+ }8888+8989+ priv = kzalloc(sizeof(*priv), GFP_KERNEL);9090+ if (!priv) {9191+ ret = -ENOMEM;9292+ dev_err(&pdev->dev, "unable to kmalloc\n");9393+ goto bad0;9494+ }9595+9696+ priv->uioinfo = uioinfo;9797+ spin_lock_init(&priv->lock);9898+ priv->flags = 0; /* interrupt is enabled to begin with */9999+100100+ uiomem = &uioinfo->mem[0];101101+102102+ for (i = 0; i < pdev->num_resources; ++i) {103103+ struct resource *r = &pdev->resource[i];104104+105105+ if (r->flags != IORESOURCE_MEM)106106+ continue;107107+108108+ if (uiomem >= &uioinfo->mem[MAX_UIO_MAPS]) {109109+ dev_warn(&pdev->dev, "device has more than "110110+ __stringify(MAX_UIO_MAPS)111111+ " I/O memory resources.\n");112112+ break;113113+ }114114+115115+ uiomem->memtype = UIO_MEM_PHYS;116116+ uiomem->addr = r->start;117117+ uiomem->size = r->end - r->start + 1;118118+ ++uiomem;119119+ }120120+121121+ while (uiomem < &uioinfo->mem[MAX_UIO_MAPS]) {122122+ uiomem->size = 0;123123+ ++uiomem;124124+ }125125+126126+ /* This driver requires no hardware specific kernel code to handle127127+ * interrupts. Instead, the interrupt handler simply disables the128128+ * interrupt in the interrupt controller. User space is responsible129129+ * for performing hardware specific acknowledge and re-enabling of130130+ * the interrupt in the interrupt controller.131131+ *132132+ * Interrupt sharing is not supported.133133+ */134134+135135+ uioinfo->irq_flags = IRQF_DISABLED;136136+ uioinfo->handler = uio_pdrv_genirq_handler;137137+ uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol;138138+ uioinfo->priv = priv;139139+140140+ ret = uio_register_device(&pdev->dev, priv->uioinfo);141141+ if (ret) {142142+ dev_err(&pdev->dev, "unable to register uio device\n");143143+ goto bad1;144144+ }145145+146146+ platform_set_drvdata(pdev, priv);147147+ return 0;148148+ bad1:149149+ kfree(priv);150150+ bad0:151151+ return ret;152152+}153153+154154+static int uio_pdrv_genirq_remove(struct platform_device *pdev)155155+{156156+ struct uio_pdrv_genirq_platdata *priv = platform_get_drvdata(pdev);157157+158158+ uio_unregister_device(priv->uioinfo);159159+ kfree(priv);160160+ return 0;161161+}162162+163163+static struct platform_driver uio_pdrv_genirq = {164164+ .probe = uio_pdrv_genirq_probe,165165+ .remove = uio_pdrv_genirq_remove,166166+ .driver = {167167+ .name = DRIVER_NAME,168168+ .owner = THIS_MODULE,169169+ },170170+};171171+172172+static int __init uio_pdrv_genirq_init(void)173173+{174174+ return platform_driver_register(&uio_pdrv_genirq);175175+}176176+177177+static void __exit uio_pdrv_genirq_exit(void)178178+{179179+ platform_driver_unregister(&uio_pdrv_genirq);180180+}181181+182182+module_init(uio_pdrv_genirq_init);183183+module_exit(uio_pdrv_genirq_exit);184184+185185+MODULE_AUTHOR("Magnus Damm");186186+MODULE_DESCRIPTION("Userspace I/O platform driver with generic IRQ handling");187187+MODULE_LICENSE("GPL v2");188188+MODULE_ALIAS("platform:" DRIVER_NAME);
···589589 tasklet_schedule(&acm->urb_task);590590591591done:592592-err_out:593592 mutex_unlock(&acm->mutex);593593+err_out:594594 mutex_unlock(&open_mutex);595595 return rv;596596···13601360 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */13611361 },13621362 { USB_DEVICE(0x0803, 0x3095), /* Zoom Telephonics Model 3095F USB MODEM */13631363+ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */13641364+ },13651365+ { USB_DEVICE(0x0572, 0x1321), /* Conexant USB MODEM CX93010 */13631366 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */13641367 },13651368
+49-47
drivers/usb/core/driver.c
···230230 */231231 intf->pm_usage_cnt = !(driver->supports_autosuspend);232232233233+ /* Carry out a deferred switch to altsetting 0 */234234+ if (intf->needs_altsetting0) {235235+ usb_set_interface(udev, intf->altsetting[0].236236+ desc.bInterfaceNumber, 0);237237+ intf->needs_altsetting0 = 0;238238+ }239239+233240 error = driver->probe(intf, id);234241 if (error) {235242 mark_quiesced(intf);···273266274267 driver->disconnect(intf);275268276276- /* reset other interface state */277277- usb_set_interface(udev, intf->altsetting[0].desc.bInterfaceNumber, 0);269269+ /* Reset other interface state.270270+ * We cannot do a Set-Interface if the device is suspended or271271+ * if it is prepared for a system sleep (since installing a new272272+ * altsetting means creating new endpoint device entries).273273+ * When either of these happens, defer the Set-Interface.274274+ */275275+ if (!error && intf->dev.power.status == DPM_ON)276276+ usb_set_interface(udev, intf->altsetting[0].277277+ desc.bInterfaceNumber, 0);278278+ else279279+ intf->needs_altsetting0 = 1;278280 usb_set_intfdata(intf, NULL);279281280282 intf->condition = USB_INTERFACE_UNBOUND;···814798 * The caller must hold @intf's device's lock, but not its pm_mutex815799 * and not @intf->dev.sem.816800 *817817- * FIXME: The caller must block system sleep transitions.801801+ * Note: Rebinds will be skipped if a system sleep transition is in802802+ * progress and the PM "complete" callback hasn't occurred yet.818803 */819804void usb_rebind_intf(struct usb_interface *intf)820805{···831814 }832815833816 /* Try to rebind the interface */834834- intf->needs_binding = 0;835835- rc = device_attach(&intf->dev);836836- if (rc < 0)837837- dev_warn(&intf->dev, "rebind failed: %d\n", rc);817817+ if (intf->dev.power.status == DPM_ON) {818818+ intf->needs_binding = 0;819819+ rc = device_attach(&intf->dev);820820+ if (rc < 0)821821+ dev_warn(&intf->dev, "rebind failed: %d\n", rc);822822+ }838823}839824840825#ifdef CONFIG_PM···848829 * or rebind interfaces that have been unbound, according to @action.849830 *850831 * The caller must hold @udev's device lock.851851- * FIXME: For rebinds, the caller must block system sleep transitions.852832 */853833static void do_unbind_rebind(struct usb_device *udev, int action)854834{···869851 }870852 break;871853 case DO_REBIND:872872- if (intf->needs_binding) {873873-874874- /* FIXME: The next line is needed because we are going to probe875875- * the interface, but as far as the PM core is concerned the876876- * interface is still suspended. The problem wouldn't exist877877- * if we could rebind the interface during the interface's own878878- * resume() call, but at the time the usb_device isn't locked!879879- *880880- * The real solution will be to carry this out during the device's881881- * complete() callback. Until that is implemented, we have to882882- * use this hack.883883- */884884-// intf->dev.power.sleeping = 0;885885-854854+ if (intf->needs_binding)886855 usb_rebind_intf(intf);887887- }888856 break;889857 }890858 }···930926}931927932928/* Caller has locked intf's usb_device's pm mutex */933933-static int usb_suspend_interface(struct usb_interface *intf, pm_message_t msg)929929+static int usb_suspend_interface(struct usb_device *udev,930930+ struct usb_interface *intf, pm_message_t msg)934931{935932 struct usb_driver *driver;936933 int status = 0;937934938935 /* with no hardware, USB interfaces only use FREEZE and ON states */939939- if (interface_to_usbdev(intf)->state == USB_STATE_NOTATTACHED ||940940- !is_active(intf))936936+ if (udev->state == USB_STATE_NOTATTACHED || !is_active(intf))941937 goto done;942938943939 if (intf->condition == USB_INTERFACE_UNBOUND) /* This can't happen */···948944 status = driver->suspend(intf, msg);949945 if (status == 0)950946 mark_quiesced(intf);951951- else if (!interface_to_usbdev(intf)->auto_pm)947947+ else if (!udev->auto_pm)952948 dev_err(&intf->dev, "%s error %d\n",953949 "suspend", status);954950 } else {···965961}966962967963/* Caller has locked intf's usb_device's pm_mutex */968968-static int usb_resume_interface(struct usb_interface *intf, int reset_resume)964964+static int usb_resume_interface(struct usb_device *udev,965965+ struct usb_interface *intf, int reset_resume)969966{970967 struct usb_driver *driver;971968 int status = 0;972969973973- if (interface_to_usbdev(intf)->state == USB_STATE_NOTATTACHED ||974974- is_active(intf))970970+ if (udev->state == USB_STATE_NOTATTACHED || is_active(intf))975971 goto done;976972977973 /* Don't let autoresume interfere with unbinding */···979975 goto done;980976981977 /* Can't resume it if it doesn't have a driver. */982982- if (intf->condition == USB_INTERFACE_UNBOUND)978978+ if (intf->condition == USB_INTERFACE_UNBOUND) {979979+980980+ /* Carry out a deferred switch to altsetting 0 */981981+ if (intf->needs_altsetting0 &&982982+ intf->dev.power.status == DPM_ON) {983983+ usb_set_interface(udev, intf->altsetting[0].984984+ desc.bInterfaceNumber, 0);985985+ intf->needs_altsetting0 = 0;986986+ }983987 goto done;988988+ }984989985990 /* Don't resume if the interface is marked for rebinding */986991 if (intf->needs_binding)···11641151 if (udev->actconfig) {11651152 for (; i < udev->actconfig->desc.bNumInterfaces; i++) {11661153 intf = udev->actconfig->interface[i];11671167- status = usb_suspend_interface(intf, msg);11541154+ status = usb_suspend_interface(udev, intf, msg);11681155 if (status != 0)11691156 break;11701157 }···11761163 if (status != 0) {11771164 while (--i >= 0) {11781165 intf = udev->actconfig->interface[i];11791179- usb_resume_interface(intf, 0);11661166+ usb_resume_interface(udev, intf, 0);11801167 }1181116811821169 /* Try another autosuspend when the interfaces aren't busy */···12891276 if (status == 0 && udev->actconfig) {12901277 for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {12911278 intf = udev->actconfig->interface[i];12921292- usb_resume_interface(intf, udev->reset_resume);12791279+ usb_resume_interface(udev, intf, udev->reset_resume);12931280 }12941281 }12951282···16181605 return status;16191606}1620160716211621-static int usb_suspend(struct device *dev, pm_message_t message)16081608+int usb_suspend(struct device *dev, pm_message_t message)16221609{16231610 struct usb_device *udev;1624161116251625- if (!is_usb_device(dev)) /* Ignore PM for interfaces */16261626- return 0;16271612 udev = to_usb_device(dev);1628161316291614 /* If udev is already suspended, we can skip this suspend and···16401629 return usb_external_suspend_device(udev, message);16411630}1642163116431643-static int usb_resume(struct device *dev)16321632+int usb_resume(struct device *dev)16441633{16451634 struct usb_device *udev;1646163516471647- if (!is_usb_device(dev)) /* Ignore PM for interfaces */16481648- return 0;16491636 udev = to_usb_device(dev);1650163716511638 /* If udev->skip_sys_resume is set then udev was already suspended···16551646 return usb_external_resume_device(udev);16561647}1657164816581658-#else16591659-16601660-#define usb_suspend NULL16611661-#define usb_resume NULL16621662-16631649#endif /* CONFIG_PM */1664165016651651struct bus_type usb_bus_type = {16661652 .name = "usb",16671653 .match = usb_device_match,16681654 .uevent = usb_uevent,16691669- .suspend = usb_suspend,16701670- .resume = usb_resume,16711655};
···212212 int (*bus_suspend)(struct usb_hcd *);213213 int (*bus_resume)(struct usb_hcd *);214214 int (*start_port_reset)(struct usb_hcd *, unsigned port_num);215215- void (*hub_irq_enable)(struct usb_hcd *);216216- /* Needed only if port-change IRQs are level-triggered */217215218216 /* force handover of high-speed port to full-speed companion */219217 void (*relinquish_port)(struct usb_hcd *, int);···376378extern struct list_head usb_bus_list;377379extern struct mutex usb_bus_list_lock;378380extern wait_queue_head_t usb_kill_urb_queue;379379-380380-extern void usb_enable_root_hub_irq(struct usb_bus *bus);381381382382extern int usb_find_interface_driver(struct usb_device *dev,383383 struct usb_interface *interface);
-9
drivers/usb/core/hub.c
···21022102 }2103210321042104 clear_bit(port1, hub->busy_bits);21052105- if (!hub->hdev->parent && !hub->busy_bits[0])21062106- usb_enable_root_hub_irq(hub->hdev->bus);2107210521082106 status = check_port_resume_type(udev,21092107 hub, port1, status, portchange, portstatus);···30793081 }30803082 }3081308330823082- /* If this is a root hub, tell the HCD it's okay to30833083- * re-enable port-change interrupts now. */30843084- if (!hdev->parent && !hub->busy_bits[0])30853085- usb_enable_root_hub_irq(hdev->bus);30863086-30873084loop_autopm:30883085 /* Allow autosuspend if we're not going to run again */30893086 if (list_empty(&hub->event_list))···33043311 break;33053312 }33063313 clear_bit(port1, parent_hub->busy_bits);33073307- if (!parent_hdev->parent && !parent_hub->busy_bits[0])33083308- usb_enable_root_hub_irq(parent_hdev->bus);3309331433103315 if (ret < 0)33113316 goto re_enumerate;
+7-2
drivers/usb/core/urb.c
···601601void usb_unlink_anchored_urbs(struct usb_anchor *anchor)602602{603603 struct urb *victim;604604+ unsigned long flags;604605605605- spin_lock_irq(&anchor->lock);606606+ spin_lock_irqsave(&anchor->lock, flags);606607 while (!list_empty(&anchor->urb_list)) {607608 victim = list_entry(anchor->urb_list.prev, struct urb,608609 anchor_list);610610+ usb_get_urb(victim);611611+ spin_unlock_irqrestore(&anchor->lock, flags);609612 /* this will unanchor the URB */610613 usb_unlink_urb(victim);614614+ usb_put_urb(victim);615615+ spin_lock_irqsave(&anchor->lock, flags);611616 }612612- spin_unlock_irq(&anchor->lock);617617+ spin_unlock_irqrestore(&anchor->lock, flags);613618}614619EXPORT_SYMBOL_GPL(usb_unlink_anchored_urbs);615620
+67-6
drivers/usb/core/usb.c
···219219}220220#endif /* CONFIG_HOTPLUG */221221222222-struct device_type usb_device_type = {223223- .name = "usb_device",224224- .release = usb_release_dev,225225- .uevent = usb_dev_uevent,226226-};227227-228222#ifdef CONFIG_PM229223230224static int ksuspend_usb_init(void)···238244 destroy_workqueue(ksuspend_usb_wq);239245}240246247247+/* USB device Power-Management thunks.248248+ * There's no need to distinguish here between quiescing a USB device249249+ * and powering it down; the generic_suspend() routine takes care of250250+ * it by skipping the usb_port_suspend() call for a quiesce. And for251251+ * USB interfaces there's no difference at all.252252+ */253253+254254+static int usb_dev_prepare(struct device *dev)255255+{256256+ return 0; /* Implement eventually? */257257+}258258+259259+static void usb_dev_complete(struct device *dev)260260+{261261+ /* Currently used only for rebinding interfaces */262262+ usb_resume(dev); /* Implement eventually? */263263+}264264+265265+static int usb_dev_suspend(struct device *dev)266266+{267267+ return usb_suspend(dev, PMSG_SUSPEND);268268+}269269+270270+static int usb_dev_resume(struct device *dev)271271+{272272+ return usb_resume(dev);273273+}274274+275275+static int usb_dev_freeze(struct device *dev)276276+{277277+ return usb_suspend(dev, PMSG_FREEZE);278278+}279279+280280+static int usb_dev_thaw(struct device *dev)281281+{282282+ return usb_resume(dev);283283+}284284+285285+static int usb_dev_poweroff(struct device *dev)286286+{287287+ return usb_suspend(dev, PMSG_HIBERNATE);288288+}289289+290290+static int usb_dev_restore(struct device *dev)291291+{292292+ return usb_resume(dev);293293+}294294+295295+static struct pm_ops usb_device_pm_ops = {296296+ .prepare = usb_dev_prepare,297297+ .complete = usb_dev_complete,298298+ .suspend = usb_dev_suspend,299299+ .resume = usb_dev_resume,300300+ .freeze = usb_dev_freeze,301301+ .thaw = usb_dev_thaw,302302+ .poweroff = usb_dev_poweroff,303303+ .restore = usb_dev_restore,304304+};305305+241306#else242307243308#define ksuspend_usb_init() 0244309#define ksuspend_usb_cleanup() do {} while (0)310310+#define usb_device_pm_ops (*(struct pm_ops *)0)245311246312#endif /* CONFIG_PM */313313+314314+struct device_type usb_device_type = {315315+ .name = "usb_device",316316+ .release = usb_release_dev,317317+ .uevent = usb_dev_uevent,318318+ .pm = &usb_device_pm_ops,319319+};247320248321249322/* Returns 1 if @usb_bus is WUSB, 0 otherwise */
+3
drivers/usb/core/usb.h
···41414242#ifdef CONFIG_PM43434444+extern int usb_suspend(struct device *dev, pm_message_t msg);4545+extern int usb_resume(struct device *dev);4646+4447extern void usb_autosuspend_work(struct work_struct *work);4548extern int usb_port_suspend(struct usb_device *dev);4649extern int usb_port_resume(struct usb_device *dev);
···36363737/*-------------------------------------------------------------------------*/38383939-/* hcd->hub_irq_enable() */4040-static void ohci_rhsc_enable (struct usb_hcd *hcd)4141-{4242- struct ohci_hcd *ohci = hcd_to_ohci (hcd);4343-4444- spin_lock_irq(&ohci->lock);4545- if (!ohci->autostop)4646- del_timer(&hcd->rh_timer); /* Prevent next poll */4747- ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);4848- spin_unlock_irq(&ohci->lock);4949-}5050-5139#define OHCI_SCHED_ENABLES \5240 (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE)5341···362374 int any_connected)363375{364376 int poll_rh = 1;377377+ int rhsc;365378379379+ rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC;366380 switch (ohci->hc_control & OHCI_CTRL_HCFS) {367381368382 case OHCI_USB_OPER:369369- /* keep on polling until we know a device is connected370370- * and RHSC is enabled */383383+ /* If no status changes are pending, enable status-change384384+ * interrupts.385385+ */386386+ if (!rhsc && !changed) {387387+ rhsc = OHCI_INTR_RHSC;388388+ ohci_writel(ohci, rhsc, &ohci->regs->intrenable);389389+ }390390+391391+ /* Keep on polling until we know a device is connected392392+ * and RHSC is enabled, or until we autostop.393393+ */371394 if (!ohci->autostop) {372395 if (any_connected ||373396 !device_may_wakeup(&ohci_to_hcd(ohci)374397 ->self.root_hub->dev)) {375375- if (ohci_readl(ohci, &ohci->regs->intrenable) &376376- OHCI_INTR_RHSC)398398+ if (rhsc)377399 poll_rh = 0;378400 } else {379401 ohci->autostop = 1;···396398 ohci->autostop = 0;397399 ohci->next_statechange = jiffies +398400 STATECHANGE_DELAY;399399- } else if (time_after_eq(jiffies,401401+ } else if (rhsc && time_after_eq(jiffies,400402 ohci->next_statechange)401403 && !ohci->ed_rm_list402404 && !(ohci->hc_control &403405 OHCI_SCHED_ENABLES)) {404406 ohci_rh_suspend(ohci, 1);407407+ poll_rh = 0;405408 }406409 }407410 break;···416417 else417418 usb_hcd_resume_root_hub(ohci_to_hcd(ohci));418419 } else {420420+ if (!rhsc && (ohci->autostop ||421421+ ohci_to_hcd(ohci)->self.root_hub->422422+ do_remote_wakeup))423423+ ohci_writel(ohci, OHCI_INTR_RHSC,424424+ &ohci->regs->intrenable);425425+419426 /* everything is idle, no need for polling */420427 poll_rh = 0;421428 }···443438static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,444439 int any_connected)445440{446446- int poll_rh = 1;447447-448448- /* keep on polling until RHSC is enabled */441441+ /* If RHSC is enabled, don't poll */449442 if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC)450450- poll_rh = 0;451451- return poll_rh;443443+ return 0;444444+445445+ /* If no status changes are pending, enable status-change interrupts */446446+ if (!changed) {447447+ ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);448448+ return 0;449449+ }450450+ return 1;452451}453452454453#endif /* CONFIG_PM */
···29342934 return 0;29352935}2936293629372937-static void u132_hub_irq_enable(struct usb_hcd *hcd)29382938-{29392939- struct u132 *u132 = hcd_to_u132(hcd);29402940- if (u132->going > 1) {29412941- dev_err(&u132->platform_dev->dev, "device has been removed %d\n"29422942- , u132->going);29432943- } else if (u132->going > 0)29442944- dev_err(&u132->platform_dev->dev, "device is being removed\n");29452945-}29462946-2947293729482938#ifdef CONFIG_PM29492939static int u132_bus_suspend(struct usb_hcd *hcd)···29852995 .bus_suspend = u132_bus_suspend,29862996 .bus_resume = u132_bus_resume,29872997 .start_port_reset = u132_start_port_reset,29882988- .hub_irq_enable = u132_hub_irq_enable,29892998};2990299929913000/*
-1
drivers/usb/misc/iowarrior.c
···1919#include <linux/slab.h>2020#include <linux/sched.h>2121#include <linux/poll.h>2222-#include <linux/version.h>2322#include <linux/usb/iowarrior.h>24232524/* Version Information */
···165165 help166166 Enable DMA transfers on TUSB 6010 when OMAP DMA is available.167167168168-config USB_MUSB_LOGLEVEL168168+config USB_MUSB_DEBUG169169 depends on USB_MUSB_HDRC170170- int 'Logging Level (0 - none / 3 - annoying / ... )'171171- default 0170170+ bool "Enable debugging messages"171171+ default n172172 help173173- Set the logging level. 0 disables the debugging altogether,174174- although when USB_DEBUG is set the value is at least 1.175175- Starting at level 3, per-transfer (urb, usb_request, packet,176176- or dma transfer) tracing may kick in.173173+ This enables musb debugging. To set the logging level use the debug174174+ module parameter. Starting at level 3, per-transfer (urb, usb_request,175175+ packet, or dma transfer) tracing may kick in.
···11-/*22- * MUSB OTG driver debug support33- *44- * Copyright 2005 Mentor Graphics Corporation55- * Copyright (C) 2005-2006 by Texas Instruments66- * Copyright (C) 2006-2007 Nokia Corporation77- *88- * This program is free software; you can redistribute it and/or99- * modify it under the terms of the GNU General Public License1010- * version 2 as published by the Free Software Foundation.1111- *1212- * This program is distributed in the hope that it will be useful, but1313- * WITHOUT ANY WARRANTY; without even the implied warranty of1414- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU1515- * General Public License for more details.1616- *1717- * You should have received a copy of the GNU General Public License1818- * along with this program; if not, write to the Free Software1919- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA2020- * 02110-1301 USA2121- *2222- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED2323- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF2424- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN2525- * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,2626- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT2727- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF2828- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON2929- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT3030- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF3131- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.3232- *3333- */3434-3535-#include <linux/kernel.h>3636-#include <linux/proc_fs.h>3737-#include <linux/seq_file.h>3838-#include <linux/uaccess.h> /* FIXME remove procfs writes */3939-#include <asm/arch/hardware.h>4040-4141-#include "musb_core.h"4242-4343-#include "davinci.h"4444-4545-#ifdef CONFIG_USB_MUSB_HDRC_HCD4646-4747-static int dump_qh(struct musb_qh *qh, char *buf, unsigned max)4848-{4949- int count;5050- int tmp;5151- struct usb_host_endpoint *hep = qh->hep;5252- struct urb *urb;5353-5454- count = snprintf(buf, max, " qh %p dev%d ep%d%s max%d\n",5555- qh, qh->dev->devnum, qh->epnum,5656- ({ char *s; switch (qh->type) {5757- case USB_ENDPOINT_XFER_BULK:5858- s = "-bulk"; break;5959- case USB_ENDPOINT_XFER_INT:6060- s = "-int"; break;6161- case USB_ENDPOINT_XFER_CONTROL:6262- s = ""; break;6363- default:6464- s = "iso"; break;6565- }; s; }),6666- qh->maxpacket);6767- if (count <= 0)6868- return 0;6969- buf += count;7070- max -= count;7171-7272- list_for_each_entry(urb, &hep->urb_list, urb_list) {7373- tmp = snprintf(buf, max, "\t%s urb %p %d/%d\n",7474- usb_pipein(urb->pipe) ? "in" : "out",7575- urb, urb->actual_length,7676- urb->transfer_buffer_length);7777- if (tmp <= 0)7878- break;7979- tmp = min(tmp, (int)max);8080- count += tmp;8181- buf += tmp;8282- max -= tmp;8383- }8484- return count;8585-}8686-8787-static int8888-dump_queue(struct list_head *q, char *buf, unsigned max)8989-{9090- int count = 0;9191- struct musb_qh *qh;9292-9393- list_for_each_entry(qh, q, ring) {9494- int tmp;9595-9696- tmp = dump_qh(qh, buf, max);9797- if (tmp <= 0)9898- break;9999- tmp = min(tmp, (int)max);100100- count += tmp;101101- buf += tmp;102102- max -= tmp;103103- }104104- return count;105105-}106106-107107-#endif /* HCD */108108-109109-#ifdef CONFIG_USB_GADGET_MUSB_HDRC110110-static int dump_ep(struct musb_ep *ep, char *buffer, unsigned max)111111-{112112- char *buf = buffer;113113- int code = 0;114114- void __iomem *regs = ep->hw_ep->regs;115115- char *mode = "1buf";116116-117117- if (ep->is_in) {118118- if (ep->hw_ep->tx_double_buffered)119119- mode = "2buf";120120- } else {121121- if (ep->hw_ep->rx_double_buffered)122122- mode = "2buf";123123- }124124-125125- do {126126- struct usb_request *req;127127-128128- code = snprintf(buf, max,129129- "\n%s (hw%d): %s%s, csr %04x maxp %04x\n",130130- ep->name, ep->current_epnum,131131- mode, ep->dma ? " dma" : "",132132- musb_readw(regs,133133- (ep->is_in || !ep->current_epnum)134134- ? MUSB_TXCSR135135- : MUSB_RXCSR),136136- musb_readw(regs, ep->is_in137137- ? MUSB_TXMAXP138138- : MUSB_RXMAXP)139139- );140140- if (code <= 0)141141- break;142142- code = min(code, (int) max);143143- buf += code;144144- max -= code;145145-146146- if (is_cppi_enabled() && ep->current_epnum) {147147- unsigned cppi = ep->current_epnum - 1;148148- void __iomem *base = ep->musb->ctrl_base;149149- unsigned off1 = cppi << 2;150150- void __iomem *ram = base;151151- char tmp[16];152152-153153- if (ep->is_in) {154154- ram += DAVINCI_TXCPPI_STATERAM_OFFSET(cppi);155155- tmp[0] = 0;156156- } else {157157- ram += DAVINCI_RXCPPI_STATERAM_OFFSET(cppi);158158- snprintf(tmp, sizeof tmp, "%d left, ",159159- musb_readl(base,160160- DAVINCI_RXCPPI_BUFCNT0_REG + off1));161161- }162162-163163- code = snprintf(buf, max, "%cX DMA%d: %s"164164- "%08x %08x, %08x %08x; "165165- "%08x %08x %08x .. %08x\n",166166- ep->is_in ? 'T' : 'R',167167- ep->current_epnum - 1, tmp,168168- musb_readl(ram, 0 * 4),169169- musb_readl(ram, 1 * 4),170170- musb_readl(ram, 2 * 4),171171- musb_readl(ram, 3 * 4),172172- musb_readl(ram, 4 * 4),173173- musb_readl(ram, 5 * 4),174174- musb_readl(ram, 6 * 4),175175- musb_readl(ram, 7 * 4));176176- if (code <= 0)177177- break;178178- code = min(code, (int) max);179179- buf += code;180180- max -= code;181181- }182182-183183- if (list_empty(&ep->req_list)) {184184- code = snprintf(buf, max, "\t(queue empty)\n");185185- if (code <= 0)186186- break;187187- code = min(code, (int) max);188188- buf += code;189189- max -= code;190190- break;191191- }192192- list_for_each_entry(req, &ep->req_list, list) {193193- code = snprintf(buf, max, "\treq %p, %s%s%d/%d\n",194194- req,195195- req->zero ? "zero, " : "",196196- req->short_not_ok ? "!short, " : "",197197- req->actual, req->length);198198- if (code <= 0)199199- break;200200- code = min(code, (int) max);201201- buf += code;202202- max -= code;203203- }204204- } while (0);205205- return buf - buffer;206206-}207207-#endif208208-209209-static int210210-dump_end_info(struct musb *musb, u8 epnum, char *aBuffer, unsigned max)211211-{212212- int code = 0;213213- char *buf = aBuffer;214214- struct musb_hw_ep *hw_ep = &musb->endpoints[epnum];215215-216216- do {217217- musb_ep_select(musb->mregs, epnum);218218-#ifdef CONFIG_USB_MUSB_HDRC_HCD219219- if (is_host_active(musb)) {220220- int dump_rx, dump_tx;221221- void __iomem *regs = hw_ep->regs;222222-223223- /* TEMPORARY (!) until we have a real periodic224224- * schedule tree ...225225- */226226- if (!epnum) {227227- /* control is shared, uses RX queue228228- * but (mostly) shadowed tx registers229229- */230230- dump_tx = !list_empty(&musb->control);231231- dump_rx = 0;232232- } else if (hw_ep == musb->bulk_ep) {233233- dump_tx = !list_empty(&musb->out_bulk);234234- dump_rx = !list_empty(&musb->in_bulk);235235- } else if (musb->periodic[epnum]) {236236- struct usb_host_endpoint *hep;237237-238238- hep = musb->periodic[epnum]->hep;239239- dump_rx = hep->desc.bEndpointAddress240240- & USB_ENDPOINT_DIR_MASK;241241- dump_tx = !dump_rx;242242- } else243243- break;244244- /* END TEMPORARY */245245-246246-247247- if (dump_rx) {248248- code = snprintf(buf, max,249249- "\nRX%d: %s rxcsr %04x interval %02x "250250- "max %04x type %02x; "251251- "dev %d hub %d port %d"252252- "\n",253253- epnum,254254- hw_ep->rx_double_buffered255255- ? "2buf" : "1buf",256256- musb_readw(regs, MUSB_RXCSR),257257- musb_readb(regs, MUSB_RXINTERVAL),258258- musb_readw(regs, MUSB_RXMAXP),259259- musb_readb(regs, MUSB_RXTYPE),260260- /* FIXME: assumes multipoint */261261- musb_readb(musb->mregs,262262- MUSB_BUSCTL_OFFSET(epnum,263263- MUSB_RXFUNCADDR)),264264- musb_readb(musb->mregs,265265- MUSB_BUSCTL_OFFSET(epnum,266266- MUSB_RXHUBADDR)),267267- musb_readb(musb->mregs,268268- MUSB_BUSCTL_OFFSET(epnum,269269- MUSB_RXHUBPORT))270270- );271271- if (code <= 0)272272- break;273273- code = min(code, (int) max);274274- buf += code;275275- max -= code;276276-277277- if (is_cppi_enabled()278278- && epnum279279- && hw_ep->rx_channel) {280280- unsigned cppi = epnum - 1;281281- unsigned off1 = cppi << 2;282282- void __iomem *base;283283- void __iomem *ram;284284- char tmp[16];285285-286286- base = musb->ctrl_base;287287- ram = DAVINCI_RXCPPI_STATERAM_OFFSET(288288- cppi) + base;289289- snprintf(tmp, sizeof tmp, "%d left, ",290290- musb_readl(base,291291- DAVINCI_RXCPPI_BUFCNT0_REG292292- + off1));293293-294294- code = snprintf(buf, max,295295- " rx dma%d: %s"296296- "%08x %08x, %08x %08x; "297297- "%08x %08x %08x .. %08x\n",298298- cppi, tmp,299299- musb_readl(ram, 0 * 4),300300- musb_readl(ram, 1 * 4),301301- musb_readl(ram, 2 * 4),302302- musb_readl(ram, 3 * 4),303303- musb_readl(ram, 4 * 4),304304- musb_readl(ram, 5 * 4),305305- musb_readl(ram, 6 * 4),306306- musb_readl(ram, 7 * 4));307307- if (code <= 0)308308- break;309309- code = min(code, (int) max);310310- buf += code;311311- max -= code;312312- }313313-314314- if (hw_ep == musb->bulk_ep315315- && !list_empty(316316- &musb->in_bulk)) {317317- code = dump_queue(&musb->in_bulk,318318- buf, max);319319- if (code <= 0)320320- break;321321- code = min(code, (int) max);322322- buf += code;323323- max -= code;324324- } else if (musb->periodic[epnum]) {325325- code = dump_qh(musb->periodic[epnum],326326- buf, max);327327- if (code <= 0)328328- break;329329- code = min(code, (int) max);330330- buf += code;331331- max -= code;332332- }333333- }334334-335335- if (dump_tx) {336336- code = snprintf(buf, max,337337- "\nTX%d: %s txcsr %04x interval %02x "338338- "max %04x type %02x; "339339- "dev %d hub %d port %d"340340- "\n",341341- epnum,342342- hw_ep->tx_double_buffered343343- ? "2buf" : "1buf",344344- musb_readw(regs, MUSB_TXCSR),345345- musb_readb(regs, MUSB_TXINTERVAL),346346- musb_readw(regs, MUSB_TXMAXP),347347- musb_readb(regs, MUSB_TXTYPE),348348- /* FIXME: assumes multipoint */349349- musb_readb(musb->mregs,350350- MUSB_BUSCTL_OFFSET(epnum,351351- MUSB_TXFUNCADDR)),352352- musb_readb(musb->mregs,353353- MUSB_BUSCTL_OFFSET(epnum,354354- MUSB_TXHUBADDR)),355355- musb_readb(musb->mregs,356356- MUSB_BUSCTL_OFFSET(epnum,357357- MUSB_TXHUBPORT))358358- );359359- if (code <= 0)360360- break;361361- code = min(code, (int) max);362362- buf += code;363363- max -= code;364364-365365- if (is_cppi_enabled()366366- && epnum367367- && hw_ep->tx_channel) {368368- unsigned cppi = epnum - 1;369369- void __iomem *base;370370- void __iomem *ram;371371-372372- base = musb->ctrl_base;373373- ram = DAVINCI_RXCPPI_STATERAM_OFFSET(374374- cppi) + base;375375- code = snprintf(buf, max,376376- " tx dma%d: "377377- "%08x %08x, %08x %08x; "378378- "%08x %08x %08x .. %08x\n",379379- cppi,380380- musb_readl(ram, 0 * 4),381381- musb_readl(ram, 1 * 4),382382- musb_readl(ram, 2 * 4),383383- musb_readl(ram, 3 * 4),384384- musb_readl(ram, 4 * 4),385385- musb_readl(ram, 5 * 4),386386- musb_readl(ram, 6 * 4),387387- musb_readl(ram, 7 * 4));388388- if (code <= 0)389389- break;390390- code = min(code, (int) max);391391- buf += code;392392- max -= code;393393- }394394-395395- if (hw_ep == musb->control_ep396396- && !list_empty(397397- &musb->control)) {398398- code = dump_queue(&musb->control,399399- buf, max);400400- if (code <= 0)401401- break;402402- code = min(code, (int) max);403403- buf += code;404404- max -= code;405405- } else if (hw_ep == musb->bulk_ep406406- && !list_empty(407407- &musb->out_bulk)) {408408- code = dump_queue(&musb->out_bulk,409409- buf, max);410410- if (code <= 0)411411- break;412412- code = min(code, (int) max);413413- buf += code;414414- max -= code;415415- } else if (musb->periodic[epnum]) {416416- code = dump_qh(musb->periodic[epnum],417417- buf, max);418418- if (code <= 0)419419- break;420420- code = min(code, (int) max);421421- buf += code;422422- max -= code;423423- }424424- }425425- }426426-#endif427427-#ifdef CONFIG_USB_GADGET_MUSB_HDRC428428- if (is_peripheral_active(musb)) {429429- code = 0;430430-431431- if (hw_ep->ep_in.desc || !epnum) {432432- code = dump_ep(&hw_ep->ep_in, buf, max);433433- if (code <= 0)434434- break;435435- code = min(code, (int) max);436436- buf += code;437437- max -= code;438438- }439439- if (hw_ep->ep_out.desc) {440440- code = dump_ep(&hw_ep->ep_out, buf, max);441441- if (code <= 0)442442- break;443443- code = min(code, (int) max);444444- buf += code;445445- max -= code;446446- }447447- }448448-#endif449449- } while (0);450450-451451- return buf - aBuffer;452452-}453453-454454-/* Dump the current status and compile options.455455- * @param musb the device driver instance456456- * @param buffer where to dump the status; it must be big enough to hold the457457- * result otherwise "BAD THINGS HAPPENS(TM)".458458- */459459-static int dump_header_stats(struct musb *musb, char *buffer)460460-{461461- int code, count = 0;462462- const void __iomem *mbase = musb->mregs;463463-464464- *buffer = 0;465465- count = sprintf(buffer, "Status: %sHDRC, Mode=%s "466466- "(Power=%02x, DevCtl=%02x)\n",467467- (musb->is_multipoint ? "M" : ""), MUSB_MODE(musb),468468- musb_readb(mbase, MUSB_POWER),469469- musb_readb(mbase, MUSB_DEVCTL));470470- if (count <= 0)471471- return 0;472472- buffer += count;473473-474474- code = sprintf(buffer, "OTG state: %s; %sactive\n",475475- otg_state_string(musb),476476- musb->is_active ? "" : "in");477477- if (code <= 0)478478- goto done;479479- buffer += code;480480- count += code;481481-482482- code = sprintf(buffer,483483- "Options: "484484-#ifdef CONFIG_MUSB_PIO_ONLY485485- "pio"486486-#elif defined(CONFIG_USB_TI_CPPI_DMA)487487- "cppi-dma"488488-#elif defined(CONFIG_USB_INVENTRA_DMA)489489- "musb-dma"490490-#elif defined(CONFIG_USB_TUSB_OMAP_DMA)491491- "tusb-omap-dma"492492-#else493493- "?dma?"494494-#endif495495- ", "496496-#ifdef CONFIG_USB_MUSB_OTG497497- "otg (peripheral+host)"498498-#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)499499- "peripheral"500500-#elif defined(CONFIG_USB_MUSB_HDRC_HCD)501501- "host"502502-#endif503503- ", debug=%d [eps=%d]\n",504504- debug,505505- musb->nr_endpoints);506506- if (code <= 0)507507- goto done;508508- count += code;509509- buffer += code;510510-511511-#ifdef CONFIG_USB_GADGET_MUSB_HDRC512512- code = sprintf(buffer, "Peripheral address: %02x\n",513513- musb_readb(musb->ctrl_base, MUSB_FADDR));514514- if (code <= 0)515515- goto done;516516- buffer += code;517517- count += code;518518-#endif519519-520520-#ifdef CONFIG_USB_MUSB_HDRC_HCD521521- code = sprintf(buffer, "Root port status: %08x\n",522522- musb->port1_status);523523- if (code <= 0)524524- goto done;525525- buffer += code;526526- count += code;527527-#endif528528-529529-#ifdef CONFIG_ARCH_DAVINCI530530- code = sprintf(buffer,531531- "DaVinci: ctrl=%02x stat=%1x phy=%03x\n"532532- "\trndis=%05x auto=%04x intsrc=%08x intmsk=%08x"533533- "\n",534534- musb_readl(musb->ctrl_base, DAVINCI_USB_CTRL_REG),535535- musb_readl(musb->ctrl_base, DAVINCI_USB_STAT_REG),536536- __raw_readl((void __force __iomem *)537537- IO_ADDRESS(USBPHY_CTL_PADDR)),538538- musb_readl(musb->ctrl_base, DAVINCI_RNDIS_REG),539539- musb_readl(musb->ctrl_base, DAVINCI_AUTOREQ_REG),540540- musb_readl(musb->ctrl_base,541541- DAVINCI_USB_INT_SOURCE_REG),542542- musb_readl(musb->ctrl_base,543543- DAVINCI_USB_INT_MASK_REG));544544- if (code <= 0)545545- goto done;546546- count += code;547547- buffer += code;548548-#endif /* DAVINCI */549549-550550-#ifdef CONFIG_USB_TUSB6010551551- code = sprintf(buffer,552552- "TUSB6010: devconf %08x, phy enable %08x drive %08x"553553- "\n\totg %03x timer %08x"554554- "\n\tprcm conf %08x mgmt %08x; int src %08x mask %08x"555555- "\n",556556- musb_readl(musb->ctrl_base, TUSB_DEV_CONF),557557- musb_readl(musb->ctrl_base, TUSB_PHY_OTG_CTRL_ENABLE),558558- musb_readl(musb->ctrl_base, TUSB_PHY_OTG_CTRL),559559- musb_readl(musb->ctrl_base, TUSB_DEV_OTG_STAT),560560- musb_readl(musb->ctrl_base, TUSB_DEV_OTG_TIMER),561561- musb_readl(musb->ctrl_base, TUSB_PRCM_CONF),562562- musb_readl(musb->ctrl_base, TUSB_PRCM_MNGMT),563563- musb_readl(musb->ctrl_base, TUSB_INT_SRC),564564- musb_readl(musb->ctrl_base, TUSB_INT_MASK));565565- if (code <= 0)566566- goto done;567567- count += code;568568- buffer += code;569569-#endif /* DAVINCI */570570-571571- if (is_cppi_enabled() && musb->dma_controller) {572572- code = sprintf(buffer,573573- "CPPI: txcr=%d txsrc=%01x txena=%01x; "574574- "rxcr=%d rxsrc=%01x rxena=%01x "575575- "\n",576576- musb_readl(musb->ctrl_base,577577- DAVINCI_TXCPPI_CTRL_REG),578578- musb_readl(musb->ctrl_base,579579- DAVINCI_TXCPPI_RAW_REG),580580- musb_readl(musb->ctrl_base,581581- DAVINCI_TXCPPI_INTENAB_REG),582582- musb_readl(musb->ctrl_base,583583- DAVINCI_RXCPPI_CTRL_REG),584584- musb_readl(musb->ctrl_base,585585- DAVINCI_RXCPPI_RAW_REG),586586- musb_readl(musb->ctrl_base,587587- DAVINCI_RXCPPI_INTENAB_REG));588588- if (code <= 0)589589- goto done;590590- count += code;591591- buffer += code;592592- }593593-594594-#ifdef CONFIG_USB_GADGET_MUSB_HDRC595595- if (is_peripheral_enabled(musb)) {596596- code = sprintf(buffer, "Gadget driver: %s\n",597597- musb->gadget_driver598598- ? musb->gadget_driver->driver.name599599- : "(none)");600600- if (code <= 0)601601- goto done;602602- count += code;603603- buffer += code;604604- }605605-#endif606606-607607-done:608608- return count;609609-}610610-611611-/* Write to ProcFS612612- *613613- * C soft-connect614614- * c soft-disconnect615615- * I enable HS616616- * i disable HS617617- * s stop session618618- * F force session (OTG-unfriendly)619619- * E rElinquish bus (OTG)620620- * H request host mode621621- * h cancel host request622622- * T start sending TEST_PACKET623623- * D<num> set/query the debug level624624- */625625-static int musb_proc_write(struct file *file, const char __user *buffer,626626- unsigned long count, void *data)627627-{628628- char cmd;629629- u8 reg;630630- struct musb *musb = (struct musb *)data;631631- void __iomem *mbase = musb->mregs;632632-633633- /* MOD_INC_USE_COUNT; */634634-635635- if (unlikely(copy_from_user(&cmd, buffer, 1)))636636- return -EFAULT;637637-638638- switch (cmd) {639639- case 'C':640640- if (mbase) {641641- reg = musb_readb(mbase, MUSB_POWER)642642- | MUSB_POWER_SOFTCONN;643643- musb_writeb(mbase, MUSB_POWER, reg);644644- }645645- break;646646-647647- case 'c':648648- if (mbase) {649649- reg = musb_readb(mbase, MUSB_POWER)650650- & ~MUSB_POWER_SOFTCONN;651651- musb_writeb(mbase, MUSB_POWER, reg);652652- }653653- break;654654-655655- case 'I':656656- if (mbase) {657657- reg = musb_readb(mbase, MUSB_POWER)658658- | MUSB_POWER_HSENAB;659659- musb_writeb(mbase, MUSB_POWER, reg);660660- }661661- break;662662-663663- case 'i':664664- if (mbase) {665665- reg = musb_readb(mbase, MUSB_POWER)666666- & ~MUSB_POWER_HSENAB;667667- musb_writeb(mbase, MUSB_POWER, reg);668668- }669669- break;670670-671671- case 'F':672672- reg = musb_readb(mbase, MUSB_DEVCTL);673673- reg |= MUSB_DEVCTL_SESSION;674674- musb_writeb(mbase, MUSB_DEVCTL, reg);675675- break;676676-677677- case 'H':678678- if (mbase) {679679- reg = musb_readb(mbase, MUSB_DEVCTL);680680- reg |= MUSB_DEVCTL_HR;681681- musb_writeb(mbase, MUSB_DEVCTL, reg);682682- /* MUSB_HST_MODE( ((struct musb*)data) ); */683683- /* WARNING("Host Mode\n"); */684684- }685685- break;686686-687687- case 'h':688688- if (mbase) {689689- reg = musb_readb(mbase, MUSB_DEVCTL);690690- reg &= ~MUSB_DEVCTL_HR;691691- musb_writeb(mbase, MUSB_DEVCTL, reg);692692- }693693- break;694694-695695- case 'T':696696- if (mbase) {697697- musb_load_testpacket(musb);698698- musb_writeb(mbase, MUSB_TESTMODE,699699- MUSB_TEST_PACKET);700700- }701701- break;702702-703703-#if (MUSB_DEBUG > 0)704704- /* set/read debug level */705705- case 'D':{706706- if (count > 1) {707707- char digits[8], *p = digits;708708- int i = 0, level = 0, sign = 1;709709- int len = min(count - 1, (unsigned long)8);710710-711711- if (copy_from_user(&digits, &buffer[1], len))712712- return -EFAULT;713713-714714- /* optional sign */715715- if (*p == '-') {716716- len -= 1;717717- sign = -sign;718718- p++;719719- }720720-721721- /* read it */722722- while (i++ < len && *p > '0' && *p < '9') {723723- level = level * 10 + (*p - '0');724724- p++;725725- }726726-727727- level *= sign;728728- DBG(1, "debug level %d\n", level);729729- debug = level;730730- }731731- }732732- break;733733-734734-735735- case '?':736736- INFO("?: you are seeing it\n");737737- INFO("C/c: soft connect enable/disable\n");738738- INFO("I/i: hispeed enable/disable\n");739739- INFO("F: force session start\n");740740- INFO("H: host mode\n");741741- INFO("T: start sending TEST_PACKET\n");742742- INFO("D: set/read dbug level\n");743743- break;744744-#endif745745-746746- default:747747- ERR("Command %c not implemented\n", cmd);748748- break;749749- }750750-751751- musb_platform_try_idle(musb, 0);752752-753753- return count;754754-}755755-756756-static int musb_proc_read(char *page, char **start,757757- off_t off, int count, int *eof, void *data)758758-{759759- char *buffer = page;760760- int code = 0;761761- unsigned long flags;762762- struct musb *musb = data;763763- unsigned epnum;764764-765765- count -= off;766766- count -= 1; /* for NUL at end */767767- if (count <= 0)768768- return -EINVAL;769769-770770- spin_lock_irqsave(&musb->lock, flags);771771-772772- code = dump_header_stats(musb, buffer);773773- if (code > 0) {774774- buffer += code;775775- count -= code;776776- }777777-778778- /* generate the report for the end points */779779- /* REVISIT ... not unless something's connected! */780780- for (epnum = 0; count >= 0 && epnum < musb->nr_endpoints;781781- epnum++) {782782- code = dump_end_info(musb, epnum, buffer, count);783783- if (code > 0) {784784- buffer += code;785785- count -= code;786786- }787787- }788788-789789- musb_platform_try_idle(musb, 0);790790-791791- spin_unlock_irqrestore(&musb->lock, flags);792792- *eof = 1;793793-794794- return buffer - page;795795-}796796-797797-void __devexit musb_debug_delete(char *name, struct musb *musb)798798-{799799- if (musb->proc_entry)800800- remove_proc_entry(name, NULL);801801-}802802-803803-struct proc_dir_entry *__init804804-musb_debug_create(char *name, struct musb *data)805805-{806806- struct proc_dir_entry *pde;807807-808808- /* FIXME convert everything to seq_file; then later, debugfs */809809-810810- if (!name)811811- return NULL;812812-813813- pde = create_proc_entry(name, S_IFREG | S_IRUGO | S_IWUSR, NULL);814814- data->proc_entry = pde;815815- if (pde) {816816- pde->data = data;817817- /* pde->owner = THIS_MODULE; */818818-819819- pde->read_proc = musb_proc_read;820820- pde->write_proc = musb_proc_write;821821-822822- pde->size = 0;823823-824824- pr_debug("Registered /proc/%s\n", name);825825- } else {826826- pr_debug("Cannot create a valid proc file entry");827827- }828828-829829- return pde;830830-}
-2
drivers/usb/serial/garmin_gps.c
···3838#include <linux/usb.h>3939#include <linux/usb/serial.h>40404141-#include <linux/version.h>4242-4341/* the mode to be set when the port ist opened */4442static int initial_mode = 1;4543
···1111 * Code is based on s3fb1212 */13131414-#include <linux/version.h>1514#include <linux/module.h>1615#include <linux/kernel.h>1716#include <linux/errno.h>
···1111 * which is based on the code of neofb.1212 */13131414-#include <linux/version.h>1514#include <linux/module.h>1615#include <linux/kernel.h>1716#include <linux/errno.h>
···914914 /* Stash our initial stack pointer into the mm structure */915915 current->mm->start_stack = (unsigned long )sp;916916917917-917917+#ifdef FLAT_PLAT_INIT918918+ FLAT_PLAT_INIT(regs);919919+#endif918920 DBG_FLT("start_thread(regs=0x%x, entry=0x%x, start_stack=0x%x)\n",919921 (int)regs, (int)start_addr, (int)current->mm->start_stack);920922
+2-2
fs/binfmt_misc.c
···120120 if (bprm->misc_bang)121121 goto _ret;122122123123- bprm->misc_bang = 1;124124-125123 /* to keep locking time low, we copy the interpreter string */126124 read_lock(&entries_lock);127125 fmt = check_file(bprm);···196198197199 if (retval < 0)198200 goto _error;201201+202202+ bprm->misc_bang = 1;199203200204 retval = search_binary_handler (bprm, regs);201205 if (retval < 0)
+38-46
fs/cramfs/inode.c
···4343static int cramfs_iget5_test(struct inode *inode, void *opaque)4444{4545 struct cramfs_inode *cramfs_inode = opaque;4646-4747- if (inode->i_ino != CRAMINO(cramfs_inode))4848- return 0; /* does not match */4949-5050- if (inode->i_ino != 1)5151- return 1;5252-5353- /* all empty directories, char, block, pipe, and sock, share inode #1 */5454-5555- if ((inode->i_mode != cramfs_inode->mode) ||5656- (inode->i_gid != cramfs_inode->gid) ||5757- (inode->i_uid != cramfs_inode->uid))5858- return 0; /* does not match */5959-6060- if ((S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) &&6161- (inode->i_rdev != old_decode_dev(cramfs_inode->size)))6262- return 0; /* does not match */6363-6464- return 1; /* matches */4646+ return inode->i_ino == CRAMINO(cramfs_inode) && inode->i_ino != 1;6547}66486749static int cramfs_iget5_set(struct inode *inode, void *opaque)6850{6969- static struct timespec zerotime;7051 struct cramfs_inode *cramfs_inode = opaque;7171- inode->i_mode = cramfs_inode->mode;7272- inode->i_uid = cramfs_inode->uid;7373- inode->i_size = cramfs_inode->size;7474- inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1;7575- inode->i_gid = cramfs_inode->gid;7676- /* Struct copy intentional */7777- inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;7852 inode->i_ino = CRAMINO(cramfs_inode);7979- /* inode->i_nlink is left 1 - arguably wrong for directories,8080- but it's the best we can do without reading the directory8181- contents. 1 yields the right result in GNU find, even8282- without -noleaf option. */8383- if (S_ISREG(inode->i_mode)) {8484- inode->i_fop = &generic_ro_fops;8585- inode->i_data.a_ops = &cramfs_aops;8686- } else if (S_ISDIR(inode->i_mode)) {8787- inode->i_op = &cramfs_dir_inode_operations;8888- inode->i_fop = &cramfs_directory_operations;8989- } else if (S_ISLNK(inode->i_mode)) {9090- inode->i_op = &page_symlink_inode_operations;9191- inode->i_data.a_ops = &cramfs_aops;9292- } else {9393- inode->i_size = 0;9494- inode->i_blocks = 0;9595- init_special_inode(inode, inode->i_mode,9696- old_decode_dev(cramfs_inode->size));9797- }9853 return 0;9954}10055···59104 struct inode *inode = iget5_locked(sb, CRAMINO(cramfs_inode),60105 cramfs_iget5_test, cramfs_iget5_set,61106 cramfs_inode);107107+ static struct timespec zerotime;108108+62109 if (inode && (inode->i_state & I_NEW)) {110110+ inode->i_mode = cramfs_inode->mode;111111+ inode->i_uid = cramfs_inode->uid;112112+ inode->i_size = cramfs_inode->size;113113+ inode->i_blocks = (cramfs_inode->size - 1) / 512 + 1;114114+ inode->i_gid = cramfs_inode->gid;115115+ /* Struct copy intentional */116116+ inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;117117+ /* inode->i_nlink is left 1 - arguably wrong for directories,118118+ but it's the best we can do without reading the directory119119+ contents. 1 yields the right result in GNU find, even120120+ without -noleaf option. */121121+ if (S_ISREG(inode->i_mode)) {122122+ inode->i_fop = &generic_ro_fops;123123+ inode->i_data.a_ops = &cramfs_aops;124124+ } else if (S_ISDIR(inode->i_mode)) {125125+ inode->i_op = &cramfs_dir_inode_operations;126126+ inode->i_fop = &cramfs_directory_operations;127127+ } else if (S_ISLNK(inode->i_mode)) {128128+ inode->i_op = &page_symlink_inode_operations;129129+ inode->i_data.a_ops = &cramfs_aops;130130+ } else {131131+ inode->i_size = 0;132132+ inode->i_blocks = 0;133133+ init_special_inode(inode, inode->i_mode,134134+ old_decode_dev(cramfs_inode->size));135135+ }63136 unlock_new_inode(inode);64137 }65138 return inode;139139+}140140+141141+static void cramfs_drop_inode(struct inode *inode)142142+{143143+ if (inode->i_ino == 1)144144+ generic_delete_inode(inode);145145+ else146146+ generic_drop_inode(inode);66147}6714868149/*···525534 .put_super = cramfs_put_super,526535 .remount_fs = cramfs_remount,527536 .statfs = cramfs_statfs,537537+ .drop_inode = cramfs_drop_inode,528538};529539530540static int cramfs_get_sb(struct file_system_type *fs_type,
+3
fs/ext4/balloc.c
···16261626 free_blocks =16271627 percpu_counter_sum_and_set(&sbi->s_freeblocks_counter);16281628#endif16291629+ if (free_blocks <= root_blocks)16301630+ /* we don't have free space */16311631+ return 0;16291632 if (free_blocks - root_blocks < nblocks)16301633 return free_blocks - root_blocks;16311634 return nblocks;
+15-5
fs/ext4/dir.c
···411411 get_dtype(sb, fname->file_type));412412 if (error) {413413 filp->f_pos = curr_pos;414414- info->extra_fname = fname->next;414414+ info->extra_fname = fname;415415 return error;416416 }417417 fname = fname->next;···450450 * If there are any leftover names on the hash collision451451 * chain, return them first.452452 */453453- if (info->extra_fname &&454454- call_filldir(filp, dirent, filldir, info->extra_fname))455455- goto finished;453453+ if (info->extra_fname) {454454+ if (call_filldir(filp, dirent, filldir, info->extra_fname))455455+ goto finished;456456457457- if (!info->curr_node)457457+ info->extra_fname = NULL;458458+ info->curr_node = rb_next(info->curr_node);459459+ if (!info->curr_node) {460460+ if (info->next_hash == ~0) {461461+ filp->f_pos = EXT4_HTREE_EOF;462462+ goto finished;463463+ }464464+ info->curr_hash = info->next_hash;465465+ info->curr_minor_hash = 0;466466+ }467467+ } else if (!info->curr_node)458468 info->curr_node = rb_first(&info->root);459469460470 while (1) {
+4
fs/ext4/ext4.h
···10721072extern void ext4_get_inode_flags(struct ext4_inode_info *);10731073extern void ext4_set_aops(struct inode *inode);10741074extern int ext4_writepage_trans_blocks(struct inode *);10751075+extern int ext4_meta_trans_blocks(struct inode *, int nrblocks, int idxblocks);10761076+extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);10751077extern int ext4_block_truncate_page(handle_t *handle,10761078 struct address_space *mapping, loff_t from);10771079extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page);···12291227/* extents.c */12301228extern int ext4_ext_tree_init(handle_t *handle, struct inode *);12311229extern int ext4_ext_writepage_trans_blocks(struct inode *, int);12301230+extern int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks,12311231+ int chunk);12321232extern int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,12331233 ext4_lblk_t iblock,12341234 unsigned long max_blocks, struct buffer_head *bh_result,
+3-1
fs/ext4/ext4_extents.h
···216216extern ext4_fsblk_t idx_pblock(struct ext4_extent_idx *);217217extern void ext4_ext_store_pblock(struct ext4_extent *, ext4_fsblk_t);218218extern int ext4_extent_tree_init(handle_t *, struct inode *);219219-extern int ext4_ext_calc_credits_for_insert(struct inode *, struct ext4_ext_path *);219219+extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode,220220+ int num,221221+ struct ext4_ext_path *path);220222extern int ext4_ext_try_to_merge(struct inode *inode,221223 struct ext4_ext_path *path,222224 struct ext4_extent *);
+8
fs/ext4/ext4_jbd2.h
···5151 EXT4_XATTR_TRANS_BLOCKS - 2 + \5252 2*EXT4_QUOTA_TRANS_BLOCKS(sb))53535454+/*5555+ * Define the number of metadata blocks we need to account to modify data.5656+ *5757+ * This include super block, inode block, quota blocks and xattr blocks5858+ */5959+#define EXT4_META_TRANS_BLOCKS(sb) (EXT4_XATTR_TRANS_BLOCKS + \6060+ 2*EXT4_QUOTA_TRANS_BLOCKS(sb))6161+5462/* Delete operations potentially hit one directory's namespace plus an5563 * entire inode, plus arbitrary amounts of bitmap/indirection data. Be5664 * generous. We can grow the delete transaction later if necessary. */
+48-65
fs/ext4/extents.c
···17471747}1748174817491749/*17501750- * ext4_ext_calc_credits_for_insert:17511751- * This routine returns max. credits that the extent tree can consume.17521752- * It should be OK for low-performance paths like ->writepage()17531753- * To allow many writing processes to fit into a single transaction,17541754- * the caller should calculate credits under i_data_sem and17551755- * pass the actual path.17501750+ * ext4_ext_calc_credits_for_single_extent:17511751+ * This routine returns max. credits that needed to insert an extent17521752+ * to the extent tree.17531753+ * When pass the actual path, the caller should calculate credits17541754+ * under i_data_sem.17561755 */17571757-int ext4_ext_calc_credits_for_insert(struct inode *inode,17561756+int ext4_ext_calc_credits_for_single_extent(struct inode *inode, int nrblocks,17581757 struct ext4_ext_path *path)17591758{17601760- int depth, needed;17611761-17621759 if (path) {17601760+ int depth = ext_depth(inode);17611761+ int ret = 0;17621762+17631763 /* probably there is space in leaf? */17641764- depth = ext_depth(inode);17651764 if (le16_to_cpu(path[depth].p_hdr->eh_entries)17661766- < le16_to_cpu(path[depth].p_hdr->eh_max))17671767- return 1;17651765+ < le16_to_cpu(path[depth].p_hdr->eh_max)) {17661766+17671767+ /*17681768+ * There are some space in the leaf tree, no17691769+ * need to account for leaf block credit17701770+ *17711771+ * bitmaps and block group descriptor blocks17721772+ * and other metadat blocks still need to be17731773+ * accounted.17741774+ */17751775+ /* 1 bitmap, 1 block group descriptor */17761776+ ret = 2 + EXT4_META_TRANS_BLOCKS(inode->i_sb);17771777+ }17681778 }1769177917701770- /*17711771- * given 32-bit logical block (4294967296 blocks), max. tree17721772- * can be 4 levels in depth -- 4 * 340^4 == 53453440000.17731773- * Let's also add one more level for imbalance.17741774- */17751775- depth = 5;17801780+ return ext4_chunk_trans_blocks(inode, nrblocks);17811781+}1776178217771777- /* allocation of new data block(s) */17781778- needed = 2;17831783+/*17841784+ * How many index/leaf blocks need to change/allocate to modify nrblocks?17851785+ *17861786+ * if nrblocks are fit in a single extent (chunk flag is 1), then17871787+ * in the worse case, each tree level index/leaf need to be changed17881788+ * if the tree split due to insert a new extent, then the old tree17891789+ * index/leaf need to be updated too17901790+ *17911791+ * If the nrblocks are discontiguous, they could cause17921792+ * the whole tree split more than once, but this is really rare.17931793+ */17941794+int ext4_ext_index_trans_blocks(struct inode *inode, int nrblocks, int chunk)17951795+{17961796+ int index;17971797+ int depth = ext_depth(inode);1779179817801780- /*17811781- * tree can be full, so it would need to grow in depth:17821782- * we need one credit to modify old root, credits for17831783- * new root will be added in split accounting17841784- */17851785- needed += 1;17991799+ if (chunk)18001800+ index = depth * 2;18011801+ else18021802+ index = depth * 3;1786180317871787- /*17881788- * Index split can happen, we would need:17891789- * allocate intermediate indexes (bitmap + group)17901790- * + change two blocks at each level, but root (already included)17911791- */17921792- needed += (depth * 2) + (depth * 2);17931793-17941794- /* any allocation modifies superblock */17951795- needed += 1;17961796-17971797- return needed;18041804+ return index;17981805}1799180618001807static int ext4_remove_blocks(handle_t *handle, struct inode *inode,···19281921 correct_index = 1;19291922 credits += (ext_depth(inode)) + 1;19301923 }19311931-#ifdef CONFIG_QUOTA19321924 credits += 2 * EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb);19331933-#endif1934192519351926 err = ext4_ext_journal_restart(handle, credits);19361927 if (err)···28102805 /*28112806 * probably first extent we're gonna free will be last in block28122807 */28132813- err = ext4_writepage_trans_blocks(inode) + 3;28082808+ err = ext4_writepage_trans_blocks(inode);28142809 handle = ext4_journal_start(inode, err);28152810 if (IS_ERR(handle))28162811 return;···28242819 down_write(&EXT4_I(inode)->i_data_sem);28252820 ext4_ext_invalidate_cache(inode);2826282128272827- ext4_mb_discard_inode_preallocations(inode);28222822+ ext4_discard_reservation(inode);2828282328292824 /*28302825 * TODO: optimization is possible here.···28612856 inode->i_mtime = inode->i_ctime = ext4_current_time(inode);28622857 ext4_mark_inode_dirty(handle, inode);28632858 ext4_journal_stop(handle);28642864-}28652865-28662866-/*28672867- * ext4_ext_writepage_trans_blocks:28682868- * calculate max number of blocks we could modify28692869- * in order to allocate new block for an inode28702870- */28712871-int ext4_ext_writepage_trans_blocks(struct inode *inode, int num)28722872-{28732873- int needed;28742874-28752875- needed = ext4_ext_calc_credits_for_insert(inode, NULL);28762876-28772877- /* caller wants to allocate num blocks, but note it includes sb */28782878- needed = needed * num - (num - 1);28792879-28802880-#ifdef CONFIG_QUOTA28812881- needed += 2 * EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb);28822882-#endif28832883-28842884- return needed;28852859}2886286028872861static void ext4_falloc_update_inode(struct inode *inode,···29232939 max_blocks = (EXT4_BLOCK_ALIGN(len + offset, blkbits) >> blkbits)29242940 - block;29252941 /*29262926- * credits to insert 1 extent into extent tree + buffers to be able to29272927- * modify 1 super block, 1 block bitmap and 1 group descriptor.29422942+ * credits to insert 1 extent into extent tree29282943 */29292929- credits = EXT4_DATA_TRANS_BLOCKS(inode->i_sb) + 3;29442944+ credits = ext4_chunk_trans_blocks(inode, max_blocks);29302945 mutex_lock(&inode->i_mutex);29312946retry:29322947 while (ret >= 0 && ret < max_blocks) {
+1-1
fs/ext4/ialloc.c
···351351 goto found_flexbg;352352 }353353354354- if (best_flex < 0 ||354354+ if (flex_group[best_flex].free_inodes == 0 ||355355 (flex_group[i].free_blocks >356356 flex_group[best_flex].free_blocks &&357357 flex_group[i].free_inodes))
+326-162
fs/ext4/inode.c
···4141#include "acl.h"4242#include "ext4_extents.h"43434444+#define MPAGE_DA_EXTENT_TAIL 0x014545+4446static inline int ext4_begin_ordered_truncate(struct inode *inode,4547 loff_t new_size)4648{···10071005 */10081006static int ext4_calc_metadata_amount(struct inode *inode, int blocks)10091007{10081008+ if (!blocks)10091009+ return 0;10101010+10101011 if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)10111012 return ext4_ext_calc_metadata_amount(inode, blocks);10121013···10451040 EXT4_I(inode)->i_allocated_meta_blocks = 0;10461041 spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);10471042}10481048-10491049-/* Maximum number of blocks we map for direct IO at once. */10501050-#define DIO_MAX_BLOCKS 409610511051-/*10521052- * Number of credits we need for writing DIO_MAX_BLOCKS:10531053- * We need sb + group descriptor + bitmap + inode -> 410541054- * For B blocks with A block pointers per block we need:10551055- * 1 (triple ind.) + (B/A/A + 2) (doubly ind.) + (B/A + 2) (indirect).10561056- * If we plug in 4096 for B and 256 for A (for 1KB block size), we get 25.10571057- */10581058-#define DIO_CREDITS 2510591059-1060104310611044/*10621045 * The ext4_get_blocks_wrap() function try to look up the requested blocks,···11571164 return retval;11581165}1159116611671167+/* Maximum number of blocks we map for direct IO at once. */11681168+#define DIO_MAX_BLOCKS 409611691169+11601170static int ext4_get_block(struct inode *inode, sector_t iblock,11611171 struct buffer_head *bh_result, int create)11621172{11631173 handle_t *handle = ext4_journal_current_handle();11641174 int ret = 0, started = 0;11651175 unsigned max_blocks = bh_result->b_size >> inode->i_blkbits;11761176+ int dio_credits;1166117711671178 if (create && !handle) {11681179 /* Direct IO write... */11691180 if (max_blocks > DIO_MAX_BLOCKS)11701181 max_blocks = DIO_MAX_BLOCKS;11711171- handle = ext4_journal_start(inode, DIO_CREDITS +11721172- 2 * EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb));11821182+ dio_credits = ext4_chunk_trans_blocks(inode, max_blocks);11831183+ handle = ext4_journal_start(inode, dio_credits);11731184 if (IS_ERR(handle)) {11741185 ret = PTR_ERR(handle);11751186 goto out;···15561559 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);15571560 int total, mdb, mdb_free, release;1558156115621562+ if (!to_free)15631563+ return; /* Nothing to release, exit */15641564+15591565 spin_lock(&EXT4_I(inode)->i_block_reservation_lock);15661566+15671567+ if (!EXT4_I(inode)->i_reserved_data_blocks) {15681568+ /*15691569+ * if there is no reserved blocks, but we try to free some15701570+ * then the counter is messed up somewhere.15711571+ * but since this function is called from invalidate15721572+ * page, it's harmless to return without any action15731573+ */15741574+ printk(KERN_INFO "ext4 delalloc try to release %d reserved "15751575+ "blocks for inode %lu, but there is no reserved "15761576+ "data blocks\n", to_free, inode->i_ino);15771577+ spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);15781578+ return;15791579+ }15801580+15601581 /* recalculate the number of metablocks still need to be reserved */15611582 total = EXT4_I(inode)->i_reserved_data_blocks - to_free;15621583 mdb = ext4_calc_metadata_amount(inode, total);···16281613 unsigned long first_page, next_page; /* extent of pages */16291614 get_block_t *get_block;16301615 struct writeback_control *wbc;16161616+ int io_done;16171617+ long pages_written;16311618};1632161916331620/*16341621 * mpage_da_submit_io - walks through extent of pages and try to write16351635- * them with __mpage_writepage()16221622+ * them with writepage() call back16361623 *16371624 * @mpd->inode: inode16381625 * @mpd->first_page: first page of the extent···16491632static int mpage_da_submit_io(struct mpage_da_data *mpd)16501633{16511634 struct address_space *mapping = mpd->inode->i_mapping;16521652- struct mpage_data mpd_pp = {16531653- .bio = NULL,16541654- .last_block_in_bio = 0,16551655- .get_block = mpd->get_block,16561656- .use_writepage = 1,16571657- };16581635 int ret = 0, err, nr_pages, i;16591636 unsigned long index, end;16601637 struct pagevec pvec;1661163816621639 BUG_ON(mpd->next_page <= mpd->first_page);16631663-16641640 pagevec_init(&pvec, 0);16651641 index = mpd->first_page;16661642 end = mpd->next_page - 1;···16711661 break;16721662 index++;1673166316741674- err = __mpage_writepage(page, mpd->wbc, &mpd_pp);16751675-16641664+ err = mapping->a_ops->writepage(page, mpd->wbc);16651665+ if (!err)16661666+ mpd->pages_written++;16761667 /*16771668 * In error case, we have to continue because16781669 * remaining pages are still locked···16841673 }16851674 pagevec_release(&pvec);16861675 }16871687- if (mpd_pp.bio)16881688- mpage_bio_submit(WRITE, mpd_pp.bio);16891689-16901676 return ret;16911677}16921678···17061698 int blocks = exbh->b_size >> inode->i_blkbits;17071699 sector_t pblock = exbh->b_blocknr, cur_logical;17081700 struct buffer_head *head, *bh;17091709- unsigned long index, end;17011701+ pgoff_t index, end;17101702 struct pagevec pvec;17111703 int nr_pages, i;17121704···17491741 if (buffer_delay(bh)) {17501742 bh->b_blocknr = pblock;17511743 clear_buffer_delay(bh);17441744+ bh->b_bdev = inode->i_sb->s_bdev;17451745+ } else if (buffer_unwritten(bh)) {17461746+ bh->b_blocknr = pblock;17471747+ clear_buffer_unwritten(bh);17481748+ set_buffer_mapped(bh);17491749+ set_buffer_new(bh);17501750+ bh->b_bdev = inode->i_sb->s_bdev;17521751 } else if (buffer_mapped(bh))17531752 BUG_ON(bh->b_blocknr != pblock);17541753···17911776 *17921777 * The function skips space we know is already mapped to disk blocks.17931778 *17941794- * The function ignores errors ->get_block() returns, thus real17951795- * error handling is postponed to __mpage_writepage()17961779 */17971780static void mpage_da_map_blocks(struct mpage_da_data *mpd)17981781{17821782+ int err = 0;17991783 struct buffer_head *lbh = &mpd->lbh;18001800- int err = 0, remain = lbh->b_size;18011784 sector_t next = lbh->b_blocknr;18021785 struct buffer_head new;18031786···18051792 if (buffer_mapped(lbh) && !buffer_delay(lbh))18061793 return;1807179418081808- while (remain) {18091809- new.b_state = lbh->b_state;18101810- new.b_blocknr = 0;18111811- new.b_size = remain;18121812- err = mpd->get_block(mpd->inode, next, &new, 1);18131813- if (err) {18141814- /*18151815- * Rather than implement own error handling18161816- * here, we just leave remaining blocks18171817- * unallocated and try again with ->writepage()18181818- */18191819- break;18201820- }18211821- BUG_ON(new.b_size == 0);17951795+ new.b_state = lbh->b_state;17961796+ new.b_blocknr = 0;17971797+ new.b_size = lbh->b_size;1822179818231823- if (buffer_new(&new))18241824- __unmap_underlying_blocks(mpd->inode, &new);17991799+ /*18001800+ * If we didn't accumulate anything18011801+ * to write simply return18021802+ */18031803+ if (!new.b_size)18041804+ return;18051805+ err = mpd->get_block(mpd->inode, next, &new, 1);18061806+ if (err)18071807+ return;18081808+ BUG_ON(new.b_size == 0);1825180918261826- /*18271827- * If blocks are delayed marked, we need to18281828- * put actual blocknr and drop delayed bit18291829- */18301830- if (buffer_delay(lbh))18311831- mpage_put_bnr_to_bhs(mpd, next, &new);18101810+ if (buffer_new(&new))18111811+ __unmap_underlying_blocks(mpd->inode, &new);1832181218331833- /* go for the remaining blocks */18341834- next += new.b_size >> mpd->inode->i_blkbits;18351835- remain -= new.b_size;18361836- }18131813+ /*18141814+ * If blocks are delayed marked, we need to18151815+ * put actual blocknr and drop delayed bit18161816+ */18171817+ if (buffer_delay(lbh) || buffer_unwritten(lbh))18181818+ mpage_put_bnr_to_bhs(mpd, next, &new);18191819+18201820+ return;18371821}1838182218391839-#define BH_FLAGS ((1 << BH_Uptodate) | (1 << BH_Mapped) | (1 << BH_Delay))18231823+#define BH_FLAGS ((1 << BH_Uptodate) | (1 << BH_Mapped) | \18241824+ (1 << BH_Delay) | (1 << BH_Unwritten))1840182518411826/*18421827 * mpage_add_bh_to_extent - try to add one more block to extent of blocks···18481837static void mpage_add_bh_to_extent(struct mpage_da_data *mpd,18491838 sector_t logical, struct buffer_head *bh)18501839{18511851- struct buffer_head *lbh = &mpd->lbh;18521840 sector_t next;18411841+ size_t b_size = bh->b_size;18421842+ struct buffer_head *lbh = &mpd->lbh;18431843+ int nrblocks = lbh->b_size >> mpd->inode->i_blkbits;1853184418541854- next = lbh->b_blocknr + (lbh->b_size >> mpd->inode->i_blkbits);18551855-18451845+ /* check if thereserved journal credits might overflow */18461846+ if (!(EXT4_I(mpd->inode)->i_flags & EXT4_EXTENTS_FL)) {18471847+ if (nrblocks >= EXT4_MAX_TRANS_DATA) {18481848+ /*18491849+ * With non-extent format we are limited by the journal18501850+ * credit available. Total credit needed to insert18511851+ * nrblocks contiguous blocks is dependent on the18521852+ * nrblocks. So limit nrblocks.18531853+ */18541854+ goto flush_it;18551855+ } else if ((nrblocks + (b_size >> mpd->inode->i_blkbits)) >18561856+ EXT4_MAX_TRANS_DATA) {18571857+ /*18581858+ * Adding the new buffer_head would make it cross the18591859+ * allowed limit for which we have journal credit18601860+ * reserved. So limit the new bh->b_size18611861+ */18621862+ b_size = (EXT4_MAX_TRANS_DATA - nrblocks) <<18631863+ mpd->inode->i_blkbits;18641864+ /* we will do mpage_da_submit_io in the next loop */18651865+ }18661866+ }18561867 /*18571868 * First block in the extent18581869 */18591870 if (lbh->b_size == 0) {18601871 lbh->b_blocknr = logical;18611861- lbh->b_size = bh->b_size;18721872+ lbh->b_size = b_size;18621873 lbh->b_state = bh->b_state & BH_FLAGS;18631874 return;18641875 }1865187618771877+ next = lbh->b_blocknr + nrblocks;18661878 /*18671879 * Can we merge the block to our big extent?18681880 */18691881 if (logical == next && (bh->b_state & BH_FLAGS) == lbh->b_state) {18701870- lbh->b_size += bh->b_size;18821882+ lbh->b_size += b_size;18711883 return;18721884 }1873188518861886+flush_it:18741887 /*18751888 * We couldn't merge the block to our extent, so we18761889 * need to flush current extent and start new one18771890 */18781891 mpage_da_map_blocks(mpd);18791879-18801880- /*18811881- * Now start a new extent18821882- */18831883- lbh->b_size = bh->b_size;18841884- lbh->b_state = bh->b_state & BH_FLAGS;18851885- lbh->b_blocknr = logical;18921892+ mpage_da_submit_io(mpd);18931893+ mpd->io_done = 1;18941894+ return;18861895}1887189618881897/*···19221891 struct buffer_head *bh, *head, fake;19231892 sector_t logical;1924189318941894+ if (mpd->io_done) {18951895+ /*18961896+ * Rest of the page in the page_vec18971897+ * redirty then and skip then. We will18981898+ * try to to write them again after18991899+ * starting a new transaction19001900+ */19011901+ redirty_page_for_writepage(wbc, page);19021902+ unlock_page(page);19031903+ return MPAGE_DA_EXTENT_TAIL;19041904+ }19251905 /*19261906 * Can we merge this page to current extent?19271907 */19281908 if (mpd->next_page != page->index) {19291909 /*19301910 * Nope, we can't. So, we map non-allocated blocks19311931- * and start IO on them using __mpage_writepage()19111911+ * and start IO on them using writepage()19321912 */19331913 if (mpd->next_page != mpd->first_page) {19341914 mpage_da_map_blocks(mpd);19351915 mpage_da_submit_io(mpd);19161916+ /*19171917+ * skip rest of the page in the page_vec19181918+ */19191919+ mpd->io_done = 1;19201920+ redirty_page_for_writepage(wbc, page);19211921+ unlock_page(page);19221922+ return MPAGE_DA_EXTENT_TAIL;19361923 }1937192419381925 /*···19811932 set_buffer_dirty(bh);19821933 set_buffer_uptodate(bh);19831934 mpage_add_bh_to_extent(mpd, logical, bh);19351935+ if (mpd->io_done)19361936+ return MPAGE_DA_EXTENT_TAIL;19841937 } else {19851938 /*19861939 * Page with regular buffer heads, just add all dirty ones···19911940 bh = head;19921941 do {19931942 BUG_ON(buffer_locked(bh));19941994- if (buffer_dirty(bh))19431943+ if (buffer_dirty(bh) &&19441944+ (!buffer_mapped(bh) || buffer_delay(bh))) {19951945 mpage_add_bh_to_extent(mpd, logical, bh);19461946+ if (mpd->io_done)19471947+ return MPAGE_DA_EXTENT_TAIL;19481948+ }19961949 logical++;19971950 } while ((bh = bh->b_this_page) != head);19981951 }···20151960 *20161961 * This is a library function, which implements the writepages()20171962 * address_space_operation.20182018- *20192019- * In order to avoid duplication of logic that deals with partial pages,20202020- * multiple bio per page, etc, we find non-allocated blocks, allocate20212021- * them with minimal calls to ->get_block() and re-use __mpage_writepage()20222022- *20232023- * It's important that we call __mpage_writepage() only once for each20242024- * involved page, otherwise we'd have to implement more complicated logic20252025- * to deal with pages w/o PG_lock or w/ PG_writeback and so on.20262026- *20272027- * See comments to mpage_writepages()20281963 */20291964static int mpage_da_writepages(struct address_space *mapping,20301965 struct writeback_control *wbc,20311966 get_block_t get_block)20321967{20331968 struct mpage_da_data mpd;19691969+ long to_write;20341970 int ret;2035197120361972 if (!get_block)···20351989 mpd.first_page = 0;20361990 mpd.next_page = 0;20371991 mpd.get_block = get_block;19921992+ mpd.io_done = 0;19931993+ mpd.pages_written = 0;19941994+19951995+ to_write = wbc->nr_to_write;2038199620391997 ret = write_cache_pages(mapping, wbc, __mpage_da_writepage, &mpd);2040199820411999 /*20422000 * Handle last extent of pages20432001 */20442044- if (mpd.next_page != mpd.first_page) {20022002+ if (!mpd.io_done && mpd.next_page != mpd.first_page) {20452003 mpage_da_map_blocks(&mpd);20462004 mpage_da_submit_io(&mpd);20472005 }2048200620072007+ wbc->nr_to_write = to_write - mpd.pages_written;20492008 return ret;20502009}20512010···22552204}2256220522572206/*22582258- * For now just follow the DIO way to estimate the max credits22592259- * needed to write out EXT4_MAX_WRITEBACK_PAGES.22602260- * todo: need to calculate the max credits need for22612261- * extent based files, currently the DIO credits is based on22622262- * indirect-blocks mapping way.22632263- *22642264- * Probably should have a generic way to calculate credits22652265- * for DIO, writepages, and truncate22072207+ * This is called via ext4_da_writepages() to22082208+ * calulate the total number of credits to reserve to fit22092209+ * a single extent allocation into a single transaction,22102210+ * ext4_da_writpeages() will loop calling this before22112211+ * the block allocation.22662212 */22672267-#define EXT4_MAX_WRITEBACK_PAGES DIO_MAX_BLOCKS22682268-#define EXT4_MAX_WRITEBACK_CREDITS DIO_CREDITS22132213+22142214+static int ext4_da_writepages_trans_blocks(struct inode *inode)22152215+{22162216+ int max_blocks = EXT4_I(inode)->i_reserved_data_blocks;22172217+22182218+ /*22192219+ * With non-extent format the journal credit needed to22202220+ * insert nrblocks contiguous block is dependent on22212221+ * number of contiguous block. So we will limit22222222+ * number of contiguous block to a sane value22232223+ */22242224+ if (!(inode->i_flags & EXT4_EXTENTS_FL) &&22252225+ (max_blocks > EXT4_MAX_TRANS_DATA))22262226+ max_blocks = EXT4_MAX_TRANS_DATA;22272227+22282228+ return ext4_chunk_trans_blocks(inode, max_blocks);22292229+}2269223022702231static int ext4_da_writepages(struct address_space *mapping,22712271- struct writeback_control *wbc)22322232+ struct writeback_control *wbc)22722233{22732273- struct inode *inode = mapping->host;22742234 handle_t *handle = NULL;22752275- int needed_blocks;22762276- int ret = 0;22772277- long to_write;22782235 loff_t range_start = 0;22362236+ struct inode *inode = mapping->host;22372237+ int needed_blocks, ret = 0, nr_to_writebump = 0;22382238+ long to_write, pages_skipped = 0;22392239+ struct ext4_sb_info *sbi = EXT4_SB(mapping->host->i_sb);2279224022802241 /*22812242 * No pages to write? This is mainly a kludge to avoid starting22822243 * a transaction for special inodes like journal inode on last iput()22832244 * because that could violate lock ordering on umount22842245 */22852285- if (!mapping->nrpages)22462246+ if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))22862247 return 0;22872287-22882248 /*22892289- * Estimate the worse case needed credits to write out22902290- * EXT4_MAX_BUF_BLOCKS pages22492249+ * Make sure nr_to_write is >= sbi->s_mb_stream_request22502250+ * This make sure small files blocks are allocated in22512251+ * single attempt. This ensure that small files22522252+ * get less fragmented.22912253 */22922292- needed_blocks = EXT4_MAX_WRITEBACK_CREDITS;22542254+ if (wbc->nr_to_write < sbi->s_mb_stream_request) {22552255+ nr_to_writebump = sbi->s_mb_stream_request - wbc->nr_to_write;22562256+ wbc->nr_to_write = sbi->s_mb_stream_request;22572257+ }2293225822942294- to_write = wbc->nr_to_write;22952295- if (!wbc->range_cyclic) {22592259+ if (!wbc->range_cyclic)22962260 /*22972261 * If range_cyclic is not set force range_cont22982262 * and save the old writeback_index22992263 */23002264 wbc->range_cont = 1;23012301- range_start = wbc->range_start;23022302- }2303226523042304- while (!ret && to_write) {22662266+ range_start = wbc->range_start;22672267+ pages_skipped = wbc->pages_skipped;22682268+22692269+restart_loop:22702270+ to_write = wbc->nr_to_write;22712271+ while (!ret && to_write > 0) {22722272+22732273+ /*22742274+ * we insert one extent at a time. So we need22752275+ * credit needed for single extent allocation.22762276+ * journalled mode is currently not supported22772277+ * by delalloc22782278+ */22792279+ BUG_ON(ext4_should_journal_data(inode));22802280+ needed_blocks = ext4_da_writepages_trans_blocks(inode);22812281+23052282 /* start a new transaction*/23062283 handle = ext4_journal_start(inode, needed_blocks);23072284 if (IS_ERR(handle)) {23082285 ret = PTR_ERR(handle);22862286+ printk(KERN_EMERG "%s: jbd2_start: "22872287+ "%ld pages, ino %lu; err %d\n", __func__,22882288+ wbc->nr_to_write, inode->i_ino, ret);22892289+ dump_stack();23092290 goto out_writepages;23102291 }23112292 if (ext4_should_order_data(inode)) {23122293 /*23132294 * With ordered mode we need to add23142314- * the inode to the journal handle22952295+ * the inode to the journal handl23152296 * when we do block allocation.23162297 */23172298 ret = ext4_jbd2_file_inode(handle, inode);···23512268 ext4_journal_stop(handle);23522269 goto out_writepages;23532270 }23542354-23552271 }23562356- /*23572357- * set the max dirty pages could be write at a time23582358- * to fit into the reserved transaction credits23592359- */23602360- if (wbc->nr_to_write > EXT4_MAX_WRITEBACK_PAGES)23612361- wbc->nr_to_write = EXT4_MAX_WRITEBACK_PAGES;2362227223632273 to_write -= wbc->nr_to_write;23642274 ret = mpage_da_writepages(mapping, wbc,23652365- ext4_da_get_block_write);22752275+ ext4_da_get_block_write);23662276 ext4_journal_stop(handle);23672367- if (wbc->nr_to_write) {22772277+ if (ret == MPAGE_DA_EXTENT_TAIL) {22782278+ /*22792279+ * got one extent now try with22802280+ * rest of the pages22812281+ */22822282+ to_write += wbc->nr_to_write;22832283+ ret = 0;22842284+ } else if (wbc->nr_to_write) {23682285 /*23692286 * There is no more writeout needed23702287 * or we requested for a noblocking writeout···23762293 wbc->nr_to_write = to_write;23772294 }2378229523792379-out_writepages:23802380- wbc->nr_to_write = to_write;23812381- if (range_start)22962296+ if (wbc->range_cont && (pages_skipped != wbc->pages_skipped)) {22972297+ /* We skipped pages in this loop */23822298 wbc->range_start = range_start;22992299+ wbc->nr_to_write = to_write +23002300+ wbc->pages_skipped - pages_skipped;23012301+ wbc->pages_skipped = pages_skipped;23022302+ goto restart_loop;23032303+ }23042304+23052305+out_writepages:23062306+ wbc->nr_to_write = to_write - nr_to_writebump;23072307+ wbc->range_start = range_start;23832308 return ret;23842309}23852310···35773486 * modify the block allocation tree.35783487 */35793488 down_write(&ei->i_data_sem);34893489+34903490+ ext4_discard_reservation(inode);34913491+35803492 /*35813493 * The orphan list entry will now protect us from any crash which35823494 * occurs before the truncate completes, so it is now safe to propagate···36483554 case EXT4_TIND_BLOCK:36493555 ;36503556 }36513651-36523652- ext4_discard_reservation(inode);3653355736543558 up_write(&ei->i_data_sem);36553559 inode->i_mtime = inode->i_ctime = ext4_current_time(inode);···44164324 return 0;44174325}4418432644194419-/*44204420- * How many blocks doth make a writepage()?44214421- *44224422- * With N blocks per page, it may be:44234423- * N data blocks44244424- * 2 indirect block44254425- * 2 dindirect44264426- * 1 tindirect44274427- * N+5 bitmap blocks (from the above)44284428- * N+5 group descriptor summary blocks44294429- * 1 inode block44304430- * 1 superblock.44314431- * 2 * EXT4_SINGLEDATA_TRANS_BLOCKS for the quote files44324432- *44334433- * 3 * (N + 5) + 2 + 2 * EXT4_SINGLEDATA_TRANS_BLOCKS44344434- *44354435- * With ordered or writeback data it's the same, less the N data blocks.44364436- *44374437- * If the inode's direct blocks can hold an integral number of pages then a44384438- * page cannot straddle two indirect blocks, and we can only touch one indirect44394439- * and dindirect block, and the "5" above becomes "3".44404440- *44414441- * This still overestimates under most circumstances. If we were to pass the44424442- * start and end offsets in here as well we could do block_to_path() on each44434443- * block and work out the exact number of indirects which are touched. Pah.44444444- */43274327+static int ext4_indirect_trans_blocks(struct inode *inode, int nrblocks,43284328+ int chunk)43294329+{43304330+ int indirects;4445433143324332+ /* if nrblocks are contiguous */43334333+ if (chunk) {43344334+ /*43354335+ * With N contiguous data blocks, it need at most43364336+ * N/EXT4_ADDR_PER_BLOCK(inode->i_sb) indirect blocks43374337+ * 2 dindirect blocks43384338+ * 1 tindirect block43394339+ */43404340+ indirects = nrblocks / EXT4_ADDR_PER_BLOCK(inode->i_sb);43414341+ return indirects + 3;43424342+ }43434343+ /*43444344+ * if nrblocks are not contiguous, worse case, each block touch43454345+ * a indirect block, and each indirect block touch a double indirect43464346+ * block, plus a triple indirect block43474347+ */43484348+ indirects = nrblocks * 2 + 1;43494349+ return indirects;43504350+}43514351+43524352+static int ext4_index_trans_blocks(struct inode *inode, int nrblocks, int chunk)43534353+{43544354+ if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))43554355+ return ext4_indirect_trans_blocks(inode, nrblocks, 0);43564356+ return ext4_ext_index_trans_blocks(inode, nrblocks, 0);43574357+}43584358+/*43594359+ * Account for index blocks, block groups bitmaps and block group43604360+ * descriptor blocks if modify datablocks and index blocks43614361+ * worse case, the indexs blocks spread over different block groups43624362+ *43634363+ * If datablocks are discontiguous, they are possible to spread over43644364+ * different block groups too. If they are contiugous, with flexbg,43654365+ * they could still across block group boundary.43664366+ *43674367+ * Also account for superblock, inode, quota and xattr blocks43684368+ */43694369+int ext4_meta_trans_blocks(struct inode *inode, int nrblocks, int chunk)43704370+{43714371+ int groups, gdpblocks;43724372+ int idxblocks;43734373+ int ret = 0;43744374+43754375+ /*43764376+ * How many index blocks need to touch to modify nrblocks?43774377+ * The "Chunk" flag indicating whether the nrblocks is43784378+ * physically contiguous on disk43794379+ *43804380+ * For Direct IO and fallocate, they calls get_block to allocate43814381+ * one single extent at a time, so they could set the "Chunk" flag43824382+ */43834383+ idxblocks = ext4_index_trans_blocks(inode, nrblocks, chunk);43844384+43854385+ ret = idxblocks;43864386+43874387+ /*43884388+ * Now let's see how many group bitmaps and group descriptors need43894389+ * to account43904390+ */43914391+ groups = idxblocks;43924392+ if (chunk)43934393+ groups += 1;43944394+ else43954395+ groups += nrblocks;43964396+43974397+ gdpblocks = groups;43984398+ if (groups > EXT4_SB(inode->i_sb)->s_groups_count)43994399+ groups = EXT4_SB(inode->i_sb)->s_groups_count;44004400+ if (groups > EXT4_SB(inode->i_sb)->s_gdb_count)44014401+ gdpblocks = EXT4_SB(inode->i_sb)->s_gdb_count;44024402+44034403+ /* bitmaps and block group descriptor blocks */44044404+ ret += groups + gdpblocks;44054405+44064406+ /* Blocks for super block, inode, quota and xattr blocks */44074407+ ret += EXT4_META_TRANS_BLOCKS(inode->i_sb);44084408+44094409+ return ret;44104410+}44114411+44124412+/*44134413+ * Calulate the total number of credits to reserve to fit44144414+ * the modification of a single pages into a single transaction,44154415+ * which may include multiple chunks of block allocations.44164416+ *44174417+ * This could be called via ext4_write_begin()44184418+ *44194419+ * We need to consider the worse case, when44204420+ * one new block per extent.44214421+ */44464422int ext4_writepage_trans_blocks(struct inode *inode)44474423{44484424 int bpp = ext4_journal_blocks_per_page(inode);44494449- int indirects = (EXT4_NDIR_BLOCKS % bpp) ? 5 : 3;44504425 int ret;4451442644524452- if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)44534453- return ext4_ext_writepage_trans_blocks(inode, bpp);44274427+ ret = ext4_meta_trans_blocks(inode, bpp, 0);4454442844294429+ /* Account for data blocks for journalled mode */44554430 if (ext4_should_journal_data(inode))44564456- ret = 3 * (bpp + indirects) + 2;44574457- else44584458- ret = 2 * (bpp + indirects) + 2;44594459-44604460-#ifdef CONFIG_QUOTA44614461- /* We know that structure was already allocated during DQUOT_INIT so44624462- * we will be updating only the data blocks + inodes */44634463- ret += 2*EXT4_QUOTA_TRANS_BLOCKS(inode->i_sb);44644464-#endif44654465-44314431+ ret += bpp;44664432 return ret;44334433+}44344434+44354435+/*44364436+ * Calculate the journal credits for a chunk of data modification.44374437+ *44384438+ * This is called from DIO, fallocate or whoever calling44394439+ * ext4_get_blocks_wrap() to map/allocate a chunk of contigous disk blocks.44404440+ *44414441+ * journal buffers for data blocks are not included here, as DIO44424442+ * and fallocate do no need to journal data buffers.44434443+ */44444444+int ext4_chunk_trans_blocks(struct inode *inode, int nrblocks)44454445+{44464446+ return ext4_meta_trans_blocks(inode, nrblocks, 1);44674447}4468444844694449/*
+46-7
fs/ext4/mballoc.c
···32823282}3283328332843284/*32853285+ * Return the prealloc space that have minimal distance32863286+ * from the goal block. @cpa is the prealloc32873287+ * space that is having currently known minimal distance32883288+ * from the goal block.32893289+ */32903290+static struct ext4_prealloc_space *32913291+ext4_mb_check_group_pa(ext4_fsblk_t goal_block,32923292+ struct ext4_prealloc_space *pa,32933293+ struct ext4_prealloc_space *cpa)32943294+{32953295+ ext4_fsblk_t cur_distance, new_distance;32963296+32973297+ if (cpa == NULL) {32983298+ atomic_inc(&pa->pa_count);32993299+ return pa;33003300+ }33013301+ cur_distance = abs(goal_block - cpa->pa_pstart);33023302+ new_distance = abs(goal_block - pa->pa_pstart);33033303+33043304+ if (cur_distance < new_distance)33053305+ return cpa;33063306+33073307+ /* drop the previous reference */33083308+ atomic_dec(&cpa->pa_count);33093309+ atomic_inc(&pa->pa_count);33103310+ return pa;33113311+}33123312+33133313+/*32853314 * search goal blocks in preallocated space32863315 */32873316static noinline_for_stack int···33193290 int order, i;33203291 struct ext4_inode_info *ei = EXT4_I(ac->ac_inode);33213292 struct ext4_locality_group *lg;33223322- struct ext4_prealloc_space *pa;32933293+ struct ext4_prealloc_space *pa, *cpa = NULL;32943294+ ext4_fsblk_t goal_block;3323329533243296 /* only data can be preallocated */33253297 if (!(ac->ac_flags & EXT4_MB_HINT_DATA))···33633333 /* The max size of hash table is PREALLOC_TB_SIZE */33643334 order = PREALLOC_TB_SIZE - 1;3365333533363336+ goal_block = ac->ac_g_ex.fe_group * EXT4_BLOCKS_PER_GROUP(ac->ac_sb) +33373337+ ac->ac_g_ex.fe_start +33383338+ le32_to_cpu(EXT4_SB(ac->ac_sb)->s_es->s_first_data_block);33393339+ /*33403340+ * search for the prealloc space that is having33413341+ * minimal distance from the goal block.33423342+ */33663343 for (i = order; i < PREALLOC_TB_SIZE; i++) {33673344 rcu_read_lock();33683345 list_for_each_entry_rcu(pa, &lg->lg_prealloc_list[i],···33773340 spin_lock(&pa->pa_lock);33783341 if (pa->pa_deleted == 0 &&33793342 pa->pa_free >= ac->ac_o_ex.fe_len) {33803380- atomic_inc(&pa->pa_count);33813381- ext4_mb_use_group_pa(ac, pa);33823382- spin_unlock(&pa->pa_lock);33833383- ac->ac_criteria = 20;33843384- rcu_read_unlock();33853385- return 1;33433343+33443344+ cpa = ext4_mb_check_group_pa(goal_block,33453345+ pa, cpa);33863346 }33873347 spin_unlock(&pa->pa_lock);33883348 }33893349 rcu_read_unlock();33503350+ }33513351+ if (cpa) {33523352+ ext4_mb_use_group_pa(ac, cpa);33533353+ ac->ac_criteria = 20;33543354+ return 1;33903355 }33913356 return 0;33923357}
+2-1
fs/ext4/migrate.c
···5353 * credit. But below we try to not accumalate too much5454 * of them by restarting the journal.5555 */5656- needed = ext4_ext_calc_credits_for_insert(inode, path);5656+ needed = ext4_ext_calc_credits_for_single_extent(inode,5757+ lb->last_block - lb->first_block + 1, path);57585859 /*5960 * Make sure the credit we accumalated is not really high
+2-1
fs/ext4/resize.c
···773773774774 if (reserved_gdb || gdb_off == 0) {775775 if (!EXT4_HAS_COMPAT_FEATURE(sb,776776- EXT4_FEATURE_COMPAT_RESIZE_INODE)){776776+ EXT4_FEATURE_COMPAT_RESIZE_INODE)777777+ || !le16_to_cpu(es->s_reserved_gdt_blocks)) {777778 ext4_warning(sb, __func__,778779 "No reserved GDT blocks, can't resize");779780 return -EPERM;
···1818#ifndef __XFS_DMAPI_H__1919#define __XFS_DMAPI_H__20202121-#include <linux/version.h>2221/* Values used to define the on-disk version of dm_attrname_t. All2322 * on-disk attribute names start with the 8-byte string "SGI_DMI_".2423 *
···102102 * Called from mm/filemap_xip.c to unmap empty zero page103103 */104104pte_t *page_check_address(struct page *, struct mm_struct *,105105- unsigned long, spinlock_t **);105105+ unsigned long, spinlock_t **, int);106106107107/*108108 * Used by swapoff to help locate where page is expected in vma.
+4
include/linux/skbuff.h
···14521452extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,14531453 int hlen,14541454 struct iovec *iov);14551455+extern int skb_copy_datagram_from_iovec(struct sk_buff *skb,14561456+ int offset,14571457+ struct iovec *from,14581458+ int len);14551459extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb);14561460extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb,14571461 unsigned int flags);
+4-1
include/linux/tick.h
···7474extern int tick_init_highres(void);7575extern int tick_program_event(ktime_t expires, int force);7676extern void tick_setup_sched_timer(void);7777+# endif7878+7979+# if defined CONFIG_NO_HZ || defined CONFIG_HIGH_RES_TIMERS7780extern void tick_cancel_sched_timer(int cpu);7881# else7982static inline void tick_cancel_sched_timer(int cpu) { }8080-# endif /* HIGHRES */8383+# endif81848285# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST8386extern struct tick_device *tick_get_broadcast_device(void);
+3
include/linux/usb.h
···110110 * @sysfs_files_created: sysfs attributes exist111111 * @needs_remote_wakeup: flag set when the driver requires remote-wakeup112112 * capability during autosuspend.113113+ * @needs_altsetting0: flag set when a set-interface request for altsetting 0114114+ * has been deferred.113115 * @needs_binding: flag set when the driver should be re-probed or unbound114116 * following a reset or suspend operation it doesn't support.115117 * @dev: driver model's view of this device···164162 unsigned is_active:1; /* the interface is not suspended */165163 unsigned sysfs_files_created:1; /* the sysfs attributes exist */166164 unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */165165+ unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */167166 unsigned needs_binding:1; /* needs delayed unbind/rebind */168167169168 struct device dev; /* interface specific device info */
+2-1
include/net/addrconf.h
···8080 struct net_device *dev,8181 int strict);82828383-extern int ipv6_dev_get_saddr(struct net_device *dev, 8383+extern int ipv6_dev_get_saddr(struct net *net,8484+ struct net_device *dev,8485 const struct in6_addr *daddr,8586 unsigned int srcprefs,8687 struct in6_addr *saddr);
+1
include/net/ip6_route.h
···107107{108108 struct sk_buff *skb;109109 struct netlink_callback *cb;110110+ struct net *net;110111};111112112113extern int rt6_dump_route(struct rt6_info *rt, void *p_arg);
+3-8
include/net/mac80211.h
···708708 * rely on the host system for such buffering. This option is used709709 * to configure the IEEE 802.11 upper layer to buffer broadcast and710710 * multicast frames when there are power saving stations so that711711- * the driver can fetch them with ieee80211_get_buffered_bc(). Note712712- * that not setting this flag works properly only when the713713- * %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is also not set because714714- * otherwise the stack will not know when the DTIM beacon was sent.711711+ * the driver can fetch them with ieee80211_get_buffered_bc().715712 *716713 * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE:717714 * Hardware is not capable of short slot operation on the 2.4 GHz band.···10961099 * See the section "Frame filtering" for more information.10971100 * This callback must be implemented and atomic.10981101 *10991099- * @set_tim: Set TIM bit. If the hardware/firmware takes care of beacon11001100- * generation (that is, %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is set)11011101- * mac80211 calls this function when a TIM bit must be set or cleared11021102- * for a given AID. Must be atomic.11021102+ * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit11031103+ * must be set or cleared for a given AID. Must be atomic.11031104 *11041105 * @set_key: See the section "Hardware crypto acceleration"11051106 * This callback can sleep, and is only called between add_interface
···7777 * sections are delimited by rcu_read_lock() and rcu_read_unlock(),7878 * and may be nested.7979 */8080+void synchronize_rcu(void); /* Makes kernel-doc tools happy */8081synchronize_rcu_xxx(synchronize_rcu, call_rcu)8182EXPORT_SYMBOL_GPL(synchronize_rcu);8283
···13381338 struct siginfo info;13391339 unsigned long flags;13401340 struct sighand_struct *psig;13411341+ int ret = sig;1341134213421343 BUG_ON(sig == -1);13431344···14031402 * is implementation-defined: we do (if you don't want14041403 * it, just use SIG_IGN instead).14051404 */14061406- tsk->exit_signal = -1;14051405+ ret = tsk->exit_signal = -1;14071406 if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)14081407 sig = -1;14091408 }···14121411 __wake_up_parent(tsk, tsk->parent);14131412 spin_unlock_irqrestore(&psig->siglock, flags);1414141314151415- return sig;14141414+ return ret;14161415}1417141614181417static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
···223223 return -ENOMEM;224224225225 /* ewww... some of these buggers have '/' in the name ... */226226- s = strchr(kobj->name, '/');227227- if (s)226226+ while ((s = strchr(kobj->name, '/')))228227 s[0] = '!';229228230229 kfree(old_name);
+29-6
mm/bootmem.c
···405405}406406#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */407407408408+static unsigned long align_idx(struct bootmem_data *bdata, unsigned long idx,409409+ unsigned long step)410410+{411411+ unsigned long base = bdata->node_min_pfn;412412+413413+ /*414414+ * Align the index with respect to the node start so that the415415+ * combination of both satisfies the requested alignment.416416+ */417417+418418+ return ALIGN(base + idx, step) - base;419419+}420420+421421+static unsigned long align_off(struct bootmem_data *bdata, unsigned long off,422422+ unsigned long align)423423+{424424+ unsigned long base = PFN_PHYS(bdata->node_min_pfn);425425+426426+ /* Same as align_idx for byte offsets */427427+428428+ return ALIGN(base + off, align) - base;429429+}430430+408431static void * __init alloc_bootmem_core(struct bootmem_data *bdata,409432 unsigned long size, unsigned long align,410433 unsigned long goal, unsigned long limit)···464441 else465442 start = ALIGN(min, step);466443467467- sidx = start - bdata->node_min_pfn;;444444+ sidx = start - bdata->node_min_pfn;468445 midx = max - bdata->node_min_pfn;469446470447 if (bdata->hint_idx > sidx) {···473450 * catch the fallback below.474451 */475452 fallback = sidx + 1;476476- sidx = ALIGN(bdata->hint_idx, step);453453+ sidx = align_idx(bdata, bdata->hint_idx, step);477454 }478455479456 while (1) {···482459 unsigned long eidx, i, start_off, end_off;483460find_block:484461 sidx = find_next_zero_bit(bdata->node_bootmem_map, midx, sidx);485485- sidx = ALIGN(sidx, step);462462+ sidx = align_idx(bdata, sidx, step);486463 eidx = sidx + PFN_UP(size);487464488465 if (sidx >= midx || eidx > midx)···490467491468 for (i = sidx; i < eidx; i++)492469 if (test_bit(i, bdata->node_bootmem_map)) {493493- sidx = ALIGN(i, step);470470+ sidx = align_idx(bdata, i, step);494471 if (sidx == i)495472 sidx += step;496473 goto find_block;···498475499476 if (bdata->last_end_off & (PAGE_SIZE - 1) &&500477 PFN_DOWN(bdata->last_end_off) + 1 == sidx)501501- start_off = ALIGN(bdata->last_end_off, align);478478+ start_off = align_off(bdata, bdata->last_end_off, align);502479 else503480 start_off = PFN_PHYS(sidx);504481···522499 }523500524501 if (fallback) {525525- sidx = ALIGN(fallback - 1, step);502502+ sidx = align_idx(bdata, fallback - 1, step);526503 fallback = 0;527504 goto find_block;528505 }
+50-15
mm/filemap_xip.c
···1515#include <linux/rmap.h>1616#include <linux/mmu_notifier.h>1717#include <linux/sched.h>1818+#include <linux/seqlock.h>1919+#include <linux/mutex.h>1820#include <asm/tlbflush.h>1921#include <asm/io.h>2022···2422 * We do use our own empty page to avoid interference with other users2523 * of ZERO_PAGE(), such as /dev/zero2624 */2525+static DEFINE_MUTEX(xip_sparse_mutex);2626+static seqcount_t xip_sparse_seq = SEQCNT_ZERO;2727static struct page *__xip_sparse_page;28282929+/* called under xip_sparse_mutex */2930static struct page *xip_sparse_page(void)3031{3132 if (!__xip_sparse_page) {3233 struct page *page = alloc_page(GFP_HIGHUSER | __GFP_ZERO);33343434- if (page) {3535- static DEFINE_SPINLOCK(xip_alloc_lock);3636- spin_lock(&xip_alloc_lock);3737- if (!__xip_sparse_page)3838- __xip_sparse_page = page;3939- else4040- __free_page(page);4141- spin_unlock(&xip_alloc_lock);4242- }3535+ if (page)3636+ __xip_sparse_page = page;4337 }4438 return __xip_sparse_page;4539}···172174 pte_t pteval;173175 spinlock_t *ptl;174176 struct page *page;177177+ unsigned count;178178+ int locked = 0;179179+180180+ count = read_seqcount_begin(&xip_sparse_seq);175181176182 page = __xip_sparse_page;177183 if (!page)178184 return;179185186186+retry:180187 spin_lock(&mapping->i_mmap_lock);181188 vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) {182189 mm = vma->vm_mm;183190 address = vma->vm_start +184191 ((pgoff - vma->vm_pgoff) << PAGE_SHIFT);185192 BUG_ON(address < vma->vm_start || address >= vma->vm_end);186186- pte = page_check_address(page, mm, address, &ptl);193193+ pte = page_check_address(page, mm, address, &ptl, 1);187194 if (pte) {188195 /* Nuke the page table entry. */189196 flush_cache_page(vma, address, pte_pfn(*pte));···201198 }202199 }203200 spin_unlock(&mapping->i_mmap_lock);201201+202202+ if (locked) {203203+ mutex_unlock(&xip_sparse_mutex);204204+ } else if (read_seqcount_retry(&xip_sparse_seq, count)) {205205+ mutex_lock(&xip_sparse_mutex);206206+ locked = 1;207207+ goto retry;208208+ }204209}205210206211/*···229218 int error;230219231220 /* XXX: are VM_FAULT_ codes OK? */232232-221221+again:233222 size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;234223 if (vmf->pgoff >= size)235224 return VM_FAULT_SIGBUS;···248237 int err;249238250239 /* maybe shared writable, allocate new block */240240+ mutex_lock(&xip_sparse_mutex);251241 error = mapping->a_ops->get_xip_mem(mapping, vmf->pgoff, 1,252242 &xip_mem, &xip_pfn);243243+ mutex_unlock(&xip_sparse_mutex);253244 if (error)254245 return VM_FAULT_SIGBUS;255246 /* unmap sparse mappings at pgoff from all other vmas */···265252 BUG_ON(err);266253 return VM_FAULT_NOPAGE;267254 } else {255255+ int err, ret = VM_FAULT_OOM;256256+257257+ mutex_lock(&xip_sparse_mutex);258258+ write_seqcount_begin(&xip_sparse_seq);259259+ error = mapping->a_ops->get_xip_mem(mapping, vmf->pgoff, 0,260260+ &xip_mem, &xip_pfn);261261+ if (unlikely(!error)) {262262+ write_seqcount_end(&xip_sparse_seq);263263+ mutex_unlock(&xip_sparse_mutex);264264+ goto again;265265+ }266266+ if (error != -ENODATA)267267+ goto out;268268 /* not shared and writable, use xip_sparse_page() */269269 page = xip_sparse_page();270270 if (!page)271271- return VM_FAULT_OOM;271271+ goto out;272272+ err = vm_insert_page(vma, (unsigned long)vmf->virtual_address,273273+ page);274274+ if (err == -ENOMEM)275275+ goto out;272276273273- page_cache_get(page);274274- vmf->page = page;275275- return 0;277277+ ret = VM_FAULT_NOPAGE;278278+out:279279+ write_seqcount_end(&xip_sparse_seq);280280+ mutex_unlock(&xip_sparse_mutex);281281+282282+ return ret;276283 }277284}278285···341308 &xip_mem, &xip_pfn);342309 if (status == -ENODATA) {343310 /* we allocate a new page unmap it */311311+ mutex_lock(&xip_sparse_mutex);344312 status = a_ops->get_xip_mem(mapping, index, 1,345313 &xip_mem, &xip_pfn);314314+ mutex_unlock(&xip_sparse_mutex);346315 if (!status)347316 /* unmap page at pgoff from all other vmas */348317 __xip_unmap(mapping, index);
···224224/*225225 * Check that @page is mapped at @address into @mm.226226 *227227+ * If @sync is false, page_check_address may perform a racy check to avoid228228+ * the page table lock when the pte is not present (helpful when reclaiming229229+ * highly shared pages).230230+ *227231 * On success returns with pte mapped and locked.228232 */229233pte_t *page_check_address(struct page *page, struct mm_struct *mm,230230- unsigned long address, spinlock_t **ptlp)234234+ unsigned long address, spinlock_t **ptlp, int sync)231235{232236 pgd_t *pgd;233237 pud_t *pud;···253249254250 pte = pte_offset_map(pmd, address);255251 /* Make a quick check before getting the lock */256256- if (!pte_present(*pte)) {252252+ if (!sync && !pte_present(*pte)) {257253 pte_unmap(pte);258254 return NULL;259255 }···285281 if (address == -EFAULT)286282 goto out;287283288288- pte = page_check_address(page, mm, address, &ptl);284284+ pte = page_check_address(page, mm, address, &ptl, 0);289285 if (!pte)290286 goto out;291287···454450 if (address == -EFAULT)455451 goto out;456452457457- pte = page_check_address(page, mm, address, &ptl);453453+ pte = page_check_address(page, mm, address, &ptl, 1);458454 if (!pte)459455 goto out;460456···663659 }664660665661 /*662662+ * Now that the last pte has gone, s390 must transfer dirty663663+ * flag from storage key to struct page. We can usually skip664664+ * this if the page is anon, so about to be freed; but perhaps665665+ * not if it's in swapcache - there might be another pte slot666666+ * containing the swap entry, but page not yet written to swap.667667+ */668668+ if ((!PageAnon(page) || PageSwapCache(page)) &&669669+ page_test_dirty(page)) {670670+ page_clear_dirty(page);671671+ set_page_dirty(page);672672+ }673673+674674+ mem_cgroup_uncharge_page(page);675675+ __dec_zone_page_state(page,676676+ PageAnon(page) ? NR_ANON_PAGES : NR_FILE_MAPPED);677677+ /*666678 * It would be tidy to reset the PageAnon mapping here,667679 * but that might overwrite a racing page_add_anon_rmap668680 * which increments mapcount after us but sets mapping···687667 * Leaving it set also helps swapoff to reinstate ptes688668 * faster for those pages still in swapcache.689669 */690690- if ((!PageAnon(page) || PageSwapCache(page)) &&691691- page_test_dirty(page)) {692692- page_clear_dirty(page);693693- set_page_dirty(page);694694- }695695- mem_cgroup_uncharge_page(page);696696-697697- __dec_zone_page_state(page,698698- PageAnon(page) ? NR_ANON_PAGES : NR_FILE_MAPPED);699670 }700671}701672···708697 if (address == -EFAULT)709698 goto out;710699711711- pte = page_check_address(page, mm, address, &ptl);700700+ pte = page_check_address(page, mm, address, &ptl, 0);712701 if (!pte)713702 goto out;714703
···21152115module_param(l2cap_mtu, uint, 0644);21162116MODULE_PARM_DESC(l2cap_mtu, "Default MTU for the L2CAP connection");2117211721182118-MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");21182118+MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");21192119MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION);21202120MODULE_VERSION(VERSION);21212121MODULE_LICENSE("GPL");
···968968 /* need to zero data of old helper */969969 memset(&help->help, 0, sizeof(help->help));970970 } else {971971- help = nf_ct_helper_ext_add(ct, GFP_KERNEL);971971+ help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);972972 if (help == NULL)973973 return -ENOMEM;974974 }···11361136 ct->timeout.expires = jiffies + ct->timeout.expires * HZ;11371137 ct->status |= IPS_CONFIRMED;1138113811391139- if (cda[CTA_STATUS]) {11401140- err = ctnetlink_change_status(ct, cda);11411141- if (err < 0)11421142- goto err;11431143- }11441144-11451145- if (cda[CTA_PROTOINFO]) {11461146- err = ctnetlink_change_protoinfo(ct, cda);11471147- if (err < 0)11481148- goto err;11491149- }11501150-11511151- nf_ct_acct_ext_add(ct, GFP_KERNEL);11521152-11531153-#if defined(CONFIG_NF_CONNTRACK_MARK)11541154- if (cda[CTA_MARK])11551155- ct->mark = ntohl(nla_get_be32(cda[CTA_MARK]));11561156-#endif11571157-11581139 rcu_read_lock();11591140 helper = __nf_ct_helper_find(rtuple);11601141 if (helper) {11611161- help = nf_ct_helper_ext_add(ct, GFP_KERNEL);11421142+ help = nf_ct_helper_ext_add(ct, GFP_ATOMIC);11621143 if (help == NULL) {11631144 rcu_read_unlock();11641145 err = -ENOMEM;···11481167 /* not in hash table yet so not strictly necessary */11491168 rcu_assign_pointer(help->helper, helper);11501169 }11701170+11711171+ if (cda[CTA_STATUS]) {11721172+ err = ctnetlink_change_status(ct, cda);11731173+ if (err < 0) {11741174+ rcu_read_unlock();11751175+ goto err;11761176+ }11771177+ }11781178+11791179+ if (cda[CTA_PROTOINFO]) {11801180+ err = ctnetlink_change_protoinfo(ct, cda);11811181+ if (err < 0) {11821182+ rcu_read_unlock();11831183+ goto err;11841184+ }11851185+ }11861186+11871187+ nf_ct_acct_ext_add(ct, GFP_KERNEL);11881188+11891189+#if defined(CONFIG_NF_CONNTRACK_MARK)11901190+ if (cda[CTA_MARK])11911191+ ct->mark = ntohl(nla_get_be32(cda[CTA_MARK]));11921192+#endif1151119311521194 /* setup master conntrack: this is a confirmed expectation */11531195 if (master_ct) {
+10-4
net/rfkill/rfkill.c
···150150 * calls and handling all the red tape such as issuing notifications151151 * if the call is successful.152152 *153153+ * Suspended devices are not touched at all, and -EAGAIN is returned.154154+ *153155 * Note that the @force parameter cannot override a (possibly cached)154156 * state of RFKILL_STATE_HARD_BLOCKED. Any device making use of155157 * RFKILL_STATE_HARD_BLOCKED implements either get_state() or···169167{170168 int retval = 0;171169 enum rfkill_state oldstate, newstate;170170+171171+ if (unlikely(rfkill->dev.power.power_state.event & PM_EVENT_SLEEP))172172+ return -EBUSY;172173173174 oldstate = rfkill->state;174175···219214 *220215 * This function toggles the state of all switches of given type,221216 * unless a specific switch is claimed by userspace (in which case,222222- * that switch is left alone).217217+ * that switch is left alone) or suspended.223218 */224219void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state)225220{···244239/**245240 * rfkill_epo - emergency power off all transmitters246241 *247247- * This kicks all rfkill devices to RFKILL_STATE_SOFT_BLOCKED, ignoring248248- * everything in its path but rfkill_mutex and rfkill->mutex.242242+ * This kicks all non-suspended rfkill devices to RFKILL_STATE_SOFT_BLOCKED,243243+ * ignoring everything in its path but rfkill_mutex and rfkill->mutex.249244 */250245void rfkill_epo(void)251246{···463458 if (dev->power.power_state.event != PM_EVENT_ON) {464459 mutex_lock(&rfkill->mutex);465460461461+ dev->power.power_state.event = PM_EVENT_ON;462462+466463 /* restore radio state AND notify everybody */467464 rfkill_toggle_radio(rfkill, rfkill->state, 1);468465469466 mutex_unlock(&rfkill->mutex);470467 }471468472472- dev->power.power_state = PMSG_ON;473469 return 0;474470}475471#else
···518518}519519EXPORT_SYMBOL(qdisc_reset);520520521521-/* this is the rcu callback function to clean up a qdisc when there522522- * are no further references to it */523523-524524-static void __qdisc_destroy(struct rcu_head *head)521521+void qdisc_destroy(struct Qdisc *qdisc)525522{526526- struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu);527523 const struct Qdisc_ops *ops = qdisc->ops;528524525525+ if (qdisc->flags & TCQ_F_BUILTIN ||526526+ !atomic_dec_and_test(&qdisc->refcnt))527527+ return;528528+529529#ifdef CONFIG_NET_SCHED530530+ qdisc_list_del(qdisc);531531+530532 qdisc_put_stab(qdisc->stab);531533#endif532534 gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est);···543541 kfree_skb(qdisc->gso_skb);544542545543 kfree((char *) qdisc - qdisc->padded);546546-}547547-548548-/* Under qdisc_lock(qdisc) and BH! */549549-550550-void qdisc_destroy(struct Qdisc *qdisc)551551-{552552- if (qdisc->flags & TCQ_F_BUILTIN ||553553- !atomic_dec_and_test(&qdisc->refcnt))554554- return;555555-556556- if (qdisc->parent)557557- list_del(&qdisc->list);558558-559559- call_rcu(&qdisc->q_rcu, __qdisc_destroy);560544}561545EXPORT_SYMBOL(qdisc_destroy);562546···584596{585597 struct Qdisc *new_qdisc = dev_queue->qdisc_sleeping;586598 int *need_watchdog_p = _need_watchdog;599599+600600+ if (!(new_qdisc->flags & TCQ_F_BUILTIN))601601+ clear_bit(__QDISC_STATE_DEACTIVATED, &new_qdisc->state);587602588603 rcu_assign_pointer(dev_queue->qdisc, new_qdisc);589604 if (need_watchdog_p && new_qdisc != &noqueue_qdisc)···631640 if (qdisc) {632641 spin_lock_bh(qdisc_lock(qdisc));633642643643+ if (!(qdisc->flags & TCQ_F_BUILTIN))644644+ set_bit(__QDISC_STATE_DEACTIVATED, &qdisc->state);645645+634646 dev_queue->qdisc = qdisc_default;635647 qdisc_reset(qdisc);636648···641647 }642648}643649644644-static bool some_qdisc_is_busy(struct net_device *dev, int lock)650650+static bool some_qdisc_is_busy(struct net_device *dev)645651{646652 unsigned int i;647653···655661 q = dev_queue->qdisc_sleeping;656662 root_lock = qdisc_lock(q);657663658658- if (lock)659659- spin_lock_bh(root_lock);664664+ spin_lock_bh(root_lock);660665661666 val = (test_bit(__QDISC_STATE_RUNNING, &q->state) ||662667 test_bit(__QDISC_STATE_SCHED, &q->state));663668664664- if (lock)665665- spin_unlock_bh(root_lock);669669+ spin_unlock_bh(root_lock);666670667671 if (val)668672 return true;···670678671679void dev_deactivate(struct net_device *dev)672680{673673- bool running;674674-675681 netdev_for_each_tx_queue(dev, dev_deactivate_queue, &noop_qdisc);676682 dev_deactivate_queue(dev, &dev->rx_queue, &noop_qdisc);677683···679689 synchronize_rcu();680690681691 /* Wait for outstanding qdisc_run calls. */682682- do {683683- while (some_qdisc_is_busy(dev, 0))684684- yield();685685-686686- /*687687- * Double-check inside queue lock to ensure that all effects688688- * of the queue run are visible when we return.689689- */690690- running = some_qdisc_is_busy(dev, 1);691691-692692- /*693693- * The running flag should never be set at this point because694694- * we've already set dev->qdisc to noop_qdisc *inside* the same695695- * pair of spin locks. That is, if any qdisc_run starts after696696- * our initial test it should see the noop_qdisc and then697697- * clear the RUNNING bit before dropping the queue lock. So698698- * if it is set here then we've found a bug.699699- */700700- } while (WARN_ON_ONCE(running));692692+ while (some_qdisc_is_busy(dev))693693+ yield();701694}702695703696static void dev_init_scheduler_queue(struct net_device *dev,···709736 struct Qdisc *qdisc_default = _qdisc_default;710737711738 if (qdisc) {712712- spinlock_t *root_lock = qdisc_lock(qdisc);713713-714739 dev_queue->qdisc = qdisc_default;715740 dev_queue->qdisc_sleeping = qdisc_default;716741717717- spin_lock_bh(root_lock);718742 qdisc_destroy(qdisc);719719- spin_unlock_bh(root_lock);720743 }721744}722745
···278278/* Defines for Nvidia HDA support */279279#define NVIDIA_HDA_TRANSREG_ADDR 0x4e280280#define NVIDIA_HDA_ENABLE_COHBITS 0x0f281281+#define NVIDIA_HDA_ISTRM_COH 0x4d282282+#define NVIDIA_HDA_OSTRM_COH 0x4c283283+#define NVIDIA_HDA_ENABLE_COHBIT 0x01281284282285/* Defines for Intel SCH HDA snoop control */283286#define INTEL_SCH_HDA_DEVC 0x78···903900 update_pci_byte(chip->pci,904901 NVIDIA_HDA_TRANSREG_ADDR,905902 0x0f, NVIDIA_HDA_ENABLE_COHBITS);903903+ update_pci_byte(chip->pci,904904+ NVIDIA_HDA_ISTRM_COH,905905+ 0x01, NVIDIA_HDA_ENABLE_COHBIT);906906+ update_pci_byte(chip->pci,907907+ NVIDIA_HDA_OSTRM_COH,908908+ 0x01, NVIDIA_HDA_ENABLE_COHBIT);906909 break;907910 case AZX_DRIVER_SCH:908911 pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop);
+3-3
sound/pci/hda/patch_realtek.c
···952952 tmp | 0x2010);953953 break;954954 case 0x10ec0888:955955- alc888_coef_init(codec);955955+ /*alc888_coef_init(codec);*/ /* called in alc_init() */956956 break;957957 case 0x10ec0267:958958 case 0x10ec0268:···24392439 unsigned int i;2440244024412441 alc_fix_pll(codec);24422442+ if (codec->vendor_id == 0x10ec0888)24432443+ alc888_coef_init(codec);2442244424432445 for (i = 0; i < spec->num_init_verbs; i++)24442446 snd_hda_sequence_write(codec, spec->init_verbs[i]);···84288426 codec->patch_ops = alc_patch_ops;84298427 if (board_config == ALC883_AUTO)84308428 spec->init_hook = alc883_auto_init;84318431- else if (codec->vendor_id == 0x10ec0888)84328432- spec->init_hook = alc888_coef_init;8433842984348430#ifdef CONFIG_SND_HDA_POWER_SAVE84358431 if (!spec->loopback.amplist)