aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2011-10-16[SCSI] be2iscsi: Fix for kdump failureJayamohan Kallickal3-1/+22
This patch fixes the Kdump failure reported by Redhat wich was caused by be2iscsi resetting the Chip when be2iscsi detects it is in crashdump mode. If be2net was loaded before be2iscsi then this leaves be2net driver hanging on to resources that the chip stopped recognising after the reset. This patch replaces chip reset with Function reset so that only the particular function and not the whole chip is affected Signed-off-by: Jayamohan Kallickal <[email protected]> Signed-off-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] qlogicpti: fix timeoutMeelis Roos1-1/+1
qlogicpti times out for some tape library operations (like mtx inventory). It seems SCSI command timeout is hardcoded into the driver. Fix it by propagating the timeout from scsi request to the controller as suggested by James Bottomley. Tested on Sun Ultra 1 with Sun StorEdge L8 Autoloader. Signed-off-by: Meelis Roos <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] scsi_dh_alua: Add one more check-condition for alua handlerMoger, Babu1-7/+8
This patch adds one more check-condition for scsi_dh_alua handler. Without this, the handler attach fails sometimes during the discovery. I have noticed this with NetApp E-Series storage with alua mode. Also removed some unnecessary brackets {} for consistency. Signed-off-by: Babu Moger <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] ipr: Add support to flash FPGA and flash back DRAM imagesWayne Boyer2-9/+3
The write buffer command is used to download and burn new IOA FW images. The same interface can now be used to flash FPGA and flash back DRAM images. To download and flash the new images takes more than 15 minutes, so increase the write buffer command timeout to 30 minutes. The FPGA and flash back DRAM images don't have the same card_type as the IOA FW image. So, remove the sanity checking from the driver. The adapter has sanity checking and will only accept a valid image. Signed-off-by: Wayne Boyer <[email protected]> Acked-by: Brian King <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] libsas: fix port->dev_list lockingDan Williams2-11/+17
port->dev_list maintains a list of devices attached to a given sas root port. It needs to be mutated under a lock as contexts outside of the single-threaded-libsas-workqueue access the list via sas_find_dev_by_rphy(). Fixup locations where the list was being mutated without a lock. This is a follow-up to commit 5911e963 "[SCSI] libsas: remove expander from dev list on error", where Luben noted [1]: > 2/ We have unlocked list manipulations in sas_ex_discover_end_dev(), > sas_unregister_common_dev(), and sas_ex_discover_end_dev() Yes, I can see that and that is very unfortunate. [1]: http://marc.info/?l=linux-scsi&m=131480962006471&w=2 Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] bnx2fc: Bumped version to 1.0.8Bhanu Prakash Gollapudi2-2/+2
Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] bnx2fc: Return error statistics of remote peerBhanu Prakash Gollapudi1-0/+20
Add support for get_lesb so that the valid statistics are returned by the remote peer when RLS command is issued. Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] fcoe,libfcoe: Move common code for fcoe_get_lesb to fcoe_transportBhanu Prakash Gollapudi2-20/+30
Except for obtaining the netdev from lport, fcoe_get_lesb is the common code for the LLDs. Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Acked-by: Yi Zou <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-16[SCSI] bnx2fc: call ctlr_link_up only when the interface is enabledBhanu Prakash Gollapudi1-0/+2
Link may not be up when the driver receives ulp_start event, and hence fcoe_ctlr_link_up is not called. Call fcoe_ctlr_link_up during indicate_netevent only when the interface is enabled. (It has to be called when enabled because that is an indication that the vlan discovery is completed). Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-10aic7xxx: fix Kconfig references to READMEsPaul Bolle2-4/+2
Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-10-07Merge branch 'master' of github.com:davem330/netDavid S. Miller8-13/+21
Conflicts: net/batman-adv/soft-interface.c
2011-10-02[SCSI] libsas: fix panic when single phy is disabled on a wide portMark Salyzyn1-4/+6
When a wide port is being utilized to a target, if one disables only one of the phys, we get an OS crash: BUG: unable to handle kernel NULL pointer dereference at 0000000000000238 IP: [<ffffffff814ca9b1>] mutex_lock+0x21/0x50 PGD 4103f5067 PUD 41dba9067 PMD 0 Oops: 0002 [#1] SMP last sysfs file: /sys/bus/pci/slots/5/address CPU 0 Modules linked in: pm8001(U) ses enclosure fuse nfsd exportfs autofs4 ipmi_devintf ipmi_si ipmi_msghandler nfs lockd fscache nfs_acl auth_rpcgss 8021q fcoe libfcoe garp libfc scsi_transport_fc stp scsi_tgt llc sunrpc cpufreq_ondemand acpi_cpufreq freq_table ipv6 sr_mod cdrom dm_mirror dm_region_hash dm_log uinput sg i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support e1000e mlx4_ib ib_mad ib_core mlx4_en mlx4_core ext3 jbd mbcache sd_mod crc_t10dif usb_storage ata_generic pata_acpi ata_piix libsas(U) scsi_transport_sas dm_mod [last unloaded: pm8001] Modules linked in: pm8001(U) ses enclosure fuse nfsd exportfs autofs4 ipmi_devintf ipmi_si ipmi_msghandler nfs lockd fscache nfs_acl auth_rpcgss 8021q fcoe libfcoe garp libfc scsi_transport_fc stp scsi_tgt llc sunrpc cpufreq_ondemand acpi_cpufreq freq_table ipv6 sr_mod cdrom dm_mirror dm_region_hash dm_log uinput sg i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support e1000e mlx4_ib ib_mad ib_core mlx4_en mlx4_core ext3 jbd mbcache sd_mod crc_t10dif usb_storage ata_generic pata_acpi ata_piix libsas(U) scsi_transport_sas dm_mod [last unloaded: pm8001] Pid: 5146, comm: scsi_wq_5 Not tainted 2.6.32-71.29.1.el6.lustre.7.x86_64 #1 Storage Server RIP: 0010:[<ffffffff814ca9b1>] [<ffffffff814ca9b1>] mutex_lock+0x21/0x50 RSP: 0018:ffff8803e4e33d30 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000238 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff8803e664c800 RDI: 0000000000000238 RBP: ffff8803e4e33d40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 R13: 0000000000000238 R14: ffff88041acb7200 R15: ffff88041c51ada0 FS: 0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000238 CR3: 0000000410143000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process scsi_wq_5 (pid: 5146, threadinfo ffff8803e4e32000, task ffff8803e4e294a0) Stack: ffff8803e664c800 0000000000000000 ffff8803e4e33d70 ffffffffa001f06e <0> ffff8803e4e33d60 ffff88041c51ada0 ffff88041acb7200 ffff88041bc0aa00 <0> ffff8803e4e33d90 ffffffffa0032b6c 0000000000000014 ffff88041acb7200 Call Trace: [<ffffffffa001f06e>] sas_port_delete_phy+0x2e/0xa0 [scsi_transport_sas] [<ffffffffa0032b6c>] sas_unregister_devs_sas_addr+0xac/0xe0 [libsas] [<ffffffffa0034914>] sas_ex_revalidate_domain+0x204/0x330 [libsas] [<ffffffffa00307f0>] ? sas_revalidate_domain+0x0/0x90 [libsas] [<ffffffffa0030855>] sas_revalidate_domain+0x65/0x90 [libsas] [<ffffffff8108c7d0>] worker_thread+0x170/0x2a0 [<ffffffff81091ea0>] ? autoremove_wake_function+0x0/0x40 [<ffffffff8108c660>] ? worker_thread+0x0/0x2a0 [<ffffffff81091b36>] kthread+0x96/0xa0 [<ffffffff810141ca>] child_rip+0xa/0x20 [<ffffffff81091aa0>] ? kthread+0x0/0xa0 [<ffffffff810141c0>] ? child_rip+0x0/0x20 Code: ff ff 85 c0 75 ed eb d6 66 90 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 24 08 0f 1f 44 00 00 48 89 fb e8 92 f4 ff ff 48 89 df <f0> ff 0f 79 05 e8 25 00 00 00 65 48 8b 04 25 08 cc 00 00 48 2d RIP [<ffffffff814ca9b1>] mutex_lock+0x21/0x50 RSP <ffff8803e4e33d30> CR2: 0000000000000238 The following patch is admittedly a band-aid, and does not solve the root cause, but it still is a good candidate for hardening as a pointer check before reference. Signed-off-by: Mark Salyzyn <[email protected]> Tested-by: Jack Wang <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] isci: export phy events via ->lldd_control_phy()Dan Williams5-6/+23
Allow the sas-transport-class to update events for local phys via a new PHY_FUNC_GET_EVENTS command to ->lldd_control_phy(). Fixup drivers that are not prepared for new enum phy_func values, and unify ->lldd_control_phy() error codes. These are the SAS defined phy events that are reported in a smp-report-phy-error-log command: * /sys/class/sas_phy/<phyX>/invalid_dword_count * /sys/class/sas_phy/<phyX>/running_disparity_error_count * /sys/class/sas_phy/<phyX>/loss_of_dword_sync_count * /sys/class/sas_phy/<phyX>/phy_reset_problem_count Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] isci: The port state should be set to stopping on the last phy.Jeff Skirvin1-1/+1
Fixes a bug where any phy removed from the port set the port state to "stopping" - do this only when the last phy removed from the port. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] isci: fix decode of DONE_CRC_ERR TC completion statusJeff Skirvin1-2/+1
DONE_CRC_ERR is not a RNC suspension condition, so do not change the state to expect the incoming suspension notification. Signed-off-by: Jeff Skirvin <[email protected]> [djbw: dropped DONE_CMD_LL_R_ERR change] Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] isci: SATA/STP I/O is only returned in the normal path to libsasJeff Skirvin1-0/+19
Since libsas has it's own means to escalate SATA/STP device error handling depending on task status codes, return all SATA/STP I/O on the normal path. i.e. skip sas_task_abort() and let sas_ata_task_done() disposition the qc. Longer term we want to audit non-essential calls to sas_task_abort(). Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] isci: atapi supportDan Williams5-16/+375
Based on original implementation from Jiangbi Liu and Maciej Trela. ATAPI transfers happen in two-to-three stages. The two stage atapi commands are those that include a dma data transfer. The data transfer portion of these operations is handled by the hardware packet-dma acceleration. The three-stage commands do not have a data transfer and are handled without hardware assistance in raw frame mode. stage1: transmit host-to-device fis to notify the device of an incoming atapi cdb. Upon reception of the pio-setup-fis repost the task_context to perform the dma transfer of the cdb+data (go to stage3), or repost the task_context to transmit the cdb as a raw frame (go to stage 2). stage2: wait for hardware notification of the cdb transmission and then go to stage 3. stage3: wait for the arrival of the terminating device-to-host fis and terminate the command. To keep the implementation simple we only support ATAPI packet-dma protocol (for commands with data) to avoid needing to handle the data transfer manually (like we do for SATA-PIO). This may affect compatibility for a small number of devices (see ATA_HORKAGE_ATAPI_MOD16_DMA). If the data-transfer underruns, or encounters an error the device-to-host fis is expected to arrive in the unsolicited frame queue to pass to libata for disposition. However, in the DONE_UNEXP_FIS (data underrun) case it appears we need to craft a response. In the DONE_REG_ERR case we do receive the UF and propagate it to libsas. Signed-off-by: Maciej Trela <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: update driver versionXiangliang Yu1-1/+1
This will synchronize the version string with internal driver. Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: fixed SMP request watchdog timeout issue.Xiangliang Yu2-0/+5
set SMP link timeout value to maximum. Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: expander write performance enhancementXiangliang Yu2-0/+10
with 1 expander, connect 8 HDD, the write performance will be improved by 80%. Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: change SL mode0 register valueXiangliang Yu1-0/+8
-- change connection behavior -- set bit8 to 1 for performance tuning -- set bit0 to 0 to enable retry for no_dest reject case. Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: fixed wrong destination when hiting NAK for command frameXiangliang Yu1-0/+10
disable non data frame retry Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: fixed some disk spin up issueXiangliang Yu2-0/+16
spin up issue: some direct attached SAS device can't spin up Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: add support for 9480 device idXiangliang Yu1-0/+9
Add support for Marvell 88SE9480 SAS/SATA HBA Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: fix expander link errorXiangliang Yu1-3/+3
Expanders fail to link when the phy rates are mismatched. Signed-off-by: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] isci: fix missed unlock in apc_agent_timeout()Jeff Skirvin1-1/+1
Needed to jump to scic_lock unlock. Also spotted by coccicheck. Signed-off-by: Jeff Skirvin <[email protected]> Cc: <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] isci: fix support for large smp requestsDan Williams4-35/+21
Kill the local smp response buffer. Besides being unnecessary, it is too small (currently truncates responses to 60 bytes). The mid-layer will have already allocated a sufficiently sized buffer, just kmap and copy into it directly. Cc: <[email protected]> Reported-by: Derick Marks <[email protected]> Tested-by: Derick Marks <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] pm8001: missing break statementsMark Salyzyn2-39/+41
Code Inspection: found two missing break directives. First one will result in not retrying an a task that report IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY, the second will result in cosmetic debug printk conflicting statement stutter. Because checkpatch.pl came up with a warning regarding unnecessary space before a newline on one of the fragments associated with the diff context, I took the liberty of fixing all the cases of this issue in the pair of files touched by this defect. These cosmetic changes hide the break changes :-( To help focus, break changes are in pm8001_hwi.c fragment line 1649 for the IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY case statement and pm8001_sas.c line 1000 deals with the conflicting debug print stutter. Signed-off-by: Mark Salyzyn <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] pm8001: fix DEV_IS_GONE infinite retryMark Salyzyn1-14/+1
On the pm8001, when a device is in the process of going away (device power off or hot plug), depending on the timing, the driver would return SAS_PHY_DOWN as the return value to the queuecommand DEV_IS_GONE logic. The net result is an near infinite retry (especially if SAS debugging is enabled), the logs will fill with: kernel: mpi_ssp_completion 2119:e21:SSP IO status 0x13 tag 0xcc1c0000 dlen=90 param=0xe kernel: wwn=5000c50034069e86 cdb=12 00 00 00 5a 00 00 00 00 00 00 00 00 00 00 00 kernel: sas: lldd_execute_task returned: 138 kernel: sas: lldd_execute_task returned: 138 kernel: sas: lldd_execute_task returned: 138 kernel: sas: lldd_execute_task returned: 138 kernel: sas: lldd_execute_task returned: 138 kernel: sas: lldd_execute_task returned: 138 kernel: sas: lldd_execute_task returned: 138 . . . This patch changes to leverage the port_attached logic to complete the command with a status of PHY_DOWN so that the disposition can be handled immediately and correctly. Signed-off-by: Mark Salyzyn <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] fcoe: setup default initial value for DDP thresholdVasu Dev1-1/+1
Currently fcoe_ddp_min doesn't have default value so by default not used, so setting up default value as 4k as this works better by avoiding overhead of programing DDP for small IOs. Signed-off-by: Vasu Dev <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Yi Zou <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] fcoe: use real dev in case of HW vlan accelerationVasu Dev2-1/+9
Use real dev in case it has HW vlan acceleration support since in this case the real dev would do needed vlan processing, this way unnecessary vlan layer processing avoided and it gives slightly better IOPS with 512B size IOs. Signed-off-by: Vasu Dev <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Yi Zou <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] libfc: cache align fc_exch_poolVasu Dev1-6/+5
fix holes and better cache aligned fields. Signed-off-by: Vasu Dev <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Yi Zou <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] libfc: cache align struct fc_fcp_pkt fieldsVasu Dev1-2/+0
Re-arrange its fields to avoid padding and have better cacheline alignments. Removed not used start_time, end_time and last_pkt_time fields. This all reduced this struct size to 448 from 480 and that also reduced one cacheline on x86_64 beside eliminating 8 pads. However kept logical fields together. Signed-off-by: Vasu Dev <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Yi Zou <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] fcoe: use kthread_create_on_nodeEric Dumazet1-2/+3
Since fcoe_percpu_thread_create() creates percpu kthread, it makes sense to use kthread_create_on_node() to get proper NUMA affinity for kthread stack. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: Yi Zou <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] libsas: set sas_address and device type of rphyJack Wang1-0/+2
Libsas forget to set the sas_address and device type of rphy lead to file under /sys/class/sas_x show wrong value, fix that. Signed-off-by: Jack Wang <[email protected]> Tested-by: Crystal Yu <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] pm8001: remove pm8001_slave_{alloc|configure}Dan Williams3-34/+3
libsas handles: 1/ limiting ata scanning to lun0 2/ changes to /sys/block/<sdX>/device/queue_depth for ata devices libata handles turning off ncq globally via kernel command line (libata.force=noncq) or sysfs (echo 1 > /sys/block/<sdX>/device/queue_depth). A lldd specific compile option is not necessary. Cc: Jack Wang <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] mvsas: remove mvs_slave_{alloc|configure}Dan Williams3-34/+2
libsas now handles: 1/ limiting ata scanning to lun0 2/ maximizing the queue_depth of sas devices (up to 256, mvsas only supports 64) 3/ changes to /sys/block/<sdX>/device/queue_depth for ata devices Acked-by: Xiangliang Yu <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] libsas: dynamic queue depthDan Williams1-21/+18
The queue-depth for libsas-attached devices initializes to 32 and can only be increased manually via sysfs to a max of 64, while mpt2sas attached devices initialize to 254 and dynamically float via the midlayer ->change_queue_depth interface. No performance regression was observed with this change on the isci driver. Tested-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] libsas,libata: fix ->change_queue_{depth|type} for sata devicesDan Williams1-1/+10
Pass queue_depth change requests to libata, and prevent queue_type changes for ATA devices. Otherwise: 1/ we do not honor the libata specific restrictions on the queue depth 2/ libsas drivers that do not set sdev->tagged_supported are unable to change the queue_depth of ata devices via sysfs Signed-off-by: Dan Williams <[email protected]> Acked-by: Jeff Garzik <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] libsas: disable scanning lun > 0 on ata devicesDan Williams1-2/+8
Currently mvsas and pm8001 have custom ->slave_alloc implementations to achieve this. Uplevel it for all libsas drivers as isci encounters problems with atapi devices when scanning past lun0. Just do what Darrick suggested [1], and limit the scan for ata devices. [1] http://marc.info/?l=linux-scsi&m=116604101119861&w=2 Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] libsas: Allow expander T-T attachmentsLuben Tuikov1-6/+14
Allow expander table-to-table attachments for expanders that support it. Signed-off-by: Luben Tuikov <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-02[SCSI] qla2xxx: Fix crash in qla2x00_abort_all_cmds() on unloadRoland Dreier1-4/+5
I hit a crash in qla2x00_abort_all_cmds() if the qla2xxx module is unloaded right after it is loaded. I debugged this down to the abort handling improperly treating a command of type SRB_ADISC_CMD as if it had a bsg_job to complete when that command actually uses the iocb_cmd part of the union. (I guess to hit this one has to unload the module while the async FC initialization is still in progress) It seems we should only look for a bsg_job if type is SRB_ELS_CMD_RPT, SRB_ELS_CMD_HST or SRB_CT_CMD, so switch the test to make that explicit. Signed-off-by: Roland Dreier <[email protected]> Acked-by: Chad Dupuis <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-09-28Merge git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6Linus Torvalds5-3/+7
* git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6: [SCSI] 3w-9xxx: fix iommu_iova leak [SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL dereference [SCSI] scsi: qla4xxx needs libiscsi.o [SCSI] libsas: fix failure to revalidate domain for anything but the first expander child. [SCSI] aacraid: reset should disable MSI interrupt
2011-09-27doc: fix broken referencesPaul Bolle1-1/+1
There are numerous broken references to Documentation files (in other Documentation files, in comments, etc.). These broken references are caused by typo's in the references, and by renames or removals of the Documentation files. Some broken references are simply odd. Fix these broken references, sometimes by dropping the irrelevant text they were part of. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-09-26[SCSI] 3w-9xxx: fix iommu_iova leakJames Bottomley1-0/+2
Following reports on the list, it looks like the 3e-9xxx driver will leak dma mappings every time we get a transient queueing error back from the card. This is because it maps the sg list in the routine that sends the command, but doesn't unmap again in the transient failure path (even though the command is sent back to the block layer). Fix by unmapping before returning the status. Reported-by: Chris Boot <[email protected]> Tested-by: Chris Boot <[email protected]> Acked-by: Adam Radford <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-09-26[SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL dereferenceNeil Horman1-1/+1
This oops was reported recently: d:mon> e cpu 0xd: Vector: 300 (Data Access) at [c0000000fd4c7120] pc: d00000000076f194: .t3_l2t_get+0x44/0x524 [cxgb3] lr: d000000000b02108: .init_act_open+0x150/0x3d4 [cxgb3i] sp: c0000000fd4c73a0 msr: 8000000000009032 dar: 0 dsisr: 40000000 current = 0xc0000000fd640d40 paca = 0xc00000000054ff80 pid = 5085, comm = iscsid d:mon> t [c0000000fd4c7450] d000000000b02108 .init_act_open+0x150/0x3d4 [cxgb3i] [c0000000fd4c7500] d000000000e45378 .cxgbi_ep_connect+0x784/0x8e8 [libcxgbi] [c0000000fd4c7650] d000000000db33f0 .iscsi_if_rx+0x71c/0xb18 [scsi_transport_iscsi2] [c0000000fd4c7740] c000000000370c9c .netlink_data_ready+0x40/0xa4 [c0000000fd4c77c0] c00000000036f010 .netlink_sendskb+0x4c/0x9c [c0000000fd4c7850] c000000000370c18 .netlink_sendmsg+0x358/0x39c [c0000000fd4c7950] c00000000033be24 .sock_sendmsg+0x114/0x1b8 [c0000000fd4c7b50] c00000000033d208 .sys_sendmsg+0x218/0x2ac [c0000000fd4c7d70] c00000000033f55c .sys_socketcall+0x228/0x27c [c0000000fd4c7e30] c0000000000086a4 syscall_exit+0x0/0x40 --- Exception: c01 (System Call) at 00000080da560cfc The root cause was an EEH error, which sent us down the offload_close path in the cxgb3 driver, which in turn sets cdev->l2opt to NULL, without regard for upper layer driver (like the cxgbi drivers) which might have execution contexts in the middle of its use. The result is the oops above, when t3_l2t_get attempts to dereference L2DATA(cdev)->nentries in arp_hash right after the EEH error handler sets it to NULL. The fix is to prevent the setting of the NULL pointer until after there are no further users of it. The t3cdev->l2opt pointer is now converted to be an rcu pointer and the L2DATA macro is now called under the protection of the rcu_read_lock(). When the EEH error path: t3_adapter_error->offload_close->cxgb3_offload_deactivate Is exectured, setting of that l2opt pointer to NULL, is now gated on an rcu quiescence point, preventing, allowing L2DATA callers to safely check for a NULL pointer without concern that the underlying data will be freeded before the pointer is dereferenced. This has been tested by the reporter and shown to fix the reproted oops [nhorman: fix up unitinialised variable reported by Dan Carpenter] Signed-off-by: Neil Horman <[email protected]> Reviewed-by: Karen Xie <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]>
2011-09-23scsi: fix qla2xxx printk format warningRandy Dunlap1-2/+2
sector_t can be different types, so cast it to its largest possible type. drivers/scsi/qla2xxx/qla_isr.c:1509:5: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'sector_t' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-09-23scsi: SCSI_ISCI needs to select SCSI_SAS_HOST_SMP, fixes build errorRandy Dunlap1-0/+1
SCSI_ISCI needs to select SCSI_SAS_HOST_SMP to ensure that all needed symbols are available to it. Fixes this build error: ERROR: "try_test_sas_gpio_gp_bit" [drivers/scsi/isci/isci.ko] undefined! Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-09-22[SCSI] ipr: Stop reading adapter dump prematurelyBrian King2-4/+12
When the ipr driver decides to dump the adapter, it changes the sdt_state to GET_DUMP, then prepares the adapter so that the dump can be read. However, if the ipr worker thread wakes up for some reason before the driver has put the adapter in a state where it can succesfully dump the adapter, the driver will start dumping the adapter too early, which can potentially trigger a BUG check in the pci config blocking API. Fix this by adding a new sdt_state to differentiate between the ipr driver wanting to dump the adapter in the near future and wanting to dump the adapter now. Signed-off-by: Brian King <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-09-22[SCSI] scsi_dh_rdac: Adding NetApp as a brand name for rdacChauhan, Vijay1-2/+2
Signed-off-by: Vijay Chauhan <[email protected]> Reviewed-by: Bob Stankey <[email protected]> Reviewed-by: Babu Moger <[email protected]> Acked-by: Chandra Seetharaman <[email protected]> Signed-off-by: James Bottomley <[email protected]>