diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 16:30:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 16:30:44 -0400 |
commit | 4f7a307dc6e4d8bfeb56f7cf7231b08cb845687c (patch) | |
tree | 3bf90522c87fcb32373cb2a5ff25b1ead33405f5 /drivers/scsi/scsi_transport_iscsi.c | |
parent | fabb5c4e4a474ff0f7d6c1d3466a1b79bbce5f49 (diff) | |
parent | 7297824581755593535fc97d2c8b6c47e2dc2db6 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (87 commits)
[SCSI] fusion: fix domain validation loops
[SCSI] qla2xxx: fix regression on sparc64
[SCSI] modalias for scsi devices
[SCSI] sg: cap reserved_size values at max_sectors
[SCSI] BusLogic: stop using check_region
[SCSI] tgt: fix rdma transfer bugs
[SCSI] aacraid: fix aacraid not finding device
[SCSI] aacraid: Correct SMC products in aacraid.txt
[SCSI] scsi_error.c: Add EH Start Unit retry
[SCSI] aacraid: [Fastboot] Panics for AACRAID driver during 'insmod' for kexec test.
[SCSI] ipr: Driver version to 2.3.2
[SCSI] ipr: Faster sg list fetch
[SCSI] ipr: Return better qc_issue errors
[SCSI] ipr: Disrupt device error
[SCSI] ipr: Improve async error logging level control
[SCSI] ipr: PCI unblock config access fix
[SCSI] ipr: Fix for oops following SATA request sense
[SCSI] ipr: Log error for SAS dual path switch
[SCSI] ipr: Enable logging of debug error data for all devices
[SCSI] ipr: Add new PCI-E IDs to device table
...
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index aabaa0576ab4..caf1836bbeca 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -49,7 +49,7 @@ struct iscsi_internal { | |||
49 | struct class_device_attribute *session_attrs[ISCSI_SESSION_ATTRS + 1]; | 49 | struct class_device_attribute *session_attrs[ISCSI_SESSION_ATTRS + 1]; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static int iscsi_session_nr; /* sysfs session id for next new session */ | 52 | static atomic_t iscsi_session_nr; /* sysfs session id for next new session */ |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * list of registered transports and lock that must | 55 | * list of registered transports and lock that must |
@@ -300,7 +300,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id) | |||
300 | int err; | 300 | int err; |
301 | 301 | ||
302 | ihost = shost->shost_data; | 302 | ihost = shost->shost_data; |
303 | session->sid = iscsi_session_nr++; | 303 | session->sid = atomic_add_return(1, &iscsi_session_nr); |
304 | session->target_id = target_id; | 304 | session->target_id = target_id; |
305 | 305 | ||
306 | snprintf(session->dev.bus_id, BUS_ID_SIZE, "session%u", | 306 | snprintf(session->dev.bus_id, BUS_ID_SIZE, "session%u", |
@@ -1419,6 +1419,8 @@ static __init int iscsi_transport_init(void) | |||
1419 | printk(KERN_INFO "Loading iSCSI transport class v%s.\n", | 1419 | printk(KERN_INFO "Loading iSCSI transport class v%s.\n", |
1420 | ISCSI_TRANSPORT_VERSION); | 1420 | ISCSI_TRANSPORT_VERSION); |
1421 | 1421 | ||
1422 | atomic_set(&iscsi_session_nr, 0); | ||
1423 | |||
1422 | err = class_register(&iscsi_transport_class); | 1424 | err = class_register(&iscsi_transport_class); |
1423 | if (err) | 1425 | if (err) |
1424 | return err; | 1426 | return err; |