* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: implement on-demand HPA unlocking
libata: use the enlarged capacity after late HPA unlock
SCSI: implement sd_unlock_native_capacity()
libata-sff: trivial corrections to Kconfig help text
sata_nv: don't diddle with nIEN on mcp55
sata_via: magic vt6421 fix for transmission problems w/ WD drives
Implement sd_unlock_native_capacity() method which calls into
hostt->unlock_native_capacity() if implemented. This will be invoked
by block layer if partitions extend beyond the end of the device and
can be used to implement, for example, on-demand ATA host protected
area unlocking.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Grant patches added an of mach table to struct device_driver. However,
while he changed the macio device code to use that, he left the match
table pointer in struct macio_driver and didn't update drivers to use
the "new" one, thus breaking the probing.
This completes the change by moving all drivers to setup the "new"
one, removing all traces of the old one, and while at it (since it
changes the exact same locations), I also remove two other duplicates
from struct driver which are the name and owner fields.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
[SCSI] fix race in scsi_target_reap
[SCSI] aacraid: Eliminate use after free
[SCSI] arcmsr: Support HW reset for EH and polling scheme for scsi device
[SCSI] bfa: fix system crash when reading sysfs fc_host statistics
[SCSI] iscsi_tcp: remove sk_sleep check
[SCSI] ipr: improve interrupt service routine performance
[SCSI] ipr: set the data list length in the request control block
[SCSI] ipr: fix a register read to use the correct address for 64 bit adapters
[SCSI] ipr: include the resource path in the IOA status area structure
[SCSI] ipr: implement fixes for 64 bit adapter support
[SCSI] be2iscsi: correct return value in mgmt_invalidate_icds()
st_open() suggests that llseek() doesn't work: "We really want to do
nonseekable_open(inode, filp); here, but some versions of tar incorrectly
call lseek on tapes and bail out if that fails. So we disallow pread()
and pwrite(), but permit lseeks."
Instead of using the fallback default_llseek() the driver should use
noop_llseek() which leaves the file->f_pos untouched but succeeds.
Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kai Makisara <Kai.Makisara@kolumbus.fi>
Cc: Willem Riede <osst@riede.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
__os_scsi_tape_open() suggests that llseek() doesn't work: "We really want
to do nonseekable_open(inode, filp); here, but some versions of tar
incorrectly call lseek on tapes and bail out if that fails. So we
disallow pread() and pwrite(), but permit lseeks."
Instead of using the fallback default_llseek() the driver should use
noop_llseek() which leaves the file->f_pos untouched but succeeds.
Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Willem Riede <osst@riede.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
osst_read()/osst_write() modify file->f_pos directly instead of the ppos
given to them. The VFS later updates the file->f_pos and overwrites it
with the value of ppos.
Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Willem Riede <osst@riede.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kill the obsolete HOSTS_C define and the related double inclusion of mvme147.h
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This patch (as1357) fixes a race in SCSI target allocation and
release. Putting a target in the STARGET_DEL state isn't protected by
the host lock, so an old target structure could be reused by a new
device even though it's about to be deleted. The cure is to change
the state while still holding the host lock.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
The debugging code using the freed structure is moved before the kfree.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@free@
expression E;
position p;
@@
kfree@p(E)
@@
expression free.E, subE<=free.E, E1;
position free.p;
@@
kfree@p(E)
...
(
subE = E1
|
* E
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1. To support instantaneous report for SCSI device existing by periodic
polling
2. In arcmsr_iop_xfer(), inform AP of F/W's deadlock state to prevent
endless waiting
3. To block the coming SCSI command while the driver is handling bus reset
4. To support HW reset in bus reset error handler
Signed-off-by: Nick Cheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
- C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not
USHORT_MAX/SHORT_MAX/SHORT_MIN.
- Make SHRT_MIN of type s16, not int, for consistency.
[akpm@linux-foundation.org: fix drivers/dma/timb_dma.c]
[akpm@linux-foundation.org: fix security/keys/keyring.c]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The port data structure related to fc_host statistics collection is
not initialized. This causes system crash when reading the fc_host
statistics. The fix is to initialize port structure during driver
attach.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
There is no need to call sk_sleep before calling wake_up_interruptible,
because the wait_queue_head is now with the socket.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
During performance testing on P7 machines it was observed that the interrupt
service routine was doing unnecessary MMIO operations.
This patch rearranges the logic of the routine and moves some of the code out
of the main routine. The result is that there are now fewer MMIO operations in
the performance path of the code.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
In bring up testing for the new 64 bit adapters, the first read command failed
after loading the driver. The cause was that the command requires more than
one scatter gather element and the corresponding code to set the data list
length in the request control block was missing. This patch adds the correct
assignment.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Fix ipr_reset_enable_ioa() to read the correct IOA to host interrupt register
address for 64 bit adapters. We need to read the lower 32 bits, not the upper
32 bits.
Also change the write of the 64 bit mask value to a single writeq instead
of two writel calls.
Finally, use the correct u8 type for the type field in the ipr_resource_entry
structure.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
The IOA status area now includes the new resource path field for 64 bit
adapters. This patch changes the driver to fix the ioasa structure and to use
the correct structure definition based on the type of adatper.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Implement some small fixes for 64 bit support that were preventing
the adapter from becoming operational.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This function should return 0 on error. Returning -1 would cause a
crash.
Also there is an extra space before the newline character and a missing
space between the "for" and the "mgmt_invalidate_icds". I put the string
on one line. The current version of checkpatch.pl complains that the
line is too long, but it makes grepping easier.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
uml: Pushdown the bkl from harddog_kern ioctl
sunrpc: Pushdown the bkl from sunrpc cache ioctl
sunrpc: Pushdown the bkl from ioctl
autofs4: Pushdown the bkl from ioctl
uml: Convert to unlocked_ioctls to remove implicit BKL
ncpfs: BKL ioctl pushdown
coda: Clean-up whitespace problems in pioctl.c
coda: BKL ioctl pushdown
drivers: Push down BKL into various drivers
isdn: Push down BKL into ioctl functions
scsi: Push down BKL into ioctl functions
dvb: Push down BKL into ioctl functions
smbfs: Push down BKL into ioctl function
coda/psdev: Remove BKL from ioctl function
um/mmapper: Remove BKL usage
sn_hwperf: Kill BKL usage
hfsplus: Push down BKL into ioctl function
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
of: change of_match_device to work with struct device
of: Remove duplicate fields from of_platform_driver
drivercore: Add of_match_table to the common device drivers
arch/microblaze: Move dma_mask from of_device into pdev_archdata
arch/powerpc: Move dma_mask from of_device into pdev_archdata
of: eliminate of_device->node and dev_archdata->{of,prom}_node
of: Always use 'struct device.of_node' to get device node pointer.
i2c/of: Allow device node to be passed via i2c_board_info
driver-core: Add device node pointer to struct device
of: protect contents of of_platform.h and of_device.h
of/flattree: Make unflatten_device_tree() safe to call from any arch
of/flattree: make of_fdt.h safe to unconditionally include.
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.
Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c
Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver. This patch is a removes the extra copies from struct
of_platform_driver and converts all users to the device_driver members.
This patch is a pretty mechanical change. The usage model doesn't change
and if any drivers have been missed, or if anything has been fixed up
incorrectly, then it will fail with a compile time error, and the fixup
will be trivial. This patch looks big and scary because it touches so
many files, but it should be pretty safe.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (38 commits)
net: Expose all network devices in a namespaces in sysfs
hotplug: netns aware uevent_helper
kobj: Send hotplug events in the proper namespace.
netlink: Implment netlink_broadcast_filtered
net/sysfs: Fix the bitrot in network device kobject namespace support
netns: Teach network device kobjects which namespace they are in.
kobject: Send hotplug events in all network namespaces
driver-core: fix Typo in drivers/base/core.c for CONFIG_MODULE
pci: check caps from sysfs file open to read device dependent config space
sysfs: add struct file* to bin_attr callbacks
sysfs: Remove usage of S_BIAS to avoid merge conflict with the vfs tree
sysfs: Don't use enums in inline function declaration.
sysfs-namespaces: add a high-level Documentation file
sysfs: Comment sysfs directory tagging logic
driver core: Implement ns directory support for device classes.
sysfs: Implement sysfs_delete_link
sysfs: Add support for tagged directories with untagged members.
sysfs: Implement sysfs tagged directory support.
kobj: Add basic infrastructure for dealing with namespaces.
sysfs: Remove double free sysfs_get_sb
...