Skip to content

Commit ec7ae51

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (204 commits) [SCSI] qla4xxx: export address/port of connection (fix udev disk names) [SCSI] ipr: Fix BUG on adapter dump timeout [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer [SCSI] hpsa: change confusing message to be more clear [SCSI] iscsi class: fix vlan configuration [SCSI] qla4xxx: fix data alignment and use nl helpers [SCSI] iscsi class: fix link local mispelling [SCSI] iscsi class: Replace iscsi_get_next_target_id with IDA [SCSI] aacraid: use lower snprintf() limit [SCSI] lpfc 8.3.27: Change driver version to 8.3.27 [SCSI] lpfc 8.3.27: T10 additions for SLI4 [SCSI] lpfc 8.3.27: Fix queue allocation failure recovery [SCSI] lpfc 8.3.27: Change algorithm for getting physical port name [SCSI] lpfc 8.3.27: Changed worst case mailbox timeout [SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes [SCSI] megaraid_sas: Changelog and version update [SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic [SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support [SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers [SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts ...
2 parents 97d2eb1 + 590134f commit ec7ae51

162 files changed

Lines changed: 14203 additions & 3413 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/ABI/testing/sysfs-block‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,16 @@ Description:
206206
when a discarded area is read the discard_zeroes_data
207207
parameter will be set to one. Otherwise it will be 0 and
208208
the result of reading a discarded area is undefined.
209+
What: /sys/block/<disk>/alias
210+
Date: Aug 2011
211+
Contact: Nao Nishijima <nao.nishijima.xt@hitachi.com>
212+
Description:
213+
A raw device name of a disk does not always point a same disk
214+
each boot-up time. Therefore, users have to use persistent
215+
device names, which udev creates when the kernel finds a disk,
216+
instead of raw device name. However, kernel doesn't show those
217+
persistent names on its messages (e.g. dmesg).
218+
This file can store an alias of the disk and it would be
219+
appeared in kernel messages if it is set. A disk can have an
220+
alias which length is up to 255bytes. Users can use alphabets,
221+
numbers, "-" and "_" in alias name. This file is writeonce.

‎Documentation/scsi/00-INDEX‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ LICENSE.FlashPoint
2828
- Licence of the Flashpoint driver
2929
LICENSE.qla2xxx
3030
- License for QLogic Linux Fibre Channel HBA Driver firmware.
31+
LICENSE.qla4xxx
32+
- License for QLogic Linux iSCSI HBA Driver.
3133
Mylex.txt
3234
- info on driver for Mylex adapters
3335
NinjaSCSI.txt

‎Documentation/scsi/ChangeLog.megaraid_sas‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
Release Date : Wed. Oct 5, 2011 17:00:00 PST 2010 -
2+
(emaild-id:megaraidlinux@lsi.com)
3+
Adam Radford
4+
Current Version : 00.00.06.12-rc1
5+
Old Version : 00.00.05.40-rc1
6+
1. Continue booting immediately if FW in FAULT at driver load time.
7+
2. Increase default cmds per lun to 256.
8+
3. Fix mismatch in megasas_reset_fusion() mutex lock-unlock.
9+
4. Remove some un-necessary code.
10+
5. Clear state change interrupts for Fusion/Invader.
11+
6. Clear FUSION_IN_RESET before enabling interrupts.
12+
7. Add support for MegaRAID 9360/9380 12GB/s controllers.
13+
8. Add multiple MSI-X vector/multiple reply queue support.
14+
9. Add driver workaround for PERC5/1068 kdump kernel panic.
15+
-------------------------------------------------------------------------------
116
Release Date : Tue. Jul 26, 2011 17:00:00 PST 2010 -
217
(emaild-id:megaraidlinux@lsi.com)
318
Adam Radford

‎Documentation/scsi/LICENSE.qla4xxx‎

Lines changed: 310 additions & 0 deletions
Large diffs are not rendered by default.

‎Documentation/scsi/bnx2fc.txt‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
Operating FCoE using bnx2fc
2+
===========================
3+
Broadcom FCoE offload through bnx2fc is full stateful hardware offload that
4+
cooperates with all interfaces provided by the Linux ecosystem for FC/FCoE and
5+
SCSI controllers. As such, FCoE functionality, once enabled is largely
6+
transparent. Devices discovered on the SAN will be registered and unregistered
7+
automatically with the upper storage layers.
8+
9+
Despite the fact that the Broadcom's FCoE offload is fully offloaded, it does
10+
depend on the state of the network interfaces to operate. As such, the network
11+
interface (e.g. eth0) associated with the FCoE offload initiator must be 'up'.
12+
It is recommended that the network interfaces be configured to be brought up
13+
automatically at boot time.
14+
15+
Furthermore, the Broadcom FCoE offload solution creates VLAN interfaces to
16+
support the VLANs that have been discovered for FCoE operation (e.g.
17+
eth0.1001-fcoe). Do not delete or disable these interfaces or FCoE operation
18+
will be disrupted.
19+
20+
Driver Usage Model:
21+
===================
22+
23+
1. Ensure that fcoe-utils package is installed.
24+
25+
2. Configure the interfaces on which bnx2fc driver has to operate on.
26+
Here are the steps to configure:
27+
a. cd /etc/fcoe
28+
b. copy cfg-ethx to cfg-eth5 if FCoE has to be enabled on eth5.
29+
c. Repeat this for all the interfaces where FCoE has to be enabled.
30+
d. Edit all the cfg-eth files to set "no" for DCB_REQUIRED** field, and
31+
"yes" for AUTO_VLAN.
32+
e. Other configuration parameters should be left as default
33+
34+
3. Ensure that "bnx2fc" is in SUPPORTED_DRIVERS list in /etc/fcoe/config.
35+
36+
4. Start fcoe service. (service fcoe start). If Broadcom devices are present in
37+
the system, bnx2fc driver would automatically claim the interfaces, starts vlan
38+
discovery and log into the targets.
39+
40+
5. "Symbolic Name" in 'fcoeadm -i' output would display if bnx2fc has claimed
41+
the interface.
42+
Eg:
43+
[root@bh2 ~]# fcoeadm -i
44+
Description: NetXtreme II BCM57712 10 Gigabit Ethernet
45+
Revision: 01
46+
Manufacturer: Broadcom Corporation
47+
Serial Number: 0010186FD558
48+
Driver: bnx2x 1.70.00-0
49+
Number of Ports: 2
50+
51+
Symbolic Name: bnx2fc v1.0.5 over eth5.4
52+
OS Device Name: host11
53+
Node Name: 0x10000010186FD559
54+
Port Name: 0x20000010186FD559
55+
FabricName: 0x2001000DECB3B681
56+
Speed: 10 Gbit
57+
Supported Speed: 10 Gbit
58+
MaxFrameSize: 2048
59+
FC-ID (Port ID): 0x0F0377
60+
State: Online
61+
62+
6. Verify the vlan discovery is performed by running ifconfig and notice
63+
<INTERFACE>.<VLAN>-fcoe interfaces are automatically created.
64+
65+
Refer to fcoeadm manpage for more information on fcoeadm operations to
66+
create/destroy interfaces or to display lun/target information.
67+
68+
NOTE:
69+
====
70+
** Broadcom FCoE capable devices implement a DCBX/LLDP client on-chip. Only one
71+
LLDP client is allowed per interface. For proper operation all host software
72+
based DCBX/LLDP clients (e.g. lldpad) must be disabled. To disable lldpad on a
73+
given interface, run the following command:
74+
75+
lldptool set-lldp -i <interface_name> adminStatus=disabled

‎arch/s390/include/asm/qdio.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ struct qdesfmt0 {
4646
u32 : 16;
4747
} __attribute__ ((packed));
4848

49+
#define QDR_AC_MULTI_BUFFER_ENABLE 0x01
50+
4951
/**
5052
* struct qdr - queue description record (QDR)
5153
* @qfmt: queue format
@@ -256,6 +258,8 @@ struct slsb {
256258
u8 val[QDIO_MAX_BUFFERS_PER_Q];
257259
} __attribute__ ((packed, aligned(256)));
258260

261+
#define CHSC_AC2_MULTI_BUFFER_AVAILABLE 0x0080
262+
#define CHSC_AC2_MULTI_BUFFER_ENABLED 0x0040
259263
#define CHSC_AC2_DATA_DIV_AVAILABLE 0x0010
260264
#define CHSC_AC2_DATA_DIV_ENABLED 0x0002
261265

@@ -357,6 +361,7 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
357361
struct qdio_initialize {
358362
struct ccw_device *cdev;
359363
unsigned char q_format;
364+
unsigned char qdr_ac;
360365
unsigned char adapter_name[8];
361366
unsigned int qib_param_field_format;
362367
unsigned char *qib_param_field;

‎block/genhd.c‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/mutex.h>
2020
#include <linux/idr.h>
2121
#include <linux/log2.h>
22+
#include <linux/ctype.h>
2223

2324
#include "blk.h"
2425

@@ -909,6 +910,74 @@ static int __init genhd_device_init(void)
909910

910911
subsys_initcall(genhd_device_init);
911912

913+
static ssize_t alias_show(struct device *dev,
914+
struct device_attribute *attr, char *buf)
915+
{
916+
struct gendisk *disk = dev_to_disk(dev);
917+
ssize_t ret = 0;
918+
919+
if (disk->alias)
920+
ret = snprintf(buf, ALIAS_LEN, "%s\n", disk->alias);
921+
return ret;
922+
}
923+
924+
static ssize_t alias_store(struct device *dev, struct device_attribute *attr,
925+
const char *buf, size_t count)
926+
{
927+
struct gendisk *disk = dev_to_disk(dev);
928+
char *alias;
929+
char *envp[] = { NULL, NULL };
930+
unsigned char c;
931+
int i;
932+
ssize_t ret = count;
933+
934+
if (!count)
935+
return -EINVAL;
936+
937+
if (count >= ALIAS_LEN) {
938+
printk(KERN_ERR "alias: alias is too long\n");
939+
return -EINVAL;
940+
}
941+
942+
/* Validation check */
943+
for (i = 0; i < count; i++) {
944+
c = buf[i];
945+
if (i == count - 1 && c == '\n')
946+
break;
947+
if (!isalnum(c) && c != '_' && c != '-') {
948+
printk(KERN_ERR "alias: invalid alias\n");
949+
return -EINVAL;
950+
}
951+
}
952+
953+
if (disk->alias) {
954+
printk(KERN_INFO "alias: %s is already assigned (%s)\n",
955+
disk->disk_name, disk->alias);
956+
return -EINVAL;
957+
}
958+
959+
alias = kasprintf(GFP_KERNEL, "%s", buf);
960+
if (!alias)
961+
return -ENOMEM;
962+
963+
if (alias[count - 1] == '\n')
964+
alias[count - 1] = '\0';
965+
966+
envp[0] = kasprintf(GFP_KERNEL, "ALIAS=%s", alias);
967+
if (!envp[0]) {
968+
kfree(alias);
969+
return -ENOMEM;
970+
}
971+
972+
disk->alias = alias;
973+
printk(KERN_INFO "alias: assigned %s to %s\n", alias, disk->disk_name);
974+
975+
kobject_uevent_env(&dev->kobj, KOBJ_ADD, envp);
976+
977+
kfree(envp[0]);
978+
return ret;
979+
}
980+
912981
static ssize_t disk_range_show(struct device *dev,
913982
struct device_attribute *attr, char *buf)
914983
{
@@ -968,6 +1037,7 @@ static ssize_t disk_discard_alignment_show(struct device *dev,
9681037
return sprintf(buf, "%d\n", queue_discard_alignment(disk->queue));
9691038
}
9701039

1040+
static DEVICE_ATTR(alias, S_IRUGO|S_IWUSR, alias_show, alias_store);
9711041
static DEVICE_ATTR(range, S_IRUGO, disk_range_show, NULL);
9721042
static DEVICE_ATTR(ext_range, S_IRUGO, disk_ext_range_show, NULL);
9731043
static DEVICE_ATTR(removable, S_IRUGO, disk_removable_show, NULL);
@@ -990,6 +1060,7 @@ static struct device_attribute dev_attr_fail_timeout =
9901060
#endif
9911061

9921062
static struct attribute *disk_attrs[] = {
1063+
&dev_attr_alias.attr,
9931064
&dev_attr_range.attr,
9941065
&dev_attr_ext_range.attr,
9951066
&dev_attr_removable.attr,

‎drivers/ata/libata-core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6713,6 +6713,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
67136713
EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
67146714
EXPORT_SYMBOL_GPL(ata_scsi_slave_destroy);
67156715
EXPORT_SYMBOL_GPL(ata_scsi_change_queue_depth);
6716+
EXPORT_SYMBOL_GPL(__ata_change_queue_depth);
67166717
EXPORT_SYMBOL_GPL(sata_scr_valid);
67176718
EXPORT_SYMBOL_GPL(sata_scr_read);
67186719
EXPORT_SYMBOL_GPL(sata_scr_write);

‎drivers/ata/libata-scsi.c‎

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,25 +1215,15 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev)
12151215
}
12161216

12171217
/**
1218-
* ata_scsi_change_queue_depth - SCSI callback for queue depth config
1219-
* @sdev: SCSI device to configure queue depth for
1220-
* @queue_depth: new queue depth
1221-
* @reason: calling context
1222-
*
1223-
* This is libata standard hostt->change_queue_depth callback.
1224-
* SCSI will call into this callback when user tries to set queue
1225-
* depth via sysfs.
1218+
* __ata_change_queue_depth - helper for ata_scsi_change_queue_depth
12261219
*
1227-
* LOCKING:
1228-
* SCSI layer (we don't care)
1220+
* libsas and libata have different approaches for associating a sdev to
1221+
* its ata_port.
12291222
*
1230-
* RETURNS:
1231-
* Newly configured queue depth.
12321223
*/
1233-
int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
1234-
int reason)
1224+
int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
1225+
int queue_depth, int reason)
12351226
{
1236-
struct ata_port *ap = ata_shost_to_port(sdev->host);
12371227
struct ata_device *dev;
12381228
unsigned long flags;
12391229

@@ -1268,6 +1258,30 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
12681258
return queue_depth;
12691259
}
12701260

1261+
/**
1262+
* ata_scsi_change_queue_depth - SCSI callback for queue depth config
1263+
* @sdev: SCSI device to configure queue depth for
1264+
* @queue_depth: new queue depth
1265+
* @reason: calling context
1266+
*
1267+
* This is libata standard hostt->change_queue_depth callback.
1268+
* SCSI will call into this callback when user tries to set queue
1269+
* depth via sysfs.
1270+
*
1271+
* LOCKING:
1272+
* SCSI layer (we don't care)
1273+
*
1274+
* RETURNS:
1275+
* Newly configured queue depth.
1276+
*/
1277+
int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
1278+
int reason)
1279+
{
1280+
struct ata_port *ap = ata_shost_to_port(sdev->host);
1281+
1282+
return __ata_change_queue_depth(ap, sdev, queue_depth, reason);
1283+
}
1284+
12711285
/**
12721286
* ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
12731287
* @qc: Storage for translated ATA taskfile

0 commit comments

Comments
 (0)