aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hosts.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 14:35:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 14:35:37 -0400
commitf5bcf5f44796bf30a058a01c10a61b19784f0540 (patch)
tree1c78ecbb2a21f880a1508dc2fcbbcc4b169f43f3 /drivers/scsi/hosts.c
parentdefe9104833b5ad309447bbc1fcb8e5981b2d3e1 (diff)
parent129dd98194747a3b8ac1ff876d8d1f2440660d01 (diff)
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: (38 commits) fusion: mptsas, fix lock imbalance [SCSI] scsi_transport_fc: replace BUS_ID_SIZE by fixed count sd, sr: fix Driver 'sd' needs updating message scsi_transport_iscsi: return -EOVERFLOW for Too many iscsi targets fc_transport: Selective return value from BSG timeout function fc_transport: The softirq_done function registration for BSG request sym53c8xx: ratelimit parity errors explain the hidden scsi_wait_scan Kconfig variable ibmvfc: Fix endless PRLI loop in discovery ibmvfc: Process async events before command responses libfc: Add runtime debugging with debug_logging module parameter libfcoe: Add runtime debugging with module param debug_logging fcoe: Add runtime debug logging with module parameter debug_logging scsi_debug: Add support for physical block exponent and alignment cnic: add NETDEV_1000 and NETDEVICES to Kconfig select cnic: Fix __symbol_get() build error. Revert "[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’" ipr: differentiate pci-x and pci-e based adapters ipr: add test for MSI interrupt support scsi_transport_spi: Blacklist Ultrium-3 tape for IU transfers ...
Diffstat (limited to 'drivers/scsi/hosts.c')
-rw-r--r--drivers/scsi/hosts.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 89d41a424b33..5fd2da494d08 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -40,7 +40,7 @@
40#include "scsi_logging.h" 40#include "scsi_logging.h"
41 41
42 42
43static int scsi_host_next_hn; /* host_no for next new host */ 43static atomic_t scsi_host_next_hn; /* host_no for next new host */
44 44
45 45
46static void scsi_host_cls_release(struct device *dev) 46static void scsi_host_cls_release(struct device *dev)
@@ -333,7 +333,11 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
333 333
334 mutex_init(&shost->scan_mutex); 334 mutex_init(&shost->scan_mutex);
335 335
336 shost->host_no = scsi_host_next_hn++; /* XXX(hch): still racy */ 336 /*
337 * subtract one because we increment first then return, but we need to
338 * know what the next host number was before increment
339 */
340 shost->host_no = atomic_inc_return(&scsi_host_next_hn) - 1;
337 shost->dma_channel = 0xff; 341 shost->dma_channel = 0xff;
338 342
339 /* These three are default values which can be overridden */ 343 /* These three are default values which can be overridden */