aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-01-06virtio: do not statically allocate root deviceMark McLoughlin1-10/+7
We shouldn't be statically allocating the root device object, so dynamically allocate it using root_device_register() instead. Also avoids this warning from 'rmmod virtio_pci': Device 'virtio-pci' does not have a release() function, it is broken and must be fixed Signed-off-by: Mark McLoughlin <markmc@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: add root_device_register()Mark McLoughlin2-0/+102
Add support for allocating root device objects which group device objects under /sys/devices directories. Also add a sysfs 'module' symlink which points to the owner of the root device object. This symlink will be used in virtio to allow userspace to determine which virtio bus implementation a given device is associated with. [Includes suggestions from Cornelia Huck] Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core:fix duplicate removing driver link in __device_release_driverMing Lei1-1/+0
In __device_release_driver(),driver_sysfs_remove() has removed the driver link under device dir in sysfs, but sysfs_remove_link() is called again to do such thing. Remove the duplicate call to sys_remove_link(). Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Driver core: move the bus notifier call pointsAlan Stern1-11/+14
This patch (as1184) changes the location of the notifications in device_add() and device_del(). Now the BUS_NOTIFY_ADD_DEVICE message is sent after dpm_sysfs_add(), which is necessary for clients that want to add attributes to the power/ subdirectory. The BUS_NOTIFY_DEL_DEVICE message is correspondingly moved before dpm_sysfs_remove(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Make DEBUG take precedence over DYNAMIC_PRINTK_DEBUGCornelia Huck2-8/+8
Statically defined DEBUG should take precedence over dynamically enabled debugging; otherwise adding DEBUG (like, for example, via CONFIG_DEBUG_KOBJECT) does not have the expected result of printing pr_debug() and dev_dbg() messages unconditionally. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: move knode_bus into private structureGreg Kroah-Hartman3-14/+31
Nothing outside of the driver core should ever touch knode_bus, so move it out of the public eye. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: move knode_driver into private structureGreg Kroah-Hartman4-9/+22
Nothing outside of the driver core should ever touch knode_driver, so move it out of the public eye. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: move klist_children into private structureGreg Kroah-Hartman3-15/+30
Nothing outside of the driver core should ever touch klist_children, or knode_parent, so move them out of the public eye. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: create a private portion of struct deviceGreg Kroah-Hartman3-0/+23
This is to be used to move things out of struct device that no code outside of the driver core should ever touch. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06dynamic_printk: reduce one level of indentationWu Fengguang1-32/+26
Cleanup pr_debug_write() to reduce one level of indentation. Cc: Marcel Holtmann <marcel@holtmann.org> Acked-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06kobject: Make Documentation/kobject.txt a little more coherent.Rusty Russell1-2/+2
While reading Documentation/kobject.txt: Note kobject_rename does perform any locking or have a solid notion of what names are valid so the provide must provide their own sanity checking and serialization. I expect better: You never see me hard with time word making sentence coherent stuff. Ever. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06PCI: Rework default handling of suspend and resumeRafael J. Wysocki1-31/+63
Rework the handling of suspend and resume of PCI devices which have no drivers or the drivers of which do not provide any suspend-resume callbacks in such a way that their standard PCI configuration registers will be saved and restored with interrupts disabled. This should prevent such devices, including PCI bridges, from being resumed too late to be able to function correctly during the resume of the other PCI devices that may depend on them. Also, to remove one possible source of future confusion, drop the default handling of suspend and resume for PCI devices with drivers providing the 'pm' object introduced by the new suspend-resume framework (there are no such PCI drivers at the moment). This patch addresses the regression from 2.6.26 tracked as http://bugzilla.kernel.org/show_bug.cgi?id=12121 . Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06kernel/ksysfs.c:fix dependence on CONFIG_NETMing Lei1-2/+2
Access to uevent_seqnum and uevent_helper does not need to depend on CONFIG_NET, so remove it. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06kobject: return the result of uevent sending by netlinkMing Lei1-2/+4
We need to return the result of uevent sending by netlink to caller, when uevent_helper is disabled and CONFIG_NET is defined. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06uevent: don't pass envp_ext[] as format string in kobject_uevent_env()Tejun Heo1-1/+1
kobject_uevent_env() uses envp_ext[] as verbatim format string which can cause problems ranging from unexpectedly mangled string to oops if a string in envp_ext[] contains substring which can be interpreted as format. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06sysfs: clarify SYSFS_DEPRECATED help textKay Sievers1-17/+27
This should make the help text of SYSFS_DEPRECATED more clear, that this is _not_ about (what some people think it is) suppressing a few symlinks and variables, but a different sysfs _layout_ with new features. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers9-53/+45
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: Remove completion from struct klist_nodeMatthew Wilcox2-5/+40
Removing the completion from klist_node reduces its size from 64 bytes to 28 on x86-64. To maintain the semantics of klist_remove(), we add a single list of klist nodes which are pending deletion and scan them. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06driver core: Rearrange struct device for better packingMatthew Wilcox1-2/+3
This minor rearrangement saves 16 bytes from sizeof(struct device) according to pahole. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Fix misspellings in pm.h macrosAlan Stern1-6/+6
This patch (as1167) fixes some misspellings in various recently-added macros in pm.h. Fortunately these macros are not yet used anywhere. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-01-06PM: Simplify the new suspend/hibernation framework for devicesRafael J. Wysocki8-151/+119
PM: Simplify the new suspend/hibernation framework for devices Following the discussion at the Kernel Summit, simplify the new device PM framework by merging 'struct pm_ops' and 'struct pm_ext_ops' and removing pointers to 'struct pm_ext_ops' from 'struct platform_driver' and 'struct pci_driver'. After this change, the suspend/hibernation callbacks will only reside in 'struct device_driver' as well as at the bus type/ device class/device type level. Accordingly, PCI and platform device drivers are now expected to put their suspend/hibernation callbacks into the 'struct device_driver' embedded in 'struct pci_driver' or 'struct platform_driver', respectively. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@suse.cz> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06dm snapshot: extend exception store functionsJonathan Brassow6-37/+55
Supply dm_add_exception as a callback to the read_metadata function. Add a status function ready for a later patch and name the functions consistently. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm snapshot: split out exception store implementationsAlasdair G Kergon6-737/+833
Move the existing snapshot exception store implementations out into separate files. Later patches will place these behind a new interface in preparation for alternative implementations. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm snapshot: rename struct exception_storeJonathan Brassow3-24/+25
Rename struct exception_store to dm_exception_store. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm snapshot: separate out exception store interfaceJonathan Brassow4-120/+134
Pull structures that bridge the gap between snapshot and exception store out of dm-snap.h and put them in a new .h file - dm-exception-store.h. This file will define the API for new exception stores. Ultimately, dm-snap.h is unnecessary, since only dm-snap.c should be using it. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm mpath: move trigger_event to system workqueueAlasdair G Kergon1-4/+4
The same workqueue is used both for sending uevents and processing queued I/O. Deadlock has been reported in RHEL5 when sending a uevent was blocked waiting for the queued I/O to be processed. Use scheduled_work() for the asynchronous uevents instead. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm: add name and uuid to sysfsMilan Broz4-2/+136
Implement simple read-only sysfs entry for device-mapper block device. This patch adds a simple sysfs directory named "dm" under block device properties and implements - name attribute (string containing mapped device name) - uuid attribute (string containing UUID, or empty string if not set) The kobject is embedded in mapped_device struct, so no additional memory allocation is needed for initializing sysfs entry. During the processing of sysfs attribute we need to lock mapped device which is done by a new function dm_get_from_kobj, which returns the md associated with kobject and increases the usage count. Each 'show attribute' function is responsible for its own locking. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm table: rework reference countingMikulas Patocka4-20/+33
Rework table reference counting. The existing code uses a reference counter. When the last reference is dropped and the counter reaches zero, the table destructor is called. Table reference counters are acquired/released from upcalls from other kernel code (dm_any_congested, dm_merge_bvec, dm_unplug_all). If the reference counter reaches zero in one of the upcalls, the table destructor is called from almost random kernel code. This leads to various problems: * dm_any_congested being called under a spinlock, which calls the destructor, which calls some sleeping function. * the destructor attempting to take a lock that is already taken by the same process. * stale reference from some other kernel code keeps the table constructed, which keeps some devices open, even after successful return from "dmsetup remove". This can confuse lvm and prevent closing of underlying devices or reusing device minor numbers. The patch changes reference counting so that the table destructor can be called only at predetermined places. The table has always exactly one reference from either mapped_device->map or hash_cell->new_map. After this patch, this reference is not counted in table->holders. A pair of dm_create_table/dm_destroy_table functions is used for table creation/destruction. Temporary references from the other code increase table->holders. A pair of dm_table_get/dm_table_put functions is used to manipulate it. When the table is about to be destroyed, we wait for table->holders to reach 0. Then, we call the table destructor. We use active waiting with msleep(1), because the situation happens rarely (to one user in 5 years) and removing the device isn't performance-critical task: the user doesn't care if it takes one tick more or not. This way, the destructor is called only at specific points (dm_table_destroy function) and the above problems associated with lazy destruction can't happen. Finally remove the temporary protection added to dm_any_congested(). Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm: support barriers on simple devicesAndi Kleen5-10/+33
Implement barrier support for single device DM devices This patch implements barrier support in DM for the common case of dm linear just remapping a single underlying device. In this case we can safely pass the barrier through because there can be no reordering between devices. NB. Any DM device might cease to support barriers if it gets reconfigured so code must continue to allow for a possible -EOPNOTSUPP on every barrier bio submitted. - agk Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm request: extend target interfaceKiyoshi Ueda1-0/+15
This patch adds the following target interfaces for request-based dm. map_rq : for mapping a request rq_end_io : for finishing a request busy : for avoiding performance regression from bio-based dm. Target can tell dm core not to map requests now, and that may help requests in the block layer queue to be bigger by I/O merging. In bio-based dm, this behavior is done by device drivers managing the block layer queue. But in request-based dm, dm core has to do that since dm core manages the block layer queue. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm request: add cachesKiyoshi Ueda1-1/+40
This patch prepares some kmem_caches for request-based dm. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm ioctl: allow dm_copy_name_and_uuid to return only one fieldMilan Broz1-2/+4
Allow NULL buffer in dm_copy_name_and_uuid if you only want to return one of the fields. (Required by a following patch that adds these fields to sysfs.) Signed-off-by: Milan Broz <mbroz@redhat.com> Reviewed-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm log: ensure log bitmap fits on log deviceMilan Broz1-0/+8
Check that the log bitmap will fit within the log device. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm log: move region_size validationMilan Broz2-14/+14
Move log size validation from mirror target to log constructor. Removed PAGE_SIZE restriction we no longer think necessary. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm log: avoid reinitialising io_req on every operationTakahiro Yasui1-10/+7
rw_header function updates three members of io_req data every time when I/O is processed. bi_rw and notify.fn are never modified once they get initialized, and so they can be set in advance. header_to_disk() can also be pulled out of write_header() since only one caller needs it and write_header() can be replaced by rw_header() directly. Signed-off-by: Takahiro Yasui <tyasui@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm: consolidate target deregistration error handlingMikulas Patocka10-50/+20
Change dm_unregister_target to return void and use BUG() for error reporting. dm_unregister_target can only fail because of programming bug in the target driver. It can't fail because of user's behavior or disk errors. This patch changes unregister_target to return void and use BUG if someone tries to unregister non-registered target or unregister target that is in use. This patch removes code duplication (testing of error codes in all dm targets) and reports bugs in just one place, in dm_unregister_target. In some target drivers, these return codes were ignored, which could lead to a situation where bugs could be missed. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm raid1: fix error countJonathan Brassow1-3/+3
Always increase the error count when I/O on a leg of a mirror fails. The error count is used to decide whether to select an alternative mirror leg. If the target doesn't use the "handle_errors" feature, the error count is not updated and the bio can get requeued forever by the read callback. Fix it by increasing error_count before the handle_errors feature checking. Cc: stable@kernel.org Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm log: fix dm_io_client leak on error pathsTakahiro Yasui1-0/+5
In create_log_context function, dm_io_client_destroy function needs to be called, when memory allocation of disk_header, sync_bits and recovering_bits failed, but dm_io_client_destroy is not called. Cc: stable@kernel.org Signed-off-by: Takahiro Yasui <tyasui@redhat.com> Acked-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm snapshot: change yield to msleepMikulas Patocka1-3/+4
Change yield() to msleep(1). If the thread had realtime priority, yield() doesn't really yield, so the yielding process would loop indefinitely and cause machine lockup. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-06dm table: drop reference at unbindMikulas Patocka1-1/+1
Move one dm_table_put() so that the last reference in the thread gets dropped in __unbind(). This is required for a following patch, dm-table-rework-reference-counting.patch, which will change the logic in such a way that table destructor is called only at specific points in the code. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2009-01-05igb: fix anoying type mismatch warning on rx/tx queue sizingLinus Torvalds1-2/+2
When using "min()", the types of both sides should match. With the cpu mask changes, the type of num_online_cpus() will now depend on config options. Use "min_t()" with an explicit type instead. And make the rx/tx case look the same too, just for sanity. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-05mm lockless pagecache barrier fixNick Piggin1-1/+1
An XFS workload showed up a bug in the lockless pagecache patch. Basically it would go into an "infinite" loop, although it would sometimes be able to break out of the loop! The reason is a missing compiler barrier in the "increment reference count unless it was zero" case of the lockless pagecache protocol in the gang lookup functions. This would cause the compiler to use a cached value of struct page pointer to retry the operation with, rather than reload it. So the page might have been removed from pagecache and freed (refcount==0) but the lookup would not correctly notice the page is no longer in pagecache, and keep attempting to increment the refcount and failing, until the page gets reallocated for something else. This isn't a data corruption because the condition will be detected if the page has been reallocated. However it can result in a lockup. Linus points out that ACCESS_ONCE is also required in that pointer load, even if it's absence is not causing a bug on our particular build. The most general way to solve this is just to put an rcu_dereference in radix_tree_deref_slot. Assembly of find_get_pages, before: .L220: movq (%rbx), %rax #* ivtmp.1162, tmp82 movq (%rax), %rdi #, prephitmp.1149 .L218: testb $1, %dil #, prephitmp.1149 jne .L217 #, testq %rdi, %rdi # prephitmp.1149 je .L203 #, cmpq $-1, %rdi #, prephitmp.1149 je .L217 #, movl 8(%rdi), %esi # <variable>._count.counter, c testl %esi, %esi # c je .L218 #, after: .L212: movq (%rbx), %rax #* ivtmp.1109, tmp81 movq (%rax), %rdi #, ret testb $1, %dil #, ret jne .L211 #, testq %rdi, %rdi # ret je .L197 #, cmpq $-1, %rdi #, ret je .L211 #, movl 8(%rdi), %esi # <variable>._count.counter, c testl %esi, %esi # c je .L212 #, (notice the obvious infinite loop in the first example, if page->count remains 0) Signed-off-by: Nick Piggin <npiggin@suse.de> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-05i2o: Update my addressAlan Cox4-4/+4
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-05qlge: Fix sparse warnings for tx ring indexes.Ron Mercer1-10/+10
Warnings: drivers/net/qlge/qlge_main.c:1474:34: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1475:36: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1592:51: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1941:20: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:1941:20: expected restricted unsigned int [usertype] tid drivers/net/qlge/qlge_main.c:1941:20: got int [signed] index drivers/net/qlge/qlge_main.c:1945:24: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:1945:24: expected restricted unsigned int [usertype] txq_idx drivers/net/qlge/qlge_main.c:1945:24: got unsigned int [unsigned] [usertype] tx_ring_idx Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05qlge: Fix sparse warning regarding rx buffer queues.Ron Mercer2-51/+15
Warnings: drivers/net/qlge/qlge_main.c:909:17: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:909:17: expected unsigned int [unsigned] [usertype] addr_lo drivers/net/qlge/qlge_main.c:909:17: got restricted unsigned int [usertype] <noident> drivers/net/qlge/qlge_main.c:911:17: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:911:17: expected unsigned int [unsigned] [usertype] addr_hi drivers/net/qlge/qlge_main.c:911:17: got restricted unsigned int [usertype] <noident> drivers/net/qlge/qlge_main.c:974:17: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:974:17: expected unsigned int [unsigned] [usertype] addr_lo drivers/net/qlge/qlge_main.c:974:17: got restricted unsigned int [usertype] <noident> drivers/net/qlge/qlge_main.c:975:17: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:975:17: expected unsigned int [unsigned] [usertype] addr_hi drivers/net/qlge/qlge_main.c:975:17: got restricted unsigned int [usertype] <noident> drivers/net/qlge/qlge_main.c:2132:16: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:2132:16: expected unsigned int [unsigned] [usertype] addr_lo drivers/net/qlge/qlge_main.c:2132:16: got restricted unsigned int [usertype] <noident> drivers/net/qlge/qlge_main.c:2133:16: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:2133:16: expected unsigned int [unsigned] [usertype] addr_hi drivers/net/qlge/qlge_main.c:2133:16: got restricted unsigned int [usertype] <noident> drivers/net/qlge/qlge_main.c:2212:15: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:2212:15: expected unsigned int [unsigned] [usertype] addr_lo drivers/net/qlge/qlge_main.c:2212:15: got restricted unsigned int [usertype] <noident> drivers/net/qlge/qlge_main.c:2214:15: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:2214:15: expected unsigned int [unsigned] [usertype] addr_hi drivers/net/qlge/qlge_main.c:2214:15: got restricted unsigned int [usertype] <noident> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05qlge: Fix sparse endian warning in ql_hw_csum_setup().Ron Mercer1-1/+1
Changed u16 to __sum16 usage. Warnings: drivers/net/qlge/qlge_main.c:1897:9: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:1897:9: expected unsigned short [usertype] *check drivers/net/qlge/qlge_main.c:1897:9: got restricted unsigned short *<noident> drivers/net/qlge/qlge_main.c:1903:9: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:1903:9: expected unsigned short [usertype] *check drivers/net/qlge/qlge_main.c:1903:9: got restricted unsigned short *<noident> drivers/net/qlge/qlge_main.c:1909:9: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_main.c:1909:9: expected unsigned short [unsigned] [short] [usertype] <noident> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05qlge: Fix sparse endian warning for inbound packet control block flags.Ron Mercer2-12/+10
Changed flags element from __le32 to 3 reserved bytes and one byte of flags. Changed flags bit definitions to reflect byte width instead of __le32 width. Warnings: drivers/net/qlge/qlge_main.c:1206:16: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1207:16: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1233:17: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1276:17: warning: restricted degrades to integer drivers/net/qlge/qlge_main.c:1349:19: warning: restricted degrades to integer Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05qlge: Fix sparse warnings for byte swapping in qlge_ethool.cRon Mercer1-4/+4
drivers/net/qlge/qlge_ethtool.c:59:23: warning: cast to restricted type drivers/net/qlge/qlge_ethtool.c:59:21: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_ethtool.c:59:21: expected restricted unsigned short [usertype] irq_delay drivers/net/qlge/qlge_ethtool.c:59:21: got unsigned short [unsigned] [usertype] <noident> drivers/net/qlge/qlge_ethtool.c:61:8: warning: cast to restricted type drivers/net/qlge/qlge_ethtool.c:60:21: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_ethtool.c:60:21: expected restricted unsigned short [usertype] pkt_delay drivers/net/qlge/qlge_ethtool.c:60:21: got unsigned short [unsigned] [usertype] <noident> drivers/net/qlge/qlge_ethtool.c:82:23: warning: cast to restricted type drivers/net/qlge/qlge_ethtool.c:82:21: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_ethtool.c:82:21: expected restricted unsigned short [usertype] irq_delay drivers/net/qlge/qlge_ethtool.c:82:21: got unsigned short [unsigned] [usertype] <noident> drivers/net/qlge/qlge_ethtool.c:84:8: warning: cast to restricted type drivers/net/qlge/qlge_ethtool.c:83:21: warning: incorrect type in assignment (different base types) drivers/net/qlge/qlge_ethtool.c:83:21: expected restricted unsigned short [usertype] pkt_delay drivers/net/qlge/qlge_ethtool.c:83:21: got unsigned short [unsigned] [usertype] <noident> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05myri10ge: print MAC and serial number on probe failureBrice Goglin1-1/+5
To help board identification and diagnosis, print the MAC and serial number on probe failure if they are available. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05pkt_sched: cls_u32: Fix locking in u32_change()Jarek Poplawski1-1/+2
New nodes are inserted in u32_change() under rtnl_lock() with wmb(), so without tcf_tree_lock() like in other classifiers (e.g. cls_fw). This isn't enough without rmb() on the read side, but on the other hand adding such barriers doesn't give any savings, so the lock is added instead. Reported-by: m0sia <m0sia@plotinka.ru> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>