diff options
author | Christoph Hellwig <hch@lst.de> | 2014-07-14 03:34:54 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-16 12:09:38 -0400 |
commit | ed81d7741eddb690aa9d5c79945123db11ec7a0c (patch) | |
tree | 5682c2c01e65c17be13216d9e6fa991982ba0d25 /drivers/scsi/eata.c | |
parent | 6fe8c1dbefd63ef3988edb745d9eb81fc6d0513c (diff) |
eata: remove driver_lock
port_detect is only called from the module_init routine and thus implicitly
serialized, so remove the driver lock which was held over potentially
sleeping function calls.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
Tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/eata.c')
-rw-r--r-- | drivers/scsi/eata.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 813dd5c998e4..943ad3a19661 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -837,7 +837,6 @@ struct hostdata { | |||
837 | static struct Scsi_Host *sh[MAX_BOARDS]; | 837 | static struct Scsi_Host *sh[MAX_BOARDS]; |
838 | static const char *driver_name = "EATA"; | 838 | static const char *driver_name = "EATA"; |
839 | static char sha[MAX_BOARDS]; | 839 | static char sha[MAX_BOARDS]; |
840 | static DEFINE_SPINLOCK(driver_lock); | ||
841 | 840 | ||
842 | /* Initialize num_boards so that ihdlr can work while detect is in progress */ | 841 | /* Initialize num_boards so that ihdlr can work while detect is in progress */ |
843 | static unsigned int num_boards = MAX_BOARDS; | 842 | static unsigned int num_boards = MAX_BOARDS; |
@@ -1097,8 +1096,6 @@ static int port_detect(unsigned long port_base, unsigned int j, | |||
1097 | goto fail; | 1096 | goto fail; |
1098 | } | 1097 | } |
1099 | 1098 | ||
1100 | spin_lock_irq(&driver_lock); | ||
1101 | |||
1102 | if (do_dma(port_base, 0, READ_CONFIG_PIO)) { | 1099 | if (do_dma(port_base, 0, READ_CONFIG_PIO)) { |
1103 | #if defined(DEBUG_DETECT) | 1100 | #if defined(DEBUG_DETECT) |
1104 | printk("%s: detect, do_dma failed at 0x%03lx.\n", name, | 1101 | printk("%s: detect, do_dma failed at 0x%03lx.\n", name, |
@@ -1264,10 +1261,7 @@ static int port_detect(unsigned long port_base, unsigned int j, | |||
1264 | } | 1261 | } |
1265 | #endif | 1262 | #endif |
1266 | 1263 | ||
1267 | spin_unlock_irq(&driver_lock); | ||
1268 | sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata)); | 1264 | sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata)); |
1269 | spin_lock_irq(&driver_lock); | ||
1270 | |||
1271 | if (shost == NULL) { | 1265 | if (shost == NULL) { |
1272 | printk("%s: unable to register host, detaching.\n", name); | 1266 | printk("%s: unable to register host, detaching.\n", name); |
1273 | goto freedma; | 1267 | goto freedma; |
@@ -1344,8 +1338,6 @@ static int port_detect(unsigned long port_base, unsigned int j, | |||
1344 | else | 1338 | else |
1345 | sprintf(dma_name, "DMA %u", dma_channel); | 1339 | sprintf(dma_name, "DMA %u", dma_channel); |
1346 | 1340 | ||
1347 | spin_unlock_irq(&driver_lock); | ||
1348 | |||
1349 | for (i = 0; i < shost->can_queue; i++) | 1341 | for (i = 0; i < shost->can_queue; i++) |
1350 | ha->cp[i].cp_dma_addr = pci_map_single(ha->pdev, | 1342 | ha->cp[i].cp_dma_addr = pci_map_single(ha->pdev, |
1351 | &ha->cp[i], | 1343 | &ha->cp[i], |
@@ -1438,7 +1430,6 @@ static int port_detect(unsigned long port_base, unsigned int j, | |||
1438 | freeirq: | 1430 | freeirq: |
1439 | free_irq(irq, &sha[j]); | 1431 | free_irq(irq, &sha[j]); |
1440 | freelock: | 1432 | freelock: |
1441 | spin_unlock_irq(&driver_lock); | ||
1442 | release_region(port_base, REGION_SIZE); | 1433 | release_region(port_base, REGION_SIZE); |
1443 | fail: | 1434 | fail: |
1444 | return 0; | 1435 | return 0; |