aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2013-06-24[SCSI] megaraid_sas: Free event detail memory without device ID check[email protected]1-4/+3
Free event detail memory from more common place, instead of doing it for limited device types. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Adam Radford <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] megaraid_sas: Update balance count in driver to be in sync of firmware[email protected]1-2/+3
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] megaraid_sas: Fix the interrupt mask for Gen2 controller[email protected]1-1/+1
Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] megaraid_sas: Return DID_ERROR for SCSI IO, when controller is in ↵[email protected]1-0/+8
critical h/w error Do not return SCSI_MLQUEUE_HOST_BUSY, but send DID_ERROR to SCSI mid-layer, if adapter is in critical error state. "SCSI_MLQUEUE_HOST_BUSY" will keep same SCSI command in loop and it is not a right return value, if controller is hardware critical error. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Kashyap Desai <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] 3w-xxxx: Create sense buffer for unsupported commandsMartin K. Petersen1-1/+3
Make the driver return appropriate sense data when an unsupported operation is queued. This will cause the SCSI layer to stop issuing the offending command. Reported-by: Florian Westphal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Acked-by: Adam Radford <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] Workaround for disks that report bad optimal transfer lengthMartin K. Petersen2-0/+4
Not all disks fill out the VPD pages correctly. Add a blacklist flag that allows us ignore the SBC-3 VPD pages for a given device. The BLIST_SKIP_VPD_PAGES flag triggers our existing skip_vpd_pages scsi_device parameter to bypass VPD scanning. Also blacklist the offending Seagate drive model. Reported-by: Mike Snitzer <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: fix for unused variable 'event_data' warningReddy, Sreekanth1-3/+4
If CONFIG_SCSI_MPT2SAS_LOGGING is undefined, then these warnings are emitted drivers/scsi/mpt2sas/mpt2sas_scsih.c: In function '_scsih_sas_broadcast_primitive_event' drivers/scsi/mpt2sas/mpt2sas_scsih.c:5810:40: warning: unused variable 'event_data' Use pr_info() function instead of dewtprintk(). Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: Bump driver vesion to v15.100.00.00Sreekanth Reddy1-2/+2
Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: Calulate the Reply post queue depth calculation as per the ↵Sreekanth Reddy1-12/+14
MPI spec [jejb: checkpatch fixes] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: fix firmware failure with wrong task attributeSreekanth Reddy1-5/+1
When SCSI command is received with task attribute not set, set it to SIMPLE. Previously it is set to untagged. This causes the firmware to fail the commands. Signed-off-by: Sreekanth Reddy <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: Fix for device scan following host reset could get stuck in ↵Sreekanth Reddy1-5/+117
a infinite loop Modified device scan routine so each configuration page read breaks from the while loop when the ioc_status is not equal to MPI2_IOCSTATUS_SUCCESS. [jejb: checkpatch fixes] Signed-off-by: Sreekanth Reddy <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: Update the timing requirements for issuing a Hard ResetSreekanth Reddy1-7/+13
Updated the mpt2sas driver code that issues hard reset to comply with the timing requirements mentioned in MPI specifications rev V. [jejb: checpatch fixes] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: MPI2 Rev W (2.00.15) specificationSreekanth Reddy5-11/+26
Change set in MPI 2.0 Rev W(2.00.15) specification and 2.00.27 header files 1. Added a bit to the IOCExceptions field of the IOCFacts Reply to indicate that the IOC detected a partial memory failure. 2. Added ElapsedSeconds field to RAID Volume Indicator Structure. Added Elapsed Seconds Valid flag to Flags field of this structure. 3. Added ElapsedSeconds field to Integrated RAID Operations Status Event Data. 4. In the IOCSettings field of BIOS Page 1, modified the Adapter Support bits description to specify X86 BIOS. 5. Toolbox Diagnostic CLI Tool Request may now use chain elements in the SGL. Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] mpt2sas: Fix for issue Missing delay not getting set during system bootupReddy, Sreekanth3-11/+13
Missing delay is not getting set properly. The reason is that it is not defined in the same file from where it is being invoked. The fix is to move the missing delay module parameter from mpt2sas_base.c to mpt2sas_scsh.c. Signed-off-by: Sreekanth Reddy <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2013-06-24[SCSI] a3000: use module_platform_driver_probe()Jingoo Han1-12/+1
This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]>
2013-06-24[SCSI] a4000t: use module_platform_driver_probe()Jingoo Han1-14/+1
This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]>
2013-06-24net: Unmap fragment page once iterator is doneWedson Almeida Filho1-1/+0
Callers of skb_seq_read() are currently forced to call skb_abort_seq_read() even when consuming all the data because the last call to skb_seq_read (the one that returns 0 to indicate the end) fails to unmap the last fragment page. With this patch callers will be allowed to traverse the SKB data by calling skb_prepare_seq_read() once and repeatedly calling skb_seq_read() as originally intended (and documented in the original commit 677e90eda), that is, only call skb_abort_seq_read() if the sequential read is actually aborted. Signed-off-by: Wedson Almeida Filho <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-06-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds1-1/+5
Pull SCSI target fixes from Nicholas Bellinger: "Included is the recent tcm_qla2xxx residual underrun length fix from Roland, along with Joern's iscsi-target patch for session_lock breakage within iscsit_stop_time2retain_timer() code. Both are CC'ed to stable. The remaining two are specific to recent iscsi-target + iser conversion changes. One drops some left-over debug noise, and Andy's patch fixes configfs attribute handling during an explicit network portal feature bit disable when iser-target is unsupported." * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iscsi-target: Remove left over v3.10-rc debug printks target/iscsi: Fix op=disable + error handling cases in np_store_iser tcm_qla2xxx: Fix residual for underrun commands that fail target/iscsi: don't corrupt bh_count in iscsit_stop_time2retain_timer()
2013-06-20qla_target: remove qlt_check_fcport_existJörn Engel2-140/+17
Comment from original 2012 patch: In all our testing this function has never returned true. However, the dropping of hardware_lock necessary to call this function seems to cause a use-after-free we manage to hit rather frequently. Given this cost-benefit ratio, I'm willing to remove some 100 lines of code. And since the same problem exists around shutdown_sess and put_sess, this patch changes them from taking the hardware_lock to requiring the hardware_lock to be taken. In most cases the caller already had the lock and had to drop it for the called method to reacquire it. At best that hurts performance and in rare instances it causes races with fatal consequences. We dropped the original 2012 patch when upgrading our kernel and it took us nearly half a year to discover we still need it. (nab: Fix qla_tgt_sess reference in tcm_qla2xxx_put_sess) Signed-off-by: Joern Engel <[email protected]> Cc: Giridhar Malavali <[email protected]> Cc: Chad Dupuis <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2013-06-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller3-3/+3
Conflicts: drivers/net/wireless/ath/ath9k/Kconfig drivers/net/xen-netback/netback.c net/batman-adv/bat_iv_ogm.c net/wireless/nl80211.c The ath9k Kconfig conflict was a change of a Kconfig option name right next to the deletion of another option. The xen-netback conflict was overlapping changes involving the handling of the notify list in xen_netbk_rx_action(). Batman conflict resolution provided by Antonio Quartulli, basically keep everything in both conflict hunks. The nl80211 conflict is a little more involved. In 'net' we added a dynamic memory allocation to nl80211_dump_wiphy() to fix a race that Linus reported. Meanwhile in 'net-next' the handlers were converted to use pre and post doit handlers which use a flag to determine whether to hold the RTNL mutex around the operation. However, the dump handlers to not use this logic. Instead they have to explicitly do the locking. There were apparent bugs in the conversion of nl80211_dump_wiphy() in that we were not dropping the RTNL mutex in all the return paths, and it seems we very much should be doing so. So I fixed that whilst handling the overlapping changes. To simplify the initial returns, I take the RTNL mutex after we try to allocate 'tb'. Signed-off-by: David S. Miller <[email protected]>
2013-06-19[SCSI] nsp32: use mdelay instead of large udelay constantsArnd Bergmann1-1/+1
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: GOTO Masanori <[email protected]> Cc: YOKOTA Hiroshi <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: [email protected]
2013-06-18treewide: Fix typo in printkMasanari Iida2-2/+2
Correct spelling typo in printk within various drivers. Signed-off-by: Masanari Iida <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-06-17net, scsi/csgb4i: convert skb->transport_header into skb_transport_header(skb)Isaku Yamahata1-1/+1
The change set of 1a37e412, "net: Use 16bits for *_headers fields of struct skbuff" converted from sk_buff_data_t into 16bit integer. So skb->tail needs to be converted to skb_tail_pointer(skb). Found by inspection. Compile tested only. Cc: Simon Horman <[email protected]> Cc: Li RongQing <[email protected]> Cc: [email protected] Signed-off-by: Isaku Yamahata <[email protected]> Acked-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-06-16lseek(fd, n, SEEK_END) does *not* go to eof - nAl Viro3-3/+3
When you copy some code, you are supposed to read it. If nothing else, there's a chance to spot and fix an obvious bug instead of sharing it... X-Song: "I Got It From Agnes", by Tom Lehrer Signed-off-by: Al Viro <[email protected]> [ Tom Lehrer? You're dating yourself, Al ] Signed-off-by: Linus Torvalds <[email protected]>
2013-06-14tcm_qla2xxx: Fix residual for underrun commands that failRoland Dreier1-1/+5
Suppose an initiator sends a DATA IN command with an allocation length shorter than the FC transfer length -- we get a target message like TARGET_CORE[qla2xxx]: Expected Transfer Length: 256 does not match SCSI CDB Length: 0 for SAM Opcode: 0x12 In that case, the target core adjusts the data_length and sets se_cmd->residual_count for the underrun. But now suppose that command fails and we end up in tcm_qla2xxx_queue_status() -- that function unconditionally overwrites residual_count with the already adjusted data_length, and the initiator will burp with a message like qla2xxx [0000:00:06.0]-301d:0: Dropped frame(s) detected (0x100 of 0x100 bytes). Fix this by adding on to the existing underflow residual count instead. Signed-off-by: Roland Dreier <[email protected]> Cc: Giridhar Malavali <[email protected]> Cc: Chad Dupuis <[email protected]> Cc: stable <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2013-06-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2-1/+2
Merge 'net' bug fixes into 'net-next' as we have patches that will build on top of them. This merge commit includes a change from Emil Goode ([email protected]) that fixes a warning that would have been introduced by this merge. Specifically it fixes the pingv6_ops method ipv6_chk_addr() to add a "const" to the "struct net_device *dev" argument and likewise update the dummy_ipv6_chk_addr() declaration. Signed-off-by: David S. Miller <[email protected]>
2013-06-05PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus)Gu Zheng1-1/+1
Use the new pci_alloc_dev(bus) to replace the existing using of alloc_pci_dev(void). [bhelgaas: drop pci_bus ref later in pci_release_dev()] Signed-off-by: Gu Zheng <[email protected]> Signed-off-by: Jiang Liu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: David Airlie <[email protected]> Cc: Neela Syam Kolli <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Andrew Morton <[email protected]>
2013-06-04[SCSI] csiostor: Retain default adapter configuration in absence of config file.Naresh Kumar Inna5-192/+2
- Retain firmware defined configuration settings in the absence of user-provided configuration by eliminating the global RSS and the PF/VF capabilities mailbox commands. - Remove S_IRUGO from sysfs parameters that don't have 'show' functionality. Signed-off-by: Naresh Kumar Inna <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] bfa: fix for FC Direct Attach LUN discovery failureVijay Mohan Guvva1-2/+2
Resending the patch as it didn't make the linux-scsi list. This patch fixes fcs rport state machine to address ocassional Brocade FC Direct Attach LUN discovery failure due to not sending PLOGI accept to the target. Signed-off-by: Vijaya Mohan Guvva <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] bfa: fix faulty handling of events in lps smVijay Mohan Guvva1-1/+1
When a switch disable/enable or a reboot is done, the HBA port gets an offline and a subsequent online notification. When the port comes up a link up notification is sent to bfa from the firmware. The bfa then send an FLOGI to the firmware which is sent out on the wire. The switch port meanwhile goes offline (presumably for diagnostics) which causes the switch not to respond to the FLOGI. The link down notification is sent to the HBA driver. However owing to a bug in the lps state machine handling the lps state machine does not move to sm_init state (it remains in sm_login state and send a login complete message to fcs). This results in a zero PID assignment as the login is not really complete. This fix is to correctly handle the events in lps state machine. Signed-off-by: Vijaya Mohan Guvva <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] Allow error handling timeout to be specifiedMartin K. Petersen3-4/+35
Introduce eh_timeout which can be used for error handling purposes. This was previously hardcoded to 10 seconds in the SCSI error handling code. However, for some fast-fail scenarios it is necessary to be able to tune this as it can take several iterations (bus device, target, bus, controller) before we give up. Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] sd: avoid deadlocks when running under multipathHannes Reinecke1-4/+25
When multipathed systems run into an all-paths-down scenario all devices might be dropped, too. This causes 'del_gendisk' to be called, which will unregister the kobj_map->probe() function for all disk device numbers. When the device comes back the default ->probe() function is run which will call __request_module(), which will deadlock. As 'del_gendisk' typically does _not_ trigger a module unload the default ->probe() function is pointless anyway. This patch implements a dummy ->probe() function, which will just return NULL if the disk is not registered. This will avoid the deadlock. Plus it'll speed up device scanning. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] ipr: Avoid target_destroy accessing memory after it was freed[email protected]2-19/+3
Defined target_ids,array_ids and vsets_ids as unsigned long to avoid target_destroy accessing memory after it was freed. Signed-off-by: Wen Xiong <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] ufs: SCSI_UFSHCD should depend on SCSI_DMAGeert Uytterhoeven1-1/+1
If NO_DMA=y: drivers/built-in.o: In function `ufshcd_transfer_req_compl': drivers/scsi/ufs/ufshcd.c:1182: undefined reference to `scsi_dma_unmap' drivers/built-in.o: In function `ufshcd_map_sg': drivers/scsi/ufs/ufshcd.c:377: undefined reference to `scsi_dma_map' drivers/built-in.o: In function `ufshcd_do_reset': drivers/scsi/ufs/ufshcd.c:912: undefined reference to `scsi_dma_unmap' drivers/built-in.o: In function `ufshcd_memory_alloc': drivers/scsi/ufs/ufshcd.c:565: undefined reference to `dma_alloc_coherent' drivers/built-in.o: In function `ufshcd_free_hba_memory': drivers/scsi/ufs/ufshcd.c:185: undefined reference to `dma_free_coherent' drivers/scsi/ufs/ufshcd.c:192: undefined reference to `dma_free_coherent' drivers/scsi/ufs/ufshcd.c:199: undefined reference to `dma_free_coherent' drivers/scsi/ufs/ufshcd.c:185: undefined reference to `dma_free_coherent' drivers/scsi/ufs/ufshcd.c:192: undefined reference to `dma_free_coherent' drivers/built-in.o:drivers/scsi/ufs/ufshcd.c:199: more undefined references to `dma_free_coherent' follow drivers/built-in.o: In function `ufshcd_abort': drivers/scsi/ufs/ufshcd.c:1498: undefined reference to `scsi_dma_unmap' drivers/built-in.o: In function `ufshcd_device_reset': drivers/scsi/ufs/ufshcd.c:1436: undefined reference to `scsi_dma_unmap' Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Santosh Y <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] ufs: Remove redundant platform_set_drvdata()Sachin Kamat1-1/+0
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Santosh Y <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] pm80xx: remove unneeded NULL checkDan Carpenter1-1/+1
Coccinelle complains about the inconsistent NULL checking on "t". It turns out the check isn't needed because we verified that "t" is non-NULL at the start of the function. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Anand Kumar Santhanam <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] libsas: implement > 16 byte CDB supportJames Bottomley6-16/+20
Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes or less. Instead do all copies via cmd->cmd_len (and use a pointer to this in the libsas task instead of a copy). Note that this still doesn't enable > 16 byte CDB support in the underlying drivers because their internal format has to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is different. the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all updated for this change. Cc: Lukasz Dorau <[email protected]> Cc: Maciej Patelczyk <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Jack Wang <[email protected]> Cc: Lindar Liu <[email protected]> Cc: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-03PM / Runtime: Rework the "runtime idle" helper routineRafael J. Wysocki1-8/+3
The "runtime idle" helper routine, rpm_idle(), currently ignores return values from .runtime_idle() callbacks executed by it. However, it turns out that many subsystems use pm_generic_runtime_idle() which checks the return value of the driver's callback and executes pm_runtime_suspend() for the device unless that value is not 0. If that logic is moved to rpm_idle() instead, pm_generic_runtime_idle() can be dropped and its users will not need any .runtime_idle() callbacks any more. Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle() routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and ata_port_runtime_idle(), respectively, as well as a few drivers' ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has been returned by the .runtime_idle() callback executed by it. To reduce overall code bloat, make the changes described above. Tested-by: Mika Westerberg <[email protected]> Tested-by: Kevin Hilman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Kevin Hilman <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Acked-by: Alan Stern <[email protected]>
2013-06-02ipr: qc_fill_rtf() method should not store alternate status registerSergei Shtylyov1-1/+0
The 'ctl' field of the 'struct ata_taskfile' is not really dual purpose, i.e. it is not intended for storing the alternate status register (which is mapped at the same address in the legacy IDE controllers) in the qc_fill_rtf() method. No other 'libata' driver except 'drivers/scsi/ipr.c' stores the alternate status register's value in the 'ctl' field of 'qc->result_tf', hence this driver should not do this as well... Signed-off-by: Sergei Shtylyov <[email protected]> Acked-by: Brian King <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2013-06-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds1-1/+1
Pull scsi target fixes from Nicholas Bellinger: "The highlights include: - Re-instate sess->wait_list in target_wait_for_sess_cmds() for active I/O shutdown handling in fabrics using se_cmd->cmd_kref - Make ib_srpt call target_sess_cmd_list_set_waiting() during session shutdown - Fix FILEIO off-by-one READ_CAPACITY bug for !S_ISBLK export - Fix iscsi-target login error heap buffer overflow (Kees) - Fix iscsi-target active I/O shutdown handling regression in v3.10-rc1 A big thanks to Kees Cook for fixing a long standing login error buffer overflow bug. All patches are CC'ed to stable with the exception of the v3.10-rc1 specific regression + other minor target cleanup." * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: iscsi-target: Fix iscsit_free_cmd() se_cmd->cmd_kref shutdown handling target: Propigate up ->cmd_kref put return via transport_generic_free_cmd iscsi-target: fix heap buffer overflow on error target/file: Fix off-by-one READ_CAPACITY bug for !S_ISBLK export ib_srpt: Call target_sess_cmd_list_set_waiting during shutdown_session target: Re-instate sess_wait_list for target_wait_for_sess_cmds target: Remove unused wait_for_tasks bit in target_wait_for_sess_cmds
2013-05-31fix buffer leak after "scsi: saner replacements for ->proc_info()"Jan Beulich1-0/+1
That patch failed to set proc_scsi_fops' .release method. Signed-off-by: Jan Beulich <[email protected]> Signed-off-by: Al Viro <[email protected]>
2013-05-28net: pass info struct via netdevice notifierJiri Pirko2-2/+2
So far, only net_device * could be passed along with netdevice notifier event. This patch provides a possibility to pass custom structure able to provide info that event listener needs to know. Signed-off-by: Jiri Pirko <[email protected]> v2->v3: fix typo on simeth shortened dev_getter shortened notifier_info struct name v1->v2: fix notifier_call parameter in call_netdevice_notifier() Signed-off-by: David S. Miller <[email protected]>
2013-05-28treewide: Fix typo in printkMasanari Iida1-1/+1
Correct spelling typo in various part of drivers Signed-off-by: Masanari Iida <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-05-28scsi: Spelling hsot -> hostGeert Uytterhoeven2-2/+2
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2013-05-20target: Remove unused wait_for_tasks bit in target_wait_for_sess_cmdsJoern Engel1-1/+1
Drop unused transport_wait_for_tasks() check in target_wait_for_sess_cmds shutdown code, and convert tcm_qla2xxx + ib_srpt fabric drivers. Cc: Joern Engel <[email protected]> Cc: Roland Dreier <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2013-05-12[SCSI] ipr: Avoid target_destroy accessing memory after it was freed[email protected]2-19/+3
Defined target_ids,array_ids and vsets_ids as unsigned long to avoid target_destroy accessing memory after it was freed. Signed-off-by: Wen Xiong <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-05-12[SCSI] qla2xxx: Fix for locking issue between driver ISR and mailbox routines[email protected]5-49/+27
The driver uses ha->mbx_cmd_flags variable to pass information between its ISR and mailbox routines, however, it does so without the protection of any locks. Under certain conditions, this can lead to multiple mailbox command completions being signaled, which, in turn, leads to a false mailbox timeout error for the subsequently issued mailbox command. The issue occurs frequently but intermittenly with the Qlogic 8GFC mezz card during card initialization, resulting in card initialization failure. Signed-off-by: Gurinder (Sunny) Shergill <[email protected]> Acked-by: Saurav Kashyap <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-05-10libfc: extend ex_lock to protect all of fc_seq_sendNeil Horman1-13/+24
This warning was reported recently: WARNING: at drivers/scsi/libfc/fc_exch.c:478 fc_seq_send+0x14f/0x160 [libfc]() (Not tainted) Hardware name: ProLiant DL120 G7 Modules linked in: tcm_fc target_core_iblock target_core_file target_core_pscsi target_core_mod configfs dm_round_robin dm_multipath 8021q garp stp llc bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc scsi_tgt autofs4 sunrpc pcc_cpufreq ipv6 hpilo hpwdt e1000e microcode iTCO_wdt iTCO_vendor_support serio_raw shpchp ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif pata_acpi ata_generic ata_piix hpsa dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan] Pid: 5464, comm: target_completi Not tainted 2.6.32-272.el6.x86_64 #1 Call Trace: [<ffffffff8106b747>] ? warn_slowpath_common+0x87/0xc0 [<ffffffff8106b79a>] ? warn_slowpath_null+0x1a/0x20 [<ffffffffa025f7df>] ? fc_seq_send+0x14f/0x160 [libfc] [<ffffffffa035cbce>] ? ft_queue_status+0x16e/0x210 [tcm_fc] [<ffffffffa030a660>] ? target_complete_ok_work+0x0/0x4b0 [target_core_mod] [<ffffffffa030a766>] ? target_complete_ok_work+0x106/0x4b0 [target_core_mod] [<ffffffffa030a660>] ? target_complete_ok_work+0x0/0x4b0 [target_core_mod] [<ffffffff8108c760>] ? worker_thread+0x170/0x2a0 [<ffffffff810920d0>] ? autoremove_wake_function+0x0/0x40 [<ffffffff8108c5f0>] ? worker_thread+0x0/0x2a0 [<ffffffff81091d66>] ? kthread+0x96/0xa0 [<ffffffff8100c14a>] ? child_rip+0xa/0x20 [<ffffffff81091cd0>] ? kthread+0x0/0xa0 [<ffffffff8100c140>] ? child_rip+0x0/0x20 It occurs because fc_seq_send can have multiple contexts executing within it at the same time, and fc_seq_send doesn't consistently use the ep->ex_lock that protects this structure. Because of that, its possible for one context to clear the INIT bit in the ep->esb_state field while another checks it, leading to the above stack trace generated by the WARN_ON in the function. We should probably undertake the effort to convert access to the fc_exch structures to use rcu, but that a larger work item. To just fix this specific issue, we can just extend the ex_lock protection through the entire fc_seq_send path Signed-off-by: Neil Horman <[email protected]> Reported-by: Gris Ge <[email protected]> CC: Robert Love <[email protected]> Signed-off-by: Robert Love <[email protected]>
2013-05-10libfc: Correct check for initiator roleMark Rustad1-1/+1
The service_params field is being checked against the symbol FC_RPORT_ROLE_FCP_INITIATOR where it really should be checked against FCP_SPPF_INIT_FCN. Signed-off-by: Mark Rustad <[email protected]> Tested-by: Jack Morgan <[email protected]> Signed-off-by: Robert Love <[email protected]>
2013-05-10libfcoe: Fix Conflicting FCFs issue in the fabricKrishna Mohan1-10/+5
When multiple FCFs in use, and first FIP Advertisement received is with "Available for Login" i.e A bit set to 0, FCF selection will fail. The fix is to remove the assumption in the code that first FCF is only allowed selectable FCF. Consider the scenario fip->fcfs contains FCF1(fabricname X, marked A=0) FCF2(fabricname Y, marked A=1). list_first_entry(first) points to FCF1 and 1st iteration we ignore the FCF and on 2nd iteration we compare FCF1 & FCF2 fabric name and we fails to perform FCF selection. Signed-off-by: Krishna Mohan <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Robert Love <[email protected]>