summaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)Author
2011-01-14Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6: [SCSI] target: Add LIO target core v4.0.0-rc6 [SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE event [SCSI] sd: implement sd_check_events()
2011-01-14Merge branch 'linux-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI/PM: Report wakeup events before resuming devices PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events PCI: sysfs: Update ROM to include default owner write access x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available PCI/ACPI: Request _OSC control once for each root bridge (v3) PCI: enable pci=bfsort by default on future Dell systems PCI/PCIe: Clear Root PME Status bits early during system resume PCI: pci-stub: ignore zero-length id parameters x86/PCI: irq and pci_ids patch for Intel Patsburg PCI: Skip id checking if no id is passed PCI: fix __pci_device_probe kernel-doc warning PCI: make pci_restore_state return void PCI: Disable ASPM if BIOS asks us to PCI: Add mask bit definition for MSI-X table PCI: MSI: Move MSI-X entry definition to pci_regs.h Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the meantime been converted to not use legacy PCI power management, and thus no longer use pci_restore_state() at all (and that caused trivial conflicts with the "make pci_restore_state return void" patch)
2011-01-14[SCSI] sd,sr: kill compat SDEV_MEDIA_CHANGE eventTejun Heo
SDEV_MEDIA_CHANGE event was first added by commit a341cd0f (SCSI: add asynchronous event notification API) for SATA AN support and then extended to cover generic media change events by commit 285e9670 ([SCSI] sr,sd: send media state change modification events). This event was mapped to block device in userland with all properties stripped to simulate CHANGE event on the block device, which, in turn, was used to trigger further userspace action on media change. The recent addition of disk event framework kept this event for backward compatibility but it turns out to be unnecessary and causes erratic and inefficient behavior. The new disk event generates proper events on the block devices and the compat events are mapped to block device with all properties stripped, so the block device ends up generating multiple duplicate events for single actual event. This patch removes the compat event generation from both sr and sd as suggested by Kay Sievers. Both existing and newer versions of udev and the associated tools will behave better with the removal of these events as they from the beginning were expecting events on the block devices. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-01-14[SCSI] sd: implement sd_check_events()Tejun Heo
Replace sd_media_change() with sd_check_events(). * Move media removed logic into set_media_not_present() and media_not_present() and set sdev->changed iff an existing media is removed or the device indicates UNIT_ATTENTION. * Make sd_check_events() sets sdev->changed if previously missing media becomes present. * Event is reported only if sdev->changed is set. This makes media presence event reported if scsi_disk->media_present actually changed or the device indicated UNIT_ATTENTION. For backward compatibility, SDEV_EVT_MEDIA_CHANGE is generated each time sd_check_events() detects media change event. [jejb: fix boot failure] Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Jens Axboe <jaxboe@fusionio.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-01-13Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds
* 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits) block: ensure that completion error gets properly traced blktrace: add missing probe argument to block_bio_complete block cfq: don't use atomic_t for cfq_group block cfq: don't use atomic_t for cfq_queue block: trace event block fix unassigned field block: add internal hd part table references block: fix accounting bug on cross partition merges kref: add kref_test_and_get bio-integrity: mark kintegrityd_wq highpri and CPU intensive block: make kblockd_workqueue smarter Revert "sd: implement sd_check_events()" block: Clean up exit_io_context() source code. Fix compile warnings due to missing removal of a 'ret' variable fs/block: type signature of major_to_index(int) to major_to_index(unsigned) block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p) cfq-iosched: don't check cfqg in choose_service_tree() fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors cdrom: export cdrom_check_events() sd: implement sd_check_events() sr: implement sr_check_events() ...
2011-01-13Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
2011-01-10Merge branch 'upstream-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: pata_platform: Remove CONFIG_HAVE_PATA_PLATFORM's dependencies. pata_hpt37x: actually limit HPT370 to UltraDMA/66 pata_hpt3x2n: coding style cleanup pata_hpt37x: coding style cleanup pata_hpt366: coding style cleanup pata_hpt3x2n: calculate average f_CNT pata_hpt3x2n: clarify about HPT371N support pata_hpt{37x|3x2n}: SATA mode filtering [libata] avoid needlessly passing around ptr to SCSI completion func [libata] new driver acard_ahci, for ATP8620 host controller
2011-01-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (147 commits) [SCSI] arcmsr: fix write to device check [SCSI] lpfc: lower stack use in lpfc_fc_frame_check [SCSI] eliminate an unnecessary local variable from scsi_remove_target() [SCSI] libiscsi: use bh locking instead of irq with session lock [SCSI] libiscsi: do not take host lock in queuecommand [SCSI] be2iscsi: fix null ptr when accessing task hdr [SCSI] be2iscsi: fix gfp use in alloc_pdu [SCSI] libiscsi: add more informative failure message during iscsi scsi eh [SCSI] gdth: Add missing call to gdth_ioctl_free [SCSI] bfa: remove unused defintions and misc cleanups [SCSI] bfa: remove inactive functions [SCSI] bfa: replace bfa_assert with WARN_ON [SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list. [SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout. [SCSI] qla2xxx: Remove code to not reset ISP82xx on failure. [SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts. [SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command fails on CNAs. [SCSI] qla2xxx: Remove redundant module parameter permission bits [SCSI] qla2xxx: Add sysfs node for displaying board temperature. [SCSI] qla2xxx: Code cleanup to remove unwanted comments and code. ...
2011-01-05[libata] avoid needlessly passing around ptr to SCSI completion funcJeff Garzik
It's stored in struct scsi_cmnd->scsi_done, making several 'done' parameters to functions redundant. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-01-03[SCSI] arcmsr: fix write to device checkroel kluin
Use command->sc_data_direction instead of trying (incorrectly) to figure it out from the command itself [jejb: fix up compile failure] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: NickCheng <nick.cheng@areca.com.tw> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-01-03[SCSI] lpfc: lower stack use in lpfc_fc_frame_checkTomas Henzl
according to checkstack the lpfc_fc_frame_check occupies the first place in stack usage: make checkstack objdump -d vmlinux $(find . -name '*.ko') | \ perl /root/rpmbuild/BUILD/kernel-2.6.32/linux-2.6.32.x86_64/scripts/checkstack.pl x86_64 0x000013f4 lpfc_fc_frame_check [lpfc]: 1936 ... This change makes the rctl_names static, thus not on stack. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-01-03[SCSI] eliminate an unnecessary local variable from scsi_remove_target()Alan Stern
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-01-03drivers: fix comment typo diable -> disable.Justin P. Mattock
The below patch fixes a typo "diable" to "disable" and also fixes another typo in a comment. Please let me know if this is correct or not. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-12-31[SCSI] libiscsi: use bh locking instead of irq with session lockMike Christie
The session lock is taken in threads, timers, and bottom halves like softirqs and tasklets. All the code but iscsi_conn/session_failure take the session lock with the spin_lock_bh call. This was done because I thought some offload drivers would be calling these functions from a irq. They never did, so this patch has iscsi_conn/session_failure use the bh locking. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] libiscsi: do not take host lock in queuecommandMike Christie
iscsi_tcp, ib_iser, cxgb*, be2iscsi and bnx2i do not use the host lock and do not take the session lock against a irq, so this patch drops the DEF_SCSI_QCMD use. Instead we just take the session lock and disable bhs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] be2iscsi: fix null ptr when accessing task hdrMike Christie
If alloc_pdu fails then the task->hdr pointer may not be set. This adds a check for this case in the cleanup callback. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] be2iscsi: fix gfp use in alloc_pduMike Christie
The pdu allication callout is called from a spin lock and in the IO path so we cannot use GFP_KERNEL. This has the driver use GFP_ATOMIC. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] libiscsi: add more informative failure message during iscsi scsi ehMike Christie
This adds a more informative error code and message for the iscsi scsi eh session drop paths. This allows you to distinguish if the session was dropped due to a connection failure vs the iscsi layer dropping the session due to scsi eh failure processing. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] gdth: Add missing call to gdth_ioctl_freeJulia Lawall
Add missing call to gdth_ioctl_free before aborting. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression buf,ha,len,addr,E; @@ buf = gdth_ioctl_alloc(ha, len, FALSE, &addr) ... when != false buf != NULL when != true buf == NULL when != \(E = buf\|buf = E\) when != gdth_ioctl_free(ha, len, buf, addr) *return ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] bfa: remove unused defintions and misc cleanupsJing Huang
This patch removes unused functions, data strucutres, and definitions. It also includes misc comment and formatting cleanups. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] bfa: remove inactive functionsJing Huang
This patch removes some inactive functions and macros. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] bfa: replace bfa_assert with WARN_ONJing Huang
Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-26Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/ipv4/fib_frontend.c
2010-12-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] fix up documentation for change in ->queuecommand to lockless calling [SCSI] bfa: rename log_level to bfa_log_level
2010-12-23[SCSI] qla2xxx: Use sg_next to fetch next sg element while walking sg list.Giridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Fix to avoid recursive lock failure during BSG timeout.Giridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Remove code to not reset ISP82xx on failure.Giridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Display mailbox register 4 during 8012 AEN for ISP82XX parts.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Don't perform a BIG_HAMMER if Get-ID (0x20) mailbox command ↵Andrew Vasquez
fails on CNAs. The semantics we employ now in the driver, performing a BIG_HAMMER in the event of Get-ID (0x20) mailbox command failing, should only be done for FC. On FC configurations, it makes sense since advertising is only really performed once, so a BIG_HAMMER to reinitiate the process is needed to restart. Under FCoE, this is not needed, as there's a continous stream of advertisements/ACks at the protocol layer to initiate a relogin/reinitialization process. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Remove redundant module parameter permission bitsJoe Carnuccio
For driver module parameters that have permission bits set to (S_IRUGO|S_IRUSR), remove the second term since it is already included in the first term. S_IRUGO comes defined as (S_IRUSR|S_IRGRP|S_IROTH). Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Add sysfs node for displaying board temperature.Andrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Code cleanup to remove unwanted comments and code.Giridhar Malavali
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Fix for memory wedge on fw halt for ISP82XXMadhuranath Iyengar
Signed-off-by: Swapnil Nagle <swapnil.nagle@qlogic.com> Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Update FCP priority information to firmware before sending IOsMadhuranath Iyengar
The FCP priority info was not being updated properly in certain situations. Here are the changes that needs to be done to take care of this issue: 1. No need to check fcport->state for FCS_UNCONFIGURED in qla24xx_update_fcport_fcp_prio(), since an invalid loop id check is already performed which is sufficient. 2. Add the missing qla24xx_update_fcport_fcp_prio() function call within qla2x00_update_fcport() function, so that the priority info is updated on every port addition or change. 3. Perform proper adapter types checking. 4. Other changes, associated with DEBUG/printk's and parameter passing. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Fixed zero test on new_config in qla2x00_process_loopback().Joe Carnuccio
Fixed the incorrect zero test on array new_config[]. Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Populate FCP_PRIO location for no *FLT* caseAndrew Vasquez
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: list cursors are not nullDan Carpenter
This is just a cleanup. The unneeded NULL check annoys static checkers because we already derefenced it and the we check it and then (if it's not the _safe() version) we dereference it again without checking. And the static checker is all, "Wah? Is it null or not?" Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23[SCSI] qla2xxx: Added support for quiescence mode for ISP82xx.Saurav Kashyap
Support is added for quiescence mode. This feature is for P3P adapters. Any of the functions can put the firmware into quiescence state. All the others have to ack that request. During quiescence mode current commands are processed and all the new incoming I/Os are blocked. Loop resync is performed after firmware comes out of quiescence state. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-23PCI: make pci_restore_state return voidJon Mason
pci_restore_state only ever returns 0, thus there is no benefit in having it return any value. Also, a large majority of the callers do not check the return code of pci_restore_state. Make the pci_restore_state a void return and avoid the overhead. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-12-23cnic: Improve ->iscsi_nl_msg_send()Michael Chan
1. Change first parameter from cnic_dev to ulp_handle which is the hba pointer. All other similar upcalls are using hba pointer. The callee can then directly reference the hba without conversion. 2. Change return value from void to int so that an error code can be passed back. This allows the operation to be retried. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-22[SCSI] megaraid_sas: Add 9565/9285 specific codeadam radford
This patch adds MegaRAID 9265/9285 (Device id 0x5b) specific code Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22[SCSI] megaraid_sas: Add struct megasas_instance_template changesadam radford
The following patch adds struct megasas_instance_template changes to the megaraid_sas driver, and changes all code to use the new instance entries: irqreturn_t (*service_isr )(int irq, void *devp); void (*tasklet)(unsigned long); u32 (*init_adapter)(struct megasas_instance *); u32 (*build_and_issue_cmd) (struct megasas_instance *, struct scsi_cmnd *); void (*issue_dcmd) (struct megasas_instance *instance, struct megasas_cmd *cmd); Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22[SCSI] megaraid_sas: Use lowest memory bar for SR-IOV VF supportadam radford
The following patch modifies the megaraid_sas driver to select the lowest memory bar available so the driver will work in SR-IOV VF environments where the memory bar mapping changes. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22[SCSI] megaraid_sas: Add MSI-X support and msix_disable module parameteradam radford
This patch adds MSI-X support and 'msix_disable' module parameter to the megaraid_sas driver. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22[SCSI] st: Increase success probability in driver buffer allocationFUJITA Tomonori
Modify allocation to try the minimum possible page order allowed by the HBA scatter/gather segment limit in allocation of the driver's internal buffer. This increases the probability of successful allocation. The allocation may still fail if this minimum order is > 0. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi> Reported-by: Lukas Kolbe <lkolbe@techfak.uni-bielefeld.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22[SCSI] st: Store page order before driver buffer allocationKai Makisara
The order of the pages allocated for the driver buffer must be stored before allocation because it is used in freeing already allocated pages if allocation fails. Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi> Reported-by: Lukas Kolbe <lkolbe@techfak.uni-bielefeld.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22[SCSI] scsi_debug: set resid to indicate no data-in when medium errorDouglas Gilbert
set resid to the requested data-in length when a MEDIUM ERROR is simulated. This implies no valid data is returned in the data-in buffer Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22[SCSI] fix medium error problems with some arrays which can cause data ↵James Bottomley
corruption Our current handling of medium error assumes that data is returned up to the bad sector. This assumption holds good for all disk devices, all DIF arrays and most ordinary arrays. However, an LSI array engine was recently discovered which reports a medium error without returning any data. This means that when we report good data up to the medium error, we've reported junk originally in the buffer as good. Worse, if the read consists of requested data plus a readahead, and the error occurs in readahead, we'll just strip off the readahead and report junk up to userspace as good data with no error. The fix for this is to have the error position computation take into account the amount of data returned by the driver using the scsi residual data. Unfortunately, not every driver fills in this data, but for those who don't, it's set to zero, which means we'll think a full set of data was transferred and the behaviour will be identical to the prior behaviour of the code (believe the buffer up to the error sector). All modern drivers seem to set the residual, so that should fix up the LSI failure/corruption case. Reported-by: Douglas Gilbert <dgilbert@interlog.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-22Merge branch 'master' into for-nextJiri Kosina
Conflicts: MAINTAINERS arch/arm/mach-omap2/pm24xx.c drivers/scsi/bfa/bfa_fcpim.c Needed to update to apply fixes for which the old branch was too outdated.
2010-12-22Revert "sd: implement sd_check_events()"Jens Axboe
This reverts commit c8d2e937355d02db3055c2fc203e5f017297ee1f. We run into merging problems with the SCSI tree, revert this one so it can be handled by a postmerge tree there. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>