aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn
AgeCommit message (Collapse)Author
2008-12-03drivers/isdn/mISDN: use ARRAY_SIZEJulia Lawall
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type or the size of its first element. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @i@ @@ #include <linux/kernel.h> @depends on i using "paren.iso"@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03isdn: Kill directly reference of netdev->privWang Chen
Simply use netdev_priv() to replace netdev->priv. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03hysdn: Kill directly reference of netdev->privWang Chen
Usually, netdev->priv should point to the memory of private data which is allocated in alloc_netdev(). netdev_priv() is used to get the address of the private data. Change the netdev->priv pointer to another memory is wrong. Use netdev->ml_priv for this case. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-02Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ixgbe/ixgbe_main.c drivers/net/smc91x.c
2008-11-30tricky one: hisax sectionsAl Viro
a) hisax_init_pcmcia() needs to be defined only if we have CONFIG_HOTPLUG (no PCMCIA support otherwise) and can be declared __devinit. b) HiSax_inithardware() can go __init c) hisax_register() is passing to checkcard() full-blown hisax_cs_setup_card(): checkcard(i, id, NULL, hisax_d_if->owner, hisax_cs_setup_card); The problem with it is that * hisax_cs_setup_card() is __devinit * hisax_register() is not * hisax_cs_setup_card() is a switch from hell, calling a lot of setup_some_weirdcard() depending on card->typ. _These_ are also __devinit. However, in hisax_register() we have card->typ equal to ISDN_CTYPE_DYNAMIC, which reduces hisax_cs_setup_card() to "nevermind all that crap, just do nothing and return 2". So we add a trimmed-down callback doing just that and passed to checkcard() by hisax_register(). _This_ is non-init (we can stand the impact on .text size). Voila - no section warnings from drivers/isdn Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-29gigaset: get rid of info() and warn() macrosTilman Schmidt
Join the move away from the obsolete info() macro, opencoding the remaining uses. While we're at it, also get rid of the warn() macro by promoting the three remaining uses to err(). Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-29gigaset: remove unnecessary poll methodTilman Schmidt
The N_GIGASET_M101 line discipline implemented by the ser_gigaset driver does not transfer any data from/to userspace through the tty interface. Therefore a poll method is not needed. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20isdn: isdn_net.c annotate struct ip_ports and trivial sparse fixesHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
2008-11-16isdn: remove extra byteswap in isdn_net_ciscohdlck_slarp_send_replyHarvey Harrison
commit a144ea4b7a13087081ab5402fa9ad0bcfd249e67 [IPV4]: annotate struct in_ifaddr Missed this extra byteswap as the isdn inlines hide the htonl inside put_u32 which causes an extra byteswap on little-endian arches. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-13isdn: use %pI4, remove get_{u8/u16/u32} and put_{u8/u16/u32} inlinesHarvey Harrison
They would have been better named as get_be16, put_be16, etc. as they were hiding an endian shift inside. They don't add much over explicitly coding the byteshifting and gcc sometimes has a problem with builtin_constant_p inside inline functions, so it may do a better job of byteswapping at compile time rather than runtime. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29net: easy removals of HIPQUAD using %pI4 formatHarvey Harrison
As a bonus, removes some unnecessary byteswapping. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-16device create: misc: convert device_create_drvdata to device_createGreg Kroah-Hartman
Now that device_create() has been audited, rename things back to the original call to be sane. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-14Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: qlge: Fix page size ifdef test. net: Rationalise email address: Network Specific Parts dsa: fix compile bug on s390 netns: mib6 section fixlet enic: Fix Kconfig headline description de2104x: wrong MAC address fix s390: claw compile fixlet net: export genphy_restart_aneg cxgb3: extend copyrights to 2008 cxgb3: update driver version net/phy: add missing kernel-doc pktgen: fix skb leak in case of failure mISDN/dsp_cmx.c: fix size checks misdn: use nonseekable_open() net: fix driver build errors due to missing net/ip6_checksum.h include
2008-10-13mISDN/dsp_cmx.c: fix size checksAdrian Bunk
The checks for ensuring that the array indices are inside the range were flipped. Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13misdn: use nonseekable_open()Andrew Morton
The driver just sets ->llseek to NULL. It should also clear FMODE_LSEEK to tell the VFS that seeks are not supported. Pointed out by Christoph Hellwig. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (49 commits) pcmcia: ioctl-internal definitions pcmcia: cistpl header cleanup pcmcia: remove unused argument to pcmcia_parse_tuple() pcmcia: card services header cleanup pcmcia: device_id header cleanup pcmcia: encapsulate ioaddr_t pcmcia: cleanup device driver header file pcmcia: cleanup socket services header file pcmcia: merge ds_internal.h into cs_internal.h pcmcia: cleanup cs_internal.h pcmcia: cs_internal.h is internal pcmcia: use dev_printk for cs_error() pcmcia: remove CS_ error codes alltogether pcmcia: deprecate CS_BAD_TUPLE pcmcia: deprecate CS_BAD_ARGS pcmcia: deprecate CS_BAD_BASE, CS_BAD_IRQ, CS_BAD_OFFSET and CS_BAD_SIZE pcmcia: deprecate CS_BAD_ATTRIBUTE, CS_BAD_TYPE and CS_BAD_PAGE pcmcia: deprecate CS_NO_MORE_ITEMS pcmcia: deprecate CS_IN_USE pcmcia: deprecate CS_CONFIGURATION_LOCKED ... Fix trivial conflict in drivers/pcmcia/ds.c manually
2008-10-13tty: fix up gigaset a bitAlan Cox
Stephen's fixes reminded me that gigaset is still rather broken so fix it up a bit Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13tty: Fallout from tty-move-canon-specialsStephen Rothwell
Today's linux-next build (x86_64 allmodconfig) failed like this: /drivers/char/tty_ioctl.c: In function 'change_termios': drivers/isdn/capi/capi.c:1234: error: implicit declaration of function 'n_tty_ioctl' drivers/isdn/gigaset/ser-gigaset.c: In function 'gigaset_tty_ioctl': drivers/isdn/gigaset/ser-gigaset.c:648: error: implicit declaration of function 'n_tty_ioctl' Introduced by commit 686b5e4aea05a80e370dc931b7f4a8d03c80da54 ("tty-move-canon-specials"). I added the following patch (which may not be correct). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-09-22mISDN: misc timerdev fixesAndi Kleen
- Remove noop VFS stubs. The VFS does that on a NULL pointer anyways. - Fix timer handler prototype to be correct - Comment ugly SMP race I didn't fix. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22mISDN: annotate iomem pointer and add staticsHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22mISDN: endian annotations for struct ztHarvey Harrison
Found two possible bugs where the z1 value was used directly without byteswapping. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22drivers/isdn/capi/kcapi.c: Adjust error handling code involving capi_ctr_putJulia Lawall
After calling capi_ctr_get, error handling code should call capi_ctr_put. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r@ expression x,E; statement S; position p1,p2,p3; @@ ( if ((x = capi_ctr_get@p1(...)) == NULL || ...) S | x = capi_ctr_get@p1(...) ... when != x if (x == NULL || ...) S ) <... if@p3 (...) { ... when != capi_ctr_put(x) when != if (x) { ... capi_ctr_put(x); ...} return@p2 ...; } ...> ( return x; | return 0; | x = E | E = x | capi_ctr_put(x) ) @exists@ position r.p1,r.p2,r.p3; expression x; int ret != 0; statement S; @@ * x = capi_ctr_get@p1(...) <... * if@p3 (...) S ...> * return@p2 \(NULL\|ret\); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-22isdn: isdn_ppp: Use SKB list facilities instead of home-grown implementation.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-23pcmcia: deprecate CS_SUCCESSDominik Brodowski
Instead of using own error or success codes, the PCMCIA code should rely on the generic return values. Therefore, replace all occurrences of CS_SUCCESS with 0. CC: netdev@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: pcmcia_config_loop() improvement by passing vccDominik Brodowski
By passing the current Vcc setting to the pcmcia_config_loop callback function, we can remove pcmcia_get_configuration_info() calls from many drivers. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: pcmcia_config_loop() default CIS entry handlingDominik Brodowski
Many drivers use the default CIS entry within their pcmcia_config_loop() callback function. Therefore, factor the default CIS entry handling out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: pcmcia_config_loop() ConfigIndex unificationDominik Brodowski
Almost all drivers set p_dev->conf.ConfigIndex to cfg->index in the pcmcia_config_loop() callback function. Therefore, factor it out. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-23pcmcia: use pcmcia_loop_config in ISDN pcmcia driversDominik Brodowski
Use the config loop helper in ISDN pcmcia drivers. CC: Karsten Keil <kkeil@suse.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2008-08-02Add DIP switch readout for HFC-4S IOB4STKarsten Keil
Also the HFC-4S IOB4ST has DIP switches and jumpers to configure the port. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-08-02Fix remaining big endian issue of hfcmultiKarsten Keil
The driver was not so bad at big endian at all, only the optimised fifo read/write functions need a fix, with this fix the driver works on a pegasus PPC machine. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-08-02mISDN cleanup user interfaceKarsten Keil
The channelmap should have the same size on 32 and 64 bit systems and should not depend on endianess. Thanks to David Woodhouse for spotting this. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-08-02mISDN fix main ISDN MakefileKarsten Keil
Compile hardware directory independent from selecting CAPI support. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-30hysdn: remove the packed attribute from PofTimStamp_tagDavid Howells
Remove the packed attribute from PofTimStamp_tag in the hysdn driver as the thing being packed is just an array of chars and so is unpackable. This deals with a compiler warning: In file included from drivers/isdn/hysdn/hysdn_boot.c:19: drivers/isdn/hysdn/hysdn_pof.h:63: warning: 'packed' attribute ignored for field of type 'unsigned char[40]' Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-30isdn: use the common ascii hex helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-28Remove deprecated virt_to_bus()Karsten Keil
Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6.git master This was a forgotten item in a printk from the old driver, the DMA allocation use already the new interface. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/ISDN-2.6: Fix namespace issue with Hisax
2008-07-27isdn: mISDN HFC PCI support depends on virt_to_bus()Stephen Rothwell
On powerpc (allyesconfig build) we get this error: drivers/isdn/hardware/mISDN/hfcpci.c:1991: error: implicit declaration of function 'virt_to_bus' Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-27Fix namespace issue with HisaxKarsten Keil
you can pull this git://git./linux/kernel/git/kkeil/ISDN-2.6 master rename release_tei() to TEIrelease() because release_tei() was already exported bei the old HiSax driver. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27Add layer1 over IP supportKarsten Keil
Implement a ISDN over IP tunnel to use mISDN hardware on remote locations. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27Add mISDN HFC multiport driverKarsten Keil
Enable support for cards with Cologne Chip AG's HFC multiport chip. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27Add mISDN HFC PCI driverKarsten Keil
Enable support for card with Cologne Chip AG's HFC PCIbased cards Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27Add mISDN DSPKarsten Keil
Enable support for digital audio processing capability. This module may be used for special applications that require cross connecting of bchannels, conferencing, dtmf decoding echo cancelation, tone generation, and Blowfish encryption and decryption. It may use hardware features if available. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27Add mISDN core filesKarsten Keil
Add mISDN core files Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-27Add mISDN driverKarsten Keil
mISDN is a new modular ISDN driver, in the long term it should replace the old I4L driver architecture for passiv ISDN cards. Signed-off-by: Karsten Keil <kkeil@suse.de>
2008-07-26pnp: fix the fcpnp_driver declaration to only exist if CONFIG_PNP=yDavid Howells
Fix the fcpnp_driver declaration to only exist if CONFIG_PNP=y as it's only accessed in that case. The PNP=n variant was added by 30d55e71a81b1f5a8136f191dc9f4c21f18e77e6 ("hisax: depend on CONFIG_PNP, not __ISAPNP__") Fixes an unused variable warning. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25Rename WARN() to WARNING() to clear the namespaceArjan van de Ven
We want to use WARN() as a variant of WARN_ON(), however a few drivers are using WARN() internally. This patch renames these to WARNING() to avoid the namespace clash. A few cases were defining but not using the thing, for those cases I just deleted the definition. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Greg KH <greg@kroah.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24gigaset: gigaset_isowbuf_getbytes() may return signed unnoticedTilman Schmidt
ifd->offset is unsigned. gigaset_isowbuf_getbytes() may return signed unnoticed. Revised version of patch originally submitted by Roel Kluin <12o3l@tiscali.nl>. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24gigaset: use dev_ macros for messagesTilman Schmidt
The info() / warn() / err() macros from usb.h for generating kernel messages are considered inferior to dev_info() / dev_warn() / dev_err() from device.h. Replace them where possible. Also correct the severity level and improve the text of one message. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits) arm: bus_id -> dev_name() and dev_set_name() conversions sparc64: fix up bus_id changes in sparc core code 3c59x: handle pci_name() being const MTD: handle pci_name() being const HP iLO driver sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute sysdev: Add utility functions for simple int/ulong variable sysdev attributes sysdev: Pass the attribute to the low level sysdev show/store function driver core: Suppress sysfs warnings for device_rename(). kobject: Transmit return value of call_usermodehelper() to caller sysfs-rules.txt: reword API stability statement debugfs: Implement debugfs_remove_recursive() HOWTO: change email addresses of James in HOWTO always enable FW_LOADER unless EMBEDDED=y uio-howto.tmpl: use unique output names uio-howto.tmpl: use standard copyright/legal markings sysfs: don't call notify_change sysdev: fix debugging statements in registration code. kobject: should use kobject_put() in kset-example kobject: reorder kobject to save space on 64 bit builds ...